From 0b21122e290be69af6b2125ae22cefbd8a63a5d3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 3 Sep 2021 04:20:16 +0000 Subject: [PATCH] CodeGen from PR 15904 in Azure/azure-rest-api-specs delete python track1 config (#15904) --- .../2018-04-01/containerinstance/CHANGELOG.md | 16 +- .../2018-04-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 3 +- .../2018-06-01/containerinstance/CHANGELOG.md | 11 +- .../2018-06-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 6 +- .../2018-09-01/containerinstance/CHANGELOG.md | 11 +- .../2018-09-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 6 +- .../2018-10-01/containerinstance/CHANGELOG.md | 14 +- .../2018-10-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 9 +- .../2019-12-01/containerinstance/CHANGELOG.md | 17 +- .../2019-12-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 12 +- .../2020-11-01/containerinstance/CHANGELOG.md | 17 +- .../2020-11-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 12 +- .../2021-03-01/containerinstance/CHANGELOG.md | 2 +- .../2021-03-01/containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 12 +- .../mgmt/2015-10-01/media/CHANGELOG.md | 8 +- .../mgmt/2015-10-01/media/_meta.json | 6 +- .../mgmt/2018-07-01/media/CHANGELOG.md | 16 +- .../mgmt/2018-07-01/media/_meta.json | 6 +- .../mgmt/2018-07-01/media/liveevents.go | 18 +- .../mgmt/2018-07-01/media/liveoutputs.go | 6 +- .../2018-07-01/media/streamingendpoints.go | 18 +- .../mgmt/2020-05-01/media/CHANGELOG.md | 18 +- .../mgmt/2020-05-01/media/_meta.json | 6 +- .../mgmt/2020-05-01/media/liveevents.go | 21 +- .../mgmt/2020-05-01/media/liveoutputs.go | 6 +- .../2020-05-01/media/streamingendpoints.go | 18 +- .../mgmt/2021-05-01/media/CHANGELOG.md | 2 +- .../mgmt/2021-05-01/media/_meta.json | 6 +- .../mgmt/2021-05-01/media/liveevents.go | 21 +- .../mgmt/2021-05-01/media/liveoutputs.go | 6 +- .../2021-05-01/media/streamingendpoints.go | 18 +- .../mgmt/2021-06-01/media/CHANGELOG.md | 2 +- .../mgmt/2021-06-01/media/_meta.json | 6 +- .../mgmt/2021-06-01/media/enums.go | 13 +- .../mgmt/2021-06-01/media/liveevents.go | 21 +- .../mgmt/2021-06-01/media/liveoutputs.go | 6 +- .../mgmt/2021-06-01/media/models.go | 2 +- .../2021-06-01/media/streamingendpoints.go | 18 +- .../containerinstance/CHANGELOG.md | 2 +- .../containerinstance/_meta.json | 6 +- .../containerinstance/CHANGELOG.md | 8 +- .../containerinstance/_meta.json | 6 +- .../containerinstance/CHANGELOG.md | 11 +- .../containerinstance/_meta.json | 6 +- .../containerinstance/CHANGELOG.md | 11 +- .../containerinstance/_meta.json | 6 +- .../containerinstance/containergroups.go | 3 +- .../2018-03-30-preview/media/CHANGELOG.md | 10 +- .../mgmt/2018-03-30-preview/media/_meta.json | 6 +- .../2018-03-30-preview/media/liveevents.go | 18 +- .../2018-03-30-preview/media/liveoutputs.go | 6 +- .../media/streamingendpoints.go | 18 +- .../2018-06-01-preview/media/CHANGELOG.md | 10 +- .../mgmt/2018-06-01-preview/media/_meta.json | 6 +- .../2018-06-01-preview/media/liveevents.go | 18 +- .../2018-06-01-preview/media/liveoutputs.go | 6 +- .../media/streamingendpoints.go | 18 +- .../2019-05-01-preview/media/CHANGELOG.md | 16 +- .../mgmt/2019-05-01-preview/media/_meta.json | 6 +- .../2019-05-01-preview/media/liveevents.go | 18 +- .../2019-05-01-preview/media/liveoutputs.go | 6 +- .../mgmt/2019-05-01-preview/media/models.go | 2 +- .../media/streamingendpoints.go | 18 +- .../security/mgmt/v1.0/security/CHANGELOG.md | 247 +- .../security/mgmt/v1.0/security/_meta.json | 6 +- .../security/adaptivenetworkhardenings.go | 3 +- .../security/mgmt/v1.0/security/enums.go | 127 +- .../mgmt/v1.0/security/ingestionsettings.go | 555 ++++ .../security/mgmt/v1.0/security/models.go | 683 +++- .../v1.0/security/securityapi/interfaces.go | 28 +- .../security/mgmt/v1.0/security/settings.go | 10 +- .../mgmt/v1.0/security/softwareinventories.go | 378 +++ .../security/mgmt/v2.0/security/CHANGELOG.md | 251 +- .../security/mgmt/v2.0/security/_meta.json | 6 +- .../security/adaptivenetworkhardenings.go | 3 +- .../security/mgmt/v2.0/security/enums.go | 127 +- .../mgmt/v2.0/security/ingestionsettings.go | 555 ++++ .../security/mgmt/v2.0/security/models.go | 683 +++- .../v2.0/security/securityapi/interfaces.go | 28 +- .../security/mgmt/v2.0/security/settings.go | 10 +- .../mgmt/v2.0/security/softwareinventories.go | 378 +++ .../security/mgmt/v3.0/security/CHANGELOG.md | 676 +++- .../security/mgmt/v3.0/security/_meta.json | 6 +- .../security/adaptivenetworkhardenings.go | 3 +- .../security/mgmt/v3.0/security/alerts.go | 3 +- .../mgmt/v3.0/security/assessments.go | 30 +- .../mgmt/v3.0/security/assessmentsmetadata.go | 81 +- .../security/mgmt/v3.0/security/device.go | 106 - .../mgmt/v3.0/security/devicesforhub.go | 158 - .../v3.0/security/devicesforsubscription.go | 165 - .../security/mgmt/v3.0/security/enums.go | 584 ++-- .../security/mgmt/v3.0/security/iotalerts.go | 251 -- .../mgmt/v3.0/security/iotalerttypes.go | 189 -- .../mgmt/v3.0/security/iotdefendersettings.go | 503 --- .../mgmt/v3.0/security/iotrecommendations.go | 240 -- .../v3.0/security/iotrecommendationtypes.go | 190 -- .../security/mgmt/v3.0/security/iotsensors.go | 556 ---- .../security/mgmt/v3.0/security/iotsites.go | 333 -- .../security/mgmt/v3.0/security/models.go | 2740 +++++------------ .../mgmt/v3.0/security/onpremiseiotsensors.go | 510 --- .../v3.0/security/securityapi/interfaces.go | 122 +- .../security/servervulnerabilityassessment.go | 3 +- .../security/mgmt/v3.0/security/settings.go | 6 +- .../servicefabric/CHANGELOG.md | 7 +- .../servicefabric/_meta.json | 6 +- .../servicefabric/clusters.go | 6 +- .../servicefabric/CHANGELOG.md | 7 +- .../servicefabric/_meta.json | 6 +- .../servicefabric/applications.go | 9 +- .../servicefabric/applicationtypes.go | 3 +- .../servicefabric/applicationtypeversions.go | 6 +- .../servicefabric/clusters.go | 6 +- .../servicefabric/services.go | 9 +- .../servicefabric/CHANGELOG.md | 7 +- .../servicefabric/_meta.json | 6 +- .../servicefabric/applications.go | 9 +- .../servicefabric/applicationtypes.go | 3 +- .../servicefabric/applicationtypeversions.go | 6 +- .../servicefabric/clusters.go | 6 +- .../servicefabric/services.go | 9 +- .../sqlvirtualmachine/CHANGELOG.md | 13 +- .../sqlvirtualmachine/_meta.json | 6 +- .../availabilitygrouplisteners.go | 6 +- .../sqlvirtualmachine/groups.go | 9 +- .../sqlvirtualmachine/sqlvirtualmachines.go | 9 +- .../2020-04-30/redhatopenshift/CHANGELOG.md | 9 +- .../2020-04-30/redhatopenshift/_meta.json | 6 +- .../redhatopenshift/openshiftclusters.go | 27 +- .../2016-09-01/servicefabric/CHANGELOG.md | 7 +- .../mgmt/2016-09-01/servicefabric/_meta.json | 6 +- .../mgmt/2016-09-01/servicefabric/clusters.go | 6 +- .../2019-03-01/servicefabric/CHANGELOG.md | 7 +- .../mgmt/2019-03-01/servicefabric/_meta.json | 6 +- .../2019-03-01/servicefabric/applications.go | 9 +- .../servicefabric/applicationtypes.go | 3 +- .../servicefabric/applicationtypeversions.go | 6 +- .../mgmt/2019-03-01/servicefabric/clusters.go | 6 +- .../mgmt/2019-03-01/servicefabric/services.go | 9 +- .../2021-06-01/servicefabric/CHANGELOG.md | 2 +- .../mgmt/2021-06-01/servicefabric/_meta.json | 2 +- 147 files changed, 6033 insertions(+), 6464 deletions(-) create mode 100644 services/preview/security/mgmt/v1.0/security/ingestionsettings.go create mode 100644 services/preview/security/mgmt/v1.0/security/softwareinventories.go create mode 100644 services/preview/security/mgmt/v2.0/security/ingestionsettings.go create mode 100644 services/preview/security/mgmt/v2.0/security/softwareinventories.go delete mode 100644 services/preview/security/mgmt/v3.0/security/device.go delete mode 100644 services/preview/security/mgmt/v3.0/security/devicesforhub.go delete mode 100644 services/preview/security/mgmt/v3.0/security/devicesforsubscription.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotalerts.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotalerttypes.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotdefendersettings.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotrecommendations.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotrecommendationtypes.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotsensors.go delete mode 100644 services/preview/security/mgmt/v3.0/security/iotsites.go delete mode 100644 services/preview/security/mgmt/v3.0/security/onpremiseiotsensors.go diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2018-04-01/containerinstance/CHANGELOG.md index 628be2d0ab96..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/CHANGELOG.md @@ -1,16 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ContainerExecResponse.MarshalJSON() ([]byte, error) -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerState.MarshalJSON() ([]byte, error) -1. Event.MarshalJSON() ([]byte, error) -1. Logs.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2018-04-01/containerinstance/_meta.json index 7016c9152967..725b1aa35fc8 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2018-04", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go index 389689fd0939..5125a6c58974 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go @@ -67,7 +67,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -101,6 +101,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2018-06-01/containerinstance/CHANGELOG.md index 561c5545ab95..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/CHANGELOG.md @@ -1,11 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2018-06-01/containerinstance/_meta.json index f395b516b294..2a9397484295 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2018-06", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go index 787a75831cdc..aa303cd4ace0 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go @@ -73,7 +73,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -107,6 +107,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -542,7 +543,7 @@ func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupNa result, err = client.RestartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", result.Response(), "Failure sending request") return } @@ -574,6 +575,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ContainerGroupsClient) RestartSender(req *http.Request) (future ContainerGroupsRestartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2018-09-01/containerinstance/CHANGELOG.md index 561c5545ab95..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/CHANGELOG.md @@ -1,11 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2018-09-01/containerinstance/_meta.json index 5b9855a8b854..f01ffe1e6986 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2018-09", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go index e11d4cc0202d..9793ff5f4ca8 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go @@ -73,7 +73,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -107,6 +107,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -542,7 +543,7 @@ func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupNa result, err = client.RestartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", result.Response(), "Failure sending request") return } @@ -574,6 +575,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ContainerGroupsClient) RestartSender(req *http.Request) (future ContainerGroupsRestartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2018-10-01/containerinstance/CHANGELOG.md index e47e07f3ad75..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/CHANGELOG.md @@ -1,14 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. Capabilities.MarshalJSON() ([]byte, error) -1. CapabilitiesCapabilities.MarshalJSON() ([]byte, error) -1. ContainerGroupIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error) -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2018-10-01/containerinstance/_meta.json index 2cf1e829be2e..dfe28e6e4b6b 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2018-10", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-10 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-10 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go index 96bd83af3a1d..5b7bb6e4d797 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go @@ -75,7 +75,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -109,6 +109,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -544,7 +545,7 @@ func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupNa result, err = client.RestartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", result.Response(), "Failure sending request") return } @@ -576,6 +577,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ContainerGroupsClient) RestartSender(req *http.Request) (future ContainerGroupsRestartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -621,7 +623,7 @@ func (client ContainerGroupsClient) Start(ctx context.Context, resourceGroupName result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", result.Response(), "Failure sending request") return } @@ -653,6 +655,7 @@ func (client ContainerGroupsClient) StartPreparer(ctx context.Context, resourceG // http.Response Body if it receives an error. func (client ContainerGroupsClient) StartSender(req *http.Request) (future ContainerGroupsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/containerinstance/mgmt/2019-12-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2019-12-01/containerinstance/CHANGELOG.md index 34c479bd4d34..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2019-12-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2019-12-01/containerinstance/CHANGELOG.md @@ -1,17 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. Capabilities.MarshalJSON() ([]byte, error) -1. CapabilitiesCapabilities.MarshalJSON() ([]byte, error) -1. ContainerGroupIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error) -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerState.MarshalJSON() ([]byte, error) -1. Event.MarshalJSON() ([]byte, error) -1. InitContainerPropertiesDefinitionInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/containerinstance/mgmt/2019-12-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2019-12-01/containerinstance/_meta.json index a8f2c9cfbfcd..322518ba3ca9 100644 --- a/services/containerinstance/mgmt/2019-12-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2019-12-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2019-12", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-12 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-12 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/containerinstance/mgmt/2019-12-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2019-12-01/containerinstance/containergroups.go index 97fea51f49c3..2da0a2cb944c 100644 --- a/services/containerinstance/mgmt/2019-12-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2019-12-01/containerinstance/containergroups.go @@ -80,7 +80,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -114,6 +114,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client ContainerGroupsClient) Delete(ctx context.Context, resourceGroupNam result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", result.Response(), "Failure sending request") return } @@ -193,6 +194,7 @@ func (client ContainerGroupsClient) DeletePreparer(ctx context.Context, resource // http.Response Body if it receives an error. func (client ContainerGroupsClient) DeleteSender(req *http.Request) (future ContainerGroupsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -551,7 +553,7 @@ func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupNa result, err = client.RestartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", result.Response(), "Failure sending request") return } @@ -583,6 +585,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ContainerGroupsClient) RestartSender(req *http.Request) (future ContainerGroupsRestartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -628,7 +631,7 @@ func (client ContainerGroupsClient) Start(ctx context.Context, resourceGroupName result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", result.Response(), "Failure sending request") return } @@ -660,6 +663,7 @@ func (client ContainerGroupsClient) StartPreparer(ctx context.Context, resourceG // http.Response Body if it receives an error. func (client ContainerGroupsClient) StartSender(req *http.Request) (future ContainerGroupsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/containerinstance/mgmt/2020-11-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2020-11-01/containerinstance/CHANGELOG.md index 34c479bd4d34..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2020-11-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2020-11-01/containerinstance/CHANGELOG.md @@ -1,17 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. Capabilities.MarshalJSON() ([]byte, error) -1. CapabilitiesCapabilities.MarshalJSON() ([]byte, error) -1. ContainerGroupIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error) -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerState.MarshalJSON() ([]byte, error) -1. Event.MarshalJSON() ([]byte, error) -1. InitContainerPropertiesDefinitionInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/containerinstance/mgmt/2020-11-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2020-11-01/containerinstance/_meta.json index 8756f8326ed0..8472567a78d4 100644 --- a/services/containerinstance/mgmt/2020-11-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2020-11-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "92ab22b49bd085116af0c61fada2c6c360702e9e", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2020-11", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-11 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-11 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/containerinstance/mgmt/2020-11-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2020-11-01/containerinstance/containergroups.go index 2b0848c8e677..4582ef1c4177 100644 --- a/services/containerinstance/mgmt/2020-11-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2020-11-01/containerinstance/containergroups.go @@ -80,7 +80,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -114,6 +114,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client ContainerGroupsClient) Delete(ctx context.Context, resourceGroupNam result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", result.Response(), "Failure sending request") return } @@ -193,6 +194,7 @@ func (client ContainerGroupsClient) DeletePreparer(ctx context.Context, resource // http.Response Body if it receives an error. func (client ContainerGroupsClient) DeleteSender(req *http.Request) (future ContainerGroupsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -551,7 +553,7 @@ func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupNa result, err = client.RestartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", result.Response(), "Failure sending request") return } @@ -583,6 +585,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ContainerGroupsClient) RestartSender(req *http.Request) (future ContainerGroupsRestartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -628,7 +631,7 @@ func (client ContainerGroupsClient) Start(ctx context.Context, resourceGroupName result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", result.Response(), "Failure sending request") return } @@ -660,6 +663,7 @@ func (client ContainerGroupsClient) StartPreparer(ctx context.Context, resourceG // http.Response Body if it receives an error. func (client ContainerGroupsClient) StartSender(req *http.Request) (future ContainerGroupsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/containerinstance/mgmt/2021-03-01/containerinstance/CHANGELOG.md b/services/containerinstance/mgmt/2021-03-01/containerinstance/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/containerinstance/mgmt/2021-03-01/containerinstance/CHANGELOG.md +++ b/services/containerinstance/mgmt/2021-03-01/containerinstance/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/containerinstance/mgmt/2021-03-01/containerinstance/_meta.json b/services/containerinstance/mgmt/2021-03-01/containerinstance/_meta.json index 08a93d9404fa..62c8f56295f1 100644 --- a/services/containerinstance/mgmt/2021-03-01/containerinstance/_meta.json +++ b/services/containerinstance/mgmt/2021-03-01/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "4e6cea592e12915061beb893134e1a70d7e5c495", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2021-03", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-03 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-03 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } diff --git a/services/containerinstance/mgmt/2021-03-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2021-03-01/containerinstance/containergroups.go index 5d833203351f..24edd5e539a7 100644 --- a/services/containerinstance/mgmt/2021-03-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2021-03-01/containerinstance/containergroups.go @@ -80,7 +80,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -114,6 +114,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client ContainerGroupsClient) Delete(ctx context.Context, resourceGroupNam result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", result.Response(), "Failure sending request") return } @@ -193,6 +194,7 @@ func (client ContainerGroupsClient) DeletePreparer(ctx context.Context, resource // http.Response Body if it receives an error. func (client ContainerGroupsClient) DeleteSender(req *http.Request) (future ContainerGroupsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -551,7 +553,7 @@ func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupNa result, err = client.RestartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", result.Response(), "Failure sending request") return } @@ -583,6 +585,7 @@ func (client ContainerGroupsClient) RestartPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ContainerGroupsClient) RestartSender(req *http.Request) (future ContainerGroupsRestartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -628,7 +631,7 @@ func (client ContainerGroupsClient) Start(ctx context.Context, resourceGroupName result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", result.Response(), "Failure sending request") return } @@ -660,6 +663,7 @@ func (client ContainerGroupsClient) StartPreparer(ctx context.Context, resourceG // http.Response Body if it receives an error. func (client ContainerGroupsClient) StartSender(req *http.Request) (future ContainerGroupsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2015-10-01/media/CHANGELOG.md b/services/mediaservices/mgmt/2015-10-01/media/CHANGELOG.md index fa72975a9186..a1ecf841edb0 100644 --- a/services/mediaservices/mgmt/2015-10-01/media/CHANGELOG.md +++ b/services/mediaservices/mgmt/2015-10-01/media/CHANGELOG.md @@ -1,8 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. OperationListResult.MarshalJSON() ([]byte, error) diff --git a/services/mediaservices/mgmt/2015-10-01/media/_meta.json b/services/mediaservices/mgmt/2015-10-01/media/_meta.json index f2b35b1e8736..3f5d3f189bfe 100644 --- a/services/mediaservices/mgmt/2015-10-01/media/_meta.json +++ b/services/mediaservices/mgmt/2015-10-01/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2015-10", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2015-10 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2015-10 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/mediaservices/mgmt/2018-07-01/media/CHANGELOG.md b/services/mediaservices/mgmt/2018-07-01/media/CHANGELOG.md index ddaa9897da98..a1ecf841edb0 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/CHANGELOG.md +++ b/services/mediaservices/mgmt/2018-07-01/media/CHANGELOG.md @@ -1,16 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. AssetStreamingLocator.MarshalJSON() ([]byte, error) -1. JobError.MarshalJSON() ([]byte, error) -1. JobErrorDetail.MarshalJSON() ([]byte, error) -1. ListStreamingLocatorsResponse.MarshalJSON() ([]byte, error) -1. Metric.MarshalJSON() ([]byte, error) -1. MetricDimension.MarshalJSON() ([]byte, error) -1. MetricProperties.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. ServiceSpecification.MarshalJSON() ([]byte, error) diff --git a/services/mediaservices/mgmt/2018-07-01/media/_meta.json b/services/mediaservices/mgmt/2018-07-01/media/_meta.json index 28f0541a9625..8152cd7033eb 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/_meta.json +++ b/services/mediaservices/mgmt/2018-07-01/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2018-07", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-07 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-07 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/mediaservices/mgmt/2018-07-01/media/liveevents.go b/services/mediaservices/mgmt/2018-07-01/media/liveevents.go index 7052b2a31381..400b50f5369d 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/liveevents.go +++ b/services/mediaservices/mgmt/2018-07-01/media/liveevents.go @@ -68,7 +68,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -106,6 +106,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -452,7 +454,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -485,6 +487,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -539,7 +542,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -572,6 +575,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -627,7 +631,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go b/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go index 6d41e8ac066c..1923fa90a093 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go +++ b/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -170,7 +171,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -204,6 +205,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go b/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go index 4a174813f8c1..d62aaead79b4 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go +++ b/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go @@ -69,7 +69,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -107,6 +107,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -162,7 +163,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -195,6 +196,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -454,7 +456,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -489,6 +491,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -543,7 +546,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -576,6 +579,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -630,7 +634,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -663,6 +667,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -718,7 +723,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -753,6 +758,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2020-05-01/media/CHANGELOG.md b/services/mediaservices/mgmt/2020-05-01/media/CHANGELOG.md index ba748df298fb..a1ecf841edb0 100644 --- a/services/mediaservices/mgmt/2020-05-01/media/CHANGELOG.md +++ b/services/mediaservices/mgmt/2020-05-01/media/CHANGELOG.md @@ -1,18 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. AssetStreamingLocator.MarshalJSON() ([]byte, error) -1. AzureEntityResource.MarshalJSON() ([]byte, error) -1. JobError.MarshalJSON() ([]byte, error) -1. JobErrorDetail.MarshalJSON() ([]byte, error) -1. ListStreamingLocatorsResponse.MarshalJSON() ([]byte, error) -1. LogSpecification.MarshalJSON() ([]byte, error) -1. MetricDimension.MarshalJSON() ([]byte, error) -1. PrivateEndpoint.MarshalJSON() ([]byte, error) -1. Properties.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. ServiceSpecification.MarshalJSON() ([]byte, error) diff --git a/services/mediaservices/mgmt/2020-05-01/media/_meta.json b/services/mediaservices/mgmt/2020-05-01/media/_meta.json index 0077ba3f3fd0..d8403227e331 100644 --- a/services/mediaservices/mgmt/2020-05-01/media/_meta.json +++ b/services/mediaservices/mgmt/2020-05-01/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "92ab22b49bd085116af0c61fada2c6c360702e9e", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2020-05", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/mediaservices/mgmt/2020-05-01/media/liveevents.go b/services/mediaservices/mgmt/2020-05-01/media/liveevents.go index e4e9cd28b55d..7c83c5c46a53 100644 --- a/services/mediaservices/mgmt/2020-05-01/media/liveevents.go +++ b/services/mediaservices/mgmt/2020-05-01/media/liveevents.go @@ -63,7 +63,7 @@ func (client LiveEventsClient) Allocate(ctx context.Context, resourceGroupName s result, err = client.AllocateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Allocate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Allocate", result.Response(), "Failure sending request") return } @@ -96,6 +96,7 @@ func (client LiveEventsClient) AllocatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client LiveEventsClient) AllocateSender(req *http.Request) (future LiveEventsAllocateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -155,7 +156,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -249,7 +251,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -282,6 +284,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -542,7 +545,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -575,6 +578,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -629,7 +633,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -807,7 +813,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -843,6 +849,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2020-05-01/media/liveoutputs.go b/services/mediaservices/mgmt/2020-05-01/media/liveoutputs.go index 694cd986002f..0e166d912084 100644 --- a/services/mediaservices/mgmt/2020-05-01/media/liveoutputs.go +++ b/services/mediaservices/mgmt/2020-05-01/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -170,7 +171,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -204,6 +205,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2020-05-01/media/streamingendpoints.go b/services/mediaservices/mgmt/2020-05-01/media/streamingendpoints.go index 38c17ca72803..0cf3e4529543 100644 --- a/services/mediaservices/mgmt/2020-05-01/media/streamingendpoints.go +++ b/services/mediaservices/mgmt/2020-05-01/media/streamingendpoints.go @@ -69,7 +69,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -108,6 +108,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -163,7 +164,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -196,6 +197,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -455,7 +457,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -490,6 +492,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -544,7 +547,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -577,6 +580,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -631,7 +635,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -664,6 +668,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -719,7 +724,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -755,6 +760,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2021-05-01/media/CHANGELOG.md b/services/mediaservices/mgmt/2021-05-01/media/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/mediaservices/mgmt/2021-05-01/media/CHANGELOG.md +++ b/services/mediaservices/mgmt/2021-05-01/media/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/mediaservices/mgmt/2021-05-01/media/_meta.json b/services/mediaservices/mgmt/2021-05-01/media/_meta.json index 0c219d913932..00bb97876559 100644 --- a/services/mediaservices/mgmt/2021-05-01/media/_meta.json +++ b/services/mediaservices/mgmt/2021-05-01/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "e6ee3d4f6a29f081eddada399bd1cb373133af02", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2021-05", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } diff --git a/services/mediaservices/mgmt/2021-05-01/media/liveevents.go b/services/mediaservices/mgmt/2021-05-01/media/liveevents.go index e4e9cd28b55d..7c83c5c46a53 100644 --- a/services/mediaservices/mgmt/2021-05-01/media/liveevents.go +++ b/services/mediaservices/mgmt/2021-05-01/media/liveevents.go @@ -63,7 +63,7 @@ func (client LiveEventsClient) Allocate(ctx context.Context, resourceGroupName s result, err = client.AllocateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Allocate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Allocate", result.Response(), "Failure sending request") return } @@ -96,6 +96,7 @@ func (client LiveEventsClient) AllocatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client LiveEventsClient) AllocateSender(req *http.Request) (future LiveEventsAllocateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -155,7 +156,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -249,7 +251,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -282,6 +284,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -542,7 +545,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -575,6 +578,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -629,7 +633,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -807,7 +813,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -843,6 +849,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2021-05-01/media/liveoutputs.go b/services/mediaservices/mgmt/2021-05-01/media/liveoutputs.go index 694cd986002f..0e166d912084 100644 --- a/services/mediaservices/mgmt/2021-05-01/media/liveoutputs.go +++ b/services/mediaservices/mgmt/2021-05-01/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -170,7 +171,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -204,6 +205,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2021-05-01/media/streamingendpoints.go b/services/mediaservices/mgmt/2021-05-01/media/streamingendpoints.go index 38c17ca72803..0cf3e4529543 100644 --- a/services/mediaservices/mgmt/2021-05-01/media/streamingendpoints.go +++ b/services/mediaservices/mgmt/2021-05-01/media/streamingendpoints.go @@ -69,7 +69,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -108,6 +108,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -163,7 +164,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -196,6 +197,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -455,7 +457,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -490,6 +492,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -544,7 +547,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -577,6 +580,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -631,7 +635,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -664,6 +668,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -719,7 +724,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -755,6 +760,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2021-06-01/media/CHANGELOG.md b/services/mediaservices/mgmt/2021-06-01/media/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/CHANGELOG.md +++ b/services/mediaservices/mgmt/2021-06-01/media/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/mediaservices/mgmt/2021-06-01/media/_meta.json b/services/mediaservices/mgmt/2021-06-01/media/_meta.json index 01425b7beb6f..06a773d158fa 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/_meta.json +++ b/services/mediaservices/mgmt/2021-06-01/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "e3980786418c280ecd7ed2e141407ed0f63cd493", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2021-06", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } diff --git a/services/mediaservices/mgmt/2021-06-01/media/enums.go b/services/mediaservices/mgmt/2021-06-01/media/enums.go index 4860c291a6ea..24e42e6bc894 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/enums.go +++ b/services/mediaservices/mgmt/2021-06-01/media/enums.go @@ -778,13 +778,16 @@ func PossibleJobStateValues() []JobState { type LiveEventEncodingType string const ( - // LiveEventEncodingTypeNone A contribution live encoder sends a multiple bitrate stream. The ingested - // stream passes through the live event without any further processing. It is also called the pass-through - // mode. + // LiveEventEncodingTypeNone This is the same as PassthroughStandard, please see description below. This + // enumeration value is being deprecated. LiveEventEncodingTypeNone LiveEventEncodingType = "None" - // LiveEventEncodingTypePassthroughBasic Pending update... + // LiveEventEncodingTypePassthroughBasic The ingested stream passes through the live event from the + // contribution encoder without any further processing. In the PassthroughBasic mode, ingestion is limited + // to up to 5Mbps and only 1 concurrent live output is allowed. Live transcription is not available. LiveEventEncodingTypePassthroughBasic LiveEventEncodingType = "PassthroughBasic" - // LiveEventEncodingTypePassthroughStandard Pending update... + // LiveEventEncodingTypePassthroughStandard The ingested stream passes through the live event from the + // contribution encoder without any further processing. Live transcription is available. Ingestion bitrate + // limits are much higher and up to 3 concurrent live outputs are allowed. LiveEventEncodingTypePassthroughStandard LiveEventEncodingType = "PassthroughStandard" // LiveEventEncodingTypePremium1080p A contribution live encoder sends a single bitrate stream to the live // event and Media Services creates multiple bitrate streams. The output cannot exceed 1080p in resolution. diff --git a/services/mediaservices/mgmt/2021-06-01/media/liveevents.go b/services/mediaservices/mgmt/2021-06-01/media/liveevents.go index 6be199dc8e41..c89ee426c5cc 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/liveevents.go +++ b/services/mediaservices/mgmt/2021-06-01/media/liveevents.go @@ -63,7 +63,7 @@ func (client LiveEventsClient) Allocate(ctx context.Context, resourceGroupName s result, err = client.AllocateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Allocate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Allocate", result.Response(), "Failure sending request") return } @@ -96,6 +96,7 @@ func (client LiveEventsClient) AllocatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client LiveEventsClient) AllocateSender(req *http.Request) (future LiveEventsAllocateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -155,7 +156,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -249,7 +251,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -282,6 +284,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -542,7 +545,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -575,6 +578,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -629,7 +633,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -807,7 +813,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -843,6 +849,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2021-06-01/media/liveoutputs.go b/services/mediaservices/mgmt/2021-06-01/media/liveoutputs.go index bb19db859f28..0cf44ea49eb4 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/liveoutputs.go +++ b/services/mediaservices/mgmt/2021-06-01/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -111,6 +111,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -171,7 +172,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -205,6 +206,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/mediaservices/mgmt/2021-06-01/media/models.go b/services/mediaservices/mgmt/2021-06-01/media/models.go index 92b17de2d88d..65494d04c8e6 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/models.go +++ b/services/mediaservices/mgmt/2021-06-01/media/models.go @@ -7798,7 +7798,7 @@ type LiveEventActionInput struct { // LiveEventEncoding specifies the live event type and optional encoding settings for encoding live events. type LiveEventEncoding struct { - // EncodingType - Live event type. When encodingType is set to None, the service simply passes through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot be modified after the live event is created. Possible values include: 'LiveEventEncodingTypeNone', 'LiveEventEncodingTypeStandard', 'LiveEventEncodingTypePremium1080p', 'LiveEventEncodingTypePassthroughBasic', 'LiveEventEncodingTypePassthroughStandard' + // EncodingType - Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot be modified after the live event is created. Possible values include: 'LiveEventEncodingTypeNone', 'LiveEventEncodingTypeStandard', 'LiveEventEncodingTypePremium1080p', 'LiveEventEncodingTypePassthroughBasic', 'LiveEventEncodingTypePassthroughStandard' EncodingType LiveEventEncodingType `json:"encodingType,omitempty"` // PresetName - The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot be updated. If the encodingType is set to Standard, then the default preset name is ‘Default720p’. Else if the encodingType is set to Premium1080p, the default preset is ‘Default1080p’. PresetName *string `json:"presetName,omitempty"` diff --git a/services/mediaservices/mgmt/2021-06-01/media/streamingendpoints.go b/services/mediaservices/mgmt/2021-06-01/media/streamingendpoints.go index 0c30dfe31c95..959f067ea66e 100644 --- a/services/mediaservices/mgmt/2021-06-01/media/streamingendpoints.go +++ b/services/mediaservices/mgmt/2021-06-01/media/streamingendpoints.go @@ -69,7 +69,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -108,6 +108,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -163,7 +164,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -196,6 +197,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -455,7 +457,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -490,6 +492,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -544,7 +547,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -577,6 +580,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -631,7 +635,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -664,6 +668,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -719,7 +724,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -755,6 +760,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/CHANGELOG.md b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/CHANGELOG.md +++ b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/_meta.json b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/_meta.json index 0bda477bc4cb..9bd4674f10e4 100644 --- a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/_meta.json +++ b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2017-08-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2017-08-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-08-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/CHANGELOG.md b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/CHANGELOG.md index d6841f1e1548..a1ecf841edb0 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/CHANGELOG.md +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/CHANGELOG.md @@ -1,8 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/_meta.json b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/_meta.json index 8d947638abc0..0561113bc3e0 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/_meta.json +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2017-10-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2017-10-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-10-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/CHANGELOG.md b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/CHANGELOG.md index 561c5545ab95..a1ecf841edb0 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/CHANGELOG.md +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/CHANGELOG.md @@ -1,11 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/_meta.json b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/_meta.json index 9e7d45972765..63f55db8cb87 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/_meta.json +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2017-12-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2017-12-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-12-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/CHANGELOG.md b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/CHANGELOG.md index 561c5545ab95..a1ecf841edb0 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/CHANGELOG.md +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/CHANGELOG.md @@ -1,11 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ContainerGroupPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. ContainerPropertiesInstanceView.MarshalJSON() ([]byte, error) -1. Usage.MarshalJSON() ([]byte, error) -1. UsageListResult.MarshalJSON() ([]byte, error) -1. UsageName.MarshalJSON() ([]byte, error) diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/_meta.json b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/_meta.json index b369281ab36e..3b599b0bdaa4 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/_meta.json +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "tag": "package-2018-02-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-02-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-02-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go index e513695fb3ff..1596d2a6371e 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go @@ -67,7 +67,7 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -101,6 +101,7 @@ func (client ContainerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (future ContainerGroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/CHANGELOG.md b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/CHANGELOG.md index 072f817e93dc..a1ecf841edb0 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/CHANGELOG.md +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/CHANGELOG.md @@ -1,10 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. JobError.MarshalJSON() ([]byte, error) -1. JobErrorDetail.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/_meta.json b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/_meta.json index c90c8d565bdf..c6fc1e478eb2 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/_meta.json +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2018-03-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go index 2d6477ee3fe0..c702452b30d9 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go @@ -68,7 +68,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -106,6 +106,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -452,7 +454,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -485,6 +487,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -539,7 +542,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -572,6 +575,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -627,7 +631,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go index 47b26eee6a35..bdfdbfdaf53e 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -170,7 +171,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -204,6 +205,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go index 5e32e39da49f..821e431d5794 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go @@ -66,7 +66,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -104,6 +104,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -159,7 +160,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -192,6 +193,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -451,7 +453,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -486,6 +488,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -540,7 +543,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -573,6 +576,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -627,7 +631,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -660,6 +664,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -715,7 +720,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -750,6 +755,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/CHANGELOG.md b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/CHANGELOG.md index 072f817e93dc..a1ecf841edb0 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/CHANGELOG.md +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/CHANGELOG.md @@ -1,10 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. JobError.MarshalJSON() ([]byte, error) -1. JobErrorDetail.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/_meta.json b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/_meta.json index b7b010a4b8da..c24739d62240 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/_meta.json +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2018-06-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-06-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-06-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go index 4c408480af94..0264c23d2b8b 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go @@ -68,7 +68,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -106,6 +106,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -452,7 +454,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -485,6 +487,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -539,7 +542,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -572,6 +575,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -627,7 +631,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go index d285a27907cf..c2997463fe4f 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -170,7 +171,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -204,6 +205,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go index 9577a97d1d5d..03cd99e63f61 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go @@ -66,7 +66,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -104,6 +104,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -159,7 +160,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -192,6 +193,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -451,7 +453,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -486,6 +488,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -540,7 +543,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -573,6 +576,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -627,7 +631,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -660,6 +664,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -715,7 +720,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -750,6 +755,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/CHANGELOG.md b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/CHANGELOG.md index ddaa9897da98..a1ecf841edb0 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/CHANGELOG.md +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/CHANGELOG.md @@ -1,16 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. AssetStreamingLocator.MarshalJSON() ([]byte, error) -1. JobError.MarshalJSON() ([]byte, error) -1. JobErrorDetail.MarshalJSON() ([]byte, error) -1. ListStreamingLocatorsResponse.MarshalJSON() ([]byte, error) -1. Metric.MarshalJSON() ([]byte, error) -1. MetricDimension.MarshalJSON() ([]byte, error) -1. MetricProperties.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. ServiceSpecification.MarshalJSON() ([]byte, error) diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/_meta.json b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/_meta.json index ba13baf6dc9c..91634e5824e4 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/_meta.json +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "tag": "package-2019-05-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-05-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-05-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go index 0149f94634e1..cc2ec249522b 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go @@ -68,7 +68,7 @@ func (client LiveEventsClient) Create(ctx context.Context, resourceGroupName str result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Create", result.Response(), "Failure sending request") return } @@ -106,6 +106,7 @@ func (client LiveEventsClient) CreatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) CreateSender(req *http.Request) (future LiveEventsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -161,7 +162,7 @@ func (client LiveEventsClient) Delete(ctx context.Context, resourceGroupName str result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Delete", result.Response(), "Failure sending request") return } @@ -194,6 +195,7 @@ func (client LiveEventsClient) DeletePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) DeleteSender(req *http.Request) (future LiveEventsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -452,7 +454,7 @@ func (client LiveEventsClient) Reset(ctx context.Context, resourceGroupName stri result, err = client.ResetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Reset", result.Response(), "Failure sending request") return } @@ -485,6 +487,7 @@ func (client LiveEventsClient) ResetPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) ResetSender(req *http.Request) (future LiveEventsResetFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -539,7 +542,7 @@ func (client LiveEventsClient) Start(ctx context.Context, resourceGroupName stri result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Start", result.Response(), "Failure sending request") return } @@ -572,6 +575,7 @@ func (client LiveEventsClient) StartPreparer(ctx context.Context, resourceGroupN // http.Response Body if it receives an error. func (client LiveEventsClient) StartSender(req *http.Request) (future LiveEventsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -627,7 +631,7 @@ func (client LiveEventsClient) Stop(ctx context.Context, resourceGroupName strin result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Stop", result.Response(), "Failure sending request") return } @@ -662,6 +666,7 @@ func (client LiveEventsClient) StopPreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client LiveEventsClient) StopSender(req *http.Request) (future LiveEventsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -717,7 +722,7 @@ func (client LiveEventsClient) Update(ctx context.Context, resourceGroupName str result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveEventsClient", "Update", result.Response(), "Failure sending request") return } @@ -752,6 +757,7 @@ func (client LiveEventsClient) UpdatePreparer(ctx context.Context, resourceGroup // http.Response Body if it receives an error. func (client LiveEventsClient) UpdateSender(req *http.Request) (future LiveEventsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go index 5c2002388885..1db3d78c50d3 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go @@ -74,7 +74,7 @@ func (client LiveOutputsClient) Create(ctx context.Context, resourceGroupName st result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Create", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client LiveOutputsClient) CreatePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) CreateSender(req *http.Request) (future LiveOutputsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -170,7 +171,7 @@ func (client LiveOutputsClient) Delete(ctx context.Context, resourceGroupName st result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.LiveOutputsClient", "Delete", result.Response(), "Failure sending request") return } @@ -204,6 +205,7 @@ func (client LiveOutputsClient) DeletePreparer(ctx context.Context, resourceGrou // http.Response Body if it receives an error. func (client LiveOutputsClient) DeleteSender(req *http.Request) (future LiveOutputsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/models.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/models.go index 90375a7f63e7..57230dfa8c10 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/models.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/models.go @@ -6637,7 +6637,7 @@ func (future *LiveEventsUpdateFuture) result(client LiveEventsClient) (le LiveEv // LiveEventTranscription describes the transcription tracks in the output of a Live Event, generated using // speech-to-text transcription. type LiveEventTranscription struct { - // Language - Specifies the language (locale) used for speech-to-text transcription � it should match the spoken language in the audio track. The value should be in BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are 'en-US' and 'en-GB'. + // Language - Specifies the language (locale) used for speech-to-text transcription - it should match the spoken language in the audio track. The value should be in BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are 'en-US' and 'en-GB'. Language *string `json:"language,omitempty"` // InputTrackSelection - Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied. InputTrackSelection *[]LiveEventInputTrackSelection `json:"inputTrackSelection,omitempty"` diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go index ac8addab1c48..59ccea702267 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go @@ -69,7 +69,7 @@ func (client StreamingEndpointsClient) Create(ctx context.Context, resourceGroup result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Create", result.Response(), "Failure sending request") return } @@ -107,6 +107,7 @@ func (client StreamingEndpointsClient) CreatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) CreateSender(req *http.Request) (future StreamingEndpointsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -162,7 +163,7 @@ func (client StreamingEndpointsClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -195,6 +196,7 @@ func (client StreamingEndpointsClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) DeleteSender(req *http.Request) (future StreamingEndpointsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -454,7 +456,7 @@ func (client StreamingEndpointsClient) Scale(ctx context.Context, resourceGroupN result, err = client.ScaleSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Scale", result.Response(), "Failure sending request") return } @@ -489,6 +491,7 @@ func (client StreamingEndpointsClient) ScalePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) ScaleSender(req *http.Request) (future StreamingEndpointsScaleFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -543,7 +546,7 @@ func (client StreamingEndpointsClient) Start(ctx context.Context, resourceGroupN result, err = client.StartSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Start", result.Response(), "Failure sending request") return } @@ -576,6 +579,7 @@ func (client StreamingEndpointsClient) StartPreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StartSender(req *http.Request) (future StreamingEndpointsStartFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -630,7 +634,7 @@ func (client StreamingEndpointsClient) Stop(ctx context.Context, resourceGroupNa result, err = client.StopSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Stop", result.Response(), "Failure sending request") return } @@ -663,6 +667,7 @@ func (client StreamingEndpointsClient) StopPreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client StreamingEndpointsClient) StopSender(req *http.Request) (future StreamingEndpointsStopFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -718,7 +723,7 @@ func (client StreamingEndpointsClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "media.StreamingEndpointsClient", "Update", result.Response(), "Failure sending request") return } @@ -753,6 +758,7 @@ func (client StreamingEndpointsClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client StreamingEndpointsClient) UpdateSender(req *http.Request) (future StreamingEndpointsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/security/mgmt/v1.0/security/CHANGELOG.md b/services/preview/security/mgmt/v1.0/security/CHANGELOG.md index 43af44a736b2..2d1d9a161eb5 100644 --- a/services/preview/security/mgmt/v1.0/security/CHANGELOG.md +++ b/services/preview/security/mgmt/v1.0/security/CHANGELOG.md @@ -1,37 +1,220 @@ -# Change History +# Unreleased + +## Breaking Changes + +### Removed Constants + +1. EnforcementMode.Audit +1. EnforcementMode.Enforce +1. EventSource.Alerts +1. EventSource.Assessments +1. EventSource.SecureScoreControls +1. EventSource.SecureScores +1. EventSource.SubAssessments +1. SettingKind.SettingKindAlertSuppressionSetting +1. SettingKind.SettingKindDataExportSetting + +### Removed Funcs + +1. PossibleSettingKindValues() []SettingKind +1. SettingResource.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### Removed Structs + +1. SettingResource + +### Signature Changes + +#### Const Types + +1. KindAAD changed type from KindEnum to KindEnum1 +1. KindATA changed type from KindEnum to KindEnum1 +1. KindCEF changed type from KindEnum to KindEnum1 +1. KindExternalSecuritySolution changed type from KindEnum to KindEnum1 +1. None changed type from EnforcementMode to EndOfSupportStatus + +#### Funcs + +1. SettingsClient.Get + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsClient.GetResponder + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsClient.Update + - Params + - From: context.Context, string, Setting + - To: context.Context, string, BasicSetting + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsClient.UpdatePreparer + - Params + - From: context.Context, string, Setting + - To: context.Context, string, BasicSetting +1. SettingsClient.UpdateResponder + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsListIterator.Value + - Returns + - From: Setting + - To: BasicSetting +1. SettingsListPage.Values + - Returns + - From: []Setting + - To: []BasicSetting + +#### Struct Fields + +1. AadExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. AtaExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. CefExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. DataExportSetting.Kind changed type from SettingKind to KindEnum +1. ExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. Setting.Kind changed type from SettingKind to KindEnum +1. SettingsList.Value changed type from *[]Setting to *[]BasicSetting ## Additive Changes +### New Constants + +1. EndOfSupportStatus.NoLongerSupported +1. EndOfSupportStatus.UpcomingNoLongerSupported +1. EndOfSupportStatus.UpcomingVersionNoLongerSupported +1. EndOfSupportStatus.VersionNoLongerSupported +1. EnforcementMode.EnforcementModeAudit +1. EnforcementMode.EnforcementModeEnforce +1. EnforcementMode.EnforcementModeNone +1. EventSource.EventSourceAlerts +1. EventSource.EventSourceAssessments +1. EventSource.EventSourceRegulatoryComplianceAssessment +1. EventSource.EventSourceRegulatoryComplianceAssessmentSnapshot +1. EventSource.EventSourceSecureScoreControls +1. EventSource.EventSourceSecureScoreControlsSnapshot +1. EventSource.EventSourceSecureScores +1. EventSource.EventSourceSecureScoresSnapshot +1. EventSource.EventSourceSubAssessments +1. KindEnum.KindDataExportSetting +1. KindEnum.KindSetting + ### New Funcs -1. AlertConfidenceReason.MarshalJSON() ([]byte, error) -1. AllowedConnectionsList.MarshalJSON() ([]byte, error) -1. AllowedConnectionsResourceProperties.MarshalJSON() ([]byte, error) -1. AscLocationList.MarshalJSON() ([]byte, error) -1. AzureResourceLink.MarshalJSON() ([]byte, error) -1. CVE.MarshalJSON() ([]byte, error) -1. CVSS.MarshalJSON() ([]byte, error) -1. CloudErrorBody.MarshalJSON() ([]byte, error) -1. ComplianceProperties.MarshalJSON() ([]byte, error) -1. ComplianceSegment.MarshalJSON() ([]byte, error) -1. ConnectableResource.MarshalJSON() ([]byte, error) -1. ConnectedResource.MarshalJSON() ([]byte, error) -1. ContactList.MarshalJSON() ([]byte, error) -1. Location.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. ScoreDetails.MarshalJSON() ([]byte, error) -1. SecureScoreControlDefinitionItemProperties.MarshalJSON() ([]byte, error) -1. SecureScoreControlDefinitionList.MarshalJSON() ([]byte, error) -1. SecureScoreControlList.MarshalJSON() ([]byte, error) -1. SecureScoreControlScore.MarshalJSON() ([]byte, error) -1. SecureScoresList.MarshalJSON() ([]byte, error) -1. SubAssessmentList.MarshalJSON() ([]byte, error) -1. SubAssessmentStatus.MarshalJSON() ([]byte, error) -1. TaskList.MarshalJSON() ([]byte, error) -1. TopologyList.MarshalJSON() ([]byte, error) -1. TopologyResourceProperties.MarshalJSON() ([]byte, error) -1. TopologySingleResource.MarshalJSON() ([]byte, error) -1. TopologySingleResourceChild.MarshalJSON() ([]byte, error) -1. TopologySingleResourceParent.MarshalJSON() ([]byte, error) -1. VendorReference.MarshalJSON() ([]byte, error) +1. *IngestionSettingListIterator.Next() error +1. *IngestionSettingListIterator.NextWithContext(context.Context) error +1. *IngestionSettingListPage.Next() error +1. *IngestionSettingListPage.NextWithContext(context.Context) error +1. *SettingModel.UnmarshalJSON([]byte) error +1. *SettingsList.UnmarshalJSON([]byte) error +1. *Software.UnmarshalJSON([]byte) error +1. *SoftwaresListIterator.Next() error +1. *SoftwaresListIterator.NextWithContext(context.Context) error +1. *SoftwaresListPage.Next() error +1. *SoftwaresListPage.NextWithContext(context.Context) error +1. DataExportSetting.AsBasicSetting() (BasicSetting, bool) +1. DataExportSetting.AsDataExportSetting() (*DataExportSetting, bool) +1. DataExportSetting.AsSetting() (*Setting, bool) +1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) +1. IngestionConnectionString.MarshalJSON() ([]byte, error) +1. IngestionSetting.MarshalJSON() ([]byte, error) +1. IngestionSettingList.IsEmpty() bool +1. IngestionSettingList.MarshalJSON() ([]byte, error) +1. IngestionSettingListIterator.NotDone() bool +1. IngestionSettingListIterator.Response() IngestionSettingList +1. IngestionSettingListIterator.Value() IngestionSetting +1. IngestionSettingListPage.NotDone() bool +1. IngestionSettingListPage.Response() IngestionSettingList +1. IngestionSettingListPage.Values() []IngestionSetting +1. IngestionSettingToken.MarshalJSON() ([]byte, error) +1. IngestionSettingsClient.Create(context.Context, string, IngestionSetting) (IngestionSetting, error) +1. IngestionSettingsClient.CreatePreparer(context.Context, string, IngestionSetting) (*http.Request, error) +1. IngestionSettingsClient.CreateResponder(*http.Response) (IngestionSetting, error) +1. IngestionSettingsClient.CreateSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.Delete(context.Context, string) (autorest.Response, error) +1. IngestionSettingsClient.DeletePreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. IngestionSettingsClient.DeleteSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.Get(context.Context, string) (IngestionSetting, error) +1. IngestionSettingsClient.GetPreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.GetResponder(*http.Response) (IngestionSetting, error) +1. IngestionSettingsClient.GetSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.List(context.Context) (IngestionSettingListPage, error) +1. IngestionSettingsClient.ListComplete(context.Context) (IngestionSettingListIterator, error) +1. IngestionSettingsClient.ListConnectionStrings(context.Context, string) (ConnectionStrings, error) +1. IngestionSettingsClient.ListConnectionStringsPreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.ListConnectionStringsResponder(*http.Response) (ConnectionStrings, error) +1. IngestionSettingsClient.ListConnectionStringsSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.ListPreparer(context.Context) (*http.Request, error) +1. IngestionSettingsClient.ListResponder(*http.Response) (IngestionSettingList, error) +1. IngestionSettingsClient.ListSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.ListTokens(context.Context, string) (IngestionSettingToken, error) +1. IngestionSettingsClient.ListTokensPreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.ListTokensResponder(*http.Response) (IngestionSettingToken, error) +1. IngestionSettingsClient.ListTokensSender(*http.Request) (*http.Response, error) +1. NewIngestionSettingListIterator(IngestionSettingListPage) IngestionSettingListIterator +1. NewIngestionSettingListPage(IngestionSettingList, func(context.Context, IngestionSettingList) (IngestionSettingList, error)) IngestionSettingListPage +1. NewIngestionSettingsClient(string, string) IngestionSettingsClient +1. NewIngestionSettingsClientWithBaseURI(string, string, string) IngestionSettingsClient +1. NewSoftwareInventoriesClient(string, string) SoftwareInventoriesClient +1. NewSoftwareInventoriesClientWithBaseURI(string, string, string) SoftwareInventoriesClient +1. NewSoftwaresListIterator(SoftwaresListPage) SoftwaresListIterator +1. NewSoftwaresListPage(SoftwaresList, func(context.Context, SoftwaresList) (SoftwaresList, error)) SoftwaresListPage +1. PossibleEndOfSupportStatusValues() []EndOfSupportStatus +1. PossibleKindEnum1Values() []KindEnum1 +1. Setting.AsBasicSetting() (BasicSetting, bool) +1. Setting.AsDataExportSetting() (*DataExportSetting, bool) +1. Setting.AsSetting() (*Setting, bool) +1. Software.MarshalJSON() ([]byte, error) +1. SoftwareInventoriesClient.Get(context.Context, string, string, string, string, string) (Software, error) +1. SoftwareInventoriesClient.GetPreparer(context.Context, string, string, string, string, string) (*http.Request, error) +1. SoftwareInventoriesClient.GetResponder(*http.Response) (Software, error) +1. SoftwareInventoriesClient.GetSender(*http.Request) (*http.Response, error) +1. SoftwareInventoriesClient.ListByExtendedResource(context.Context, string, string, string, string) (SoftwaresListPage, error) +1. SoftwareInventoriesClient.ListByExtendedResourceComplete(context.Context, string, string, string, string) (SoftwaresListIterator, error) +1. SoftwareInventoriesClient.ListByExtendedResourcePreparer(context.Context, string, string, string, string) (*http.Request, error) +1. SoftwareInventoriesClient.ListByExtendedResourceResponder(*http.Response) (SoftwaresList, error) +1. SoftwareInventoriesClient.ListByExtendedResourceSender(*http.Request) (*http.Response, error) +1. SoftwareInventoriesClient.ListBySubscription(context.Context) (SoftwaresListPage, error) +1. SoftwareInventoriesClient.ListBySubscriptionComplete(context.Context) (SoftwaresListIterator, error) +1. SoftwareInventoriesClient.ListBySubscriptionPreparer(context.Context) (*http.Request, error) +1. SoftwareInventoriesClient.ListBySubscriptionResponder(*http.Response) (SoftwaresList, error) +1. SoftwareInventoriesClient.ListBySubscriptionSender(*http.Request) (*http.Response, error) +1. SoftwaresList.IsEmpty() bool +1. SoftwaresList.MarshalJSON() ([]byte, error) +1. SoftwaresListIterator.NotDone() bool +1. SoftwaresListIterator.Response() SoftwaresList +1. SoftwaresListIterator.Value() Software +1. SoftwaresListPage.NotDone() bool +1. SoftwaresListPage.Response() SoftwaresList +1. SoftwaresListPage.Values() []Software + +### Struct Changes + +#### New Structs + +1. ConnectionStrings +1. ErrorAdditionalInfo +1. IngestionConnectionString +1. IngestionSetting +1. IngestionSettingList +1. IngestionSettingListIterator +1. IngestionSettingListPage +1. IngestionSettingToken +1. IngestionSettingsClient +1. SettingModel +1. Software +1. SoftwareInventoriesClient +1. SoftwareProperties +1. SoftwaresList +1. SoftwaresListIterator +1. SoftwaresListPage + +#### New Struct Fields + +1. CloudErrorBody.AdditionalInfo +1. CloudErrorBody.Details +1. CloudErrorBody.Target diff --git a/services/preview/security/mgmt/v1.0/security/_meta.json b/services/preview/security/mgmt/v1.0/security/_meta.json index bc78a287be13..c39cea8f33b2 100644 --- a/services/preview/security/mgmt/v1.0/security/_meta.json +++ b/services/preview/security/mgmt/v1.0/security/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/security/resource-manager/readme.md", "tag": "package-composite-v1", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-composite-v1 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/security/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-composite-v1 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/security/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go b/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go index b99edfe1be6f..8ba5351c1e7b 100644 --- a/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go +++ b/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go @@ -72,7 +72,7 @@ func (client AdaptiveNetworkHardeningsClient) Enforce(ctx context.Context, resou result, err = client.EnforceSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsClient", "Enforce", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsClient", "Enforce", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client AdaptiveNetworkHardeningsClient) EnforcePreparer(ctx context.Contex // http.Response Body if it receives an error. func (client AdaptiveNetworkHardeningsClient) EnforceSender(req *http.Request) (future AdaptiveNetworkHardeningsEnforceFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/security/mgmt/v1.0/security/enums.go b/services/preview/security/mgmt/v1.0/security/enums.go index ed5a06ace25a..df2ac4b29bae 100644 --- a/services/preview/security/mgmt/v1.0/security/enums.go +++ b/services/preview/security/mgmt/v1.0/security/enums.go @@ -269,21 +269,42 @@ func PossibleDirectionValues() []Direction { return []Direction{Inbound, Outbound} } +// EndOfSupportStatus enumerates the values for end of support status. +type EndOfSupportStatus string + +const ( + // NoLongerSupported ... + NoLongerSupported EndOfSupportStatus = "noLongerSupported" + // None ... + None EndOfSupportStatus = "None" + // UpcomingNoLongerSupported ... + UpcomingNoLongerSupported EndOfSupportStatus = "upcomingNoLongerSupported" + // UpcomingVersionNoLongerSupported ... + UpcomingVersionNoLongerSupported EndOfSupportStatus = "upcomingVersionNoLongerSupported" + // VersionNoLongerSupported ... + VersionNoLongerSupported EndOfSupportStatus = "versionNoLongerSupported" +) + +// PossibleEndOfSupportStatusValues returns an array of possible values for the EndOfSupportStatus const type. +func PossibleEndOfSupportStatusValues() []EndOfSupportStatus { + return []EndOfSupportStatus{NoLongerSupported, None, UpcomingNoLongerSupported, UpcomingVersionNoLongerSupported, VersionNoLongerSupported} +} + // EnforcementMode enumerates the values for enforcement mode. type EnforcementMode string const ( - // Audit ... - Audit EnforcementMode = "Audit" - // Enforce ... - Enforce EnforcementMode = "Enforce" - // None ... - None EnforcementMode = "None" + // EnforcementModeAudit ... + EnforcementModeAudit EnforcementMode = "Audit" + // EnforcementModeEnforce ... + EnforcementModeEnforce EnforcementMode = "Enforce" + // EnforcementModeNone ... + EnforcementModeNone EnforcementMode = "None" ) // PossibleEnforcementModeValues returns an array of possible values for the EnforcementMode const type. func PossibleEnforcementModeValues() []EnforcementMode { - return []EnforcementMode{Audit, Enforce, None} + return []EnforcementMode{EnforcementModeAudit, EnforcementModeEnforce, EnforcementModeNone} } // EnforcementMode1 enumerates the values for enforcement mode 1. @@ -324,21 +345,29 @@ func PossibleEnforcementSupportValues() []EnforcementSupport { type EventSource string const ( - // Alerts ... - Alerts EventSource = "Alerts" - // Assessments ... - Assessments EventSource = "Assessments" - // SecureScoreControls ... - SecureScoreControls EventSource = "SecureScoreControls" - // SecureScores ... - SecureScores EventSource = "SecureScores" - // SubAssessments ... - SubAssessments EventSource = "SubAssessments" + // EventSourceAlerts ... + EventSourceAlerts EventSource = "Alerts" + // EventSourceAssessments ... + EventSourceAssessments EventSource = "Assessments" + // EventSourceRegulatoryComplianceAssessment ... + EventSourceRegulatoryComplianceAssessment EventSource = "RegulatoryComplianceAssessment" + // EventSourceRegulatoryComplianceAssessmentSnapshot ... + EventSourceRegulatoryComplianceAssessmentSnapshot EventSource = "RegulatoryComplianceAssessmentSnapshot" + // EventSourceSecureScoreControls ... + EventSourceSecureScoreControls EventSource = "SecureScoreControls" + // EventSourceSecureScoreControlsSnapshot ... + EventSourceSecureScoreControlsSnapshot EventSource = "SecureScoreControlsSnapshot" + // EventSourceSecureScores ... + EventSourceSecureScores EventSource = "SecureScores" + // EventSourceSecureScoresSnapshot ... + EventSourceSecureScoresSnapshot EventSource = "SecureScoresSnapshot" + // EventSourceSubAssessments ... + EventSourceSubAssessments EventSource = "SubAssessments" ) // PossibleEventSourceValues returns an array of possible values for the EventSource const type. func PossibleEventSourceValues() []EventSource { - return []EventSource{Alerts, Assessments, SecureScoreControls, SecureScores, SubAssessments} + return []EventSource{EventSourceAlerts, EventSourceAssessments, EventSourceRegulatoryComplianceAssessment, EventSourceRegulatoryComplianceAssessmentSnapshot, EventSourceSecureScoreControls, EventSourceSecureScoreControlsSnapshot, EventSourceSecureScores, EventSourceSecureScoresSnapshot, EventSourceSubAssessments} } // Exe enumerates the values for exe. @@ -490,20 +519,35 @@ func PossibleIssueValues() []Issue { // KindEnum enumerates the values for kind enum. type KindEnum string +const ( + // KindDataExportSetting ... + KindDataExportSetting KindEnum = "DataExportSetting" + // KindSetting ... + KindSetting KindEnum = "Setting" +) + +// PossibleKindEnumValues returns an array of possible values for the KindEnum const type. +func PossibleKindEnumValues() []KindEnum { + return []KindEnum{KindDataExportSetting, KindSetting} +} + +// KindEnum1 enumerates the values for kind enum 1. +type KindEnum1 string + const ( // KindAAD ... - KindAAD KindEnum = "AAD" + KindAAD KindEnum1 = "AAD" // KindATA ... - KindATA KindEnum = "ATA" + KindATA KindEnum1 = "ATA" // KindCEF ... - KindCEF KindEnum = "CEF" + KindCEF KindEnum1 = "CEF" // KindExternalSecuritySolution ... - KindExternalSecuritySolution KindEnum = "ExternalSecuritySolution" + KindExternalSecuritySolution KindEnum1 = "ExternalSecuritySolution" ) -// PossibleKindEnumValues returns an array of possible values for the KindEnum const type. -func PossibleKindEnumValues() []KindEnum { - return []KindEnum{KindAAD, KindATA, KindCEF, KindExternalSecuritySolution} +// PossibleKindEnum1Values returns an array of possible values for the KindEnum1 const type. +func PossibleKindEnum1Values() []KindEnum1 { + return []KindEnum1{KindAAD, KindATA, KindCEF, KindExternalSecuritySolution} } // Msi enumerates the values for msi. @@ -527,23 +571,23 @@ func PossibleMsiValues() []Msi { type Operator string const ( - // Contains ... + // Contains Applies only for non-decimal operands Contains Operator = "Contains" - // EndsWith ... + // EndsWith Applies only for non-decimal operands EndsWith Operator = "EndsWith" - // Equals ... + // Equals Applies for decimal and non-decimal operands Equals Operator = "Equals" - // GreaterThan ... + // GreaterThan Applies only for decimal operands GreaterThan Operator = "GreaterThan" - // GreaterThanOrEqualTo ... + // GreaterThanOrEqualTo Applies only for decimal operands GreaterThanOrEqualTo Operator = "GreaterThanOrEqualTo" - // LesserThan ... + // LesserThan Applies only for decimal operands LesserThan Operator = "LesserThan" - // LesserThanOrEqualTo ... + // LesserThanOrEqualTo Applies only for decimal operands LesserThanOrEqualTo Operator = "LesserThanOrEqualTo" - // NotEquals ... + // NotEquals Applies for decimal and non-decimal operands NotEquals Operator = "NotEquals" - // StartsWith ... + // StartsWith Applies only for non-decimal operands StartsWith Operator = "StartsWith" ) @@ -902,21 +946,6 @@ func PossibleScriptValues() []Script { return []Script{ScriptAudit, ScriptEnforce, ScriptNone} } -// SettingKind enumerates the values for setting kind. -type SettingKind string - -const ( - // SettingKindAlertSuppressionSetting ... - SettingKindAlertSuppressionSetting SettingKind = "AlertSuppressionSetting" - // SettingKindDataExportSetting ... - SettingKindDataExportSetting SettingKind = "DataExportSetting" -) - -// PossibleSettingKindValues returns an array of possible values for the SettingKind const type. -func PossibleSettingKindValues() []SettingKind { - return []SettingKind{SettingKindAlertSuppressionSetting, SettingKindDataExportSetting} -} - // Severity enumerates the values for severity. type Severity string diff --git a/services/preview/security/mgmt/v1.0/security/ingestionsettings.go b/services/preview/security/mgmt/v1.0/security/ingestionsettings.go new file mode 100644 index 000000000000..b5f7ce03a686 --- /dev/null +++ b/services/preview/security/mgmt/v1.0/security/ingestionsettings.go @@ -0,0 +1,555 @@ +package security + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// IngestionSettingsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type IngestionSettingsClient struct { + BaseClient +} + +// NewIngestionSettingsClient creates an instance of the IngestionSettingsClient client. +func NewIngestionSettingsClient(subscriptionID string, ascLocation string) IngestionSettingsClient { + return NewIngestionSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewIngestionSettingsClientWithBaseURI creates an instance of the IngestionSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewIngestionSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IngestionSettingsClient { + return IngestionSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// Create create setting for ingesting security data and logs to correlate with resources associated with the +// subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +// ingestionSetting - ingestion setting object +func (client IngestionSettingsClient) Create(ctx context.Context, ingestionSettingName string, ingestionSetting IngestionSetting) (result IngestionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, ingestionSettingName, ingestionSetting) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Create", resp, "Failure responding to request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client IngestionSettingsClient) CreatePreparer(ctx context.Context, ingestionSettingName string, ingestionSetting IngestionSetting) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", pathParameters), + autorest.WithJSON(ingestionSetting), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) CreateResponder(resp *http.Response) (result IngestionSetting, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the ingestion settings for this subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) Delete(ctx context.Context, ingestionSettingName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IngestionSettingsClient) DeletePreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get settings for ingesting security data and logs to correlate with resources associated with the subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) Get(ctx context.Context, ingestionSettingName string) (result IngestionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IngestionSettingsClient) GetPreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) GetResponder(resp *http.Response) (result IngestionSetting, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List settings for ingesting security data and logs to correlate with resources associated with the subscription. +func (client IngestionSettingsClient) List(ctx context.Context) (result IngestionSettingListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.List") + defer func() { + sc := -1 + if result.isl.Response.Response != nil { + sc = result.isl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.isl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "List", resp, "Failure sending request") + return + } + + result.isl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "List", resp, "Failure responding to request") + return + } + if result.isl.hasNextLink() && result.isl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IngestionSettingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) ListResponder(resp *http.Response) (result IngestionSettingList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client IngestionSettingsClient) listNextResults(ctx context.Context, lastResults IngestionSettingList) (result IngestionSettingList, err error) { + req, err := lastResults.ingestionSettingListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client IngestionSettingsClient) ListComplete(ctx context.Context) (result IngestionSettingListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListConnectionStrings connection strings for ingesting security scan logs and data. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) ListConnectionStrings(ctx context.Context, ingestionSettingName string) (result ConnectionStrings, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.ListConnectionStrings") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "ListConnectionStrings", err.Error()) + } + + req, err := client.ListConnectionStringsPreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListConnectionStrings", nil, "Failure preparing request") + return + } + + resp, err := client.ListConnectionStringsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListConnectionStrings", resp, "Failure sending request") + return + } + + result, err = client.ListConnectionStringsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListConnectionStrings", resp, "Failure responding to request") + return + } + + return +} + +// ListConnectionStringsPreparer prepares the ListConnectionStrings request. +func (client IngestionSettingsClient) ListConnectionStringsPreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listConnectionStrings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStrings, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTokens returns the token that is used for correlating ingested telemetry with the resources in the subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) ListTokens(ctx context.Context, ingestionSettingName string) (result IngestionSettingToken, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.ListTokens") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "ListTokens", err.Error()) + } + + req, err := client.ListTokensPreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListTokens", nil, "Failure preparing request") + return + } + + resp, err := client.ListTokensSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListTokens", resp, "Failure sending request") + return + } + + result, err = client.ListTokensResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListTokens", resp, "Failure responding to request") + return + } + + return +} + +// ListTokensPreparer prepares the ListTokens request. +func (client IngestionSettingsClient) ListTokensPreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listTokens", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListTokensSender sends the ListTokens request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) ListTokensSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListTokensResponder handles the response to the ListTokens request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) ListTokensResponder(resp *http.Response) (result IngestionSettingToken, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/security/mgmt/v1.0/security/models.go b/services/preview/security/mgmt/v1.0/security/models.go index ddd586e71223..30744224f6ab 100644 --- a/services/preview/security/mgmt/v1.0/security/models.go +++ b/services/preview/security/mgmt/v1.0/security/models.go @@ -40,7 +40,7 @@ type AadExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for AadExternalSecuritySolution. @@ -2551,7 +2551,7 @@ func (awg *AppWhitelistingGroup) UnmarshalJSON(body []byte) error { // AppWhitelistingGroupData represents a VM/server group and set of rules that are Recommended by Azure // Security Center to be allowed type AppWhitelistingGroupData struct { - // EnforcementMode - Possible values include: 'Audit', 'Enforce', 'None' + // EnforcementMode - Possible values include: 'EnforcementModeAudit', 'EnforcementModeEnforce', 'EnforcementModeNone' EnforcementMode EnforcementMode `json:"enforcementMode,omitempty"` ProtectionMode *ProtectionMode `json:"protectionMode,omitempty"` // ConfigurationStatus - Possible values include: 'ConfigurationStatus2Configured', 'ConfigurationStatus2NotConfigured', 'ConfigurationStatus2InProgress', 'ConfigurationStatus2Failed', 'ConfigurationStatus2NoStatus' @@ -2788,7 +2788,7 @@ type AtaExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for AtaExternalSecuritySolution. @@ -3662,7 +3662,7 @@ type AutomationScope struct { // - security alerts and security assessments. To learn more about the supported security events data // models schemas - please visit https://aka.ms/ASCAutomationSchemas. type AutomationSource struct { - // EventSource - A valid event source type. Possible values include: 'Assessments', 'SubAssessments', 'Alerts', 'SecureScores', 'SecureScoreControls' + // EventSource - A valid event source type. Possible values include: 'EventSourceAssessments', 'EventSourceSubAssessments', 'EventSourceAlerts', 'EventSourceSecureScores', 'EventSourceSecureScoresSnapshot', 'EventSourceSecureScoreControls', 'EventSourceSecureScoreControlsSnapshot', 'EventSourceRegulatoryComplianceAssessment', 'EventSourceRegulatoryComplianceAssessmentSnapshot' EventSource EventSource `json:"eventSource,omitempty"` // RuleSets - A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical 'or'). RuleSets *[]AutomationRuleSet `json:"ruleSets,omitempty"` @@ -4165,7 +4165,7 @@ type CefExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for CefExternalSecuritySolution. @@ -4326,9 +4326,10 @@ func (csp *CefSolutionProperties) UnmarshalJSON(body []byte) error { return nil } -// CloudError error response structure. +// CloudError common error response for all Azure Resource Manager APIs to return error details for failed +// operations. (This also follows the OData error response format.). type CloudError struct { - // CloudErrorBody - Error data + // CloudErrorBody - The error object. *CloudErrorBody `json:"error,omitempty"` } @@ -4365,12 +4366,18 @@ func (ce *CloudError) UnmarshalJSON(body []byte) error { return nil } -// CloudErrorBody error details. +// CloudErrorBody the error detail. type CloudErrorBody struct { - // Code - READ-ONLY; An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + // Code - READ-ONLY; The error code. Code *string `json:"code,omitempty"` - // Message - READ-ONLY; A message describing the error, intended to be suitable for display in a user interface. + // Message - READ-ONLY; The error message. Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]CloudErrorBody `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` } // MarshalJSON is the custom marshaler for CloudErrorBody. @@ -4690,6 +4697,13 @@ type ConnectedWorkspace struct { ID *string `json:"id,omitempty"` } +// ConnectionStrings connection string for ingesting security data and logs +type ConnectionStrings struct { + autorest.Response `json:"-"` + // Value - Connection strings + Value *[]IngestionConnectionString `json:"value,omitempty"` +} + // ConnectionToIPNotAllowed outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or // ipv6 range in CIDR notation. type ConnectionToIPNotAllowed struct { @@ -5829,18 +5843,19 @@ func (c CVSS) MarshalJSON() ([]byte, error) { type DataExportSetting struct { // DataExportSettingProperties - Data export setting data *DataExportSettingProperties `json:"properties,omitempty"` - // Kind - the kind of the settings string (DataExportSetting). Possible values include: 'SettingKindDataExportSetting', 'SettingKindAlertSuppressionSetting' - Kind SettingKind `json:"kind,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Kind - Possible values include: 'KindSetting', 'KindDataExportSetting' + Kind KindEnum `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for DataExportSetting. func (desVar DataExportSetting) MarshalJSON() ([]byte, error) { + desVar.Kind = KindDataExportSetting objectMap := make(map[string]interface{}) if desVar.DataExportSettingProperties != nil { objectMap["properties"] = desVar.DataExportSettingProperties @@ -5851,6 +5866,21 @@ func (desVar DataExportSetting) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsDataExportSetting is the BasicSetting implementation for DataExportSetting. +func (desVar DataExportSetting) AsDataExportSetting() (*DataExportSetting, bool) { + return &desVar, true +} + +// AsSetting is the BasicSetting implementation for DataExportSetting. +func (desVar DataExportSetting) AsSetting() (*Setting, bool) { + return nil, false +} + +// AsBasicSetting is the BasicSetting implementation for DataExportSetting. +func (desVar DataExportSetting) AsBasicSetting() (BasicSetting, bool) { + return &desVar, true +} + // UnmarshalJSON is the custom unmarshaler for DataExportSetting struct. func (desVar *DataExportSetting) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -5871,7 +5901,7 @@ func (desVar *DataExportSetting) UnmarshalJSON(body []byte) error { } case "kind": if v != nil { - var kind SettingKind + var kind KindEnum err = json.Unmarshal(*v, &kind) if err != nil { return err @@ -6862,6 +6892,20 @@ type EffectiveNetworkSecurityGroups struct { NetworkSecurityGroups *[]string `json:"networkSecurityGroups,omitempty"` } +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ETag entity tag is used for comparing two or more entities from the same requested resource. type ETag struct { // Etag - Entity tag is used for comparing two or more entities from the same requested resource. @@ -6890,7 +6934,7 @@ type ExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } func unmarshalBasicExternalSecuritySolution(body []byte) (BasicExternalSecuritySolution, error) { @@ -8664,6 +8708,222 @@ type InformationType struct { Keywords *[]InformationProtectionKeyword `json:"keywords,omitempty"` } +// IngestionConnectionString connection string for ingesting security data and logs +type IngestionConnectionString struct { + // Location - READ-ONLY; The region where ingested logs and data resides + Location *string `json:"location,omitempty"` + // Value - READ-ONLY; Connection string value + Value *string `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionConnectionString. +func (ics IngestionConnectionString) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// IngestionSetting configures how to correlate scan data and logs with resources associated with the +// subscription. +type IngestionSetting struct { + autorest.Response `json:"-"` + // Properties - Ingestion setting data + Properties interface{} `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionSetting. +func (is IngestionSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if is.Properties != nil { + objectMap["properties"] = is.Properties + } + return json.Marshal(objectMap) +} + +// IngestionSettingList list of ingestion settings +type IngestionSettingList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of ingestion settings + Value *[]IngestionSetting `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI to fetch the next page. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionSettingList. +func (isl IngestionSettingList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// IngestionSettingListIterator provides access to a complete listing of IngestionSetting values. +type IngestionSettingListIterator struct { + i int + page IngestionSettingListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *IngestionSettingListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *IngestionSettingListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IngestionSettingListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter IngestionSettingListIterator) Response() IngestionSettingList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter IngestionSettingListIterator) Value() IngestionSetting { + if !iter.page.NotDone() { + return IngestionSetting{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IngestionSettingListIterator type. +func NewIngestionSettingListIterator(page IngestionSettingListPage) IngestionSettingListIterator { + return IngestionSettingListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (isl IngestionSettingList) IsEmpty() bool { + return isl.Value == nil || len(*isl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (isl IngestionSettingList) hasNextLink() bool { + return isl.NextLink != nil && len(*isl.NextLink) != 0 +} + +// ingestionSettingListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (isl IngestionSettingList) ingestionSettingListPreparer(ctx context.Context) (*http.Request, error) { + if !isl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(isl.NextLink))) +} + +// IngestionSettingListPage contains a page of IngestionSetting values. +type IngestionSettingListPage struct { + fn func(context.Context, IngestionSettingList) (IngestionSettingList, error) + isl IngestionSettingList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *IngestionSettingListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.isl) + if err != nil { + return err + } + page.isl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *IngestionSettingListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IngestionSettingListPage) NotDone() bool { + return !page.isl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IngestionSettingListPage) Response() IngestionSettingList { + return page.isl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IngestionSettingListPage) Values() []IngestionSetting { + if page.isl.IsEmpty() { + return nil + } + return *page.isl.Value +} + +// Creates a new instance of the IngestionSettingListPage type. +func NewIngestionSettingListPage(cur IngestionSettingList, getNextPage func(context.Context, IngestionSettingList) (IngestionSettingList, error)) IngestionSettingListPage { + return IngestionSettingListPage{ + fn: getNextPage, + isl: cur, + } +} + +// IngestionSettingToken configures how to correlate scan data and logs with resources associated with the +// subscription. +type IngestionSettingToken struct { + autorest.Response `json:"-"` + // Token - READ-ONLY; The token is used for correlating security data and logs with the resources in the subscription. + Token *string `json:"token,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionSettingToken. +func (ist IngestionSettingToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // JitNetworkAccessPoliciesList ... type JitNetworkAccessPoliciesList struct { autorest.Response `json:"-"` @@ -13297,11 +13557,17 @@ type ServicePrincipalProperties struct { Secret *string `json:"secret,omitempty"` } -// Setting represents a security setting in Azure Security Center. +// BasicSetting the kind of the security setting +type BasicSetting interface { + AsDataExportSetting() (*DataExportSetting, bool) + AsSetting() (*Setting, bool) +} + +// Setting the kind of the security setting type Setting struct { autorest.Response `json:"-"` - // Kind - the kind of the settings string (DataExportSetting). Possible values include: 'SettingKindDataExportSetting', 'SettingKindAlertSuppressionSetting' - Kind SettingKind `json:"kind,omitempty"` + // Kind - Possible values include: 'KindSetting', 'KindDataExportSetting' + Kind KindEnum `json:"kind,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -13310,8 +13576,46 @@ type Setting struct { Type *string `json:"type,omitempty"` } +func unmarshalBasicSetting(body []byte) (BasicSetting, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindDataExportSetting): + var desVar DataExportSetting + err := json.Unmarshal(body, &desVar) + return desVar, err + default: + var s Setting + err := json.Unmarshal(body, &s) + return s, err + } +} +func unmarshalBasicSettingArray(body []byte) ([]BasicSetting, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sArray := make([]BasicSetting, len(rawMessages)) + + for index, rawMessage := range rawMessages { + s, err := unmarshalBasicSetting(*rawMessage) + if err != nil { + return nil, err + } + sArray[index] = s + } + return sArray, nil +} + // MarshalJSON is the custom marshaler for Setting. func (s Setting) MarshalJSON() ([]byte, error) { + s.Kind = KindSetting objectMap := make(map[string]interface{}) if s.Kind != "" { objectMap["kind"] = s.Kind @@ -13319,32 +13623,43 @@ func (s Setting) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// SettingResource the kind of the security setting -type SettingResource struct { - // Kind - the kind of the settings string (DataExportSetting). Possible values include: 'SettingKindDataExportSetting', 'SettingKindAlertSuppressionSetting' - Kind SettingKind `json:"kind,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` +// AsDataExportSetting is the BasicSetting implementation for Setting. +func (s Setting) AsDataExportSetting() (*DataExportSetting, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for SettingResource. -func (sr SettingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sr.Kind != "" { - objectMap["kind"] = sr.Kind +// AsSetting is the BasicSetting implementation for Setting. +func (s Setting) AsSetting() (*Setting, bool) { + return &s, true +} + +// AsBasicSetting is the BasicSetting implementation for Setting. +func (s Setting) AsBasicSetting() (BasicSetting, bool) { + return &s, true +} + +// SettingModel ... +type SettingModel struct { + autorest.Response `json:"-"` + Value BasicSetting `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SettingModel struct. +func (sm *SettingModel) UnmarshalJSON(body []byte) error { + s, err := unmarshalBasicSetting(body) + if err != nil { + return err } - return json.Marshal(objectMap) + sm.Value = s + + return nil } // SettingsList subscription settings list. type SettingsList struct { autorest.Response `json:"-"` // Value - The settings list. - Value *[]Setting `json:"value,omitempty"` + Value *[]BasicSetting `json:"value,omitempty"` // NextLink - READ-ONLY; The URI to fetch the next page. NextLink *string `json:"nextLink,omitempty"` } @@ -13358,6 +13673,38 @@ func (sl SettingsList) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// UnmarshalJSON is the custom unmarshaler for SettingsList struct. +func (sl *SettingsList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "value": + if v != nil { + value, err := unmarshalBasicSettingArray(*v) + if err != nil { + return err + } + sl.Value = &value + } + case "nextLink": + if v != nil { + var nextLink string + err = json.Unmarshal(*v, &nextLink) + if err != nil { + return err + } + sl.NextLink = &nextLink + } + } + } + + return nil +} + // SettingsListIterator provides access to a complete listing of Setting values. type SettingsListIterator struct { i int @@ -13409,7 +13756,7 @@ func (iter SettingsListIterator) Response() SettingsList { // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SettingsListIterator) Value() Setting { +func (iter SettingsListIterator) Value() BasicSetting { if !iter.page.NotDone() { return Setting{} } @@ -13443,7 +13790,7 @@ func (sl SettingsList) settingsListPreparer(ctx context.Context) (*http.Request, autorest.WithBaseURL(to.String(sl.NextLink))) } -// SettingsListPage contains a page of Setting values. +// SettingsListPage contains a page of BasicSetting values. type SettingsListPage struct { fn func(context.Context, SettingsList) (SettingsList, error) sl SettingsList @@ -13493,7 +13840,7 @@ func (page SettingsListPage) Response() SettingsList { } // Values returns the slice of values for the current page or nil if there are no values. -func (page SettingsListPage) Values() []Setting { +func (page SettingsListPage) Values() []BasicSetting { if page.sl.IsEmpty() { return nil } @@ -13508,6 +13855,268 @@ func NewSettingsListPage(cur SettingsList, getNextPage func(context.Context, Set } } +// Software represents a software data +type Software struct { + autorest.Response `json:"-"` + // SoftwareProperties - Properties of the Software Inventory resource + *SoftwareProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Software. +func (s Software) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.SoftwareProperties != nil { + objectMap["properties"] = s.SoftwareProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Software struct. +func (s *Software) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var softwareProperties SoftwareProperties + err = json.Unmarshal(*v, &softwareProperties) + if err != nil { + return err + } + s.SoftwareProperties = &softwareProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + } + } + + return nil +} + +// SoftwareProperties software Inventory resource properties +type SoftwareProperties struct { + // DeviceID - Unique identifier for the virtual machine in the service. + DeviceID *string `json:"deviceId,omitempty"` + // OsPlatform - Platform of the operating system running on the device. + OsPlatform *string `json:"osPlatform,omitempty"` + // Vendor - Name of the software vendor. + Vendor *string `json:"vendor,omitempty"` + // SoftwareName - Name of the software product. + SoftwareName *string `json:"softwareName,omitempty"` + // Version - Version number of the software product. + Version *string `json:"version,omitempty"` + // EndOfSupportStatus - End of support status. Possible values include: 'None', 'NoLongerSupported', 'VersionNoLongerSupported', 'UpcomingNoLongerSupported', 'UpcomingVersionNoLongerSupported' + EndOfSupportStatus EndOfSupportStatus `json:"endOfSupportStatus,omitempty"` + // EndOfSupportDate - The end of support date in case the product is upcoming end of support. + EndOfSupportDate *string `json:"endOfSupportDate,omitempty"` + // NumberOfKnownVulnerabilities - Number of weaknesses. + NumberOfKnownVulnerabilities *int32 `json:"numberOfKnownVulnerabilities,omitempty"` + // FirstSeenAt - First time that the software was seen in the device. + FirstSeenAt *string `json:"firstSeenAt,omitempty"` +} + +// SoftwaresList represents the software inventory of the virtual machine. +type SoftwaresList struct { + autorest.Response `json:"-"` + Value *[]Software `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI to fetch the next page. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SoftwaresList. +func (sl SoftwaresList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sl.Value != nil { + objectMap["value"] = sl.Value + } + return json.Marshal(objectMap) +} + +// SoftwaresListIterator provides access to a complete listing of Software values. +type SoftwaresListIterator struct { + i int + page SoftwaresListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SoftwaresListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwaresListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SoftwaresListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SoftwaresListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SoftwaresListIterator) Response() SoftwaresList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SoftwaresListIterator) Value() Software { + if !iter.page.NotDone() { + return Software{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SoftwaresListIterator type. +func NewSoftwaresListIterator(page SoftwaresListPage) SoftwaresListIterator { + return SoftwaresListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sl SoftwaresList) IsEmpty() bool { + return sl.Value == nil || len(*sl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sl SoftwaresList) hasNextLink() bool { + return sl.NextLink != nil && len(*sl.NextLink) != 0 +} + +// softwaresListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sl SoftwaresList) softwaresListPreparer(ctx context.Context) (*http.Request, error) { + if !sl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sl.NextLink))) +} + +// SoftwaresListPage contains a page of Software values. +type SoftwaresListPage struct { + fn func(context.Context, SoftwaresList) (SoftwaresList, error) + sl SoftwaresList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SoftwaresListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwaresListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sl) + if err != nil { + return err + } + page.sl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SoftwaresListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SoftwaresListPage) NotDone() bool { + return !page.sl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SoftwaresListPage) Response() SoftwaresList { + return page.sl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SoftwaresListPage) Values() []Software { + if page.sl.IsEmpty() { + return nil + } + return *page.sl.Value +} + +// Creates a new instance of the SoftwaresListPage type. +func NewSoftwaresListPage(cur SoftwaresList, getNextPage func(context.Context, SoftwaresList) (SoftwaresList, error)) SoftwaresListPage { + return SoftwaresListPage{ + fn: getNextPage, + sl: cur, + } +} + // SQLServerVulnerabilityProperties details of the resource that was assessed type SQLServerVulnerabilityProperties struct { // Type - READ-ONLY; The resource type the sub assessment refers to in its resource details diff --git a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go index 0088922aaf64..0f7b0824c728 100644 --- a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go @@ -12,6 +12,17 @@ import ( "github.com/Azure/go-autorest/autorest" ) +// SoftwareInventoriesClientAPI contains the set of methods on the SoftwareInventoriesClient type. +type SoftwareInventoriesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string) (result security.Software, err error) + ListByExtendedResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.SoftwaresListPage, err error) + ListByExtendedResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.SoftwaresListIterator, err error) + ListBySubscription(ctx context.Context) (result security.SoftwaresListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result security.SoftwaresListIterator, err error) +} + +var _ SoftwareInventoriesClientAPI = (*security.SoftwareInventoriesClient)(nil) + // SQLVulnerabilityAssessmentScansClientAPI contains the set of methods on the SQLVulnerabilityAssessmentScansClient type. type SQLVulnerabilityAssessmentScansClientAPI interface { Get(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (result security.Scan, err error) @@ -209,10 +220,10 @@ var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil // SettingsClientAPI contains the set of methods on the SettingsClient type. type SettingsClientAPI interface { - Get(ctx context.Context, settingName string) (result security.Setting, err error) + Get(ctx context.Context, settingName string) (result security.SettingModel, err error) List(ctx context.Context) (result security.SettingsListPage, err error) ListComplete(ctx context.Context) (result security.SettingsListIterator, err error) - Update(ctx context.Context, settingName string, setting security.Setting) (result security.Setting, err error) + Update(ctx context.Context, settingName string, setting security.BasicSetting) (result security.SettingModel, err error) } var _ SettingsClientAPI = (*security.SettingsClient)(nil) @@ -372,3 +383,16 @@ type AlertsSuppressionRulesClientAPI interface { } var _ AlertsSuppressionRulesClientAPI = (*security.AlertsSuppressionRulesClient)(nil) + +// IngestionSettingsClientAPI contains the set of methods on the IngestionSettingsClient type. +type IngestionSettingsClientAPI interface { + Create(ctx context.Context, ingestionSettingName string, ingestionSetting security.IngestionSetting) (result security.IngestionSetting, err error) + Delete(ctx context.Context, ingestionSettingName string) (result autorest.Response, err error) + Get(ctx context.Context, ingestionSettingName string) (result security.IngestionSetting, err error) + List(ctx context.Context) (result security.IngestionSettingListPage, err error) + ListComplete(ctx context.Context) (result security.IngestionSettingListIterator, err error) + ListConnectionStrings(ctx context.Context, ingestionSettingName string) (result security.ConnectionStrings, err error) + ListTokens(ctx context.Context, ingestionSettingName string) (result security.IngestionSettingToken, err error) +} + +var _ IngestionSettingsClientAPI = (*security.IngestionSettingsClient)(nil) diff --git a/services/preview/security/mgmt/v1.0/security/settings.go b/services/preview/security/mgmt/v1.0/security/settings.go index 5d87a8857e37..224ec473bbcf 100644 --- a/services/preview/security/mgmt/v1.0/security/settings.go +++ b/services/preview/security/mgmt/v1.0/security/settings.go @@ -34,7 +34,7 @@ func NewSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLoca // Get settings of different configurations in security center // Parameters: // settingName - name of setting: (MCAS/WDATP) -func (client SettingsClient) Get(ctx context.Context, settingName string) (result Setting, err error) { +func (client SettingsClient) Get(ctx context.Context, settingName string) (result SettingModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Get") defer func() { @@ -101,7 +101,7 @@ func (client SettingsClient) GetSender(req *http.Request) (*http.Response, error // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client SettingsClient) GetResponder(resp *http.Response) (result Setting, err error) { +func (client SettingsClient) GetResponder(resp *http.Response) (result SettingModel, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -234,7 +234,7 @@ func (client SettingsClient) ListComplete(ctx context.Context) (result SettingsL // Parameters: // settingName - name of setting: (MCAS/WDATP) // setting - setting object -func (client SettingsClient) Update(ctx context.Context, settingName string, setting Setting) (result Setting, err error) { +func (client SettingsClient) Update(ctx context.Context, settingName string, setting BasicSetting) (result SettingModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Update") defer func() { @@ -274,7 +274,7 @@ func (client SettingsClient) Update(ctx context.Context, settingName string, set } // UpdatePreparer prepares the Update request. -func (client SettingsClient) UpdatePreparer(ctx context.Context, settingName string, setting Setting) (*http.Request, error) { +func (client SettingsClient) UpdatePreparer(ctx context.Context, settingName string, setting BasicSetting) (*http.Request, error) { pathParameters := map[string]interface{}{ "settingName": autorest.Encode("path", settingName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -303,7 +303,7 @@ func (client SettingsClient) UpdateSender(req *http.Request) (*http.Response, er // UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client SettingsClient) UpdateResponder(resp *http.Response) (result Setting, err error) { +func (client SettingsClient) UpdateResponder(resp *http.Response) (result SettingModel, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), diff --git a/services/preview/security/mgmt/v1.0/security/softwareinventories.go b/services/preview/security/mgmt/v1.0/security/softwareinventories.go new file mode 100644 index 000000000000..d7e3b70fd39a --- /dev/null +++ b/services/preview/security/mgmt/v1.0/security/softwareinventories.go @@ -0,0 +1,378 @@ +package security + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SoftwareInventoriesClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type SoftwareInventoriesClient struct { + BaseClient +} + +// NewSoftwareInventoriesClient creates an instance of the SoftwareInventoriesClient client. +func NewSoftwareInventoriesClient(subscriptionID string, ascLocation string) SoftwareInventoriesClient { + return NewSoftwareInventoriesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewSoftwareInventoriesClientWithBaseURI creates an instance of the SoftwareInventoriesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSoftwareInventoriesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SoftwareInventoriesClient { + return SoftwareInventoriesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// Get gets a single software data of the virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// resourceNamespace - the namespace of the resource. +// resourceType - the type of the resource. +// resourceName - name of the resource. +// softwareName - name of the installed software. +func (client SoftwareInventoriesClient) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string) (result Software, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.SoftwareInventoriesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SoftwareInventoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceNamespace": autorest.Encode("path", resourceNamespace), + "resourceType": autorest.Encode("path", resourceType), + "softwareName": autorest.Encode("path", softwareName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SoftwareInventoriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SoftwareInventoriesClient) GetResponder(resp *http.Response) (result Software, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByExtendedResource gets the software inventory of the virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// resourceNamespace - the namespace of the resource. +// resourceType - the type of the resource. +// resourceName - name of the resource. +func (client SoftwareInventoriesClient) ListByExtendedResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result SoftwaresListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListByExtendedResource") + defer func() { + sc := -1 + if result.sl.Response.Response != nil { + sc = result.sl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.SoftwareInventoriesClient", "ListByExtendedResource", err.Error()) + } + + result.fn = client.listByExtendedResourceNextResults + req, err := client.ListByExtendedResourcePreparer(ctx, resourceGroupName, resourceNamespace, resourceType, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListByExtendedResource", nil, "Failure preparing request") + return + } + + resp, err := client.ListByExtendedResourceSender(req) + if err != nil { + result.sl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListByExtendedResource", resp, "Failure sending request") + return + } + + result.sl, err = client.ListByExtendedResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListByExtendedResource", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByExtendedResourcePreparer prepares the ListByExtendedResource request. +func (client SoftwareInventoriesClient) ListByExtendedResourcePreparer(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceNamespace": autorest.Encode("path", resourceNamespace), + "resourceType": autorest.Encode("path", resourceType), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByExtendedResourceSender sends the ListByExtendedResource request. The method will close the +// http.Response Body if it receives an error. +func (client SoftwareInventoriesClient) ListByExtendedResourceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByExtendedResourceResponder handles the response to the ListByExtendedResource request. The method always +// closes the http.Response Body. +func (client SoftwareInventoriesClient) ListByExtendedResourceResponder(resp *http.Response) (result SoftwaresList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByExtendedResourceNextResults retrieves the next set of results, if any. +func (client SoftwareInventoriesClient) listByExtendedResourceNextResults(ctx context.Context, lastResults SoftwaresList) (result SoftwaresList, err error) { + req, err := lastResults.softwaresListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listByExtendedResourceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByExtendedResourceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listByExtendedResourceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByExtendedResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listByExtendedResourceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByExtendedResourceComplete enumerates all values, automatically crossing page boundaries as required. +func (client SoftwareInventoriesClient) ListByExtendedResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result SoftwaresListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListByExtendedResource") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByExtendedResource(ctx, resourceGroupName, resourceNamespace, resourceType, resourceName) + return +} + +// ListBySubscription gets the software inventory of all virtual machines in the subscriptions. +func (client SoftwareInventoriesClient) ListBySubscription(ctx context.Context) (result SoftwaresListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListBySubscription") + defer func() { + sc := -1 + if result.sl.Response.Response != nil { + sc = result.sl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.SoftwareInventoriesClient", "ListBySubscription", err.Error()) + } + + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.sl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.sl, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client SoftwareInventoriesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/softwareInventories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client SoftwareInventoriesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client SoftwareInventoriesClient) ListBySubscriptionResponder(resp *http.Response) (result SoftwaresList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client SoftwareInventoriesClient) listBySubscriptionNextResults(ctx context.Context, lastResults SoftwaresList) (result SoftwaresList, err error) { + req, err := lastResults.softwaresListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client SoftwareInventoriesClient) ListBySubscriptionComplete(ctx context.Context) (result SoftwaresListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBySubscription(ctx) + return +} diff --git a/services/preview/security/mgmt/v2.0/security/CHANGELOG.md b/services/preview/security/mgmt/v2.0/security/CHANGELOG.md index 0ddd0317ce49..2d1d9a161eb5 100644 --- a/services/preview/security/mgmt/v2.0/security/CHANGELOG.md +++ b/services/preview/security/mgmt/v2.0/security/CHANGELOG.md @@ -1,41 +1,220 @@ -# Change History +# Unreleased + +## Breaking Changes + +### Removed Constants + +1. EnforcementMode.Audit +1. EnforcementMode.Enforce +1. EventSource.Alerts +1. EventSource.Assessments +1. EventSource.SecureScoreControls +1. EventSource.SecureScores +1. EventSource.SubAssessments +1. SettingKind.SettingKindAlertSuppressionSetting +1. SettingKind.SettingKindDataExportSetting + +### Removed Funcs + +1. PossibleSettingKindValues() []SettingKind +1. SettingResource.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### Removed Structs + +1. SettingResource + +### Signature Changes + +#### Const Types + +1. KindAAD changed type from KindEnum to KindEnum1 +1. KindATA changed type from KindEnum to KindEnum1 +1. KindCEF changed type from KindEnum to KindEnum1 +1. KindExternalSecuritySolution changed type from KindEnum to KindEnum1 +1. None changed type from EnforcementMode to EndOfSupportStatus + +#### Funcs + +1. SettingsClient.Get + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsClient.GetResponder + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsClient.Update + - Params + - From: context.Context, string, Setting + - To: context.Context, string, BasicSetting + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsClient.UpdatePreparer + - Params + - From: context.Context, string, Setting + - To: context.Context, string, BasicSetting +1. SettingsClient.UpdateResponder + - Returns + - From: Setting, error + - To: SettingModel, error +1. SettingsListIterator.Value + - Returns + - From: Setting + - To: BasicSetting +1. SettingsListPage.Values + - Returns + - From: []Setting + - To: []BasicSetting + +#### Struct Fields + +1. AadExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. AtaExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. CefExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. DataExportSetting.Kind changed type from SettingKind to KindEnum +1. ExternalSecuritySolution.Kind changed type from KindEnum to KindEnum1 +1. Setting.Kind changed type from SettingKind to KindEnum +1. SettingsList.Value changed type from *[]Setting to *[]BasicSetting ## Additive Changes +### New Constants + +1. EndOfSupportStatus.NoLongerSupported +1. EndOfSupportStatus.UpcomingNoLongerSupported +1. EndOfSupportStatus.UpcomingVersionNoLongerSupported +1. EndOfSupportStatus.VersionNoLongerSupported +1. EnforcementMode.EnforcementModeAudit +1. EnforcementMode.EnforcementModeEnforce +1. EnforcementMode.EnforcementModeNone +1. EventSource.EventSourceAlerts +1. EventSource.EventSourceAssessments +1. EventSource.EventSourceRegulatoryComplianceAssessment +1. EventSource.EventSourceRegulatoryComplianceAssessmentSnapshot +1. EventSource.EventSourceSecureScoreControls +1. EventSource.EventSourceSecureScoreControlsSnapshot +1. EventSource.EventSourceSecureScores +1. EventSource.EventSourceSecureScoresSnapshot +1. EventSource.EventSourceSubAssessments +1. KindEnum.KindDataExportSetting +1. KindEnum.KindSetting + ### New Funcs -1. AlertConfidenceReason.MarshalJSON() ([]byte, error) -1. AllowedConnectionsList.MarshalJSON() ([]byte, error) -1. AllowedConnectionsResourceProperties.MarshalJSON() ([]byte, error) -1. AscLocationList.MarshalJSON() ([]byte, error) -1. AzureResourceLink.MarshalJSON() ([]byte, error) -1. CVE.MarshalJSON() ([]byte, error) -1. CVSS.MarshalJSON() ([]byte, error) -1. CloudErrorBody.MarshalJSON() ([]byte, error) -1. ComplianceProperties.MarshalJSON() ([]byte, error) -1. ComplianceSegment.MarshalJSON() ([]byte, error) -1. ConnectableResource.MarshalJSON() ([]byte, error) -1. ConnectedResource.MarshalJSON() ([]byte, error) -1. ContactList.MarshalJSON() ([]byte, error) -1. IoTSecurityAggregatedAlertProperties.MarshalJSON() ([]byte, error) -1. IoTSecurityAlertedDevice.MarshalJSON() ([]byte, error) -1. IoTSecurityDeviceAlert.MarshalJSON() ([]byte, error) -1. IoTSecurityDeviceRecommendation.MarshalJSON() ([]byte, error) -1. Location.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) -1. ScoreDetails.MarshalJSON() ([]byte, error) -1. SecureScoreControlDefinitionItemProperties.MarshalJSON() ([]byte, error) -1. SecureScoreControlDefinitionList.MarshalJSON() ([]byte, error) -1. SecureScoreControlList.MarshalJSON() ([]byte, error) -1. SecureScoreControlScore.MarshalJSON() ([]byte, error) -1. SecureScoresList.MarshalJSON() ([]byte, error) -1. SubAssessmentList.MarshalJSON() ([]byte, error) -1. SubAssessmentStatus.MarshalJSON() ([]byte, error) -1. TaskList.MarshalJSON() ([]byte, error) -1. TopologyList.MarshalJSON() ([]byte, error) -1. TopologyResourceProperties.MarshalJSON() ([]byte, error) -1. TopologySingleResource.MarshalJSON() ([]byte, error) -1. TopologySingleResourceChild.MarshalJSON() ([]byte, error) -1. TopologySingleResourceParent.MarshalJSON() ([]byte, error) -1. VendorReference.MarshalJSON() ([]byte, error) +1. *IngestionSettingListIterator.Next() error +1. *IngestionSettingListIterator.NextWithContext(context.Context) error +1. *IngestionSettingListPage.Next() error +1. *IngestionSettingListPage.NextWithContext(context.Context) error +1. *SettingModel.UnmarshalJSON([]byte) error +1. *SettingsList.UnmarshalJSON([]byte) error +1. *Software.UnmarshalJSON([]byte) error +1. *SoftwaresListIterator.Next() error +1. *SoftwaresListIterator.NextWithContext(context.Context) error +1. *SoftwaresListPage.Next() error +1. *SoftwaresListPage.NextWithContext(context.Context) error +1. DataExportSetting.AsBasicSetting() (BasicSetting, bool) +1. DataExportSetting.AsDataExportSetting() (*DataExportSetting, bool) +1. DataExportSetting.AsSetting() (*Setting, bool) +1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) +1. IngestionConnectionString.MarshalJSON() ([]byte, error) +1. IngestionSetting.MarshalJSON() ([]byte, error) +1. IngestionSettingList.IsEmpty() bool +1. IngestionSettingList.MarshalJSON() ([]byte, error) +1. IngestionSettingListIterator.NotDone() bool +1. IngestionSettingListIterator.Response() IngestionSettingList +1. IngestionSettingListIterator.Value() IngestionSetting +1. IngestionSettingListPage.NotDone() bool +1. IngestionSettingListPage.Response() IngestionSettingList +1. IngestionSettingListPage.Values() []IngestionSetting +1. IngestionSettingToken.MarshalJSON() ([]byte, error) +1. IngestionSettingsClient.Create(context.Context, string, IngestionSetting) (IngestionSetting, error) +1. IngestionSettingsClient.CreatePreparer(context.Context, string, IngestionSetting) (*http.Request, error) +1. IngestionSettingsClient.CreateResponder(*http.Response) (IngestionSetting, error) +1. IngestionSettingsClient.CreateSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.Delete(context.Context, string) (autorest.Response, error) +1. IngestionSettingsClient.DeletePreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. IngestionSettingsClient.DeleteSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.Get(context.Context, string) (IngestionSetting, error) +1. IngestionSettingsClient.GetPreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.GetResponder(*http.Response) (IngestionSetting, error) +1. IngestionSettingsClient.GetSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.List(context.Context) (IngestionSettingListPage, error) +1. IngestionSettingsClient.ListComplete(context.Context) (IngestionSettingListIterator, error) +1. IngestionSettingsClient.ListConnectionStrings(context.Context, string) (ConnectionStrings, error) +1. IngestionSettingsClient.ListConnectionStringsPreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.ListConnectionStringsResponder(*http.Response) (ConnectionStrings, error) +1. IngestionSettingsClient.ListConnectionStringsSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.ListPreparer(context.Context) (*http.Request, error) +1. IngestionSettingsClient.ListResponder(*http.Response) (IngestionSettingList, error) +1. IngestionSettingsClient.ListSender(*http.Request) (*http.Response, error) +1. IngestionSettingsClient.ListTokens(context.Context, string) (IngestionSettingToken, error) +1. IngestionSettingsClient.ListTokensPreparer(context.Context, string) (*http.Request, error) +1. IngestionSettingsClient.ListTokensResponder(*http.Response) (IngestionSettingToken, error) +1. IngestionSettingsClient.ListTokensSender(*http.Request) (*http.Response, error) +1. NewIngestionSettingListIterator(IngestionSettingListPage) IngestionSettingListIterator +1. NewIngestionSettingListPage(IngestionSettingList, func(context.Context, IngestionSettingList) (IngestionSettingList, error)) IngestionSettingListPage +1. NewIngestionSettingsClient(string, string) IngestionSettingsClient +1. NewIngestionSettingsClientWithBaseURI(string, string, string) IngestionSettingsClient +1. NewSoftwareInventoriesClient(string, string) SoftwareInventoriesClient +1. NewSoftwareInventoriesClientWithBaseURI(string, string, string) SoftwareInventoriesClient +1. NewSoftwaresListIterator(SoftwaresListPage) SoftwaresListIterator +1. NewSoftwaresListPage(SoftwaresList, func(context.Context, SoftwaresList) (SoftwaresList, error)) SoftwaresListPage +1. PossibleEndOfSupportStatusValues() []EndOfSupportStatus +1. PossibleKindEnum1Values() []KindEnum1 +1. Setting.AsBasicSetting() (BasicSetting, bool) +1. Setting.AsDataExportSetting() (*DataExportSetting, bool) +1. Setting.AsSetting() (*Setting, bool) +1. Software.MarshalJSON() ([]byte, error) +1. SoftwareInventoriesClient.Get(context.Context, string, string, string, string, string) (Software, error) +1. SoftwareInventoriesClient.GetPreparer(context.Context, string, string, string, string, string) (*http.Request, error) +1. SoftwareInventoriesClient.GetResponder(*http.Response) (Software, error) +1. SoftwareInventoriesClient.GetSender(*http.Request) (*http.Response, error) +1. SoftwareInventoriesClient.ListByExtendedResource(context.Context, string, string, string, string) (SoftwaresListPage, error) +1. SoftwareInventoriesClient.ListByExtendedResourceComplete(context.Context, string, string, string, string) (SoftwaresListIterator, error) +1. SoftwareInventoriesClient.ListByExtendedResourcePreparer(context.Context, string, string, string, string) (*http.Request, error) +1. SoftwareInventoriesClient.ListByExtendedResourceResponder(*http.Response) (SoftwaresList, error) +1. SoftwareInventoriesClient.ListByExtendedResourceSender(*http.Request) (*http.Response, error) +1. SoftwareInventoriesClient.ListBySubscription(context.Context) (SoftwaresListPage, error) +1. SoftwareInventoriesClient.ListBySubscriptionComplete(context.Context) (SoftwaresListIterator, error) +1. SoftwareInventoriesClient.ListBySubscriptionPreparer(context.Context) (*http.Request, error) +1. SoftwareInventoriesClient.ListBySubscriptionResponder(*http.Response) (SoftwaresList, error) +1. SoftwareInventoriesClient.ListBySubscriptionSender(*http.Request) (*http.Response, error) +1. SoftwaresList.IsEmpty() bool +1. SoftwaresList.MarshalJSON() ([]byte, error) +1. SoftwaresListIterator.NotDone() bool +1. SoftwaresListIterator.Response() SoftwaresList +1. SoftwaresListIterator.Value() Software +1. SoftwaresListPage.NotDone() bool +1. SoftwaresListPage.Response() SoftwaresList +1. SoftwaresListPage.Values() []Software + +### Struct Changes + +#### New Structs + +1. ConnectionStrings +1. ErrorAdditionalInfo +1. IngestionConnectionString +1. IngestionSetting +1. IngestionSettingList +1. IngestionSettingListIterator +1. IngestionSettingListPage +1. IngestionSettingToken +1. IngestionSettingsClient +1. SettingModel +1. Software +1. SoftwareInventoriesClient +1. SoftwareProperties +1. SoftwaresList +1. SoftwaresListIterator +1. SoftwaresListPage + +#### New Struct Fields + +1. CloudErrorBody.AdditionalInfo +1. CloudErrorBody.Details +1. CloudErrorBody.Target diff --git a/services/preview/security/mgmt/v2.0/security/_meta.json b/services/preview/security/mgmt/v2.0/security/_meta.json index ea159a9416c6..4526723fd2a5 100644 --- a/services/preview/security/mgmt/v2.0/security/_meta.json +++ b/services/preview/security/mgmt/v2.0/security/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/security/resource-manager/readme.md", "tag": "package-composite-v2", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-composite-v2 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/security/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-composite-v2 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/security/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go b/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go index b99edfe1be6f..8ba5351c1e7b 100644 --- a/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go +++ b/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go @@ -72,7 +72,7 @@ func (client AdaptiveNetworkHardeningsClient) Enforce(ctx context.Context, resou result, err = client.EnforceSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsClient", "Enforce", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsClient", "Enforce", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client AdaptiveNetworkHardeningsClient) EnforcePreparer(ctx context.Contex // http.Response Body if it receives an error. func (client AdaptiveNetworkHardeningsClient) EnforceSender(req *http.Request) (future AdaptiveNetworkHardeningsEnforceFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/security/mgmt/v2.0/security/enums.go b/services/preview/security/mgmt/v2.0/security/enums.go index 8d0b7725faa7..ce4fc1b88c3a 100644 --- a/services/preview/security/mgmt/v2.0/security/enums.go +++ b/services/preview/security/mgmt/v2.0/security/enums.go @@ -282,21 +282,42 @@ func PossibleDirectionValues() []Direction { return []Direction{Inbound, Outbound} } +// EndOfSupportStatus enumerates the values for end of support status. +type EndOfSupportStatus string + +const ( + // NoLongerSupported ... + NoLongerSupported EndOfSupportStatus = "noLongerSupported" + // None ... + None EndOfSupportStatus = "None" + // UpcomingNoLongerSupported ... + UpcomingNoLongerSupported EndOfSupportStatus = "upcomingNoLongerSupported" + // UpcomingVersionNoLongerSupported ... + UpcomingVersionNoLongerSupported EndOfSupportStatus = "upcomingVersionNoLongerSupported" + // VersionNoLongerSupported ... + VersionNoLongerSupported EndOfSupportStatus = "versionNoLongerSupported" +) + +// PossibleEndOfSupportStatusValues returns an array of possible values for the EndOfSupportStatus const type. +func PossibleEndOfSupportStatusValues() []EndOfSupportStatus { + return []EndOfSupportStatus{NoLongerSupported, None, UpcomingNoLongerSupported, UpcomingVersionNoLongerSupported, VersionNoLongerSupported} +} + // EnforcementMode enumerates the values for enforcement mode. type EnforcementMode string const ( - // Audit ... - Audit EnforcementMode = "Audit" - // Enforce ... - Enforce EnforcementMode = "Enforce" - // None ... - None EnforcementMode = "None" + // EnforcementModeAudit ... + EnforcementModeAudit EnforcementMode = "Audit" + // EnforcementModeEnforce ... + EnforcementModeEnforce EnforcementMode = "Enforce" + // EnforcementModeNone ... + EnforcementModeNone EnforcementMode = "None" ) // PossibleEnforcementModeValues returns an array of possible values for the EnforcementMode const type. func PossibleEnforcementModeValues() []EnforcementMode { - return []EnforcementMode{Audit, Enforce, None} + return []EnforcementMode{EnforcementModeAudit, EnforcementModeEnforce, EnforcementModeNone} } // EnforcementMode1 enumerates the values for enforcement mode 1. @@ -337,21 +358,29 @@ func PossibleEnforcementSupportValues() []EnforcementSupport { type EventSource string const ( - // Alerts ... - Alerts EventSource = "Alerts" - // Assessments ... - Assessments EventSource = "Assessments" - // SecureScoreControls ... - SecureScoreControls EventSource = "SecureScoreControls" - // SecureScores ... - SecureScores EventSource = "SecureScores" - // SubAssessments ... - SubAssessments EventSource = "SubAssessments" + // EventSourceAlerts ... + EventSourceAlerts EventSource = "Alerts" + // EventSourceAssessments ... + EventSourceAssessments EventSource = "Assessments" + // EventSourceRegulatoryComplianceAssessment ... + EventSourceRegulatoryComplianceAssessment EventSource = "RegulatoryComplianceAssessment" + // EventSourceRegulatoryComplianceAssessmentSnapshot ... + EventSourceRegulatoryComplianceAssessmentSnapshot EventSource = "RegulatoryComplianceAssessmentSnapshot" + // EventSourceSecureScoreControls ... + EventSourceSecureScoreControls EventSource = "SecureScoreControls" + // EventSourceSecureScoreControlsSnapshot ... + EventSourceSecureScoreControlsSnapshot EventSource = "SecureScoreControlsSnapshot" + // EventSourceSecureScores ... + EventSourceSecureScores EventSource = "SecureScores" + // EventSourceSecureScoresSnapshot ... + EventSourceSecureScoresSnapshot EventSource = "SecureScoresSnapshot" + // EventSourceSubAssessments ... + EventSourceSubAssessments EventSource = "SubAssessments" ) // PossibleEventSourceValues returns an array of possible values for the EventSource const type. func PossibleEventSourceValues() []EventSource { - return []EventSource{Alerts, Assessments, SecureScoreControls, SecureScores, SubAssessments} + return []EventSource{EventSourceAlerts, EventSourceAssessments, EventSourceRegulatoryComplianceAssessment, EventSourceRegulatoryComplianceAssessmentSnapshot, EventSourceSecureScoreControls, EventSourceSecureScoreControlsSnapshot, EventSourceSecureScores, EventSourceSecureScoresSnapshot, EventSourceSubAssessments} } // Exe enumerates the values for exe. @@ -516,20 +545,35 @@ func PossibleIssueValues() []Issue { // KindEnum enumerates the values for kind enum. type KindEnum string +const ( + // KindDataExportSetting ... + KindDataExportSetting KindEnum = "DataExportSetting" + // KindSetting ... + KindSetting KindEnum = "Setting" +) + +// PossibleKindEnumValues returns an array of possible values for the KindEnum const type. +func PossibleKindEnumValues() []KindEnum { + return []KindEnum{KindDataExportSetting, KindSetting} +} + +// KindEnum1 enumerates the values for kind enum 1. +type KindEnum1 string + const ( // KindAAD ... - KindAAD KindEnum = "AAD" + KindAAD KindEnum1 = "AAD" // KindATA ... - KindATA KindEnum = "ATA" + KindATA KindEnum1 = "ATA" // KindCEF ... - KindCEF KindEnum = "CEF" + KindCEF KindEnum1 = "CEF" // KindExternalSecuritySolution ... - KindExternalSecuritySolution KindEnum = "ExternalSecuritySolution" + KindExternalSecuritySolution KindEnum1 = "ExternalSecuritySolution" ) -// PossibleKindEnumValues returns an array of possible values for the KindEnum const type. -func PossibleKindEnumValues() []KindEnum { - return []KindEnum{KindAAD, KindATA, KindCEF, KindExternalSecuritySolution} +// PossibleKindEnum1Values returns an array of possible values for the KindEnum1 const type. +func PossibleKindEnum1Values() []KindEnum1 { + return []KindEnum1{KindAAD, KindATA, KindCEF, KindExternalSecuritySolution} } // Msi enumerates the values for msi. @@ -553,23 +597,23 @@ func PossibleMsiValues() []Msi { type Operator string const ( - // Contains ... + // Contains Applies only for non-decimal operands Contains Operator = "Contains" - // EndsWith ... + // EndsWith Applies only for non-decimal operands EndsWith Operator = "EndsWith" - // Equals ... + // Equals Applies for decimal and non-decimal operands Equals Operator = "Equals" - // GreaterThan ... + // GreaterThan Applies only for decimal operands GreaterThan Operator = "GreaterThan" - // GreaterThanOrEqualTo ... + // GreaterThanOrEqualTo Applies only for decimal operands GreaterThanOrEqualTo Operator = "GreaterThanOrEqualTo" - // LesserThan ... + // LesserThan Applies only for decimal operands LesserThan Operator = "LesserThan" - // LesserThanOrEqualTo ... + // LesserThanOrEqualTo Applies only for decimal operands LesserThanOrEqualTo Operator = "LesserThanOrEqualTo" - // NotEquals ... + // NotEquals Applies for decimal and non-decimal operands NotEquals Operator = "NotEquals" - // StartsWith ... + // StartsWith Applies only for non-decimal operands StartsWith Operator = "StartsWith" ) @@ -998,21 +1042,6 @@ func PossibleScriptValues() []Script { return []Script{ScriptAudit, ScriptEnforce, ScriptNone} } -// SettingKind enumerates the values for setting kind. -type SettingKind string - -const ( - // SettingKindAlertSuppressionSetting ... - SettingKindAlertSuppressionSetting SettingKind = "AlertSuppressionSetting" - // SettingKindDataExportSetting ... - SettingKindDataExportSetting SettingKind = "DataExportSetting" -) - -// PossibleSettingKindValues returns an array of possible values for the SettingKind const type. -func PossibleSettingKindValues() []SettingKind { - return []SettingKind{SettingKindAlertSuppressionSetting, SettingKindDataExportSetting} -} - // Severity enumerates the values for severity. type Severity string diff --git a/services/preview/security/mgmt/v2.0/security/ingestionsettings.go b/services/preview/security/mgmt/v2.0/security/ingestionsettings.go new file mode 100644 index 000000000000..b5f7ce03a686 --- /dev/null +++ b/services/preview/security/mgmt/v2.0/security/ingestionsettings.go @@ -0,0 +1,555 @@ +package security + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// IngestionSettingsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type IngestionSettingsClient struct { + BaseClient +} + +// NewIngestionSettingsClient creates an instance of the IngestionSettingsClient client. +func NewIngestionSettingsClient(subscriptionID string, ascLocation string) IngestionSettingsClient { + return NewIngestionSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewIngestionSettingsClientWithBaseURI creates an instance of the IngestionSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewIngestionSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IngestionSettingsClient { + return IngestionSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// Create create setting for ingesting security data and logs to correlate with resources associated with the +// subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +// ingestionSetting - ingestion setting object +func (client IngestionSettingsClient) Create(ctx context.Context, ingestionSettingName string, ingestionSetting IngestionSetting) (result IngestionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, ingestionSettingName, ingestionSetting) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Create", resp, "Failure responding to request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client IngestionSettingsClient) CreatePreparer(ctx context.Context, ingestionSettingName string, ingestionSetting IngestionSetting) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", pathParameters), + autorest.WithJSON(ingestionSetting), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) CreateResponder(resp *http.Response) (result IngestionSetting, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the ingestion settings for this subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) Delete(ctx context.Context, ingestionSettingName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IngestionSettingsClient) DeletePreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get settings for ingesting security data and logs to correlate with resources associated with the subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) Get(ctx context.Context, ingestionSettingName string) (result IngestionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client IngestionSettingsClient) GetPreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) GetResponder(resp *http.Response) (result IngestionSetting, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List settings for ingesting security data and logs to correlate with resources associated with the subscription. +func (client IngestionSettingsClient) List(ctx context.Context) (result IngestionSettingListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.List") + defer func() { + sc := -1 + if result.isl.Response.Response != nil { + sc = result.isl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.isl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "List", resp, "Failure sending request") + return + } + + result.isl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "List", resp, "Failure responding to request") + return + } + if result.isl.hasNextLink() && result.isl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client IngestionSettingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) ListResponder(resp *http.Response) (result IngestionSettingList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client IngestionSettingsClient) listNextResults(ctx context.Context, lastResults IngestionSettingList) (result IngestionSettingList, err error) { + req, err := lastResults.ingestionSettingListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client IngestionSettingsClient) ListComplete(ctx context.Context) (result IngestionSettingListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListConnectionStrings connection strings for ingesting security scan logs and data. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) ListConnectionStrings(ctx context.Context, ingestionSettingName string) (result ConnectionStrings, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.ListConnectionStrings") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "ListConnectionStrings", err.Error()) + } + + req, err := client.ListConnectionStringsPreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListConnectionStrings", nil, "Failure preparing request") + return + } + + resp, err := client.ListConnectionStringsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListConnectionStrings", resp, "Failure sending request") + return + } + + result, err = client.ListConnectionStringsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListConnectionStrings", resp, "Failure responding to request") + return + } + + return +} + +// ListConnectionStringsPreparer prepares the ListConnectionStrings request. +func (client IngestionSettingsClient) ListConnectionStringsPreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listConnectionStrings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStrings, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTokens returns the token that is used for correlating ingested telemetry with the resources in the subscription. +// Parameters: +// ingestionSettingName - name of the ingestion setting +func (client IngestionSettingsClient) ListTokens(ctx context.Context, ingestionSettingName string) (result IngestionSettingToken, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingsClient.ListTokens") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.IngestionSettingsClient", "ListTokens", err.Error()) + } + + req, err := client.ListTokensPreparer(ctx, ingestionSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListTokens", nil, "Failure preparing request") + return + } + + resp, err := client.ListTokensSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListTokens", resp, "Failure sending request") + return + } + + result, err = client.ListTokensResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.IngestionSettingsClient", "ListTokens", resp, "Failure responding to request") + return + } + + return +} + +// ListTokensPreparer prepares the ListTokens request. +func (client IngestionSettingsClient) ListTokensPreparer(ctx context.Context, ingestionSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ingestionSettingName": autorest.Encode("path", ingestionSettingName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-01-15-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listTokens", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListTokensSender sends the ListTokens request. The method will close the +// http.Response Body if it receives an error. +func (client IngestionSettingsClient) ListTokensSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListTokensResponder handles the response to the ListTokens request. The method always +// closes the http.Response Body. +func (client IngestionSettingsClient) ListTokensResponder(resp *http.Response) (result IngestionSettingToken, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/security/mgmt/v2.0/security/models.go b/services/preview/security/mgmt/v2.0/security/models.go index 3e3bc607845d..d26d34f7f797 100644 --- a/services/preview/security/mgmt/v2.0/security/models.go +++ b/services/preview/security/mgmt/v2.0/security/models.go @@ -40,7 +40,7 @@ type AadExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for AadExternalSecuritySolution. @@ -2551,7 +2551,7 @@ func (awg *AppWhitelistingGroup) UnmarshalJSON(body []byte) error { // AppWhitelistingGroupData represents a VM/server group and set of rules that are Recommended by Azure // Security Center to be allowed type AppWhitelistingGroupData struct { - // EnforcementMode - Possible values include: 'Audit', 'Enforce', 'None' + // EnforcementMode - Possible values include: 'EnforcementModeAudit', 'EnforcementModeEnforce', 'EnforcementModeNone' EnforcementMode EnforcementMode `json:"enforcementMode,omitempty"` ProtectionMode *ProtectionMode `json:"protectionMode,omitempty"` // ConfigurationStatus - Possible values include: 'ConfigurationStatus2Configured', 'ConfigurationStatus2NotConfigured', 'ConfigurationStatus2InProgress', 'ConfigurationStatus2Failed', 'ConfigurationStatus2NoStatus' @@ -2788,7 +2788,7 @@ type AtaExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for AtaExternalSecuritySolution. @@ -3662,7 +3662,7 @@ type AutomationScope struct { // - security alerts and security assessments. To learn more about the supported security events data // models schemas - please visit https://aka.ms/ASCAutomationSchemas. type AutomationSource struct { - // EventSource - A valid event source type. Possible values include: 'Assessments', 'SubAssessments', 'Alerts', 'SecureScores', 'SecureScoreControls' + // EventSource - A valid event source type. Possible values include: 'EventSourceAssessments', 'EventSourceSubAssessments', 'EventSourceAlerts', 'EventSourceSecureScores', 'EventSourceSecureScoresSnapshot', 'EventSourceSecureScoreControls', 'EventSourceSecureScoreControlsSnapshot', 'EventSourceRegulatoryComplianceAssessment', 'EventSourceRegulatoryComplianceAssessmentSnapshot' EventSource EventSource `json:"eventSource,omitempty"` // RuleSets - A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical 'or'). RuleSets *[]AutomationRuleSet `json:"ruleSets,omitempty"` @@ -4165,7 +4165,7 @@ type CefExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for CefExternalSecuritySolution. @@ -4326,9 +4326,10 @@ func (csp *CefSolutionProperties) UnmarshalJSON(body []byte) error { return nil } -// CloudError error response structure. +// CloudError common error response for all Azure Resource Manager APIs to return error details for failed +// operations. (This also follows the OData error response format.). type CloudError struct { - // CloudErrorBody - Error data + // CloudErrorBody - The error object. *CloudErrorBody `json:"error,omitempty"` } @@ -4365,12 +4366,18 @@ func (ce *CloudError) UnmarshalJSON(body []byte) error { return nil } -// CloudErrorBody error details. +// CloudErrorBody the error detail. type CloudErrorBody struct { - // Code - READ-ONLY; An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + // Code - READ-ONLY; The error code. Code *string `json:"code,omitempty"` - // Message - READ-ONLY; A message describing the error, intended to be suitable for display in a user interface. + // Message - READ-ONLY; The error message. Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]CloudErrorBody `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` } // MarshalJSON is the custom marshaler for CloudErrorBody. @@ -4690,6 +4697,13 @@ type ConnectedWorkspace struct { ID *string `json:"id,omitempty"` } +// ConnectionStrings connection string for ingesting security data and logs +type ConnectionStrings struct { + autorest.Response `json:"-"` + // Value - Connection strings + Value *[]IngestionConnectionString `json:"value,omitempty"` +} + // ConnectionToIPNotAllowed outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or // ipv6 range in CIDR notation. type ConnectionToIPNotAllowed struct { @@ -5829,18 +5843,19 @@ func (c CVSS) MarshalJSON() ([]byte, error) { type DataExportSetting struct { // DataExportSettingProperties - Data export setting data *DataExportSettingProperties `json:"properties,omitempty"` - // Kind - the kind of the settings string (DataExportSetting). Possible values include: 'SettingKindDataExportSetting', 'SettingKindAlertSuppressionSetting' - Kind SettingKind `json:"kind,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Kind - Possible values include: 'KindSetting', 'KindDataExportSetting' + Kind KindEnum `json:"kind,omitempty"` } // MarshalJSON is the custom marshaler for DataExportSetting. func (desVar DataExportSetting) MarshalJSON() ([]byte, error) { + desVar.Kind = KindDataExportSetting objectMap := make(map[string]interface{}) if desVar.DataExportSettingProperties != nil { objectMap["properties"] = desVar.DataExportSettingProperties @@ -5851,6 +5866,21 @@ func (desVar DataExportSetting) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsDataExportSetting is the BasicSetting implementation for DataExportSetting. +func (desVar DataExportSetting) AsDataExportSetting() (*DataExportSetting, bool) { + return &desVar, true +} + +// AsSetting is the BasicSetting implementation for DataExportSetting. +func (desVar DataExportSetting) AsSetting() (*Setting, bool) { + return nil, false +} + +// AsBasicSetting is the BasicSetting implementation for DataExportSetting. +func (desVar DataExportSetting) AsBasicSetting() (BasicSetting, bool) { + return &desVar, true +} + // UnmarshalJSON is the custom unmarshaler for DataExportSetting struct. func (desVar *DataExportSetting) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -5871,7 +5901,7 @@ func (desVar *DataExportSetting) UnmarshalJSON(body []byte) error { } case "kind": if v != nil { - var kind SettingKind + var kind KindEnum err = json.Unmarshal(*v, &kind) if err != nil { return err @@ -6862,6 +6892,20 @@ type EffectiveNetworkSecurityGroups struct { NetworkSecurityGroups *[]string `json:"networkSecurityGroups,omitempty"` } +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ETag entity tag is used for comparing two or more entities from the same requested resource. type ETag struct { // Etag - Entity tag is used for comparing two or more entities from the same requested resource. @@ -6890,7 +6934,7 @@ type ExternalSecuritySolution struct { // Location - READ-ONLY; Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD' - Kind KindEnum `json:"kind,omitempty"` + Kind KindEnum1 `json:"kind,omitempty"` } func unmarshalBasicExternalSecuritySolution(body []byte) (BasicExternalSecuritySolution, error) { @@ -8664,6 +8708,222 @@ type InformationType struct { Keywords *[]InformationProtectionKeyword `json:"keywords,omitempty"` } +// IngestionConnectionString connection string for ingesting security data and logs +type IngestionConnectionString struct { + // Location - READ-ONLY; The region where ingested logs and data resides + Location *string `json:"location,omitempty"` + // Value - READ-ONLY; Connection string value + Value *string `json:"value,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionConnectionString. +func (ics IngestionConnectionString) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// IngestionSetting configures how to correlate scan data and logs with resources associated with the +// subscription. +type IngestionSetting struct { + autorest.Response `json:"-"` + // Properties - Ingestion setting data + Properties interface{} `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionSetting. +func (is IngestionSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if is.Properties != nil { + objectMap["properties"] = is.Properties + } + return json.Marshal(objectMap) +} + +// IngestionSettingList list of ingestion settings +type IngestionSettingList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of ingestion settings + Value *[]IngestionSetting `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI to fetch the next page. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionSettingList. +func (isl IngestionSettingList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// IngestionSettingListIterator provides access to a complete listing of IngestionSetting values. +type IngestionSettingListIterator struct { + i int + page IngestionSettingListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *IngestionSettingListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *IngestionSettingListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IngestionSettingListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter IngestionSettingListIterator) Response() IngestionSettingList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter IngestionSettingListIterator) Value() IngestionSetting { + if !iter.page.NotDone() { + return IngestionSetting{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IngestionSettingListIterator type. +func NewIngestionSettingListIterator(page IngestionSettingListPage) IngestionSettingListIterator { + return IngestionSettingListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (isl IngestionSettingList) IsEmpty() bool { + return isl.Value == nil || len(*isl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (isl IngestionSettingList) hasNextLink() bool { + return isl.NextLink != nil && len(*isl.NextLink) != 0 +} + +// ingestionSettingListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (isl IngestionSettingList) ingestionSettingListPreparer(ctx context.Context) (*http.Request, error) { + if !isl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(isl.NextLink))) +} + +// IngestionSettingListPage contains a page of IngestionSetting values. +type IngestionSettingListPage struct { + fn func(context.Context, IngestionSettingList) (IngestionSettingList, error) + isl IngestionSettingList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *IngestionSettingListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.isl) + if err != nil { + return err + } + page.isl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *IngestionSettingListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IngestionSettingListPage) NotDone() bool { + return !page.isl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IngestionSettingListPage) Response() IngestionSettingList { + return page.isl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IngestionSettingListPage) Values() []IngestionSetting { + if page.isl.IsEmpty() { + return nil + } + return *page.isl.Value +} + +// Creates a new instance of the IngestionSettingListPage type. +func NewIngestionSettingListPage(cur IngestionSettingList, getNextPage func(context.Context, IngestionSettingList) (IngestionSettingList, error)) IngestionSettingListPage { + return IngestionSettingListPage{ + fn: getNextPage, + isl: cur, + } +} + +// IngestionSettingToken configures how to correlate scan data and logs with resources associated with the +// subscription. +type IngestionSettingToken struct { + autorest.Response `json:"-"` + // Token - READ-ONLY; The token is used for correlating security data and logs with the resources in the subscription. + Token *string `json:"token,omitempty"` +} + +// MarshalJSON is the custom marshaler for IngestionSettingToken. +func (ist IngestionSettingToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // IoTSecurityAggregatedAlert security Solution Aggregated Alert information type IoTSecurityAggregatedAlert struct { autorest.Response `json:"-"` @@ -14311,11 +14571,17 @@ type ServicePrincipalProperties struct { Secret *string `json:"secret,omitempty"` } -// Setting represents a security setting in Azure Security Center. +// BasicSetting the kind of the security setting +type BasicSetting interface { + AsDataExportSetting() (*DataExportSetting, bool) + AsSetting() (*Setting, bool) +} + +// Setting the kind of the security setting type Setting struct { autorest.Response `json:"-"` - // Kind - the kind of the settings string (DataExportSetting). Possible values include: 'SettingKindDataExportSetting', 'SettingKindAlertSuppressionSetting' - Kind SettingKind `json:"kind,omitempty"` + // Kind - Possible values include: 'KindSetting', 'KindDataExportSetting' + Kind KindEnum `json:"kind,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -14324,8 +14590,46 @@ type Setting struct { Type *string `json:"type,omitempty"` } +func unmarshalBasicSetting(body []byte) (BasicSetting, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindDataExportSetting): + var desVar DataExportSetting + err := json.Unmarshal(body, &desVar) + return desVar, err + default: + var s Setting + err := json.Unmarshal(body, &s) + return s, err + } +} +func unmarshalBasicSettingArray(body []byte) ([]BasicSetting, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sArray := make([]BasicSetting, len(rawMessages)) + + for index, rawMessage := range rawMessages { + s, err := unmarshalBasicSetting(*rawMessage) + if err != nil { + return nil, err + } + sArray[index] = s + } + return sArray, nil +} + // MarshalJSON is the custom marshaler for Setting. func (s Setting) MarshalJSON() ([]byte, error) { + s.Kind = KindSetting objectMap := make(map[string]interface{}) if s.Kind != "" { objectMap["kind"] = s.Kind @@ -14333,32 +14637,43 @@ func (s Setting) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// SettingResource the kind of the security setting -type SettingResource struct { - // Kind - the kind of the settings string (DataExportSetting). Possible values include: 'SettingKindDataExportSetting', 'SettingKindAlertSuppressionSetting' - Kind SettingKind `json:"kind,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` +// AsDataExportSetting is the BasicSetting implementation for Setting. +func (s Setting) AsDataExportSetting() (*DataExportSetting, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for SettingResource. -func (sr SettingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sr.Kind != "" { - objectMap["kind"] = sr.Kind +// AsSetting is the BasicSetting implementation for Setting. +func (s Setting) AsSetting() (*Setting, bool) { + return &s, true +} + +// AsBasicSetting is the BasicSetting implementation for Setting. +func (s Setting) AsBasicSetting() (BasicSetting, bool) { + return &s, true +} + +// SettingModel ... +type SettingModel struct { + autorest.Response `json:"-"` + Value BasicSetting `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SettingModel struct. +func (sm *SettingModel) UnmarshalJSON(body []byte) error { + s, err := unmarshalBasicSetting(body) + if err != nil { + return err } - return json.Marshal(objectMap) + sm.Value = s + + return nil } // SettingsList subscription settings list. type SettingsList struct { autorest.Response `json:"-"` // Value - The settings list. - Value *[]Setting `json:"value,omitempty"` + Value *[]BasicSetting `json:"value,omitempty"` // NextLink - READ-ONLY; The URI to fetch the next page. NextLink *string `json:"nextLink,omitempty"` } @@ -14372,6 +14687,38 @@ func (sl SettingsList) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// UnmarshalJSON is the custom unmarshaler for SettingsList struct. +func (sl *SettingsList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "value": + if v != nil { + value, err := unmarshalBasicSettingArray(*v) + if err != nil { + return err + } + sl.Value = &value + } + case "nextLink": + if v != nil { + var nextLink string + err = json.Unmarshal(*v, &nextLink) + if err != nil { + return err + } + sl.NextLink = &nextLink + } + } + } + + return nil +} + // SettingsListIterator provides access to a complete listing of Setting values. type SettingsListIterator struct { i int @@ -14423,7 +14770,7 @@ func (iter SettingsListIterator) Response() SettingsList { // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter SettingsListIterator) Value() Setting { +func (iter SettingsListIterator) Value() BasicSetting { if !iter.page.NotDone() { return Setting{} } @@ -14457,7 +14804,7 @@ func (sl SettingsList) settingsListPreparer(ctx context.Context) (*http.Request, autorest.WithBaseURL(to.String(sl.NextLink))) } -// SettingsListPage contains a page of Setting values. +// SettingsListPage contains a page of BasicSetting values. type SettingsListPage struct { fn func(context.Context, SettingsList) (SettingsList, error) sl SettingsList @@ -14507,7 +14854,7 @@ func (page SettingsListPage) Response() SettingsList { } // Values returns the slice of values for the current page or nil if there are no values. -func (page SettingsListPage) Values() []Setting { +func (page SettingsListPage) Values() []BasicSetting { if page.sl.IsEmpty() { return nil } @@ -14522,6 +14869,268 @@ func NewSettingsListPage(cur SettingsList, getNextPage func(context.Context, Set } } +// Software represents a software data +type Software struct { + autorest.Response `json:"-"` + // SoftwareProperties - Properties of the Software Inventory resource + *SoftwareProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Software. +func (s Software) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.SoftwareProperties != nil { + objectMap["properties"] = s.SoftwareProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Software struct. +func (s *Software) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var softwareProperties SoftwareProperties + err = json.Unmarshal(*v, &softwareProperties) + if err != nil { + return err + } + s.SoftwareProperties = &softwareProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + } + } + + return nil +} + +// SoftwareProperties software Inventory resource properties +type SoftwareProperties struct { + // DeviceID - Unique identifier for the virtual machine in the service. + DeviceID *string `json:"deviceId,omitempty"` + // OsPlatform - Platform of the operating system running on the device. + OsPlatform *string `json:"osPlatform,omitempty"` + // Vendor - Name of the software vendor. + Vendor *string `json:"vendor,omitempty"` + // SoftwareName - Name of the software product. + SoftwareName *string `json:"softwareName,omitempty"` + // Version - Version number of the software product. + Version *string `json:"version,omitempty"` + // EndOfSupportStatus - End of support status. Possible values include: 'None', 'NoLongerSupported', 'VersionNoLongerSupported', 'UpcomingNoLongerSupported', 'UpcomingVersionNoLongerSupported' + EndOfSupportStatus EndOfSupportStatus `json:"endOfSupportStatus,omitempty"` + // EndOfSupportDate - The end of support date in case the product is upcoming end of support. + EndOfSupportDate *string `json:"endOfSupportDate,omitempty"` + // NumberOfKnownVulnerabilities - Number of weaknesses. + NumberOfKnownVulnerabilities *int32 `json:"numberOfKnownVulnerabilities,omitempty"` + // FirstSeenAt - First time that the software was seen in the device. + FirstSeenAt *string `json:"firstSeenAt,omitempty"` +} + +// SoftwaresList represents the software inventory of the virtual machine. +type SoftwaresList struct { + autorest.Response `json:"-"` + Value *[]Software `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI to fetch the next page. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for SoftwaresList. +func (sl SoftwaresList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sl.Value != nil { + objectMap["value"] = sl.Value + } + return json.Marshal(objectMap) +} + +// SoftwaresListIterator provides access to a complete listing of Software values. +type SoftwaresListIterator struct { + i int + page SoftwaresListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SoftwaresListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwaresListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SoftwaresListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SoftwaresListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SoftwaresListIterator) Response() SoftwaresList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SoftwaresListIterator) Value() Software { + if !iter.page.NotDone() { + return Software{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SoftwaresListIterator type. +func NewSoftwaresListIterator(page SoftwaresListPage) SoftwaresListIterator { + return SoftwaresListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sl SoftwaresList) IsEmpty() bool { + return sl.Value == nil || len(*sl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sl SoftwaresList) hasNextLink() bool { + return sl.NextLink != nil && len(*sl.NextLink) != 0 +} + +// softwaresListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sl SoftwaresList) softwaresListPreparer(ctx context.Context) (*http.Request, error) { + if !sl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sl.NextLink))) +} + +// SoftwaresListPage contains a page of Software values. +type SoftwaresListPage struct { + fn func(context.Context, SoftwaresList) (SoftwaresList, error) + sl SoftwaresList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SoftwaresListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwaresListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sl) + if err != nil { + return err + } + page.sl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SoftwaresListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SoftwaresListPage) NotDone() bool { + return !page.sl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SoftwaresListPage) Response() SoftwaresList { + return page.sl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SoftwaresListPage) Values() []Software { + if page.sl.IsEmpty() { + return nil + } + return *page.sl.Value +} + +// Creates a new instance of the SoftwaresListPage type. +func NewSoftwaresListPage(cur SoftwaresList, getNextPage func(context.Context, SoftwaresList) (SoftwaresList, error)) SoftwaresListPage { + return SoftwaresListPage{ + fn: getNextPage, + sl: cur, + } +} + // SQLServerVulnerabilityProperties details of the resource that was assessed type SQLServerVulnerabilityProperties struct { // Type - READ-ONLY; The resource type the sub assessment refers to in its resource details diff --git a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go index 5f0989fa73eb..05c14309cea9 100644 --- a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go @@ -12,6 +12,17 @@ import ( "github.com/Azure/go-autorest/autorest" ) +// SoftwareInventoriesClientAPI contains the set of methods on the SoftwareInventoriesClient type. +type SoftwareInventoriesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string) (result security.Software, err error) + ListByExtendedResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.SoftwaresListPage, err error) + ListByExtendedResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.SoftwaresListIterator, err error) + ListBySubscription(ctx context.Context) (result security.SoftwaresListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result security.SoftwaresListIterator, err error) +} + +var _ SoftwareInventoriesClientAPI = (*security.SoftwareInventoriesClient)(nil) + // SQLVulnerabilityAssessmentScansClientAPI contains the set of methods on the SQLVulnerabilityAssessmentScansClient type. type SQLVulnerabilityAssessmentScansClientAPI interface { Get(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (result security.Scan, err error) @@ -204,10 +215,10 @@ var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil // SettingsClientAPI contains the set of methods on the SettingsClient type. type SettingsClientAPI interface { - Get(ctx context.Context, settingName string) (result security.Setting, err error) + Get(ctx context.Context, settingName string) (result security.SettingModel, err error) List(ctx context.Context) (result security.SettingsListPage, err error) ListComplete(ctx context.Context) (result security.SettingsListIterator, err error) - Update(ctx context.Context, settingName string, setting security.Setting) (result security.Setting, err error) + Update(ctx context.Context, settingName string, setting security.BasicSetting) (result security.SettingModel, err error) } var _ SettingsClientAPI = (*security.SettingsClient)(nil) @@ -432,3 +443,16 @@ type AlertsSuppressionRulesClientAPI interface { } var _ AlertsSuppressionRulesClientAPI = (*security.AlertsSuppressionRulesClient)(nil) + +// IngestionSettingsClientAPI contains the set of methods on the IngestionSettingsClient type. +type IngestionSettingsClientAPI interface { + Create(ctx context.Context, ingestionSettingName string, ingestionSetting security.IngestionSetting) (result security.IngestionSetting, err error) + Delete(ctx context.Context, ingestionSettingName string) (result autorest.Response, err error) + Get(ctx context.Context, ingestionSettingName string) (result security.IngestionSetting, err error) + List(ctx context.Context) (result security.IngestionSettingListPage, err error) + ListComplete(ctx context.Context) (result security.IngestionSettingListIterator, err error) + ListConnectionStrings(ctx context.Context, ingestionSettingName string) (result security.ConnectionStrings, err error) + ListTokens(ctx context.Context, ingestionSettingName string) (result security.IngestionSettingToken, err error) +} + +var _ IngestionSettingsClientAPI = (*security.IngestionSettingsClient)(nil) diff --git a/services/preview/security/mgmt/v2.0/security/settings.go b/services/preview/security/mgmt/v2.0/security/settings.go index 5d87a8857e37..224ec473bbcf 100644 --- a/services/preview/security/mgmt/v2.0/security/settings.go +++ b/services/preview/security/mgmt/v2.0/security/settings.go @@ -34,7 +34,7 @@ func NewSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLoca // Get settings of different configurations in security center // Parameters: // settingName - name of setting: (MCAS/WDATP) -func (client SettingsClient) Get(ctx context.Context, settingName string) (result Setting, err error) { +func (client SettingsClient) Get(ctx context.Context, settingName string) (result SettingModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Get") defer func() { @@ -101,7 +101,7 @@ func (client SettingsClient) GetSender(req *http.Request) (*http.Response, error // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client SettingsClient) GetResponder(resp *http.Response) (result Setting, err error) { +func (client SettingsClient) GetResponder(resp *http.Response) (result SettingModel, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -234,7 +234,7 @@ func (client SettingsClient) ListComplete(ctx context.Context) (result SettingsL // Parameters: // settingName - name of setting: (MCAS/WDATP) // setting - setting object -func (client SettingsClient) Update(ctx context.Context, settingName string, setting Setting) (result Setting, err error) { +func (client SettingsClient) Update(ctx context.Context, settingName string, setting BasicSetting) (result SettingModel, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Update") defer func() { @@ -274,7 +274,7 @@ func (client SettingsClient) Update(ctx context.Context, settingName string, set } // UpdatePreparer prepares the Update request. -func (client SettingsClient) UpdatePreparer(ctx context.Context, settingName string, setting Setting) (*http.Request, error) { +func (client SettingsClient) UpdatePreparer(ctx context.Context, settingName string, setting BasicSetting) (*http.Request, error) { pathParameters := map[string]interface{}{ "settingName": autorest.Encode("path", settingName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -303,7 +303,7 @@ func (client SettingsClient) UpdateSender(req *http.Request) (*http.Response, er // UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client SettingsClient) UpdateResponder(resp *http.Response) (result Setting, err error) { +func (client SettingsClient) UpdateResponder(resp *http.Response) (result SettingModel, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), diff --git a/services/preview/security/mgmt/v2.0/security/softwareinventories.go b/services/preview/security/mgmt/v2.0/security/softwareinventories.go new file mode 100644 index 000000000000..d7e3b70fd39a --- /dev/null +++ b/services/preview/security/mgmt/v2.0/security/softwareinventories.go @@ -0,0 +1,378 @@ +package security + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SoftwareInventoriesClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type SoftwareInventoriesClient struct { + BaseClient +} + +// NewSoftwareInventoriesClient creates an instance of the SoftwareInventoriesClient client. +func NewSoftwareInventoriesClient(subscriptionID string, ascLocation string) SoftwareInventoriesClient { + return NewSoftwareInventoriesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewSoftwareInventoriesClientWithBaseURI creates an instance of the SoftwareInventoriesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewSoftwareInventoriesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SoftwareInventoriesClient { + return SoftwareInventoriesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// Get gets a single software data of the virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// resourceNamespace - the namespace of the resource. +// resourceType - the type of the resource. +// resourceName - name of the resource. +// softwareName - name of the installed software. +func (client SoftwareInventoriesClient) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string) (result Software, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.SoftwareInventoriesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client SoftwareInventoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceNamespace": autorest.Encode("path", resourceNamespace), + "resourceType": autorest.Encode("path", resourceType), + "softwareName": autorest.Encode("path", softwareName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SoftwareInventoriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SoftwareInventoriesClient) GetResponder(resp *http.Response) (result Software, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByExtendedResource gets the software inventory of the virtual machine. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// resourceNamespace - the namespace of the resource. +// resourceType - the type of the resource. +// resourceName - name of the resource. +func (client SoftwareInventoriesClient) ListByExtendedResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result SoftwaresListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListByExtendedResource") + defer func() { + sc := -1 + if result.sl.Response.Response != nil { + sc = result.sl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.SoftwareInventoriesClient", "ListByExtendedResource", err.Error()) + } + + result.fn = client.listByExtendedResourceNextResults + req, err := client.ListByExtendedResourcePreparer(ctx, resourceGroupName, resourceNamespace, resourceType, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListByExtendedResource", nil, "Failure preparing request") + return + } + + resp, err := client.ListByExtendedResourceSender(req) + if err != nil { + result.sl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListByExtendedResource", resp, "Failure sending request") + return + } + + result.sl, err = client.ListByExtendedResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListByExtendedResource", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByExtendedResourcePreparer prepares the ListByExtendedResource request. +func (client SoftwareInventoriesClient) ListByExtendedResourcePreparer(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceNamespace": autorest.Encode("path", resourceNamespace), + "resourceType": autorest.Encode("path", resourceType), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByExtendedResourceSender sends the ListByExtendedResource request. The method will close the +// http.Response Body if it receives an error. +func (client SoftwareInventoriesClient) ListByExtendedResourceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByExtendedResourceResponder handles the response to the ListByExtendedResource request. The method always +// closes the http.Response Body. +func (client SoftwareInventoriesClient) ListByExtendedResourceResponder(resp *http.Response) (result SoftwaresList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByExtendedResourceNextResults retrieves the next set of results, if any. +func (client SoftwareInventoriesClient) listByExtendedResourceNextResults(ctx context.Context, lastResults SoftwaresList) (result SoftwaresList, err error) { + req, err := lastResults.softwaresListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listByExtendedResourceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByExtendedResourceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listByExtendedResourceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByExtendedResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listByExtendedResourceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByExtendedResourceComplete enumerates all values, automatically crossing page boundaries as required. +func (client SoftwareInventoriesClient) ListByExtendedResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result SoftwaresListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListByExtendedResource") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByExtendedResource(ctx, resourceGroupName, resourceNamespace, resourceType, resourceName) + return +} + +// ListBySubscription gets the software inventory of all virtual machines in the subscriptions. +func (client SoftwareInventoriesClient) ListBySubscription(ctx context.Context) (result SoftwaresListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListBySubscription") + defer func() { + sc := -1 + if result.sl.Response.Response != nil { + sc = result.sl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.SoftwareInventoriesClient", "ListBySubscription", err.Error()) + } + + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.sl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.sl, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client SoftwareInventoriesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/softwareInventories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client SoftwareInventoriesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client SoftwareInventoriesClient) ListBySubscriptionResponder(resp *http.Response) (result SoftwaresList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client SoftwareInventoriesClient) listBySubscriptionNextResults(ctx context.Context, lastResults SoftwaresList) (result SoftwaresList, err error) { + req, err := lastResults.softwaresListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.SoftwareInventoriesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client SoftwareInventoriesClient) ListBySubscriptionComplete(ctx context.Context) (result SoftwaresListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SoftwareInventoriesClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBySubscription(ctx) + return +} diff --git a/services/preview/security/mgmt/v3.0/security/CHANGELOG.md b/services/preview/security/mgmt/v3.0/security/CHANGELOG.md index 52911e4cc5e4..d8d288583a8d 100644 --- a/services/preview/security/mgmt/v3.0/security/CHANGELOG.md +++ b/services/preview/security/mgmt/v3.0/security/CHANGELOG.md @@ -1,2 +1,676 @@ -# Change History +# Unreleased +## Breaking Changes + +### Removed Constants + +1. AlertIntent.CommandAndControl +1. AlertIntent.Exploitation +1. AlertIntent.PreAttack +1. AlertIntent.Probing +1. AuthorizationState.Authorized +1. AuthorizationState.Unauthorized +1. DeviceCriticality.Important +1. DeviceStatus.DeviceStatusActive +1. DeviceStatus.DeviceStatusRemoved +1. EnforcementSupport.EnforcementSupportNotSupported +1. EnforcementSupport.EnforcementSupportSupported +1. EnforcementSupport.EnforcementSupportUnknown +1. MacSignificance.Primary +1. MacSignificance.Secondary +1. ManagementState.Managed +1. ManagementState.Unmanaged +1. OnboardingKind.Default +1. OnboardingKind.Evaluation +1. OnboardingKind.MigratedToAzure +1. OnboardingKind.Purchased +1. PricingTier.PricingTierFree +1. PricingTier.PricingTierStandard +1. ProgrammingState.NotProgrammingDevice +1. ProgrammingState.ProgrammingDevice +1. PurdueLevel.Enterprise +1. PurdueLevel.ProcessControl +1. PurdueLevel.Supervisory +1. RecommendationSeverity.RecommendationSeverityHealthy +1. RecommendationSeverity.RecommendationSeverityHigh +1. RecommendationSeverity.RecommendationSeverityLow +1. RecommendationSeverity.RecommendationSeverityMedium +1. RecommendationSeverity.RecommendationSeverityNotApplicable +1. RecommendationSeverity.RecommendationSeverityOffByPolicy +1. RecommendationSeverity.RecommendationSeverityUnknown +1. RelationToIPStatus.Certain +1. RelationToIPStatus.Guess +1. ScanningFunctionality.NotScannerDevice +1. ScanningFunctionality.ScannerDevice +1. SensorStatus.Disconnected +1. SensorStatus.Ok +1. SensorStatus.Unavailable +1. SensorType.SensorTypeEnterprise +1. SensorType.SensorTypeOt +1. TiStatus.TiStatusFailed +1. TiStatus.TiStatusInProgress +1. TiStatus.TiStatusOk +1. TiStatus.TiStatusUpdateAvailable +1. VersionKind.Latest +1. VersionKind.Preview +1. VersionKind.Previous + +### Removed Funcs + +1. *AssessmentMetadataListIterator.Next() error +1. *AssessmentMetadataListIterator.NextWithContext(context.Context) error +1. *AssessmentMetadataListPage.Next() error +1. *AssessmentMetadataListPage.NextWithContext(context.Context) error +1. *Device.UnmarshalJSON([]byte) error +1. *DeviceListIterator.Next() error +1. *DeviceListIterator.NextWithContext(context.Context) error +1. *DeviceListPage.Next() error +1. *DeviceListPage.NextWithContext(context.Context) error +1. *IotAlertListModelIterator.Next() error +1. *IotAlertListModelIterator.NextWithContext(context.Context) error +1. *IotAlertListModelPage.Next() error +1. *IotAlertListModelPage.NextWithContext(context.Context) error +1. *IotAlertModel.UnmarshalJSON([]byte) error +1. *IotAlertType.UnmarshalJSON([]byte) error +1. *IotDefenderSettingsModel.UnmarshalJSON([]byte) error +1. *IotRecommendationListModelIterator.Next() error +1. *IotRecommendationListModelIterator.NextWithContext(context.Context) error +1. *IotRecommendationListModelPage.Next() error +1. *IotRecommendationListModelPage.NextWithContext(context.Context) error +1. *IotRecommendationModel.UnmarshalJSON([]byte) error +1. *IotRecommendationType.UnmarshalJSON([]byte) error +1. *IotSensorsModel.UnmarshalJSON([]byte) error +1. *IotSitesModel.UnmarshalJSON([]byte) error +1. AssessmentMetadataList.IsEmpty() bool +1. AssessmentMetadataList.MarshalJSON() ([]byte, error) +1. AssessmentMetadataListIterator.NotDone() bool +1. AssessmentMetadataListIterator.Response() AssessmentMetadataList +1. AssessmentMetadataListIterator.Value() AssessmentMetadata +1. AssessmentMetadataListPage.NotDone() bool +1. AssessmentMetadataListPage.Response() AssessmentMetadataList +1. AssessmentMetadataListPage.Values() []AssessmentMetadata +1. Device.MarshalJSON() ([]byte, error) +1. DeviceClient.Get(context.Context, string, string) (Device, error) +1. DeviceClient.GetPreparer(context.Context, string, string) (*http.Request, error) +1. DeviceClient.GetResponder(*http.Response) (Device, error) +1. DeviceClient.GetSender(*http.Request) (*http.Response, error) +1. DeviceList.IsEmpty() bool +1. DeviceList.MarshalJSON() ([]byte, error) +1. DeviceListIterator.NotDone() bool +1. DeviceListIterator.Response() DeviceList +1. DeviceListIterator.Value() Device +1. DeviceListPage.NotDone() bool +1. DeviceListPage.Response() DeviceList +1. DeviceListPage.Values() []Device +1. DeviceProperties.MarshalJSON() ([]byte, error) +1. DevicesForHubClient.List(context.Context, string, *int32, string, ManagementState) (DeviceListPage, error) +1. DevicesForHubClient.ListComplete(context.Context, string, *int32, string, ManagementState) (DeviceListIterator, error) +1. DevicesForHubClient.ListPreparer(context.Context, string, *int32, string, ManagementState) (*http.Request, error) +1. DevicesForHubClient.ListResponder(*http.Response) (DeviceList, error) +1. DevicesForHubClient.ListSender(*http.Request) (*http.Response, error) +1. DevicesForSubscriptionClient.List(context.Context, *int32, string, ManagementState) (DeviceListPage, error) +1. DevicesForSubscriptionClient.ListComplete(context.Context, *int32, string, ManagementState) (DeviceListIterator, error) +1. DevicesForSubscriptionClient.ListPreparer(context.Context, *int32, string, ManagementState) (*http.Request, error) +1. DevicesForSubscriptionClient.ListResponder(*http.Response) (DeviceList, error) +1. DevicesForSubscriptionClient.ListSender(*http.Request) (*http.Response, error) +1. Firmware.MarshalJSON() ([]byte, error) +1. IPAddress.MarshalJSON() ([]byte, error) +1. IotAlertListModel.IsEmpty() bool +1. IotAlertListModel.MarshalJSON() ([]byte, error) +1. IotAlertListModelIterator.NotDone() bool +1. IotAlertListModelIterator.Response() IotAlertListModel +1. IotAlertListModelIterator.Value() IotAlertModel +1. IotAlertListModelPage.NotDone() bool +1. IotAlertListModelPage.Response() IotAlertListModel +1. IotAlertListModelPage.Values() []IotAlertModel +1. IotAlertModel.MarshalJSON() ([]byte, error) +1. IotAlertPropertiesModel.MarshalJSON() ([]byte, error) +1. IotAlertType.MarshalJSON() ([]byte, error) +1. IotAlertTypeProperties.MarshalJSON() ([]byte, error) +1. IotAlertTypesClient.Get(context.Context, string) (IotAlertType, error) +1. IotAlertTypesClient.GetPreparer(context.Context, string) (*http.Request, error) +1. IotAlertTypesClient.GetResponder(*http.Response) (IotAlertType, error) +1. IotAlertTypesClient.GetSender(*http.Request) (*http.Response, error) +1. IotAlertTypesClient.List(context.Context) (IotAlertTypeList, error) +1. IotAlertTypesClient.ListPreparer(context.Context) (*http.Request, error) +1. IotAlertTypesClient.ListResponder(*http.Response) (IotAlertTypeList, error) +1. IotAlertTypesClient.ListSender(*http.Request) (*http.Response, error) +1. IotAlertsClient.Get(context.Context, string, string) (IotAlertModel, error) +1. IotAlertsClient.GetPreparer(context.Context, string, string) (*http.Request, error) +1. IotAlertsClient.GetResponder(*http.Response) (IotAlertModel, error) +1. IotAlertsClient.GetSender(*http.Request) (*http.Response, error) +1. IotAlertsClient.List(context.Context, string, string, string, string, ManagementState, string, *int32, string) (IotAlertListModelPage, error) +1. IotAlertsClient.ListComplete(context.Context, string, string, string, string, ManagementState, string, *int32, string) (IotAlertListModelIterator, error) +1. IotAlertsClient.ListPreparer(context.Context, string, string, string, string, ManagementState, string, *int32, string) (*http.Request, error) +1. IotAlertsClient.ListResponder(*http.Response) (IotAlertListModel, error) +1. IotAlertsClient.ListSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsClient.CreateOrUpdate(context.Context, IotDefenderSettingsModel) (IotDefenderSettingsModel, error) +1. IotDefenderSettingsClient.CreateOrUpdatePreparer(context.Context, IotDefenderSettingsModel) (*http.Request, error) +1. IotDefenderSettingsClient.CreateOrUpdateResponder(*http.Response) (IotDefenderSettingsModel, error) +1. IotDefenderSettingsClient.CreateOrUpdateSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsClient.Delete(context.Context) (autorest.Response, error) +1. IotDefenderSettingsClient.DeletePreparer(context.Context) (*http.Request, error) +1. IotDefenderSettingsClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. IotDefenderSettingsClient.DeleteSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsClient.DownloadManagerActivation(context.Context) (ReadCloser, error) +1. IotDefenderSettingsClient.DownloadManagerActivationPreparer(context.Context) (*http.Request, error) +1. IotDefenderSettingsClient.DownloadManagerActivationResponder(*http.Response) (ReadCloser, error) +1. IotDefenderSettingsClient.DownloadManagerActivationSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsClient.Get(context.Context) (IotDefenderSettingsModel, error) +1. IotDefenderSettingsClient.GetPreparer(context.Context) (*http.Request, error) +1. IotDefenderSettingsClient.GetResponder(*http.Response) (IotDefenderSettingsModel, error) +1. IotDefenderSettingsClient.GetSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsClient.List(context.Context) (IotDefenderSettingsList, error) +1. IotDefenderSettingsClient.ListPreparer(context.Context) (*http.Request, error) +1. IotDefenderSettingsClient.ListResponder(*http.Response) (IotDefenderSettingsList, error) +1. IotDefenderSettingsClient.ListSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsClient.PackageDownloadsMethod(context.Context) (PackageDownloads, error) +1. IotDefenderSettingsClient.PackageDownloadsMethodPreparer(context.Context) (*http.Request, error) +1. IotDefenderSettingsClient.PackageDownloadsMethodResponder(*http.Response) (PackageDownloads, error) +1. IotDefenderSettingsClient.PackageDownloadsMethodSender(*http.Request) (*http.Response, error) +1. IotDefenderSettingsList.MarshalJSON() ([]byte, error) +1. IotDefenderSettingsModel.MarshalJSON() ([]byte, error) +1. IotDefenderSettingsProperties.MarshalJSON() ([]byte, error) +1. IotRecommendationListModel.IsEmpty() bool +1. IotRecommendationListModel.MarshalJSON() ([]byte, error) +1. IotRecommendationListModelIterator.NotDone() bool +1. IotRecommendationListModelIterator.Response() IotRecommendationListModel +1. IotRecommendationListModelIterator.Value() IotRecommendationModel +1. IotRecommendationListModelPage.NotDone() bool +1. IotRecommendationListModelPage.Response() IotRecommendationListModel +1. IotRecommendationListModelPage.Values() []IotRecommendationModel +1. IotRecommendationModel.MarshalJSON() ([]byte, error) +1. IotRecommendationPropertiesModel.MarshalJSON() ([]byte, error) +1. IotRecommendationType.MarshalJSON() ([]byte, error) +1. IotRecommendationTypeProperties.MarshalJSON() ([]byte, error) +1. IotRecommendationTypesClient.Get(context.Context, string) (IotRecommendationType, error) +1. IotRecommendationTypesClient.GetPreparer(context.Context, string) (*http.Request, error) +1. IotRecommendationTypesClient.GetResponder(*http.Response) (IotRecommendationType, error) +1. IotRecommendationTypesClient.GetSender(*http.Request) (*http.Response, error) +1. IotRecommendationTypesClient.List(context.Context) (IotRecommendationTypeList, error) +1. IotRecommendationTypesClient.ListPreparer(context.Context) (*http.Request, error) +1. IotRecommendationTypesClient.ListResponder(*http.Response) (IotRecommendationTypeList, error) +1. IotRecommendationTypesClient.ListSender(*http.Request) (*http.Response, error) +1. IotRecommendationsClient.Get(context.Context, string, string) (IotRecommendationModel, error) +1. IotRecommendationsClient.GetPreparer(context.Context, string, string) (*http.Request, error) +1. IotRecommendationsClient.GetResponder(*http.Response) (IotRecommendationModel, error) +1. IotRecommendationsClient.GetSender(*http.Request) (*http.Response, error) +1. IotRecommendationsClient.List(context.Context, string, string, string, *int32, string) (IotRecommendationListModelPage, error) +1. IotRecommendationsClient.ListComplete(context.Context, string, string, string, *int32, string) (IotRecommendationListModelIterator, error) +1. IotRecommendationsClient.ListPreparer(context.Context, string, string, string, *int32, string) (*http.Request, error) +1. IotRecommendationsClient.ListResponder(*http.Response) (IotRecommendationListModel, error) +1. IotRecommendationsClient.ListSender(*http.Request) (*http.Response, error) +1. IotSensorProperties.MarshalJSON() ([]byte, error) +1. IotSensorsClient.CreateOrUpdate(context.Context, string, string, IotSensorsModel) (IotSensorsModel, error) +1. IotSensorsClient.CreateOrUpdatePreparer(context.Context, string, string, IotSensorsModel) (*http.Request, error) +1. IotSensorsClient.CreateOrUpdateResponder(*http.Response) (IotSensorsModel, error) +1. IotSensorsClient.CreateOrUpdateSender(*http.Request) (*http.Response, error) +1. IotSensorsClient.Delete(context.Context, string, string) (autorest.Response, error) +1. IotSensorsClient.DeletePreparer(context.Context, string, string) (*http.Request, error) +1. IotSensorsClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. IotSensorsClient.DeleteSender(*http.Request) (*http.Response, error) +1. IotSensorsClient.DownloadActivation(context.Context, string, string) (ReadCloser, error) +1. IotSensorsClient.DownloadActivationPreparer(context.Context, string, string) (*http.Request, error) +1. IotSensorsClient.DownloadActivationResponder(*http.Response) (ReadCloser, error) +1. IotSensorsClient.DownloadActivationSender(*http.Request) (*http.Response, error) +1. IotSensorsClient.DownloadResetPassword(context.Context, string, string, ResetPasswordInput) (ReadCloser, error) +1. IotSensorsClient.DownloadResetPasswordPreparer(context.Context, string, string, ResetPasswordInput) (*http.Request, error) +1. IotSensorsClient.DownloadResetPasswordResponder(*http.Response) (ReadCloser, error) +1. IotSensorsClient.DownloadResetPasswordSender(*http.Request) (*http.Response, error) +1. IotSensorsClient.Get(context.Context, string, string) (IotSensorsModel, error) +1. IotSensorsClient.GetPreparer(context.Context, string, string) (*http.Request, error) +1. IotSensorsClient.GetResponder(*http.Response) (IotSensorsModel, error) +1. IotSensorsClient.GetSender(*http.Request) (*http.Response, error) +1. IotSensorsClient.List(context.Context, string) (IotSensorsList, error) +1. IotSensorsClient.ListPreparer(context.Context, string) (*http.Request, error) +1. IotSensorsClient.ListResponder(*http.Response) (IotSensorsList, error) +1. IotSensorsClient.ListSender(*http.Request) (*http.Response, error) +1. IotSensorsClient.TriggerTiPackageUpdate(context.Context, string, string) (autorest.Response, error) +1. IotSensorsClient.TriggerTiPackageUpdatePreparer(context.Context, string, string) (*http.Request, error) +1. IotSensorsClient.TriggerTiPackageUpdateResponder(*http.Response) (autorest.Response, error) +1. IotSensorsClient.TriggerTiPackageUpdateSender(*http.Request) (*http.Response, error) +1. IotSensorsList.MarshalJSON() ([]byte, error) +1. IotSensorsModel.MarshalJSON() ([]byte, error) +1. IotSiteProperties.MarshalJSON() ([]byte, error) +1. IotSitesClient.CreateOrUpdate(context.Context, string, IotSitesModel) (IotSitesModel, error) +1. IotSitesClient.CreateOrUpdatePreparer(context.Context, string, IotSitesModel) (*http.Request, error) +1. IotSitesClient.CreateOrUpdateResponder(*http.Response) (IotSitesModel, error) +1. IotSitesClient.CreateOrUpdateSender(*http.Request) (*http.Response, error) +1. IotSitesClient.Delete(context.Context, string) (autorest.Response, error) +1. IotSitesClient.DeletePreparer(context.Context, string) (*http.Request, error) +1. IotSitesClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. IotSitesClient.DeleteSender(*http.Request) (*http.Response, error) +1. IotSitesClient.Get(context.Context, string) (IotSitesModel, error) +1. IotSitesClient.GetPreparer(context.Context, string) (*http.Request, error) +1. IotSitesClient.GetResponder(*http.Response) (IotSitesModel, error) +1. IotSitesClient.GetSender(*http.Request) (*http.Response, error) +1. IotSitesClient.List(context.Context, string) (IotSitesList, error) +1. IotSitesClient.ListPreparer(context.Context, string) (*http.Request, error) +1. IotSitesClient.ListResponder(*http.Response) (IotSitesList, error) +1. IotSitesClient.ListSender(*http.Request) (*http.Response, error) +1. IotSitesList.MarshalJSON() ([]byte, error) +1. IotSitesModel.MarshalJSON() ([]byte, error) +1. MacAddress.MarshalJSON() ([]byte, error) +1. NetworkInterface.MarshalJSON() ([]byte, error) +1. NewAssessmentMetadataListIterator(AssessmentMetadataListPage) AssessmentMetadataListIterator +1. NewAssessmentMetadataListPage(AssessmentMetadataList, func(context.Context, AssessmentMetadataList) (AssessmentMetadataList, error)) AssessmentMetadataListPage +1. NewDeviceClient(string, string) DeviceClient +1. NewDeviceClientWithBaseURI(string, string, string) DeviceClient +1. NewDeviceListIterator(DeviceListPage) DeviceListIterator +1. NewDeviceListPage(DeviceList, func(context.Context, DeviceList) (DeviceList, error)) DeviceListPage +1. NewDevicesForHubClient(string, string) DevicesForHubClient +1. NewDevicesForHubClientWithBaseURI(string, string, string) DevicesForHubClient +1. NewDevicesForSubscriptionClient(string, string) DevicesForSubscriptionClient +1. NewDevicesForSubscriptionClientWithBaseURI(string, string, string) DevicesForSubscriptionClient +1. NewIotAlertListModelIterator(IotAlertListModelPage) IotAlertListModelIterator +1. NewIotAlertListModelPage(IotAlertListModel, func(context.Context, IotAlertListModel) (IotAlertListModel, error)) IotAlertListModelPage +1. NewIotAlertTypesClient(string, string) IotAlertTypesClient +1. NewIotAlertTypesClientWithBaseURI(string, string, string) IotAlertTypesClient +1. NewIotAlertsClient(string, string) IotAlertsClient +1. NewIotAlertsClientWithBaseURI(string, string, string) IotAlertsClient +1. NewIotDefenderSettingsClient(string, string) IotDefenderSettingsClient +1. NewIotDefenderSettingsClientWithBaseURI(string, string, string) IotDefenderSettingsClient +1. NewIotRecommendationListModelIterator(IotRecommendationListModelPage) IotRecommendationListModelIterator +1. NewIotRecommendationListModelPage(IotRecommendationListModel, func(context.Context, IotRecommendationListModel) (IotRecommendationListModel, error)) IotRecommendationListModelPage +1. NewIotRecommendationTypesClient(string, string) IotRecommendationTypesClient +1. NewIotRecommendationTypesClientWithBaseURI(string, string, string) IotRecommendationTypesClient +1. NewIotRecommendationsClient(string, string) IotRecommendationsClient +1. NewIotRecommendationsClientWithBaseURI(string, string, string) IotRecommendationsClient +1. NewIotSensorsClient(string, string) IotSensorsClient +1. NewIotSensorsClientWithBaseURI(string, string, string) IotSensorsClient +1. NewIotSitesClient(string, string) IotSitesClient +1. NewIotSitesClientWithBaseURI(string, string, string) IotSitesClient +1. NewOnPremiseIotSensorsClient(string, string) OnPremiseIotSensorsClient +1. NewOnPremiseIotSensorsClientWithBaseURI(string, string, string) OnPremiseIotSensorsClient +1. OnPremiseIotSensor.MarshalJSON() ([]byte, error) +1. OnPremiseIotSensorsClient.CreateOrUpdate(context.Context, string) (OnPremiseIotSensor, error) +1. OnPremiseIotSensorsClient.CreateOrUpdatePreparer(context.Context, string) (*http.Request, error) +1. OnPremiseIotSensorsClient.CreateOrUpdateResponder(*http.Response) (OnPremiseIotSensor, error) +1. OnPremiseIotSensorsClient.CreateOrUpdateSender(*http.Request) (*http.Response, error) +1. OnPremiseIotSensorsClient.Delete(context.Context, string) (autorest.Response, error) +1. OnPremiseIotSensorsClient.DeletePreparer(context.Context, string) (*http.Request, error) +1. OnPremiseIotSensorsClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. OnPremiseIotSensorsClient.DeleteSender(*http.Request) (*http.Response, error) +1. OnPremiseIotSensorsClient.DownloadActivation(context.Context, string) (ReadCloser, error) +1. OnPremiseIotSensorsClient.DownloadActivationPreparer(context.Context, string) (*http.Request, error) +1. OnPremiseIotSensorsClient.DownloadActivationResponder(*http.Response) (ReadCloser, error) +1. OnPremiseIotSensorsClient.DownloadActivationSender(*http.Request) (*http.Response, error) +1. OnPremiseIotSensorsClient.DownloadResetPassword(context.Context, string, ResetPasswordInput) (ReadCloser, error) +1. OnPremiseIotSensorsClient.DownloadResetPasswordPreparer(context.Context, string, ResetPasswordInput) (*http.Request, error) +1. OnPremiseIotSensorsClient.DownloadResetPasswordResponder(*http.Response) (ReadCloser, error) +1. OnPremiseIotSensorsClient.DownloadResetPasswordSender(*http.Request) (*http.Response, error) +1. OnPremiseIotSensorsClient.Get(context.Context, string) (OnPremiseIotSensor, error) +1. OnPremiseIotSensorsClient.GetPreparer(context.Context, string) (*http.Request, error) +1. OnPremiseIotSensorsClient.GetResponder(*http.Response) (OnPremiseIotSensor, error) +1. OnPremiseIotSensorsClient.GetSender(*http.Request) (*http.Response, error) +1. OnPremiseIotSensorsClient.List(context.Context) (OnPremiseIotSensorsList, error) +1. OnPremiseIotSensorsClient.ListPreparer(context.Context) (*http.Request, error) +1. OnPremiseIotSensorsClient.ListResponder(*http.Response) (OnPremiseIotSensorsList, error) +1. OnPremiseIotSensorsClient.ListSender(*http.Request) (*http.Response, error) +1. OnPremiseIotSensorsList.MarshalJSON() ([]byte, error) +1. PackageDownloadInfo.MarshalJSON() ([]byte, error) +1. PackageDownloads.MarshalJSON() ([]byte, error) +1. PackageDownloadsCentralManager.MarshalJSON() ([]byte, error) +1. PackageDownloadsCentralManagerFull.MarshalJSON() ([]byte, error) +1. PackageDownloadsCentralManagerFullOvf.MarshalJSON() ([]byte, error) +1. PackageDownloadsSensor.MarshalJSON() ([]byte, error) +1. PackageDownloadsSensorFull.MarshalJSON() ([]byte, error) +1. PackageDownloadsSensorFullOvf.MarshalJSON() ([]byte, error) +1. PossibleAlertIntentValues() []AlertIntent +1. PossibleAuthorizationStateValues() []AuthorizationState +1. PossibleDeviceCriticalityValues() []DeviceCriticality +1. PossibleDeviceStatusValues() []DeviceStatus +1. PossibleMacSignificanceValues() []MacSignificance +1. PossibleManagementStateValues() []ManagementState +1. PossibleOnboardingKindValues() []OnboardingKind +1. PossibleProgrammingStateValues() []ProgrammingState +1. PossiblePurdueLevelValues() []PurdueLevel +1. PossibleRecommendationSeverityValues() []RecommendationSeverity +1. PossibleRelationToIPStatusValues() []RelationToIPStatus +1. PossibleScanningFunctionalityValues() []ScanningFunctionality +1. PossibleSensorStatusValues() []SensorStatus +1. PossibleSensorTypeValues() []SensorType +1. PossibleTiStatusValues() []TiStatus +1. PossibleVersionKindValues() []VersionKind +1. Protocol1.MarshalJSON() ([]byte, error) +1. Sensor.MarshalJSON() ([]byte, error) +1. Site.MarshalJSON() ([]byte, error) +1. UpgradePackageDownloadInfo.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### Removed Structs + +1. AssessmentMetadataList +1. AssessmentMetadataListIterator +1. AssessmentMetadataListPage +1. Device +1. DeviceClient +1. DeviceList +1. DeviceListIterator +1. DeviceListPage +1. DeviceProperties +1. DevicesForHubClient +1. DevicesForSubscriptionClient +1. Firmware +1. IPAddress +1. IotAlertListModel +1. IotAlertListModelIterator +1. IotAlertListModelPage +1. IotAlertModel +1. IotAlertPropertiesModel +1. IotAlertType +1. IotAlertTypeList +1. IotAlertTypeProperties +1. IotAlertTypesClient +1. IotAlertsClient +1. IotDefenderSettingsClient +1. IotDefenderSettingsList +1. IotDefenderSettingsModel +1. IotDefenderSettingsProperties +1. IotRecommendationListModel +1. IotRecommendationListModelIterator +1. IotRecommendationListModelPage +1. IotRecommendationModel +1. IotRecommendationPropertiesModel +1. IotRecommendationType +1. IotRecommendationTypeList +1. IotRecommendationTypeProperties +1. IotRecommendationTypesClient +1. IotRecommendationsClient +1. IotSensorProperties +1. IotSensorsClient +1. IotSensorsList +1. IotSensorsModel +1. IotSiteProperties +1. IotSitesClient +1. IotSitesList +1. IotSitesModel +1. MacAddress +1. NetworkInterface +1. OnPremiseIotSensor +1. OnPremiseIotSensorsClient +1. OnPremiseIotSensorsList +1. PackageDownloadInfo +1. PackageDownloads +1. PackageDownloadsCentralManager +1. PackageDownloadsCentralManagerFull +1. PackageDownloadsCentralManagerFullOvf +1. PackageDownloadsSensor +1. PackageDownloadsSensorFull +1. PackageDownloadsSensorFullOvf +1. Protocol1 +1. ReadCloser +1. ResetPasswordInput +1. Sensor +1. Site +1. UpgradePackageDownloadInfo + +#### Removed Struct Fields + +1. Assessment.autorest.Response +1. AssessmentMetadata.autorest.Response + +### Signature Changes + +#### Const Types + +1. Collection changed type from AlertIntent to Tactics +1. CredentialAccess changed type from AlertIntent to Tactics +1. DefenseEvasion changed type from AlertIntent to Tactics +1. Discovery changed type from AlertIntent to Tactics +1. Execution changed type from AlertIntent to Tactics +1. Exfiltration changed type from AlertIntent to Tactics +1. Impact changed type from AlertIntent to Tactics +1. InitialAccess changed type from AlertIntent to Tactics +1. LateralMovement changed type from AlertIntent to Tactics +1. Persistence changed type from AlertIntent to Tactics +1. PrivilegeEscalation changed type from AlertIntent to Tactics +1. Standard changed type from DeviceCriticality to PricingTier +1. Unknown changed type from AlertIntent to EnforcementSupport + +#### Funcs + +1. AssessmentListIterator.Value + - Returns + - From: Assessment + - To: AssessmentResponse +1. AssessmentListPage.Values + - Returns + - From: []Assessment + - To: []AssessmentResponse +1. AssessmentsClient.CreateOrUpdate + - Returns + - From: Assessment, error + - To: AssessmentResponse, error +1. AssessmentsClient.CreateOrUpdateResponder + - Returns + - From: Assessment, error + - To: AssessmentResponse, error +1. AssessmentsClient.Get + - Returns + - From: Assessment, error + - To: AssessmentResponse, error +1. AssessmentsClient.GetResponder + - Returns + - From: Assessment, error + - To: AssessmentResponse, error +1. AssessmentsMetadataClient.CreateInSubscription + - Params + - From: context.Context, string, AssessmentMetadata + - To: context.Context, string, AssessmentMetadataResponse + - Returns + - From: AssessmentMetadata, error + - To: AssessmentMetadataResponse, error +1. AssessmentsMetadataClient.CreateInSubscriptionPreparer + - Params + - From: context.Context, string, AssessmentMetadata + - To: context.Context, string, AssessmentMetadataResponse +1. AssessmentsMetadataClient.CreateInSubscriptionResponder + - Returns + - From: AssessmentMetadata, error + - To: AssessmentMetadataResponse, error +1. AssessmentsMetadataClient.Get + - Returns + - From: AssessmentMetadata, error + - To: AssessmentMetadataResponse, error +1. AssessmentsMetadataClient.GetInSubscription + - Returns + - From: AssessmentMetadata, error + - To: AssessmentMetadataResponse, error +1. AssessmentsMetadataClient.GetInSubscriptionResponder + - Returns + - From: AssessmentMetadata, error + - To: AssessmentMetadataResponse, error +1. AssessmentsMetadataClient.GetResponder + - Returns + - From: AssessmentMetadata, error + - To: AssessmentMetadataResponse, error +1. AssessmentsMetadataClient.List + - Returns + - From: AssessmentMetadataListPage, error + - To: AssessmentMetadataResponseListPage, error +1. AssessmentsMetadataClient.ListBySubscription + - Returns + - From: AssessmentMetadataListPage, error + - To: AssessmentMetadataResponseListPage, error +1. AssessmentsMetadataClient.ListBySubscriptionComplete + - Returns + - From: AssessmentMetadataListIterator, error + - To: AssessmentMetadataResponseListIterator, error +1. AssessmentsMetadataClient.ListBySubscriptionResponder + - Returns + - From: AssessmentMetadataList, error + - To: AssessmentMetadataResponseList, error +1. AssessmentsMetadataClient.ListComplete + - Returns + - From: AssessmentMetadataListIterator, error + - To: AssessmentMetadataResponseListIterator, error +1. AssessmentsMetadataClient.ListResponder + - Returns + - From: AssessmentMetadataList, error + - To: AssessmentMetadataResponseList, error + +#### Struct Fields + +1. AssessmentList.Value changed type from *[]Assessment to *[]AssessmentResponse + +## Additive Changes + +### New Constants + +1. EnforcementSupport.NotSupported +1. EnforcementSupport.Supported +1. PricingTier.Free +1. Tactics.CommandandControl +1. Tactics.Reconnaissance +1. Tactics.ResourceDevelopment +1. Techniques.AbuseElevationControlMechanism +1. Techniques.AccessTokenManipulation +1. Techniques.AccountDiscovery +1. Techniques.AccountManipulation +1. Techniques.ActiveScanning +1. Techniques.ApplicationLayerProtocol +1. Techniques.AudioCapture +1. Techniques.BootorLogonAutostartExecution +1. Techniques.BootorLogonInitializationScripts +1. Techniques.BruteForce +1. Techniques.CloudInfrastructureDiscovery +1. Techniques.CloudServiceDashboard +1. Techniques.CloudServiceDiscovery +1. Techniques.CommandandScriptingInterpreter +1. Techniques.CompromiseClientSoftwareBinary +1. Techniques.CompromiseInfrastructure +1. Techniques.ContainerandResourceDiscovery +1. Techniques.CreateAccount +1. Techniques.CreateorModifySystemProcess +1. Techniques.CredentialsfromPasswordStores +1. Techniques.DataDestruction +1. Techniques.DataEncryptedforImpact +1. Techniques.DataManipulation +1. Techniques.DataStaged +1. Techniques.DatafromCloudStorageObject +1. Techniques.DatafromConfigurationRepository +1. Techniques.DatafromInformationRepositories +1. Techniques.DatafromLocalSystem +1. Techniques.Defacement +1. Techniques.DeobfuscateDecodeFilesorInformation +1. Techniques.DiskWipe +1. Techniques.DomainTrustDiscovery +1. Techniques.DriveByCompromise +1. Techniques.DynamicResolution +1. Techniques.EndpointDenialofService +1. Techniques.EventTriggeredExecution +1. Techniques.ExfiltrationOverAlternativeProtocol +1. Techniques.ExploitPublicFacingApplication +1. Techniques.ExploitationforClientExecution +1. Techniques.ExploitationforCredentialAccess +1. Techniques.ExploitationforDefenseEvasion +1. Techniques.ExploitationforPrivilegeEscalation +1. Techniques.ExploitationofRemoteServices +1. Techniques.ExternalRemoteServices +1. Techniques.FallbackChannels +1. Techniques.FileandDirectoryDiscovery +1. Techniques.FileandDirectoryPermissionsModification +1. Techniques.GatherVictimNetworkInformation +1. Techniques.HideArtifacts +1. Techniques.HijackExecutionFlow +1. Techniques.ImpairDefenses +1. Techniques.ImplantContainerImage +1. Techniques.IndicatorRemovalonHost +1. Techniques.IndirectCommandExecution +1. Techniques.IngressToolTransfer +1. Techniques.InputCapture +1. Techniques.InterProcessCommunication +1. Techniques.LateralToolTransfer +1. Techniques.ManInTheMiddle +1. Techniques.Masquerading +1. Techniques.ModifyAuthenticationProcess +1. Techniques.ModifyRegistry +1. Techniques.NetworkDenialofService +1. Techniques.NetworkServiceScanning +1. Techniques.NetworkSniffing +1. Techniques.NonApplicationLayerProtocol +1. Techniques.NonStandardPort +1. Techniques.OSCredentialDumping +1. Techniques.ObfuscatedFilesorInformation +1. Techniques.ObtainCapabilities +1. Techniques.ObuscatedFilesorInformation +1. Techniques.OfficeApplicationStartup +1. Techniques.PermissionGroupsDiscovery +1. Techniques.Phishing +1. Techniques.PreOSBoot +1. Techniques.ProcessDiscovery +1. Techniques.ProcessInjection +1. Techniques.ProtocolTunneling +1. Techniques.Proxy +1. Techniques.QueryRegistry +1. Techniques.RemoteAccessSoftware +1. Techniques.RemoteServiceSessionHijacking +1. Techniques.RemoteServices +1. Techniques.RemoteSystemDiscovery +1. Techniques.ResourceHijacking +1. Techniques.SQLStoredProcedures +1. Techniques.ScheduledTaskJob +1. Techniques.ScreenCapture +1. Techniques.SearchVictimOwnedWebsites +1. Techniques.ServerSoftwareComponent +1. Techniques.ServiceStop +1. Techniques.SignedBinaryProxyExecution +1. Techniques.SoftwareDeploymentTools +1. Techniques.StealorForgeKerberosTickets +1. Techniques.SubvertTrustControls +1. Techniques.SupplyChainCompromise +1. Techniques.SystemInformationDiscovery +1. Techniques.TaintSharedContent +1. Techniques.TrafficSignaling +1. Techniques.TransferDatatoCloudAccount +1. Techniques.TrustedRelationship +1. Techniques.UnsecuredCredentials +1. Techniques.UserExecution +1. Techniques.ValidAccounts +1. Techniques.WindowsManagementInstrumentation + +### New Funcs + +1. *AssessmentMetadataResponse.UnmarshalJSON([]byte) error +1. *AssessmentMetadataResponseListIterator.Next() error +1. *AssessmentMetadataResponseListIterator.NextWithContext(context.Context) error +1. *AssessmentMetadataResponseListPage.Next() error +1. *AssessmentMetadataResponseListPage.NextWithContext(context.Context) error +1. *AssessmentPropertiesBase.UnmarshalJSON([]byte) error +1. *AssessmentPropertiesResponse.UnmarshalJSON([]byte) error +1. *AssessmentResponse.UnmarshalJSON([]byte) error +1. AssessmentMetadataPropertiesResponse.MarshalJSON() ([]byte, error) +1. AssessmentMetadataResponse.MarshalJSON() ([]byte, error) +1. AssessmentMetadataResponseList.IsEmpty() bool +1. AssessmentMetadataResponseList.MarshalJSON() ([]byte, error) +1. AssessmentMetadataResponseListIterator.NotDone() bool +1. AssessmentMetadataResponseListIterator.Response() AssessmentMetadataResponseList +1. AssessmentMetadataResponseListIterator.Value() AssessmentMetadataResponse +1. AssessmentMetadataResponseListPage.NotDone() bool +1. AssessmentMetadataResponseListPage.Response() AssessmentMetadataResponseList +1. AssessmentMetadataResponseListPage.Values() []AssessmentMetadataResponse +1. AssessmentPropertiesBase.MarshalJSON() ([]byte, error) +1. AssessmentPropertiesResponse.MarshalJSON() ([]byte, error) +1. AssessmentResponse.MarshalJSON() ([]byte, error) +1. AssessmentStatusResponse.MarshalJSON() ([]byte, error) +1. NewAssessmentMetadataResponseListIterator(AssessmentMetadataResponseListPage) AssessmentMetadataResponseListIterator +1. NewAssessmentMetadataResponseListPage(AssessmentMetadataResponseList, func(context.Context, AssessmentMetadataResponseList) (AssessmentMetadataResponseList, error)) AssessmentMetadataResponseListPage +1. PossibleTacticsValues() []Tactics +1. PossibleTechniquesValues() []Techniques + +### Struct Changes + +#### New Structs + +1. AssessmentMetadataPropertiesResponse +1. AssessmentMetadataPropertiesResponsePublishDates +1. AssessmentMetadataResponse +1. AssessmentMetadataResponseList +1. AssessmentMetadataResponseListIterator +1. AssessmentMetadataResponseListPage +1. AssessmentPropertiesBase +1. AssessmentPropertiesResponse +1. AssessmentResponse +1. AssessmentStatusResponse diff --git a/services/preview/security/mgmt/v3.0/security/_meta.json b/services/preview/security/mgmt/v3.0/security/_meta.json index 6e306caeaa27..83ea89dff291 100644 --- a/services/preview/security/mgmt/v3.0/security/_meta.json +++ b/services/preview/security/mgmt/v3.0/security/_meta.json @@ -1,10 +1,10 @@ { - "commit": "e3980786418c280ecd7ed2e141407ed0f63cd493", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/security/resource-manager/readme.md", "tag": "package-composite-v3", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-composite-v3 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/security/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-composite-v3 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/security/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/security/mgmt/v3.0/security/adaptivenetworkhardenings.go b/services/preview/security/mgmt/v3.0/security/adaptivenetworkhardenings.go index b6dfe47ac6cb..dc570d770c2e 100644 --- a/services/preview/security/mgmt/v3.0/security/adaptivenetworkhardenings.go +++ b/services/preview/security/mgmt/v3.0/security/adaptivenetworkhardenings.go @@ -72,7 +72,7 @@ func (client AdaptiveNetworkHardeningsClient) Enforce(ctx context.Context, resou result, err = client.EnforceSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsClient", "Enforce", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsClient", "Enforce", result.Response(), "Failure sending request") return } @@ -110,6 +110,7 @@ func (client AdaptiveNetworkHardeningsClient) EnforcePreparer(ctx context.Contex // http.Response Body if it receives an error. func (client AdaptiveNetworkHardeningsClient) EnforceSender(req *http.Request) (future AdaptiveNetworkHardeningsEnforceFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/security/mgmt/v3.0/security/alerts.go b/services/preview/security/mgmt/v3.0/security/alerts.go index 700b821ab120..d5bd0a1c0d7f 100644 --- a/services/preview/security/mgmt/v3.0/security/alerts.go +++ b/services/preview/security/mgmt/v3.0/security/alerts.go @@ -724,7 +724,7 @@ func (client AlertsClient) Simulate(ctx context.Context, alertSimulatorRequestBo result, err = client.SimulateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "Simulate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "Simulate", result.Response(), "Failure sending request") return } @@ -757,6 +757,7 @@ func (client AlertsClient) SimulatePreparer(ctx context.Context, alertSimulatorR // http.Response Body if it receives an error. func (client AlertsClient) SimulateSender(req *http.Request) (future AlertsSimulateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/security/mgmt/v3.0/security/assessments.go b/services/preview/security/mgmt/v3.0/security/assessments.go index 65f4d466da55..aaa10a3fe0d4 100644 --- a/services/preview/security/mgmt/v3.0/security/assessments.go +++ b/services/preview/security/mgmt/v3.0/security/assessments.go @@ -37,7 +37,7 @@ func NewAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascL // resourceID - the identifier of the resource. // assessmentName - the Assessment Key - Unique key for the assessment type // assessment - calculated assessment on a pre-defined assessment metadata -func (client AssessmentsClient) CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment Assessment) (result Assessment, err error) { +func (client AssessmentsClient) CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment Assessment) (result AssessmentResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.CreateOrUpdate") defer func() { @@ -51,19 +51,7 @@ func (client AssessmentsClient) CreateOrUpdate(ctx context.Context, resourceID s if err := validation.Validate([]validation.Validation{ {TargetValue: assessment, Constraints: []validation.Constraint{{Target: "assessment.AssessmentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "assessment.AssessmentProperties.Status", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "assessment.AssessmentProperties.Metadata", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "assessment.AssessmentProperties.Metadata.DisplayName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "assessment.AssessmentProperties.Metadata.PartnerData", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "assessment.AssessmentProperties.Metadata.PartnerData.PartnerName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "assessment.AssessmentProperties.Metadata.PartnerData.Secret", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "assessment.AssessmentProperties.PartnersData", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "assessment.AssessmentProperties.PartnersData.PartnerName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "assessment.AssessmentProperties.PartnersData.Secret", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { + Chain: []validation.Constraint{{Target: "assessment.AssessmentProperties.Status", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("security.AssessmentsClient", "CreateOrUpdate", err.Error()) } @@ -96,7 +84,7 @@ func (client AssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, reso "resourceId": resourceID, } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -119,7 +107,7 @@ func (client AssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.R // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client AssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result Assessment, err error) { +func (client AssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result AssessmentResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), @@ -174,7 +162,7 @@ func (client AssessmentsClient) DeletePreparer(ctx context.Context, resourceID s "resourceId": resourceID, } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,7 +197,7 @@ func (client AssessmentsClient) DeleteResponder(resp *http.Response) (result aut // resourceID - the identifier of the resource. // assessmentName - the Assessment Key - Unique key for the assessment type // expand - oData expand. Optional. -func (client AssessmentsClient) Get(ctx context.Context, resourceID string, assessmentName string, expand ExpandEnum) (result Assessment, err error) { +func (client AssessmentsClient) Get(ctx context.Context, resourceID string, assessmentName string, expand ExpandEnum) (result AssessmentResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.Get") defer func() { @@ -249,7 +237,7 @@ func (client AssessmentsClient) GetPreparer(ctx context.Context, resourceID stri "resourceId": resourceID, } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -273,7 +261,7 @@ func (client AssessmentsClient) GetSender(req *http.Request) (*http.Response, er // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client AssessmentsClient) GetResponder(resp *http.Response) (result Assessment, err error) { +func (client AssessmentsClient) GetResponder(resp *http.Response) (result AssessmentResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -331,7 +319,7 @@ func (client AssessmentsClient) ListPreparer(ctx context.Context, scope string) "scope": scope, } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go b/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go index 0cbfcd89ad55..ee9931406c0b 100644 --- a/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go +++ b/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go @@ -36,7 +36,7 @@ func NewAssessmentsMetadataClientWithBaseURI(baseURI string, subscriptionID stri // Parameters: // assessmentMetadataName - the Assessment Key - Unique key for the assessment type // assessmentMetadata - assessmentMetadata object -func (client AssessmentsMetadataClient) CreateInSubscription(ctx context.Context, assessmentMetadataName string, assessmentMetadata AssessmentMetadata) (result AssessmentMetadata, err error) { +func (client AssessmentsMetadataClient) CreateInSubscription(ctx context.Context, assessmentMetadataName string, assessmentMetadata AssessmentMetadataResponse) (result AssessmentMetadataResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.CreateInSubscription") defer func() { @@ -51,12 +51,15 @@ func (client AssessmentsMetadataClient) CreateInSubscription(ctx context.Context {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, {TargetValue: assessmentMetadata, - Constraints: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataProperties.DisplayName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "assessmentMetadata.AssessmentMetadataProperties.PartnerData", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataProperties.PartnerData.PartnerName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "assessmentMetadata.AssessmentMetadataProperties.PartnerData.Secret", Name: validation.Null, Rule: true, Chain: nil}, - }}, + Constraints: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PublishDates", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PublishDates.GA", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PublishDates.GA", Name: validation.Pattern, Rule: `^([0-9]{2}/){2}[0-9]{4}$`, Chain: nil}}}, + {Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PublishDates.Public", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PublishDates.Public", Name: validation.Pattern, Rule: `^([0-9]{2}/){2}[0-9]{4}$`, Chain: nil}}}, + }}, + {Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PlannedDeprecationDate", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "assessmentMetadata.AssessmentMetadataPropertiesResponse.PlannedDeprecationDate", Name: validation.Pattern, Rule: `^[0-9]{2}/[0-9]{4}$`, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("security.AssessmentsMetadataClient", "CreateInSubscription", err.Error()) } @@ -84,13 +87,13 @@ func (client AssessmentsMetadataClient) CreateInSubscription(ctx context.Context } // CreateInSubscriptionPreparer prepares the CreateInSubscription request. -func (client AssessmentsMetadataClient) CreateInSubscriptionPreparer(ctx context.Context, assessmentMetadataName string, assessmentMetadata AssessmentMetadata) (*http.Request, error) { +func (client AssessmentsMetadataClient) CreateInSubscriptionPreparer(ctx context.Context, assessmentMetadataName string, assessmentMetadata AssessmentMetadataResponse) (*http.Request, error) { pathParameters := map[string]interface{}{ "assessmentMetadataName": autorest.Encode("path", assessmentMetadataName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -113,7 +116,7 @@ func (client AssessmentsMetadataClient) CreateInSubscriptionSender(req *http.Req // CreateInSubscriptionResponder handles the response to the CreateInSubscription request. The method always // closes the http.Response Body. -func (client AssessmentsMetadataClient) CreateInSubscriptionResponder(resp *http.Response) (result AssessmentMetadata, err error) { +func (client AssessmentsMetadataClient) CreateInSubscriptionResponder(resp *http.Response) (result AssessmentMetadataResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -173,7 +176,7 @@ func (client AssessmentsMetadataClient) DeleteInSubscriptionPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -206,7 +209,7 @@ func (client AssessmentsMetadataClient) DeleteInSubscriptionResponder(resp *http // Get get metadata information on an assessment type // Parameters: // assessmentMetadataName - the Assessment Key - Unique key for the assessment type -func (client AssessmentsMetadataClient) Get(ctx context.Context, assessmentMetadataName string) (result AssessmentMetadata, err error) { +func (client AssessmentsMetadataClient) Get(ctx context.Context, assessmentMetadataName string) (result AssessmentMetadataResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.Get") defer func() { @@ -245,7 +248,7 @@ func (client AssessmentsMetadataClient) GetPreparer(ctx context.Context, assessm "assessmentMetadataName": autorest.Encode("path", assessmentMetadataName), } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +269,7 @@ func (client AssessmentsMetadataClient) GetSender(req *http.Request) (*http.Resp // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client AssessmentsMetadataClient) GetResponder(resp *http.Response) (result AssessmentMetadata, err error) { +func (client AssessmentsMetadataClient) GetResponder(resp *http.Response) (result AssessmentMetadataResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -279,7 +282,7 @@ func (client AssessmentsMetadataClient) GetResponder(resp *http.Response) (resul // GetInSubscription get metadata information on an assessment type in a specific subscription // Parameters: // assessmentMetadataName - the Assessment Key - Unique key for the assessment type -func (client AssessmentsMetadataClient) GetInSubscription(ctx context.Context, assessmentMetadataName string) (result AssessmentMetadata, err error) { +func (client AssessmentsMetadataClient) GetInSubscription(ctx context.Context, assessmentMetadataName string) (result AssessmentMetadataResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.GetInSubscription") defer func() { @@ -325,7 +328,7 @@ func (client AssessmentsMetadataClient) GetInSubscriptionPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,7 +349,7 @@ func (client AssessmentsMetadataClient) GetInSubscriptionSender(req *http.Reques // GetInSubscriptionResponder handles the response to the GetInSubscription request. The method always // closes the http.Response Body. -func (client AssessmentsMetadataClient) GetInSubscriptionResponder(resp *http.Response) (result AssessmentMetadata, err error) { +func (client AssessmentsMetadataClient) GetInSubscriptionResponder(resp *http.Response) (result AssessmentMetadataResponse, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -357,13 +360,13 @@ func (client AssessmentsMetadataClient) GetInSubscriptionResponder(resp *http.Re } // List get metadata information on all assessment types -func (client AssessmentsMetadataClient) List(ctx context.Context) (result AssessmentMetadataListPage, err error) { +func (client AssessmentsMetadataClient) List(ctx context.Context) (result AssessmentMetadataResponseListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.List") defer func() { sc := -1 - if result.aml.Response.Response != nil { - sc = result.aml.Response.Response.StatusCode + if result.amrl.Response.Response != nil { + sc = result.amrl.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -377,17 +380,17 @@ func (client AssessmentsMetadataClient) List(ctx context.Context) (result Assess resp, err := client.ListSender(req) if err != nil { - result.aml.Response = autorest.Response{Response: resp} + result.amrl.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "security.AssessmentsMetadataClient", "List", resp, "Failure sending request") return } - result.aml, err = client.ListResponder(resp) + result.amrl, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "security.AssessmentsMetadataClient", "List", resp, "Failure responding to request") return } - if result.aml.hasNextLink() && result.aml.IsEmpty() { + if result.amrl.hasNextLink() && result.amrl.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -397,7 +400,7 @@ func (client AssessmentsMetadataClient) List(ctx context.Context) (result Assess // ListPreparer prepares the List request. func (client AssessmentsMetadataClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -418,7 +421,7 @@ func (client AssessmentsMetadataClient) ListSender(req *http.Request) (*http.Res // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client AssessmentsMetadataClient) ListResponder(resp *http.Response) (result AssessmentMetadataList, err error) { +func (client AssessmentsMetadataClient) ListResponder(resp *http.Response) (result AssessmentMetadataResponseList, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -429,8 +432,8 @@ func (client AssessmentsMetadataClient) ListResponder(resp *http.Response) (resu } // listNextResults retrieves the next set of results, if any. -func (client AssessmentsMetadataClient) listNextResults(ctx context.Context, lastResults AssessmentMetadataList) (result AssessmentMetadataList, err error) { - req, err := lastResults.assessmentMetadataListPreparer(ctx) +func (client AssessmentsMetadataClient) listNextResults(ctx context.Context, lastResults AssessmentMetadataResponseList) (result AssessmentMetadataResponseList, err error) { + req, err := lastResults.assessmentMetadataResponseListPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "security.AssessmentsMetadataClient", "listNextResults", nil, "Failure preparing next results request") } @@ -450,7 +453,7 @@ func (client AssessmentsMetadataClient) listNextResults(ctx context.Context, las } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AssessmentsMetadataClient) ListComplete(ctx context.Context) (result AssessmentMetadataListIterator, err error) { +func (client AssessmentsMetadataClient) ListComplete(ctx context.Context) (result AssessmentMetadataResponseListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.List") defer func() { @@ -466,13 +469,13 @@ func (client AssessmentsMetadataClient) ListComplete(ctx context.Context) (resul } // ListBySubscription get metadata information on all assessment types in a specific subscription -func (client AssessmentsMetadataClient) ListBySubscription(ctx context.Context) (result AssessmentMetadataListPage, err error) { +func (client AssessmentsMetadataClient) ListBySubscription(ctx context.Context) (result AssessmentMetadataResponseListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.ListBySubscription") defer func() { sc := -1 - if result.aml.Response.Response != nil { - sc = result.aml.Response.Response.StatusCode + if result.amrl.Response.Response != nil { + sc = result.amrl.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -492,17 +495,17 @@ func (client AssessmentsMetadataClient) ListBySubscription(ctx context.Context) resp, err := client.ListBySubscriptionSender(req) if err != nil { - result.aml.Response = autorest.Response{Response: resp} + result.amrl.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "security.AssessmentsMetadataClient", "ListBySubscription", resp, "Failure sending request") return } - result.aml, err = client.ListBySubscriptionResponder(resp) + result.amrl, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "security.AssessmentsMetadataClient", "ListBySubscription", resp, "Failure responding to request") return } - if result.aml.hasNextLink() && result.aml.IsEmpty() { + if result.amrl.hasNextLink() && result.amrl.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -516,7 +519,7 @@ func (client AssessmentsMetadataClient) ListBySubscriptionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01" + const APIVersion = "2021-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -537,7 +540,7 @@ func (client AssessmentsMetadataClient) ListBySubscriptionSender(req *http.Reque // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always // closes the http.Response Body. -func (client AssessmentsMetadataClient) ListBySubscriptionResponder(resp *http.Response) (result AssessmentMetadataList, err error) { +func (client AssessmentsMetadataClient) ListBySubscriptionResponder(resp *http.Response) (result AssessmentMetadataResponseList, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -548,8 +551,8 @@ func (client AssessmentsMetadataClient) ListBySubscriptionResponder(resp *http.R } // listBySubscriptionNextResults retrieves the next set of results, if any. -func (client AssessmentsMetadataClient) listBySubscriptionNextResults(ctx context.Context, lastResults AssessmentMetadataList) (result AssessmentMetadataList, err error) { - req, err := lastResults.assessmentMetadataListPreparer(ctx) +func (client AssessmentsMetadataClient) listBySubscriptionNextResults(ctx context.Context, lastResults AssessmentMetadataResponseList) (result AssessmentMetadataResponseList, err error) { + req, err := lastResults.assessmentMetadataResponseListPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "security.AssessmentsMetadataClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") } @@ -569,7 +572,7 @@ func (client AssessmentsMetadataClient) listBySubscriptionNextResults(ctx contex } // ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client AssessmentsMetadataClient) ListBySubscriptionComplete(ctx context.Context) (result AssessmentMetadataListIterator, err error) { +func (client AssessmentsMetadataClient) ListBySubscriptionComplete(ctx context.Context) (result AssessmentMetadataResponseListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsMetadataClient.ListBySubscription") defer func() { diff --git a/services/preview/security/mgmt/v3.0/security/device.go b/services/preview/security/mgmt/v3.0/security/device.go deleted file mode 100644 index 1c2be34eee7c..000000000000 --- a/services/preview/security/mgmt/v3.0/security/device.go +++ /dev/null @@ -1,106 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DeviceClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type DeviceClient struct { - BaseClient -} - -// NewDeviceClient creates an instance of the DeviceClient client. -func NewDeviceClient(subscriptionID string, ascLocation string) DeviceClient { - return NewDeviceClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewDeviceClientWithBaseURI creates an instance of the DeviceClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDeviceClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DeviceClient { - return DeviceClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// Get get device. -// Parameters: -// resourceID - the identifier of the resource. -// deviceID - identifier of the device. -func (client DeviceClient) Get(ctx context.Context, resourceID string, deviceID string) (result Device, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DeviceClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceID, deviceID) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DeviceClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.DeviceClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DeviceClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DeviceClient) GetPreparer(ctx context.Context, resourceID string, deviceID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "deviceId": autorest.Encode("path", deviceID), - "resourceId": resourceID, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/devices/{deviceId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client DeviceClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client DeviceClient) GetResponder(resp *http.Response) (result Device, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/preview/security/mgmt/v3.0/security/devicesforhub.go b/services/preview/security/mgmt/v3.0/security/devicesforhub.go deleted file mode 100644 index ef202a24c8d9..000000000000 --- a/services/preview/security/mgmt/v3.0/security/devicesforhub.go +++ /dev/null @@ -1,158 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DevicesForHubClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type DevicesForHubClient struct { - BaseClient -} - -// NewDevicesForHubClient creates an instance of the DevicesForHubClient client. -func NewDevicesForHubClient(subscriptionID string, ascLocation string) DevicesForHubClient { - return NewDevicesForHubClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewDevicesForHubClientWithBaseURI creates an instance of the DevicesForHubClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewDevicesForHubClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DevicesForHubClient { - return DevicesForHubClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// List get list of the devices for the specified IoT Hub resource. -// Parameters: -// resourceID - the identifier of the resource. -// limit - limit the number of items returned in a single page -// skipToken - skip token used for pagination -// deviceManagementType - get devices only from specific type, Managed or Unmanaged. -func (client DevicesForHubClient) List(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForHubClient.List") - defer func() { - sc := -1 - if result.dl.Response.Response != nil { - sc = result.dl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceID, limit, skipToken, deviceManagementType) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.dl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "List", resp, "Failure sending request") - return - } - - result.dl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "List", resp, "Failure responding to request") - return - } - if result.dl.hasNextLink() && result.dl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client DevicesForHubClient) ListPreparer(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType ManagementState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceId": resourceID, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if limit != nil { - queryParameters["$limit"] = autorest.Encode("query", *limit) - } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } - if len(string(deviceManagementType)) > 0 { - queryParameters["deviceManagementType"] = autorest.Encode("query", deviceManagementType) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/devices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client DevicesForHubClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client DevicesForHubClient) ListResponder(resp *http.Response) (result DeviceList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client DevicesForHubClient) listNextResults(ctx context.Context, lastResults DeviceList) (result DeviceList, err error) { - req, err := lastResults.deviceListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "security.DevicesForHubClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "security.DevicesForHubClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DevicesForHubClient) ListComplete(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForHubClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceID, limit, skipToken, deviceManagementType) - return -} diff --git a/services/preview/security/mgmt/v3.0/security/devicesforsubscription.go b/services/preview/security/mgmt/v3.0/security/devicesforsubscription.go deleted file mode 100644 index c9e07735bddf..000000000000 --- a/services/preview/security/mgmt/v3.0/security/devicesforsubscription.go +++ /dev/null @@ -1,165 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DevicesForSubscriptionClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type DevicesForSubscriptionClient struct { - BaseClient -} - -// NewDevicesForSubscriptionClient creates an instance of the DevicesForSubscriptionClient client. -func NewDevicesForSubscriptionClient(subscriptionID string, ascLocation string) DevicesForSubscriptionClient { - return NewDevicesForSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewDevicesForSubscriptionClientWithBaseURI creates an instance of the DevicesForSubscriptionClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewDevicesForSubscriptionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DevicesForSubscriptionClient { - return DevicesForSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// List get list of the devices by their subscription. -// Parameters: -// limit - limit the number of items returned in a single page -// skipToken - skip token used for pagination -// deviceManagementType - get devices only from specific type, Managed or Unmanaged. -func (client DevicesForSubscriptionClient) List(ctx context.Context, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForSubscriptionClient.List") - defer func() { - sc := -1 - if result.dl.Response.Response != nil { - sc = result.dl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.DevicesForSubscriptionClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, limit, skipToken, deviceManagementType) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.dl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "List", resp, "Failure sending request") - return - } - - result.dl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "List", resp, "Failure responding to request") - return - } - if result.dl.hasNextLink() && result.dl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client DevicesForSubscriptionClient) ListPreparer(ctx context.Context, limit *int32, skipToken string, deviceManagementType ManagementState) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if limit != nil { - queryParameters["$limit"] = autorest.Encode("query", *limit) - } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } - if len(string(deviceManagementType)) > 0 { - queryParameters["deviceManagementType"] = autorest.Encode("query", deviceManagementType) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/devices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client DevicesForSubscriptionClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client DevicesForSubscriptionClient) ListResponder(resp *http.Response) (result DeviceList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client DevicesForSubscriptionClient) listNextResults(ctx context.Context, lastResults DeviceList) (result DeviceList, err error) { - req, err := lastResults.deviceListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DevicesForSubscriptionClient) ListComplete(ctx context.Context, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForSubscriptionClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, limit, skipToken, deviceManagementType) - return -} diff --git a/services/preview/security/mgmt/v3.0/security/enums.go b/services/preview/security/mgmt/v3.0/security/enums.go index 4cc6ec11eb72..8e35855f9403 100644 --- a/services/preview/security/mgmt/v3.0/security/enums.go +++ b/services/preview/security/mgmt/v3.0/security/enums.go @@ -87,49 +87,6 @@ func PossibleAdditionalWorkspaceTypeValues() []AdditionalWorkspaceType { return []AdditionalWorkspaceType{Sentinel} } -// AlertIntent enumerates the values for alert intent. -type AlertIntent string - -const ( - // Collection ... - Collection AlertIntent = "Collection" - // CommandAndControl ... - CommandAndControl AlertIntent = "CommandAndControl" - // CredentialAccess ... - CredentialAccess AlertIntent = "CredentialAccess" - // DefenseEvasion ... - DefenseEvasion AlertIntent = "DefenseEvasion" - // Discovery ... - Discovery AlertIntent = "Discovery" - // Execution ... - Execution AlertIntent = "Execution" - // Exfiltration ... - Exfiltration AlertIntent = "Exfiltration" - // Exploitation ... - Exploitation AlertIntent = "Exploitation" - // Impact ... - Impact AlertIntent = "Impact" - // InitialAccess ... - InitialAccess AlertIntent = "InitialAccess" - // LateralMovement ... - LateralMovement AlertIntent = "LateralMovement" - // Persistence ... - Persistence AlertIntent = "Persistence" - // PreAttack ... - PreAttack AlertIntent = "PreAttack" - // PrivilegeEscalation ... - PrivilegeEscalation AlertIntent = "PrivilegeEscalation" - // Probing ... - Probing AlertIntent = "Probing" - // Unknown ... - Unknown AlertIntent = "Unknown" -) - -// PossibleAlertIntentValues returns an array of possible values for the AlertIntent const type. -func PossibleAlertIntentValues() []AlertIntent { - return []AlertIntent{Collection, CommandAndControl, CredentialAccess, DefenseEvasion, Discovery, Execution, Exfiltration, Exploitation, Impact, InitialAccess, LateralMovement, Persistence, PreAttack, PrivilegeEscalation, Probing, Unknown} -} - // AlertNotifications enumerates the values for alert notifications. type AlertNotifications string @@ -149,13 +106,13 @@ func PossibleAlertNotificationsValues() []AlertNotifications { type AlertSeverity string const ( - // High ... + // High High High AlertSeverity = "High" - // Informational ... + // Informational Informational Informational AlertSeverity = "Informational" - // Low ... + // Low Low Low AlertSeverity = "Low" - // Medium ... + // Medium Medium Medium AlertSeverity = "Medium" ) @@ -291,21 +248,6 @@ func PossibleAuthenticationTypeValues() []AuthenticationType { return []AuthenticationType{AuthenticationTypeAuthenticationDetailsProperties, AuthenticationTypeAwsAssumeRole, AuthenticationTypeAwsCreds, AuthenticationTypeGcpCredentials} } -// AuthorizationState enumerates the values for authorization state. -type AuthorizationState string - -const ( - // Authorized ... - Authorized AuthorizationState = "Authorized" - // Unauthorized ... - Unauthorized AuthorizationState = "Unauthorized" -) - -// PossibleAuthorizationStateValues returns an array of possible values for the AuthorizationState const type. -func PossibleAuthorizationStateValues() []AuthorizationState { - return []AuthorizationState{Authorized, Unauthorized} -} - // AutoProvision enumerates the values for auto provision. type AutoProvision string @@ -494,36 +436,6 @@ func PossibleDataSourceValues() []DataSource { return []DataSource{TwinData} } -// DeviceCriticality enumerates the values for device criticality. -type DeviceCriticality string - -const ( - // Important ... - Important DeviceCriticality = "Important" - // Standard ... - Standard DeviceCriticality = "Standard" -) - -// PossibleDeviceCriticalityValues returns an array of possible values for the DeviceCriticality const type. -func PossibleDeviceCriticalityValues() []DeviceCriticality { - return []DeviceCriticality{Important, Standard} -} - -// DeviceStatus enumerates the values for device status. -type DeviceStatus string - -const ( - // DeviceStatusActive ... - DeviceStatusActive DeviceStatus = "Active" - // DeviceStatusRemoved ... - DeviceStatusRemoved DeviceStatus = "Removed" -) - -// PossibleDeviceStatusValues returns an array of possible values for the DeviceStatus const type. -func PossibleDeviceStatusValues() []DeviceStatus { - return []DeviceStatus{DeviceStatusActive, DeviceStatusRemoved} -} - // Direction enumerates the values for direction. type Direction string @@ -581,17 +493,17 @@ func PossibleEnforcementModeValues() []EnforcementMode { type EnforcementSupport string const ( - // EnforcementSupportNotSupported ... - EnforcementSupportNotSupported EnforcementSupport = "NotSupported" - // EnforcementSupportSupported ... - EnforcementSupportSupported EnforcementSupport = "Supported" - // EnforcementSupportUnknown ... - EnforcementSupportUnknown EnforcementSupport = "Unknown" + // NotSupported ... + NotSupported EnforcementSupport = "NotSupported" + // Supported ... + Supported EnforcementSupport = "Supported" + // Unknown ... + Unknown EnforcementSupport = "Unknown" ) // PossibleEnforcementSupportValues returns an array of possible values for the EnforcementSupport const type. func PossibleEnforcementSupportValues() []EnforcementSupport { - return []EnforcementSupport{EnforcementSupportNotSupported, EnforcementSupportSupported, EnforcementSupportUnknown} + return []EnforcementSupport{NotSupported, Supported, Unknown} } // EventSource enumerates the values for event source. @@ -929,36 +841,6 @@ func PossibleKindEnum2Values() []KindEnum2 { return []KindEnum2{KindAlertSyncSettings, KindDataExportSettings, KindSetting} } -// MacSignificance enumerates the values for mac significance. -type MacSignificance string - -const ( - // Primary ... - Primary MacSignificance = "Primary" - // Secondary ... - Secondary MacSignificance = "Secondary" -) - -// PossibleMacSignificanceValues returns an array of possible values for the MacSignificance const type. -func PossibleMacSignificanceValues() []MacSignificance { - return []MacSignificance{Primary, Secondary} -} - -// ManagementState enumerates the values for management state. -type ManagementState string - -const ( - // Managed ... - Managed ManagementState = "Managed" - // Unmanaged ... - Unmanaged ManagementState = "Unmanaged" -) - -// PossibleManagementStateValues returns an array of possible values for the ManagementState const type. -func PossibleManagementStateValues() []ManagementState { - return []ManagementState{Managed, Unmanaged} -} - // Msi enumerates the values for msi. type Msi string @@ -976,25 +858,6 @@ func PossibleMsiValues() []Msi { return []Msi{MsiAudit, MsiEnforce, MsiNone} } -// OnboardingKind enumerates the values for onboarding kind. -type OnboardingKind string - -const ( - // Default ... - Default OnboardingKind = "Default" - // Evaluation ... - Evaluation OnboardingKind = "Evaluation" - // MigratedToAzure ... - MigratedToAzure OnboardingKind = "MigratedToAzure" - // Purchased ... - Purchased OnboardingKind = "Purchased" -) - -// PossibleOnboardingKindValues returns an array of possible values for the OnboardingKind const type. -func PossibleOnboardingKindValues() []OnboardingKind { - return []OnboardingKind{Default, Evaluation, MigratedToAzure, Purchased} -} - // Operator enumerates the values for operator. type Operator string @@ -1048,30 +911,15 @@ func PossiblePermissionPropertyValues() []PermissionProperty { type PricingTier string const ( - // PricingTierFree Get free Azure security center experience with basic security features - PricingTierFree PricingTier = "Free" - // PricingTierStandard Get the standard Azure security center experience with advanced security features - PricingTierStandard PricingTier = "Standard" + // Free Get free Azure security center experience with basic security features + Free PricingTier = "Free" + // Standard Get the standard Azure security center experience with advanced security features + Standard PricingTier = "Standard" ) // PossiblePricingTierValues returns an array of possible values for the PricingTier const type. func PossiblePricingTierValues() []PricingTier { - return []PricingTier{PricingTierFree, PricingTierStandard} -} - -// ProgrammingState enumerates the values for programming state. -type ProgrammingState string - -const ( - // NotProgrammingDevice ... - NotProgrammingDevice ProgrammingState = "NotProgrammingDevice" - // ProgrammingDevice ... - ProgrammingDevice ProgrammingState = "ProgrammingDevice" -) - -// PossibleProgrammingStateValues returns an array of possible values for the ProgrammingState const type. -func PossibleProgrammingStateValues() []ProgrammingState { - return []ProgrammingState{NotProgrammingDevice, ProgrammingDevice} + return []PricingTier{Free, Standard} } // PropertyType enumerates the values for property type. @@ -1148,23 +996,6 @@ func PossibleProvisioningState1Values() []ProvisioningState1 { return []ProvisioningState1{ProvisioningState1Canceled, ProvisioningState1Deprovisioning, ProvisioningState1Failed, ProvisioningState1Provisioning, ProvisioningState1Succeeded} } -// PurdueLevel enumerates the values for purdue level. -type PurdueLevel string - -const ( - // Enterprise ... - Enterprise PurdueLevel = "Enterprise" - // ProcessControl ... - ProcessControl PurdueLevel = "ProcessControl" - // Supervisory ... - Supervisory PurdueLevel = "Supervisory" -) - -// PossiblePurdueLevelValues returns an array of possible values for the PurdueLevel const type. -func PossiblePurdueLevelValues() []PurdueLevel { - return []PurdueLevel{Enterprise, ProcessControl, Supervisory} -} - // Rank enumerates the values for rank. type Rank string @@ -1235,31 +1066,6 @@ func PossibleRecommendationConfigStatusValues() []RecommendationConfigStatus { return []RecommendationConfigStatus{Disabled, Enabled} } -// RecommendationSeverity enumerates the values for recommendation severity. -type RecommendationSeverity string - -const ( - // RecommendationSeverityHealthy ... - RecommendationSeverityHealthy RecommendationSeverity = "Healthy" - // RecommendationSeverityHigh ... - RecommendationSeverityHigh RecommendationSeverity = "High" - // RecommendationSeverityLow ... - RecommendationSeverityLow RecommendationSeverity = "Low" - // RecommendationSeverityMedium ... - RecommendationSeverityMedium RecommendationSeverity = "Medium" - // RecommendationSeverityNotApplicable ... - RecommendationSeverityNotApplicable RecommendationSeverity = "NotApplicable" - // RecommendationSeverityOffByPolicy ... - RecommendationSeverityOffByPolicy RecommendationSeverity = "OffByPolicy" - // RecommendationSeverityUnknown ... - RecommendationSeverityUnknown RecommendationSeverity = "Unknown" -) - -// PossibleRecommendationSeverityValues returns an array of possible values for the RecommendationSeverity const type. -func PossibleRecommendationSeverityValues() []RecommendationSeverity { - return []RecommendationSeverity{RecommendationSeverityHealthy, RecommendationSeverityHigh, RecommendationSeverityLow, RecommendationSeverityMedium, RecommendationSeverityNotApplicable, RecommendationSeverityOffByPolicy, RecommendationSeverityUnknown} -} - // RecommendationStatus enumerates the values for recommendation status. type RecommendationStatus string @@ -1334,21 +1140,6 @@ func PossibleRecommendationTypeValues() []RecommendationType { return []RecommendationType{IoTACRAuthentication, IoTAgentSendsUnutilizedMessages, IoTBaseline, IoTEdgeHubMemOptimize, IoTEdgeLoggingOptions, IoTInconsistentModuleSettings, IoTInstallAgent, IoTIPFilterDenyAll, IoTIPFilterPermissiveRule, IoTOpenPorts, IoTPermissiveFirewallPolicy, IoTPermissiveInputFirewallRules, IoTPermissiveOutputFirewallRules, IoTPrivilegedDockerOptions, IoTSharedCredentials, IoTVulnerableTLSCipherSuite} } -// RelationToIPStatus enumerates the values for relation to ip status. -type RelationToIPStatus string - -const ( - // Certain ... - Certain RelationToIPStatus = "Certain" - // Guess ... - Guess RelationToIPStatus = "Guess" -) - -// PossibleRelationToIPStatusValues returns an array of possible values for the RelationToIPStatus const type. -func PossibleRelationToIPStatusValues() []RelationToIPStatus { - return []RelationToIPStatus{Certain, Guess} -} - // ReportedSeverity enumerates the values for reported severity. type ReportedSeverity string @@ -1524,21 +1315,6 @@ func PossibleRuleTypeBasicCustomAlertRuleValues() []RuleTypeBasicCustomAlertRule return []RuleTypeBasicCustomAlertRule{RuleTypeActiveConnectionsNotInAllowedRange, RuleTypeAllowlistCustomAlertRule, RuleTypeAmqpC2DMessagesNotInAllowedRange, RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange, RuleTypeAmqpD2CMessagesNotInAllowedRange, RuleTypeConnectionFromIPNotAllowed, RuleTypeConnectionToIPNotAllowed, RuleTypeCustomAlertRule, RuleTypeDenylistCustomAlertRule, RuleTypeDirectMethodInvokesNotInAllowedRange, RuleTypeFailedLocalLoginsNotInAllowedRange, RuleTypeFileUploadsNotInAllowedRange, RuleTypeHTTPC2DMessagesNotInAllowedRange, RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange, RuleTypeHTTPD2CMessagesNotInAllowedRange, RuleTypeListCustomAlertRule, RuleTypeLocalUserNotAllowed, RuleTypeMqttC2DMessagesNotInAllowedRange, RuleTypeMqttC2DRejectedMessagesNotInAllowedRange, RuleTypeMqttD2CMessagesNotInAllowedRange, RuleTypeProcessNotAllowed, RuleTypeQueuePurgesNotInAllowedRange, RuleTypeThresholdCustomAlertRule, RuleTypeTimeWindowCustomAlertRule, RuleTypeTwinUpdatesNotInAllowedRange, RuleTypeUnauthorizedOperationsNotInAllowedRange} } -// ScanningFunctionality enumerates the values for scanning functionality. -type ScanningFunctionality string - -const ( - // NotScannerDevice ... - NotScannerDevice ScanningFunctionality = "NotScannerDevice" - // ScannerDevice ... - ScannerDevice ScanningFunctionality = "ScannerDevice" -) - -// PossibleScanningFunctionalityValues returns an array of possible values for the ScanningFunctionality const type. -func PossibleScanningFunctionalityValues() []ScanningFunctionality { - return []ScanningFunctionality{NotScannerDevice, ScannerDevice} -} - // ScanState enumerates the values for scan state. type ScanState string @@ -1590,38 +1366,6 @@ func PossibleScriptValues() []Script { return []Script{ScriptAudit, ScriptEnforce, ScriptNone} } -// SensorStatus enumerates the values for sensor status. -type SensorStatus string - -const ( - // Disconnected ... - Disconnected SensorStatus = "Disconnected" - // Ok ... - Ok SensorStatus = "Ok" - // Unavailable ... - Unavailable SensorStatus = "Unavailable" -) - -// PossibleSensorStatusValues returns an array of possible values for the SensorStatus const type. -func PossibleSensorStatusValues() []SensorStatus { - return []SensorStatus{Disconnected, Ok, Unavailable} -} - -// SensorType enumerates the values for sensor type. -type SensorType string - -const ( - // SensorTypeEnterprise ... - SensorTypeEnterprise SensorType = "Enterprise" - // SensorTypeOt ... - SensorTypeOt SensorType = "Ot" -) - -// PossibleSensorTypeValues returns an array of possible values for the SensorType const type. -func PossibleSensorTypeValues() []SensorType { - return []SensorType{SensorTypeEnterprise, SensorTypeOt} -} - // Severity enumerates the values for severity. type Severity string @@ -1763,6 +1507,266 @@ func PossibleSubAssessmentStatusCodeValues() []SubAssessmentStatusCode { return []SubAssessmentStatusCode{SubAssessmentStatusCodeHealthy, SubAssessmentStatusCodeNotApplicable, SubAssessmentStatusCodeUnhealthy} } +// Tactics enumerates the values for tactics. +type Tactics string + +const ( + // Collection ... + Collection Tactics = "Collection" + // CommandandControl ... + CommandandControl Tactics = "Command and Control" + // CredentialAccess ... + CredentialAccess Tactics = "Credential Access" + // DefenseEvasion ... + DefenseEvasion Tactics = "Defense Evasion" + // Discovery ... + Discovery Tactics = "Discovery" + // Execution ... + Execution Tactics = "Execution" + // Exfiltration ... + Exfiltration Tactics = "Exfiltration" + // Impact ... + Impact Tactics = "Impact" + // InitialAccess ... + InitialAccess Tactics = "Initial Access" + // LateralMovement ... + LateralMovement Tactics = "Lateral Movement" + // Persistence ... + Persistence Tactics = "Persistence" + // PrivilegeEscalation ... + PrivilegeEscalation Tactics = "Privilege Escalation" + // Reconnaissance ... + Reconnaissance Tactics = "Reconnaissance" + // ResourceDevelopment ... + ResourceDevelopment Tactics = "Resource Development" +) + +// PossibleTacticsValues returns an array of possible values for the Tactics const type. +func PossibleTacticsValues() []Tactics { + return []Tactics{Collection, CommandandControl, CredentialAccess, DefenseEvasion, Discovery, Execution, Exfiltration, Impact, InitialAccess, LateralMovement, Persistence, PrivilegeEscalation, Reconnaissance, ResourceDevelopment} +} + +// Techniques enumerates the values for techniques. +type Techniques string + +const ( + // AbuseElevationControlMechanism ... + AbuseElevationControlMechanism Techniques = "Abuse Elevation Control Mechanism" + // AccessTokenManipulation ... + AccessTokenManipulation Techniques = "Access Token Manipulation" + // AccountDiscovery ... + AccountDiscovery Techniques = "Account Discovery" + // AccountManipulation ... + AccountManipulation Techniques = "Account Manipulation" + // ActiveScanning ... + ActiveScanning Techniques = "Active Scanning" + // ApplicationLayerProtocol ... + ApplicationLayerProtocol Techniques = "Application Layer Protocol" + // AudioCapture ... + AudioCapture Techniques = "Audio Capture" + // BootorLogonAutostartExecution ... + BootorLogonAutostartExecution Techniques = "Boot or Logon Autostart Execution" + // BootorLogonInitializationScripts ... + BootorLogonInitializationScripts Techniques = "Boot or Logon Initialization Scripts" + // BruteForce ... + BruteForce Techniques = "Brute Force" + // CloudInfrastructureDiscovery ... + CloudInfrastructureDiscovery Techniques = "Cloud Infrastructure Discovery" + // CloudServiceDashboard ... + CloudServiceDashboard Techniques = "Cloud Service Dashboard" + // CloudServiceDiscovery ... + CloudServiceDiscovery Techniques = "Cloud Service Discovery" + // CommandandScriptingInterpreter ... + CommandandScriptingInterpreter Techniques = "Command and Scripting Interpreter" + // CompromiseClientSoftwareBinary ... + CompromiseClientSoftwareBinary Techniques = "Compromise Client Software Binary" + // CompromiseInfrastructure ... + CompromiseInfrastructure Techniques = "Compromise Infrastructure" + // ContainerandResourceDiscovery ... + ContainerandResourceDiscovery Techniques = "Container and Resource Discovery" + // CreateAccount ... + CreateAccount Techniques = "Create Account" + // CreateorModifySystemProcess ... + CreateorModifySystemProcess Techniques = "Create or Modify System Process" + // CredentialsfromPasswordStores ... + CredentialsfromPasswordStores Techniques = "Credentials from Password Stores" + // DataDestruction ... + DataDestruction Techniques = "Data Destruction" + // DataEncryptedforImpact ... + DataEncryptedforImpact Techniques = "Data Encrypted for Impact" + // DatafromCloudStorageObject ... + DatafromCloudStorageObject Techniques = "Data from Cloud Storage Object" + // DatafromConfigurationRepository ... + DatafromConfigurationRepository Techniques = "Data from Configuration Repository" + // DatafromInformationRepositories ... + DatafromInformationRepositories Techniques = "Data from Information Repositories" + // DatafromLocalSystem ... + DatafromLocalSystem Techniques = "Data from Local System" + // DataManipulation ... + DataManipulation Techniques = "Data Manipulation" + // DataStaged ... + DataStaged Techniques = "Data Staged" + // Defacement ... + Defacement Techniques = "Defacement" + // DeobfuscateDecodeFilesorInformation ... + DeobfuscateDecodeFilesorInformation Techniques = "Deobfuscate/Decode Files or Information" + // DiskWipe ... + DiskWipe Techniques = "Disk Wipe" + // DomainTrustDiscovery ... + DomainTrustDiscovery Techniques = "Domain Trust Discovery" + // DriveByCompromise ... + DriveByCompromise Techniques = "Drive-by Compromise" + // DynamicResolution ... + DynamicResolution Techniques = "Dynamic Resolution" + // EndpointDenialofService ... + EndpointDenialofService Techniques = "Endpoint Denial of Service" + // EventTriggeredExecution ... + EventTriggeredExecution Techniques = "Event Triggered Execution" + // ExfiltrationOverAlternativeProtocol ... + ExfiltrationOverAlternativeProtocol Techniques = "Exfiltration Over Alternative Protocol" + // ExploitationforClientExecution ... + ExploitationforClientExecution Techniques = "Exploitation for Client Execution" + // ExploitationforCredentialAccess ... + ExploitationforCredentialAccess Techniques = "Exploitation for Credential Access" + // ExploitationforDefenseEvasion ... + ExploitationforDefenseEvasion Techniques = "Exploitation for Defense Evasion" + // ExploitationforPrivilegeEscalation ... + ExploitationforPrivilegeEscalation Techniques = "Exploitation for Privilege Escalation" + // ExploitationofRemoteServices ... + ExploitationofRemoteServices Techniques = "Exploitation of Remote Services" + // ExploitPublicFacingApplication ... + ExploitPublicFacingApplication Techniques = "Exploit Public-Facing Application" + // ExternalRemoteServices ... + ExternalRemoteServices Techniques = "External Remote Services" + // FallbackChannels ... + FallbackChannels Techniques = "Fallback Channels" + // FileandDirectoryDiscovery ... + FileandDirectoryDiscovery Techniques = "File and Directory Discovery" + // FileandDirectoryPermissionsModification ... + FileandDirectoryPermissionsModification Techniques = "File and Directory Permissions Modification" + // GatherVictimNetworkInformation ... + GatherVictimNetworkInformation Techniques = "Gather Victim Network Information" + // HideArtifacts ... + HideArtifacts Techniques = "Hide Artifacts" + // HijackExecutionFlow ... + HijackExecutionFlow Techniques = "Hijack Execution Flow" + // ImpairDefenses ... + ImpairDefenses Techniques = "Impair Defenses" + // ImplantContainerImage ... + ImplantContainerImage Techniques = "Implant Container Image" + // IndicatorRemovalonHost ... + IndicatorRemovalonHost Techniques = "Indicator Removal on Host" + // IndirectCommandExecution ... + IndirectCommandExecution Techniques = "Indirect Command Execution" + // IngressToolTransfer ... + IngressToolTransfer Techniques = "Ingress Tool Transfer" + // InputCapture ... + InputCapture Techniques = "Input Capture" + // InterProcessCommunication ... + InterProcessCommunication Techniques = "Inter-Process Communication" + // LateralToolTransfer ... + LateralToolTransfer Techniques = "Lateral Tool Transfer" + // ManInTheMiddle ... + ManInTheMiddle Techniques = "Man-in-the-Middle" + // Masquerading ... + Masquerading Techniques = "Masquerading" + // ModifyAuthenticationProcess ... + ModifyAuthenticationProcess Techniques = "Modify Authentication Process" + // ModifyRegistry ... + ModifyRegistry Techniques = "Modify Registry" + // NetworkDenialofService ... + NetworkDenialofService Techniques = "Network Denial of Service" + // NetworkServiceScanning ... + NetworkServiceScanning Techniques = "Network Service Scanning" + // NetworkSniffing ... + NetworkSniffing Techniques = "Network Sniffing" + // NonApplicationLayerProtocol ... + NonApplicationLayerProtocol Techniques = "Non-Application Layer Protocol" + // NonStandardPort ... + NonStandardPort Techniques = "Non-Standard Port" + // ObfuscatedFilesorInformation ... + ObfuscatedFilesorInformation Techniques = "Obfuscated Files or Information" + // ObtainCapabilities ... + ObtainCapabilities Techniques = "Obtain Capabilities" + // ObuscatedFilesorInformation ... + ObuscatedFilesorInformation Techniques = "Obuscated Files or Information" + // OfficeApplicationStartup ... + OfficeApplicationStartup Techniques = "Office Application Startup" + // OSCredentialDumping ... + OSCredentialDumping Techniques = "OS Credential Dumping" + // PermissionGroupsDiscovery ... + PermissionGroupsDiscovery Techniques = "Permission Groups Discovery" + // Phishing ... + Phishing Techniques = "Phishing" + // PreOSBoot ... + PreOSBoot Techniques = "Pre-OS Boot" + // ProcessDiscovery ... + ProcessDiscovery Techniques = "Process Discovery" + // ProcessInjection ... + ProcessInjection Techniques = "Process Injection" + // ProtocolTunneling ... + ProtocolTunneling Techniques = "Protocol Tunneling" + // Proxy ... + Proxy Techniques = "Proxy" + // QueryRegistry ... + QueryRegistry Techniques = "Query Registry" + // RemoteAccessSoftware ... + RemoteAccessSoftware Techniques = "Remote Access Software" + // RemoteServices ... + RemoteServices Techniques = "Remote Services" + // RemoteServiceSessionHijacking ... + RemoteServiceSessionHijacking Techniques = "Remote Service Session Hijacking" + // RemoteSystemDiscovery ... + RemoteSystemDiscovery Techniques = "Remote System Discovery" + // ResourceHijacking ... + ResourceHijacking Techniques = "Resource Hijacking" + // ScheduledTaskJob ... + ScheduledTaskJob Techniques = "Scheduled Task/Job" + // ScreenCapture ... + ScreenCapture Techniques = "Screen Capture" + // SearchVictimOwnedWebsites ... + SearchVictimOwnedWebsites Techniques = "Search Victim-Owned Websites" + // ServerSoftwareComponent ... + ServerSoftwareComponent Techniques = "Server Software Component" + // ServiceStop ... + ServiceStop Techniques = "Service Stop" + // SignedBinaryProxyExecution ... + SignedBinaryProxyExecution Techniques = "Signed Binary Proxy Execution" + // SoftwareDeploymentTools ... + SoftwareDeploymentTools Techniques = "Software Deployment Tools" + // SQLStoredProcedures ... + SQLStoredProcedures Techniques = "SQL Stored Procedures" + // StealorForgeKerberosTickets ... + StealorForgeKerberosTickets Techniques = "Steal or Forge Kerberos Tickets" + // SubvertTrustControls ... + SubvertTrustControls Techniques = "Subvert Trust Controls" + // SupplyChainCompromise ... + SupplyChainCompromise Techniques = "Supply Chain Compromise" + // SystemInformationDiscovery ... + SystemInformationDiscovery Techniques = "System Information Discovery" + // TaintSharedContent ... + TaintSharedContent Techniques = "Taint Shared Content" + // TrafficSignaling ... + TrafficSignaling Techniques = "Traffic Signaling" + // TransferDatatoCloudAccount ... + TransferDatatoCloudAccount Techniques = "Transfer Data to Cloud Account" + // TrustedRelationship ... + TrustedRelationship Techniques = "Trusted Relationship" + // UnsecuredCredentials ... + UnsecuredCredentials Techniques = "Unsecured Credentials" + // UserExecution ... + UserExecution Techniques = "User Execution" + // ValidAccounts ... + ValidAccounts Techniques = "Valid Accounts" + // WindowsManagementInstrumentation ... + WindowsManagementInstrumentation Techniques = "Windows Management Instrumentation" +) + +// PossibleTechniquesValues returns an array of possible values for the Techniques const type. +func PossibleTechniquesValues() []Techniques { + return []Techniques{AbuseElevationControlMechanism, AccessTokenManipulation, AccountDiscovery, AccountManipulation, ActiveScanning, ApplicationLayerProtocol, AudioCapture, BootorLogonAutostartExecution, BootorLogonInitializationScripts, BruteForce, CloudInfrastructureDiscovery, CloudServiceDashboard, CloudServiceDiscovery, CommandandScriptingInterpreter, CompromiseClientSoftwareBinary, CompromiseInfrastructure, ContainerandResourceDiscovery, CreateAccount, CreateorModifySystemProcess, CredentialsfromPasswordStores, DataDestruction, DataEncryptedforImpact, DatafromCloudStorageObject, DatafromConfigurationRepository, DatafromInformationRepositories, DatafromLocalSystem, DataManipulation, DataStaged, Defacement, DeobfuscateDecodeFilesorInformation, DiskWipe, DomainTrustDiscovery, DriveByCompromise, DynamicResolution, EndpointDenialofService, EventTriggeredExecution, ExfiltrationOverAlternativeProtocol, ExploitationforClientExecution, ExploitationforCredentialAccess, ExploitationforDefenseEvasion, ExploitationforPrivilegeEscalation, ExploitationofRemoteServices, ExploitPublicFacingApplication, ExternalRemoteServices, FallbackChannels, FileandDirectoryDiscovery, FileandDirectoryPermissionsModification, GatherVictimNetworkInformation, HideArtifacts, HijackExecutionFlow, ImpairDefenses, ImplantContainerImage, IndicatorRemovalonHost, IndirectCommandExecution, IngressToolTransfer, InputCapture, InterProcessCommunication, LateralToolTransfer, ManInTheMiddle, Masquerading, ModifyAuthenticationProcess, ModifyRegistry, NetworkDenialofService, NetworkServiceScanning, NetworkSniffing, NonApplicationLayerProtocol, NonStandardPort, ObfuscatedFilesorInformation, ObtainCapabilities, ObuscatedFilesorInformation, OfficeApplicationStartup, OSCredentialDumping, PermissionGroupsDiscovery, Phishing, PreOSBoot, ProcessDiscovery, ProcessInjection, ProtocolTunneling, Proxy, QueryRegistry, RemoteAccessSoftware, RemoteServices, RemoteServiceSessionHijacking, RemoteSystemDiscovery, ResourceHijacking, ScheduledTaskJob, ScreenCapture, SearchVictimOwnedWebsites, ServerSoftwareComponent, ServiceStop, SignedBinaryProxyExecution, SoftwareDeploymentTools, SQLStoredProcedures, StealorForgeKerberosTickets, SubvertTrustControls, SupplyChainCompromise, SystemInformationDiscovery, TaintSharedContent, TrafficSignaling, TransferDatatoCloudAccount, TrustedRelationship, UnsecuredCredentials, UserExecution, ValidAccounts, WindowsManagementInstrumentation} +} + // Threats enumerates the values for threats. type Threats string @@ -1790,25 +1794,6 @@ func PossibleThreatsValues() []Threats { return []Threats{AccountBreach, DataExfiltration, DataSpillage, DenialOfService, ElevationOfPrivilege, MaliciousInsider, MissingCoverage, ThreatResistance} } -// TiStatus enumerates the values for ti status. -type TiStatus string - -const ( - // TiStatusFailed ... - TiStatusFailed TiStatus = "Failed" - // TiStatusInProgress ... - TiStatusInProgress TiStatus = "InProgress" - // TiStatusOk ... - TiStatusOk TiStatus = "Ok" - // TiStatusUpdateAvailable ... - TiStatusUpdateAvailable TiStatus = "UpdateAvailable" -) - -// PossibleTiStatusValues returns an array of possible values for the TiStatus const type. -func PossibleTiStatusValues() []TiStatus { - return []TiStatus{TiStatusFailed, TiStatusInProgress, TiStatusOk, TiStatusUpdateAvailable} -} - // TransportProtocol enumerates the values for transport protocol. type TransportProtocol string @@ -1910,20 +1895,3 @@ const ( func PossibleValueTypeValues() []ValueType { return []ValueType{ValueTypeIPCidr, ValueTypeString} } - -// VersionKind enumerates the values for version kind. -type VersionKind string - -const ( - // Latest ... - Latest VersionKind = "Latest" - // Preview ... - Preview VersionKind = "Preview" - // Previous ... - Previous VersionKind = "Previous" -) - -// PossibleVersionKindValues returns an array of possible values for the VersionKind const type. -func PossibleVersionKindValues() []VersionKind { - return []VersionKind{Latest, Preview, Previous} -} diff --git a/services/preview/security/mgmt/v3.0/security/iotalerts.go b/services/preview/security/mgmt/v3.0/security/iotalerts.go deleted file mode 100644 index 0db7982efdb0..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotalerts.go +++ /dev/null @@ -1,251 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotAlertsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotAlertsClient struct { - BaseClient -} - -// NewIotAlertsClient creates an instance of the IotAlertsClient client. -func NewIotAlertsClient(subscriptionID string, ascLocation string) IotAlertsClient { - return NewIotAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotAlertsClientWithBaseURI creates an instance of the IotAlertsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIotAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotAlertsClient { - return IotAlertsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// Get get IoT alert -// Parameters: -// scope - scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. -// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) -// iotAlertID - id of the alert -func (client IotAlertsClient) Get(ctx context.Context, scope string, iotAlertID string) (result IotAlertModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, scope, iotAlertID) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotAlertsClient) GetPreparer(ctx context.Context, scope string, iotAlertID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotAlertId": autorest.Encode("path", iotAlertID), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotAlerts/{iotAlertId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotAlertsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotAlertsClient) GetResponder(resp *http.Response) (result IotAlertModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT alerts -// Parameters: -// scope - scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. -// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) -// minStartTimeUtc - filter by minimum startTimeUtc (ISO 8601 format) -// maxStartTimeUtc - filter by maximum startTimeUtc (ISO 8601 format) -// alertType - filter by alert type -// deviceManagementType - get devices only from specific type, Managed or Unmanaged. -// compromisedEntity - filter by compromised device -// limit - limit the number of items returned in a single page -// skipToken - skip token used for pagination -func (client IotAlertsClient) List(ctx context.Context, scope string, minStartTimeUtc string, maxStartTimeUtc string, alertType string, deviceManagementType ManagementState, compromisedEntity string, limit *int32, skipToken string) (result IotAlertListModelPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertsClient.List") - defer func() { - sc := -1 - if result.ialm.Response.Response != nil { - sc = result.ialm.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope, minStartTimeUtc, maxStartTimeUtc, alertType, deviceManagementType, compromisedEntity, limit, skipToken) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ialm.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "List", resp, "Failure sending request") - return - } - - result.ialm, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "List", resp, "Failure responding to request") - return - } - if result.ialm.hasNextLink() && result.ialm.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotAlertsClient) ListPreparer(ctx context.Context, scope string, minStartTimeUtc string, maxStartTimeUtc string, alertType string, deviceManagementType ManagementState, compromisedEntity string, limit *int32, skipToken string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(minStartTimeUtc) > 0 { - queryParameters["startTimeUtc>"] = autorest.Encode("query", minStartTimeUtc) - } - if len(maxStartTimeUtc) > 0 { - queryParameters["startTimeUtc<"] = autorest.Encode("query", maxStartTimeUtc) - } - if len(alertType) > 0 { - queryParameters["alertType"] = autorest.Encode("query", alertType) - } - if len(string(deviceManagementType)) > 0 { - queryParameters["deviceManagementType"] = autorest.Encode("query", deviceManagementType) - } - if len(compromisedEntity) > 0 { - queryParameters["compromisedEntity"] = autorest.Encode("query", compromisedEntity) - } - if limit != nil { - queryParameters["$limit"] = autorest.Encode("query", *limit) - } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotAlerts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotAlertsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotAlertsClient) ListResponder(resp *http.Response) (result IotAlertListModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IotAlertsClient) listNextResults(ctx context.Context, lastResults IotAlertListModel) (result IotAlertListModel, err error) { - req, err := lastResults.iotAlertListModelPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "security.IotAlertsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "security.IotAlertsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IotAlertsClient) ListComplete(ctx context.Context, scope string, minStartTimeUtc string, maxStartTimeUtc string, alertType string, deviceManagementType ManagementState, compromisedEntity string, limit *int32, skipToken string) (result IotAlertListModelIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, scope, minStartTimeUtc, maxStartTimeUtc, alertType, deviceManagementType, compromisedEntity, limit, skipToken) - return -} diff --git a/services/preview/security/mgmt/v3.0/security/iotalerttypes.go b/services/preview/security/mgmt/v3.0/security/iotalerttypes.go deleted file mode 100644 index 08f297dde0c6..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotalerttypes.go +++ /dev/null @@ -1,189 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotAlertTypesClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotAlertTypesClient struct { - BaseClient -} - -// NewIotAlertTypesClient creates an instance of the IotAlertTypesClient client. -func NewIotAlertTypesClient(subscriptionID string, ascLocation string) IotAlertTypesClient { - return NewIotAlertTypesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotAlertTypesClientWithBaseURI creates an instance of the IotAlertTypesClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIotAlertTypesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotAlertTypesClient { - return IotAlertTypesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// Get get IoT alert type -// Parameters: -// iotAlertTypeName - name of the alert type -func (client IotAlertTypesClient) Get(ctx context.Context, iotAlertTypeName string) (result IotAlertType, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertTypesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotAlertTypesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, iotAlertTypeName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertTypesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotAlertTypesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertTypesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotAlertTypesClient) GetPreparer(ctx context.Context, iotAlertTypeName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotAlertTypeName": autorest.Encode("path", iotAlertTypeName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotAlertTypes/{iotAlertTypeName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotAlertTypesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotAlertTypesClient) GetResponder(resp *http.Response) (result IotAlertType, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT alert types -func (client IotAlertTypesClient) List(ctx context.Context) (result IotAlertTypeList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertTypesClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotAlertTypesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertTypesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotAlertTypesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotAlertTypesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotAlertTypesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotAlertTypes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotAlertTypesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotAlertTypesClient) ListResponder(resp *http.Response) (result IotAlertTypeList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/preview/security/mgmt/v3.0/security/iotdefendersettings.go b/services/preview/security/mgmt/v3.0/security/iotdefendersettings.go deleted file mode 100644 index 9d3ee16a1d8c..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotdefendersettings.go +++ /dev/null @@ -1,503 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotDefenderSettingsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotDefenderSettingsClient struct { - BaseClient -} - -// NewIotDefenderSettingsClient creates an instance of the IotDefenderSettingsClient client. -func NewIotDefenderSettingsClient(subscriptionID string, ascLocation string) IotDefenderSettingsClient { - return NewIotDefenderSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotDefenderSettingsClientWithBaseURI creates an instance of the IotDefenderSettingsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewIotDefenderSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotDefenderSettingsClient { - return IotDefenderSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// CreateOrUpdate create or update IoT Defender settings -// Parameters: -// iotDefenderSettingsModel - the IoT defender settings model -func (client IotDefenderSettingsClient) CreateOrUpdate(ctx context.Context, iotDefenderSettingsModel IotDefenderSettingsModel) (result IotDefenderSettingsModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotDefenderSettingsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: iotDefenderSettingsModel, - Constraints: []validation.Constraint{{Target: "iotDefenderSettingsModel.IotDefenderSettingsProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotDefenderSettingsModel.IotDefenderSettingsProperties.DeviceQuota", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "iotDefenderSettingsModel.IotDefenderSettingsProperties.DeviceQuota", Name: validation.InclusiveMinimum, Rule: int64(1000), Chain: nil}}}, - {Target: "iotDefenderSettingsModel.IotDefenderSettingsProperties.SentinelWorkspaceResourceIds", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("security.IotDefenderSettingsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, iotDefenderSettingsModel) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IotDefenderSettingsClient) CreateOrUpdatePreparer(ctx context.Context, iotDefenderSettingsModel IotDefenderSettingsModel) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default", pathParameters), - autorest.WithJSON(iotDefenderSettingsModel), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IotDefenderSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IotDefenderSettingsClient) CreateOrUpdateResponder(resp *http.Response) (result IotDefenderSettingsModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete IoT Defender settings -func (client IotDefenderSettingsClient) Delete(ctx context.Context) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotDefenderSettingsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotDefenderSettingsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IotDefenderSettingsClient) DeletePreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IotDefenderSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IotDefenderSettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DownloadManagerActivation download manager activation data defined for this subscription -func (client IotDefenderSettingsClient) DownloadManagerActivation(ctx context.Context) (result ReadCloser, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotDefenderSettingsClient.DownloadManagerActivation") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotDefenderSettingsClient", "DownloadManagerActivation", err.Error()) - } - - req, err := client.DownloadManagerActivationPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "DownloadManagerActivation", nil, "Failure preparing request") - return - } - - resp, err := client.DownloadManagerActivationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "DownloadManagerActivation", resp, "Failure sending request") - return - } - - result, err = client.DownloadManagerActivationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "DownloadManagerActivation", resp, "Failure responding to request") - return - } - - return -} - -// DownloadManagerActivationPreparer prepares the DownloadManagerActivation request. -func (client IotDefenderSettingsClient) DownloadManagerActivationPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/downloadManagerActivation", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DownloadManagerActivationSender sends the DownloadManagerActivation request. The method will close the -// http.Response Body if it receives an error. -func (client IotDefenderSettingsClient) DownloadManagerActivationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DownloadManagerActivationResponder handles the response to the DownloadManagerActivation request. The method always -// closes the http.Response Body. -func (client IotDefenderSettingsClient) DownloadManagerActivationResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK)) - result.Response = autorest.Response{Response: resp} - return -} - -// Get get IoT Defender Settings -func (client IotDefenderSettingsClient) Get(ctx context.Context) (result IotDefenderSettingsModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotDefenderSettingsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotDefenderSettingsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotDefenderSettingsClient) GetPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotDefenderSettingsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotDefenderSettingsClient) GetResponder(resp *http.Response) (result IotDefenderSettingsModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT Defender Settings -func (client IotDefenderSettingsClient) List(ctx context.Context) (result IotDefenderSettingsList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotDefenderSettingsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotDefenderSettingsClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotDefenderSettingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotDefenderSettingsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotDefenderSettingsClient) ListResponder(resp *http.Response) (result IotDefenderSettingsList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// PackageDownloadsMethod information about downloadable packages -func (client IotDefenderSettingsClient) PackageDownloadsMethod(ctx context.Context) (result PackageDownloads, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotDefenderSettingsClient.PackageDownloadsMethod") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotDefenderSettingsClient", "PackageDownloadsMethod", err.Error()) - } - - req, err := client.PackageDownloadsMethodPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "PackageDownloadsMethod", nil, "Failure preparing request") - return - } - - resp, err := client.PackageDownloadsMethodSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "PackageDownloadsMethod", resp, "Failure sending request") - return - } - - result, err = client.PackageDownloadsMethodResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotDefenderSettingsClient", "PackageDownloadsMethod", resp, "Failure responding to request") - return - } - - return -} - -// PackageDownloadsMethodPreparer prepares the PackageDownloadsMethod request. -func (client IotDefenderSettingsClient) PackageDownloadsMethodPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/packageDownloads", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PackageDownloadsMethodSender sends the PackageDownloadsMethod request. The method will close the -// http.Response Body if it receives an error. -func (client IotDefenderSettingsClient) PackageDownloadsMethodSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// PackageDownloadsMethodResponder handles the response to the PackageDownloadsMethod request. The method always -// closes the http.Response Body. -func (client IotDefenderSettingsClient) PackageDownloadsMethodResponder(resp *http.Response) (result PackageDownloads, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/preview/security/mgmt/v3.0/security/iotrecommendations.go b/services/preview/security/mgmt/v3.0/security/iotrecommendations.go deleted file mode 100644 index d65c06b1cb94..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotrecommendations.go +++ /dev/null @@ -1,240 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotRecommendationsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotRecommendationsClient struct { - BaseClient -} - -// NewIotRecommendationsClient creates an instance of the IotRecommendationsClient client. -func NewIotRecommendationsClient(subscriptionID string, ascLocation string) IotRecommendationsClient { - return NewIotRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotRecommendationsClientWithBaseURI creates an instance of the IotRecommendationsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewIotRecommendationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotRecommendationsClient { - return IotRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// Get get IoT recommendation -// Parameters: -// scope - scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. -// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) -// iotRecommendationID - id of the recommendation -func (client IotRecommendationsClient) Get(ctx context.Context, scope string, iotRecommendationID string) (result IotRecommendationModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, scope, iotRecommendationID) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotRecommendationsClient) GetPreparer(ctx context.Context, scope string, iotRecommendationID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotRecommendationId": autorest.Encode("path", iotRecommendationID), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotRecommendations/{iotRecommendationId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotRecommendationsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotRecommendationsClient) GetResponder(resp *http.Response) (result IotRecommendationModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT recommendations -// Parameters: -// scope - scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. -// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}) -// recommendationType - filter by recommendation type -// deviceID - filter by device id -// limit - limit the number of items returned in a single page -// skipToken - skip token used for pagination -func (client IotRecommendationsClient) List(ctx context.Context, scope string, recommendationType string, deviceID string, limit *int32, skipToken string) (result IotRecommendationListModelPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationsClient.List") - defer func() { - sc := -1 - if result.irlm.Response.Response != nil { - sc = result.irlm.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, scope, recommendationType, deviceID, limit, skipToken) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.irlm.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "List", resp, "Failure sending request") - return - } - - result.irlm, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "List", resp, "Failure responding to request") - return - } - if result.irlm.hasNextLink() && result.irlm.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotRecommendationsClient) ListPreparer(ctx context.Context, scope string, recommendationType string, deviceID string, limit *int32, skipToken string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(recommendationType) > 0 { - queryParameters["recommendationType"] = autorest.Encode("query", recommendationType) - } - if len(deviceID) > 0 { - queryParameters["deviceId"] = autorest.Encode("query", deviceID) - } - if limit != nil { - queryParameters["$limit"] = autorest.Encode("query", *limit) - } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotRecommendations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotRecommendationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotRecommendationsClient) ListResponder(resp *http.Response) (result IotRecommendationListModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IotRecommendationsClient) listNextResults(ctx context.Context, lastResults IotRecommendationListModel) (result IotRecommendationListModel, err error) { - req, err := lastResults.iotRecommendationListModelPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IotRecommendationsClient) ListComplete(ctx context.Context, scope string, recommendationType string, deviceID string, limit *int32, skipToken string) (result IotRecommendationListModelIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, scope, recommendationType, deviceID, limit, skipToken) - return -} diff --git a/services/preview/security/mgmt/v3.0/security/iotrecommendationtypes.go b/services/preview/security/mgmt/v3.0/security/iotrecommendationtypes.go deleted file mode 100644 index 23f77b0dfd7b..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotrecommendationtypes.go +++ /dev/null @@ -1,190 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotRecommendationTypesClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotRecommendationTypesClient struct { - BaseClient -} - -// NewIotRecommendationTypesClient creates an instance of the IotRecommendationTypesClient client. -func NewIotRecommendationTypesClient(subscriptionID string, ascLocation string) IotRecommendationTypesClient { - return NewIotRecommendationTypesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotRecommendationTypesClientWithBaseURI creates an instance of the IotRecommendationTypesClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewIotRecommendationTypesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotRecommendationTypesClient { - return IotRecommendationTypesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// Get get IoT recommendation type -// Parameters: -// iotRecommendationTypeName - name of the recommendation type -func (client IotRecommendationTypesClient) Get(ctx context.Context, iotRecommendationTypeName string) (result IotRecommendationType, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationTypesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotRecommendationTypesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, iotRecommendationTypeName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationTypesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotRecommendationTypesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationTypesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotRecommendationTypesClient) GetPreparer(ctx context.Context, iotRecommendationTypeName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotRecommendationTypeName": autorest.Encode("path", iotRecommendationTypeName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotRecommendationTypes/{iotRecommendationTypeName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotRecommendationTypesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotRecommendationTypesClient) GetResponder(resp *http.Response) (result IotRecommendationType, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT recommendation types -func (client IotRecommendationTypesClient) List(ctx context.Context) (result IotRecommendationTypeList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationTypesClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.IotRecommendationTypesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationTypesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotRecommendationTypesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotRecommendationTypesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotRecommendationTypesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotRecommendationTypes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotRecommendationTypesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotRecommendationTypesClient) ListResponder(resp *http.Response) (result IotRecommendationTypeList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/preview/security/mgmt/v3.0/security/iotsensors.go b/services/preview/security/mgmt/v3.0/security/iotsensors.go deleted file mode 100644 index ff3ae20b5dc0..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotsensors.go +++ /dev/null @@ -1,556 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotSensorsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotSensorsClient struct { - BaseClient -} - -// NewIotSensorsClient creates an instance of the IotSensorsClient client. -func NewIotSensorsClient(subscriptionID string, ascLocation string) IotSensorsClient { - return NewIotSensorsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotSensorsClientWithBaseURI creates an instance of the IotSensorsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIotSensorsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSensorsClient { - return IotSensorsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// CreateOrUpdate create or update IoT sensor -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSensorName - name of the IoT sensor -// iotSensorsModel - the IoT sensor model -func (client IotSensorsClient) CreateOrUpdate(ctx context.Context, scope string, iotSensorName string, iotSensorsModel IotSensorsModel) (result IotSensorsModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, scope, iotSensorName, iotSensorsModel) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IotSensorsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, iotSensorName string, iotSensorsModel IotSensorsModel) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotSensorName": autorest.Encode("path", iotSensorName), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", pathParameters), - autorest.WithJSON(iotSensorsModel), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) CreateOrUpdateResponder(resp *http.Response) (result IotSensorsModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete IoT sensor -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSensorName - name of the IoT sensor -func (client IotSensorsClient) Delete(ctx context.Context, scope string, iotSensorName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, scope, iotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IotSensorsClient) DeletePreparer(ctx context.Context, scope string, iotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotSensorName": autorest.Encode("path", iotSensorName), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DownloadActivation download sensor activation file -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSensorName - name of the IoT sensor -func (client IotSensorsClient) DownloadActivation(ctx context.Context, scope string, iotSensorName string) (result ReadCloser, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.DownloadActivation") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DownloadActivationPreparer(ctx, scope, iotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "DownloadActivation", nil, "Failure preparing request") - return - } - - resp, err := client.DownloadActivationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "DownloadActivation", resp, "Failure sending request") - return - } - - result, err = client.DownloadActivationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "DownloadActivation", resp, "Failure responding to request") - return - } - - return -} - -// DownloadActivationPreparer prepares the DownloadActivation request. -func (client IotSensorsClient) DownloadActivationPreparer(ctx context.Context, scope string, iotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotSensorName": autorest.Encode("path", iotSensorName), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadActivation", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DownloadActivationSender sends the DownloadActivation request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) DownloadActivationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DownloadActivationResponder handles the response to the DownloadActivation request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) DownloadActivationResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK)) - result.Response = autorest.Response{Response: resp} - return -} - -// DownloadResetPassword download file for reset password of the sensor -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSensorName - name of the IoT sensor -// body - the reset password input. -func (client IotSensorsClient) DownloadResetPassword(ctx context.Context, scope string, iotSensorName string, body ResetPasswordInput) (result ReadCloser, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.DownloadResetPassword") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DownloadResetPasswordPreparer(ctx, scope, iotSensorName, body) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "DownloadResetPassword", nil, "Failure preparing request") - return - } - - resp, err := client.DownloadResetPasswordSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "DownloadResetPassword", resp, "Failure sending request") - return - } - - result, err = client.DownloadResetPasswordResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "DownloadResetPassword", resp, "Failure responding to request") - return - } - - return -} - -// DownloadResetPasswordPreparer prepares the DownloadResetPassword request. -func (client IotSensorsClient) DownloadResetPasswordPreparer(ctx context.Context, scope string, iotSensorName string, body ResetPasswordInput) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotSensorName": autorest.Encode("path", iotSensorName), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadResetPassword", pathParameters), - autorest.WithJSON(body), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DownloadResetPasswordSender sends the DownloadResetPassword request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) DownloadResetPasswordSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DownloadResetPasswordResponder handles the response to the DownloadResetPassword request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) DownloadResetPasswordResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK)) - result.Response = autorest.Response{Response: resp} - return -} - -// Get get IoT sensor -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSensorName - name of the IoT sensor -func (client IotSensorsClient) Get(ctx context.Context, scope string, iotSensorName string) (result IotSensorsModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, scope, iotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotSensorsClient) GetPreparer(ctx context.Context, scope string, iotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotSensorName": autorest.Encode("path", iotSensorName), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) GetResponder(resp *http.Response) (result IotSensorsModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT sensors -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -func (client IotSensorsClient) List(ctx context.Context, scope string) (result IotSensorsList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, scope) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotSensorsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) ListResponder(resp *http.Response) (result IotSensorsList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// TriggerTiPackageUpdate trigger threat intelligence package update -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSensorName - name of the IoT sensor -func (client IotSensorsClient) TriggerTiPackageUpdate(ctx context.Context, scope string, iotSensorName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSensorsClient.TriggerTiPackageUpdate") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.TriggerTiPackageUpdatePreparer(ctx, scope, iotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "TriggerTiPackageUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.TriggerTiPackageUpdateSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "TriggerTiPackageUpdate", resp, "Failure sending request") - return - } - - result, err = client.TriggerTiPackageUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSensorsClient", "TriggerTiPackageUpdate", resp, "Failure responding to request") - return - } - - return -} - -// TriggerTiPackageUpdatePreparer prepares the TriggerTiPackageUpdate request. -func (client IotSensorsClient) TriggerTiPackageUpdatePreparer(ctx context.Context, scope string, iotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "iotSensorName": autorest.Encode("path", iotSensorName), - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/triggerTiPackageUpdate", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// TriggerTiPackageUpdateSender sends the TriggerTiPackageUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IotSensorsClient) TriggerTiPackageUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// TriggerTiPackageUpdateResponder handles the response to the TriggerTiPackageUpdate request. The method always -// closes the http.Response Body. -func (client IotSensorsClient) TriggerTiPackageUpdateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/services/preview/security/mgmt/v3.0/security/iotsites.go b/services/preview/security/mgmt/v3.0/security/iotsites.go deleted file mode 100644 index 1326e67d8924..000000000000 --- a/services/preview/security/mgmt/v3.0/security/iotsites.go +++ /dev/null @@ -1,333 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IotSitesClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type IotSitesClient struct { - BaseClient -} - -// NewIotSitesClient creates an instance of the IotSitesClient client. -func NewIotSitesClient(subscriptionID string, ascLocation string) IotSitesClient { - return NewIotSitesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewIotSitesClientWithBaseURI creates an instance of the IotSitesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIotSitesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSitesClient { - return IotSitesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// CreateOrUpdate create or update IoT site -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -// iotSitesModel - the IoT sites model -func (client IotSitesClient) CreateOrUpdate(ctx context.Context, scope string, iotSitesModel IotSitesModel) (result IotSitesModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSitesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: iotSitesModel, - Constraints: []validation.Constraint{{Target: "iotSitesModel.IotSiteProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotSitesModel.IotSiteProperties.DisplayName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("security.IotSitesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, scope, iotSitesModel) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IotSitesClient) CreateOrUpdatePreparer(ctx context.Context, scope string, iotSitesModel IotSitesModel) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSites/default", pathParameters), - autorest.WithJSON(iotSitesModel), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IotSitesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IotSitesClient) CreateOrUpdateResponder(resp *http.Response) (result IotSitesModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete IoT site -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -func (client IotSitesClient) Delete(ctx context.Context, scope string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSitesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, scope) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IotSitesClient) DeletePreparer(ctx context.Context, scope string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSites/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IotSitesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IotSitesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get get IoT site -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -func (client IotSitesClient) Get(ctx context.Context, scope string) (result IotSitesModel, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSitesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, scope) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IotSitesClient) GetPreparer(ctx context.Context, scope string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSites/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IotSitesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IotSitesClient) GetResponder(resp *http.Response) (result IotSitesModel, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list IoT sites -// Parameters: -// scope - scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub) -func (client IotSitesClient) List(ctx context.Context, scope string) (result IotSitesList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotSitesClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, scope) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.IotSitesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IotSitesClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "scope": scope, - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/iotSites", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IotSitesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IotSitesClient) ListResponder(resp *http.Response) (result IotSitesList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/preview/security/mgmt/v3.0/security/models.go b/services/preview/security/mgmt/v3.0/security/models.go index 03a13201a108..a379dfa22ba5 100644 --- a/services/preview/security/mgmt/v3.0/security/models.go +++ b/services/preview/security/mgmt/v3.0/security/models.go @@ -15,7 +15,6 @@ import ( "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/tracing" "github.com/gofrs/uuid" - "io" "net/http" ) @@ -3412,7 +3411,6 @@ func NewAscLocationListPage(cur AscLocationList, getNextPage func(context.Contex // Assessment security assessment on a resource type Assessment struct { - autorest.Response `json:"-"` *AssessmentProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -3498,7 +3496,7 @@ func (al AssessmentLinks) MarshalJSON() ([]byte, error) { type AssessmentList struct { autorest.Response `json:"-"` // Value - READ-ONLY; Collection of security assessments in this page - Value *[]Assessment `json:"value,omitempty"` + Value *[]AssessmentResponse `json:"value,omitempty"` // NextLink - READ-ONLY; The URI to fetch the next page. NextLink *string `json:"nextLink,omitempty"` } @@ -3509,7 +3507,7 @@ func (al AssessmentList) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AssessmentListIterator provides access to a complete listing of Assessment values. +// AssessmentListIterator provides access to a complete listing of AssessmentResponse values. type AssessmentListIterator struct { i int page AssessmentListPage @@ -3560,9 +3558,9 @@ func (iter AssessmentListIterator) Response() AssessmentList { // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter AssessmentListIterator) Value() Assessment { +func (iter AssessmentListIterator) Value() AssessmentResponse { if !iter.page.NotDone() { - return Assessment{} + return AssessmentResponse{} } return iter.page.Values()[iter.i] } @@ -3594,7 +3592,7 @@ func (al AssessmentList) assessmentListPreparer(ctx context.Context) (*http.Requ autorest.WithBaseURL(to.String(al.NextLink))) } -// AssessmentListPage contains a page of Assessment values. +// AssessmentListPage contains a page of AssessmentResponse values. type AssessmentListPage struct { fn func(context.Context, AssessmentList) (AssessmentList, error) al AssessmentList @@ -3644,7 +3642,7 @@ func (page AssessmentListPage) Response() AssessmentList { } // Values returns the slice of values for the current page or nil if there are no values. -func (page AssessmentListPage) Values() []Assessment { +func (page AssessmentListPage) Values() []AssessmentResponse { if page.al.IsEmpty() { return nil } @@ -3661,7 +3659,6 @@ func NewAssessmentListPage(cur AssessmentList, getNextPage func(context.Context, // AssessmentMetadata security assessment metadata type AssessmentMetadata struct { - autorest.Response `json:"-"` *AssessmentMetadataProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -3731,32 +3728,265 @@ func (am *AssessmentMetadata) UnmarshalJSON(body []byte) error { return nil } -// AssessmentMetadataList list of security assessment metadata -type AssessmentMetadataList struct { +// AssessmentMetadataPartnerData describes the partner that created the assessment +type AssessmentMetadataPartnerData struct { + // PartnerName - Name of the company of the partner + PartnerName *string `json:"partnerName,omitempty"` + // ProductName - Name of the product of the partner that created the assessment + ProductName *string `json:"productName,omitempty"` + // Secret - Secret to authenticate the partner and verify it created the assessment - write only + Secret *string `json:"secret,omitempty"` +} + +// AssessmentMetadataProperties describes properties of an assessment metadata. +type AssessmentMetadataProperties struct { + // DisplayName - User friendly display name of the assessment + DisplayName *string `json:"displayName,omitempty"` + // PolicyDefinitionID - READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on + PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"` + // Description - Human readable description of the assessment + Description *string `json:"description,omitempty"` + // RemediationDescription - Human readable description of what you should do to mitigate this security issue + RemediationDescription *string `json:"remediationDescription,omitempty"` + Categories *[]Categories `json:"categories,omitempty"` + // Severity - The severity level of the assessment. Possible values include: 'SeverityLow', 'SeverityMedium', 'SeverityHigh' + Severity Severity `json:"severity,omitempty"` + // UserImpact - The user impact of the assessment. Possible values include: 'UserImpactLow', 'UserImpactModerate', 'UserImpactHigh' + UserImpact UserImpact `json:"userImpact,omitempty"` + // ImplementationEffort - The implementation effort required to remediate this assessment. Possible values include: 'ImplementationEffortLow', 'ImplementationEffortModerate', 'ImplementationEffortHigh' + ImplementationEffort ImplementationEffort `json:"implementationEffort,omitempty"` + Threats *[]Threats `json:"threats,omitempty"` + // Preview - True if this assessment is in preview release status + Preview *bool `json:"preview,omitempty"` + // AssessmentType - BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. Possible values include: 'BuiltIn', 'CustomPolicy', 'CustomerManaged', 'VerifiedPartner' + AssessmentType AssessmentType `json:"assessmentType,omitempty"` + PartnerData *AssessmentMetadataPartnerData `json:"partnerData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentMetadataProperties. +func (amp AssessmentMetadataProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if amp.DisplayName != nil { + objectMap["displayName"] = amp.DisplayName + } + if amp.Description != nil { + objectMap["description"] = amp.Description + } + if amp.RemediationDescription != nil { + objectMap["remediationDescription"] = amp.RemediationDescription + } + if amp.Categories != nil { + objectMap["categories"] = amp.Categories + } + if amp.Severity != "" { + objectMap["severity"] = amp.Severity + } + if amp.UserImpact != "" { + objectMap["userImpact"] = amp.UserImpact + } + if amp.ImplementationEffort != "" { + objectMap["implementationEffort"] = amp.ImplementationEffort + } + if amp.Threats != nil { + objectMap["threats"] = amp.Threats + } + if amp.Preview != nil { + objectMap["preview"] = amp.Preview + } + if amp.AssessmentType != "" { + objectMap["assessmentType"] = amp.AssessmentType + } + if amp.PartnerData != nil { + objectMap["partnerData"] = amp.PartnerData + } + return json.Marshal(objectMap) +} + +// AssessmentMetadataPropertiesResponse describes properties of an assessment metadata response. +type AssessmentMetadataPropertiesResponse struct { + PublishDates *AssessmentMetadataPropertiesResponsePublishDates `json:"publishDates,omitempty"` + PlannedDeprecationDate *string `json:"plannedDeprecationDate,omitempty"` + Tactics *[]Tactics `json:"tactics,omitempty"` + Techniques *[]Techniques `json:"techniques,omitempty"` + // DisplayName - User friendly display name of the assessment + DisplayName *string `json:"displayName,omitempty"` + // PolicyDefinitionID - READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on + PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"` + // Description - Human readable description of the assessment + Description *string `json:"description,omitempty"` + // RemediationDescription - Human readable description of what you should do to mitigate this security issue + RemediationDescription *string `json:"remediationDescription,omitempty"` + Categories *[]Categories `json:"categories,omitempty"` + // Severity - The severity level of the assessment. Possible values include: 'SeverityLow', 'SeverityMedium', 'SeverityHigh' + Severity Severity `json:"severity,omitempty"` + // UserImpact - The user impact of the assessment. Possible values include: 'UserImpactLow', 'UserImpactModerate', 'UserImpactHigh' + UserImpact UserImpact `json:"userImpact,omitempty"` + // ImplementationEffort - The implementation effort required to remediate this assessment. Possible values include: 'ImplementationEffortLow', 'ImplementationEffortModerate', 'ImplementationEffortHigh' + ImplementationEffort ImplementationEffort `json:"implementationEffort,omitempty"` + Threats *[]Threats `json:"threats,omitempty"` + // Preview - True if this assessment is in preview release status + Preview *bool `json:"preview,omitempty"` + // AssessmentType - BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. Possible values include: 'BuiltIn', 'CustomPolicy', 'CustomerManaged', 'VerifiedPartner' + AssessmentType AssessmentType `json:"assessmentType,omitempty"` + PartnerData *AssessmentMetadataPartnerData `json:"partnerData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentMetadataPropertiesResponse. +func (ampr AssessmentMetadataPropertiesResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ampr.PublishDates != nil { + objectMap["publishDates"] = ampr.PublishDates + } + if ampr.PlannedDeprecationDate != nil { + objectMap["plannedDeprecationDate"] = ampr.PlannedDeprecationDate + } + if ampr.Tactics != nil { + objectMap["tactics"] = ampr.Tactics + } + if ampr.Techniques != nil { + objectMap["techniques"] = ampr.Techniques + } + if ampr.DisplayName != nil { + objectMap["displayName"] = ampr.DisplayName + } + if ampr.Description != nil { + objectMap["description"] = ampr.Description + } + if ampr.RemediationDescription != nil { + objectMap["remediationDescription"] = ampr.RemediationDescription + } + if ampr.Categories != nil { + objectMap["categories"] = ampr.Categories + } + if ampr.Severity != "" { + objectMap["severity"] = ampr.Severity + } + if ampr.UserImpact != "" { + objectMap["userImpact"] = ampr.UserImpact + } + if ampr.ImplementationEffort != "" { + objectMap["implementationEffort"] = ampr.ImplementationEffort + } + if ampr.Threats != nil { + objectMap["threats"] = ampr.Threats + } + if ampr.Preview != nil { + objectMap["preview"] = ampr.Preview + } + if ampr.AssessmentType != "" { + objectMap["assessmentType"] = ampr.AssessmentType + } + if ampr.PartnerData != nil { + objectMap["partnerData"] = ampr.PartnerData + } + return json.Marshal(objectMap) +} + +// AssessmentMetadataPropertiesResponsePublishDates ... +type AssessmentMetadataPropertiesResponsePublishDates struct { + GA *string `json:"GA,omitempty"` + Public *string `json:"public,omitempty"` +} + +// AssessmentMetadataResponse security assessment metadata response +type AssessmentMetadataResponse struct { + autorest.Response `json:"-"` + *AssessmentMetadataPropertiesResponse `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentMetadataResponse. +func (amr AssessmentMetadataResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if amr.AssessmentMetadataPropertiesResponse != nil { + objectMap["properties"] = amr.AssessmentMetadataPropertiesResponse + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AssessmentMetadataResponse struct. +func (amr *AssessmentMetadataResponse) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var assessmentMetadataPropertiesResponse AssessmentMetadataPropertiesResponse + err = json.Unmarshal(*v, &assessmentMetadataPropertiesResponse) + if err != nil { + return err + } + amr.AssessmentMetadataPropertiesResponse = &assessmentMetadataPropertiesResponse + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + amr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + amr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + amr.Type = &typeVar + } + } + } + + return nil +} + +// AssessmentMetadataResponseList list of security assessment metadata +type AssessmentMetadataResponseList struct { autorest.Response `json:"-"` // Value - READ-ONLY - Value *[]AssessmentMetadata `json:"value,omitempty"` + Value *[]AssessmentMetadataResponse `json:"value,omitempty"` // NextLink - READ-ONLY; The URI to fetch the next page. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for AssessmentMetadataList. -func (aml AssessmentMetadataList) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AssessmentMetadataResponseList. +func (amrl AssessmentMetadataResponseList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// AssessmentMetadataListIterator provides access to a complete listing of AssessmentMetadata values. -type AssessmentMetadataListIterator struct { +// AssessmentMetadataResponseListIterator provides access to a complete listing of +// AssessmentMetadataResponse values. +type AssessmentMetadataResponseListIterator struct { i int - page AssessmentMetadataListPage + page AssessmentMetadataResponseListPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *AssessmentMetadataListIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *AssessmentMetadataResponseListIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentMetadataListIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentMetadataResponseListIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -3781,67 +4011,67 @@ func (iter *AssessmentMetadataListIterator) NextWithContext(ctx context.Context) // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *AssessmentMetadataListIterator) Next() error { +func (iter *AssessmentMetadataResponseListIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AssessmentMetadataListIterator) NotDone() bool { +func (iter AssessmentMetadataResponseListIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter AssessmentMetadataListIterator) Response() AssessmentMetadataList { +func (iter AssessmentMetadataResponseListIterator) Response() AssessmentMetadataResponseList { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter AssessmentMetadataListIterator) Value() AssessmentMetadata { +func (iter AssessmentMetadataResponseListIterator) Value() AssessmentMetadataResponse { if !iter.page.NotDone() { - return AssessmentMetadata{} + return AssessmentMetadataResponse{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the AssessmentMetadataListIterator type. -func NewAssessmentMetadataListIterator(page AssessmentMetadataListPage) AssessmentMetadataListIterator { - return AssessmentMetadataListIterator{page: page} +// Creates a new instance of the AssessmentMetadataResponseListIterator type. +func NewAssessmentMetadataResponseListIterator(page AssessmentMetadataResponseListPage) AssessmentMetadataResponseListIterator { + return AssessmentMetadataResponseListIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (aml AssessmentMetadataList) IsEmpty() bool { - return aml.Value == nil || len(*aml.Value) == 0 +func (amrl AssessmentMetadataResponseList) IsEmpty() bool { + return amrl.Value == nil || len(*amrl.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (aml AssessmentMetadataList) hasNextLink() bool { - return aml.NextLink != nil && len(*aml.NextLink) != 0 +func (amrl AssessmentMetadataResponseList) hasNextLink() bool { + return amrl.NextLink != nil && len(*amrl.NextLink) != 0 } -// assessmentMetadataListPreparer prepares a request to retrieve the next set of results. +// assessmentMetadataResponseListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (aml AssessmentMetadataList) assessmentMetadataListPreparer(ctx context.Context) (*http.Request, error) { - if !aml.hasNextLink() { +func (amrl AssessmentMetadataResponseList) assessmentMetadataResponseListPreparer(ctx context.Context) (*http.Request, error) { + if !amrl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(aml.NextLink))) + autorest.WithBaseURL(to.String(amrl.NextLink))) } -// AssessmentMetadataListPage contains a page of AssessmentMetadata values. -type AssessmentMetadataListPage struct { - fn func(context.Context, AssessmentMetadataList) (AssessmentMetadataList, error) - aml AssessmentMetadataList +// AssessmentMetadataResponseListPage contains a page of AssessmentMetadataResponse values. +type AssessmentMetadataResponseListPage struct { + fn func(context.Context, AssessmentMetadataResponseList) (AssessmentMetadataResponseList, error) + amrl AssessmentMetadataResponseList } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *AssessmentMetadataListPage) NextWithContext(ctx context.Context) (err error) { +func (page *AssessmentMetadataResponseListPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentMetadataListPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentMetadataResponseListPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -3851,11 +4081,11 @@ func (page *AssessmentMetadataListPage) NextWithContext(ctx context.Context) (er }() } for { - next, err := page.fn(ctx, page.aml) + next, err := page.fn(ctx, page.amrl) if err != nil { return err } - page.aml = next + page.amrl = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -3866,108 +4096,34 @@ func (page *AssessmentMetadataListPage) NextWithContext(ctx context.Context) (er // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *AssessmentMetadataListPage) Next() error { +func (page *AssessmentMetadataResponseListPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AssessmentMetadataListPage) NotDone() bool { - return !page.aml.IsEmpty() +func (page AssessmentMetadataResponseListPage) NotDone() bool { + return !page.amrl.IsEmpty() } // Response returns the raw server response from the last page request. -func (page AssessmentMetadataListPage) Response() AssessmentMetadataList { - return page.aml +func (page AssessmentMetadataResponseListPage) Response() AssessmentMetadataResponseList { + return page.amrl } // Values returns the slice of values for the current page or nil if there are no values. -func (page AssessmentMetadataListPage) Values() []AssessmentMetadata { - if page.aml.IsEmpty() { +func (page AssessmentMetadataResponseListPage) Values() []AssessmentMetadataResponse { + if page.amrl.IsEmpty() { return nil } - return *page.aml.Value -} - -// Creates a new instance of the AssessmentMetadataListPage type. -func NewAssessmentMetadataListPage(cur AssessmentMetadataList, getNextPage func(context.Context, AssessmentMetadataList) (AssessmentMetadataList, error)) AssessmentMetadataListPage { - return AssessmentMetadataListPage{ - fn: getNextPage, - aml: cur, - } -} - -// AssessmentMetadataPartnerData describes the partner that created the assessment -type AssessmentMetadataPartnerData struct { - // PartnerName - Name of the company of the partner - PartnerName *string `json:"partnerName,omitempty"` - // ProductName - Name of the product of the partner that created the assessment - ProductName *string `json:"productName,omitempty"` - // Secret - Secret to authenticate the partner and verify it created the assessment - write only - Secret *string `json:"secret,omitempty"` -} - -// AssessmentMetadataProperties describes properties of an assessment metadata. -type AssessmentMetadataProperties struct { - // DisplayName - User friendly display name of the assessment - DisplayName *string `json:"displayName,omitempty"` - // PolicyDefinitionID - READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on - PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"` - // Description - Human readable description of the assessment - Description *string `json:"description,omitempty"` - // RemediationDescription - Human readable description of what you should do to mitigate this security issue - RemediationDescription *string `json:"remediationDescription,omitempty"` - Categories *[]Categories `json:"categories,omitempty"` - // Severity - The severity level of the assessment. Possible values include: 'SeverityLow', 'SeverityMedium', 'SeverityHigh' - Severity Severity `json:"severity,omitempty"` - // UserImpact - The user impact of the assessment. Possible values include: 'UserImpactLow', 'UserImpactModerate', 'UserImpactHigh' - UserImpact UserImpact `json:"userImpact,omitempty"` - // ImplementationEffort - The implementation effort required to remediate this assessment. Possible values include: 'ImplementationEffortLow', 'ImplementationEffortModerate', 'ImplementationEffortHigh' - ImplementationEffort ImplementationEffort `json:"implementationEffort,omitempty"` - Threats *[]Threats `json:"threats,omitempty"` - // Preview - True if this assessment is in preview release status - Preview *bool `json:"preview,omitempty"` - // AssessmentType - BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. Possible values include: 'BuiltIn', 'CustomPolicy', 'CustomerManaged', 'VerifiedPartner' - AssessmentType AssessmentType `json:"assessmentType,omitempty"` - PartnerData *AssessmentMetadataPartnerData `json:"partnerData,omitempty"` + return *page.amrl.Value } -// MarshalJSON is the custom marshaler for AssessmentMetadataProperties. -func (amp AssessmentMetadataProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if amp.DisplayName != nil { - objectMap["displayName"] = amp.DisplayName - } - if amp.Description != nil { - objectMap["description"] = amp.Description - } - if amp.RemediationDescription != nil { - objectMap["remediationDescription"] = amp.RemediationDescription - } - if amp.Categories != nil { - objectMap["categories"] = amp.Categories - } - if amp.Severity != "" { - objectMap["severity"] = amp.Severity - } - if amp.UserImpact != "" { - objectMap["userImpact"] = amp.UserImpact - } - if amp.ImplementationEffort != "" { - objectMap["implementationEffort"] = amp.ImplementationEffort - } - if amp.Threats != nil { - objectMap["threats"] = amp.Threats - } - if amp.Preview != nil { - objectMap["preview"] = amp.Preview - } - if amp.AssessmentType != "" { - objectMap["assessmentType"] = amp.AssessmentType - } - if amp.PartnerData != nil { - objectMap["partnerData"] = amp.PartnerData +// Creates a new instance of the AssessmentMetadataResponseListPage type. +func NewAssessmentMetadataResponseListPage(cur AssessmentMetadataResponseList, getNextPage func(context.Context, AssessmentMetadataResponseList) (AssessmentMetadataResponseList, error)) AssessmentMetadataResponseListPage { + return AssessmentMetadataResponseListPage{ + fn: getNextPage, + amrl: cur, } - return json.Marshal(objectMap) } // AssessmentPartnerData data regarding 3rd party partner integration @@ -3980,10 +4136,10 @@ type AssessmentPartnerData struct { // AssessmentProperties describes properties of an assessment. type AssessmentProperties struct { + Status *AssessmentStatus `json:"status,omitempty"` ResourceDetails BasicResourceDetails `json:"resourceDetails,omitempty"` // DisplayName - READ-ONLY; User friendly display name of the assessment - DisplayName *string `json:"displayName,omitempty"` - Status *AssessmentStatus `json:"status,omitempty"` + DisplayName *string `json:"displayName,omitempty"` // AdditionalData - Additional data regarding the assessment AdditionalData map[string]*string `json:"additionalData"` Links *AssessmentLinks `json:"links,omitempty"` @@ -3994,10 +4150,10 @@ type AssessmentProperties struct { // MarshalJSON is the custom marshaler for AssessmentProperties. func (ap AssessmentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - objectMap["resourceDetails"] = ap.ResourceDetails if ap.Status != nil { objectMap["status"] = ap.Status } + objectMap["resourceDetails"] = ap.ResourceDetails if ap.AdditionalData != nil { objectMap["additionalData"] = ap.AdditionalData } @@ -4022,7 +4178,16 @@ func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "resourceDetails": + case "status": + if v != nil { + var status AssessmentStatus + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + ap.Status = &status + } + case "resourceDetails": if v != nil { resourceDetails, err := unmarshalBasicResourceDetails(*v) if err != nil { @@ -4039,14 +4204,216 @@ func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { } ap.DisplayName = &displayName } + case "additionalData": + if v != nil { + var additionalData map[string]*string + err = json.Unmarshal(*v, &additionalData) + if err != nil { + return err + } + ap.AdditionalData = additionalData + } + case "links": + if v != nil { + var links AssessmentLinks + err = json.Unmarshal(*v, &links) + if err != nil { + return err + } + ap.Links = &links + } + case "metadata": + if v != nil { + var metadata AssessmentMetadataProperties + err = json.Unmarshal(*v, &metadata) + if err != nil { + return err + } + ap.Metadata = &metadata + } + case "partnersData": + if v != nil { + var partnersData AssessmentPartnerData + err = json.Unmarshal(*v, &partnersData) + if err != nil { + return err + } + ap.PartnersData = &partnersData + } + } + } + + return nil +} + +// AssessmentPropertiesBase describes properties of an assessment. +type AssessmentPropertiesBase struct { + ResourceDetails BasicResourceDetails `json:"resourceDetails,omitempty"` + // DisplayName - READ-ONLY; User friendly display name of the assessment + DisplayName *string `json:"displayName,omitempty"` + // AdditionalData - Additional data regarding the assessment + AdditionalData map[string]*string `json:"additionalData"` + Links *AssessmentLinks `json:"links,omitempty"` + Metadata *AssessmentMetadataProperties `json:"metadata,omitempty"` + PartnersData *AssessmentPartnerData `json:"partnersData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentPropertiesBase. +func (apb AssessmentPropertiesBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["resourceDetails"] = apb.ResourceDetails + if apb.AdditionalData != nil { + objectMap["additionalData"] = apb.AdditionalData + } + if apb.Links != nil { + objectMap["links"] = apb.Links + } + if apb.Metadata != nil { + objectMap["metadata"] = apb.Metadata + } + if apb.PartnersData != nil { + objectMap["partnersData"] = apb.PartnersData + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AssessmentPropertiesBase struct. +func (apb *AssessmentPropertiesBase) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "resourceDetails": + if v != nil { + resourceDetails, err := unmarshalBasicResourceDetails(*v) + if err != nil { + return err + } + apb.ResourceDetails = resourceDetails + } + case "displayName": + if v != nil { + var displayName string + err = json.Unmarshal(*v, &displayName) + if err != nil { + return err + } + apb.DisplayName = &displayName + } + case "additionalData": + if v != nil { + var additionalData map[string]*string + err = json.Unmarshal(*v, &additionalData) + if err != nil { + return err + } + apb.AdditionalData = additionalData + } + case "links": + if v != nil { + var links AssessmentLinks + err = json.Unmarshal(*v, &links) + if err != nil { + return err + } + apb.Links = &links + } + case "metadata": + if v != nil { + var metadata AssessmentMetadataProperties + err = json.Unmarshal(*v, &metadata) + if err != nil { + return err + } + apb.Metadata = &metadata + } + case "partnersData": + if v != nil { + var partnersData AssessmentPartnerData + err = json.Unmarshal(*v, &partnersData) + if err != nil { + return err + } + apb.PartnersData = &partnersData + } + } + } + + return nil +} + +// AssessmentPropertiesResponse describes properties of an assessment. +type AssessmentPropertiesResponse struct { + Status *AssessmentStatusResponse `json:"status,omitempty"` + ResourceDetails BasicResourceDetails `json:"resourceDetails,omitempty"` + // DisplayName - READ-ONLY; User friendly display name of the assessment + DisplayName *string `json:"displayName,omitempty"` + // AdditionalData - Additional data regarding the assessment + AdditionalData map[string]*string `json:"additionalData"` + Links *AssessmentLinks `json:"links,omitempty"` + Metadata *AssessmentMetadataProperties `json:"metadata,omitempty"` + PartnersData *AssessmentPartnerData `json:"partnersData,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentPropertiesResponse. +func (apr AssessmentPropertiesResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apr.Status != nil { + objectMap["status"] = apr.Status + } + objectMap["resourceDetails"] = apr.ResourceDetails + if apr.AdditionalData != nil { + objectMap["additionalData"] = apr.AdditionalData + } + if apr.Links != nil { + objectMap["links"] = apr.Links + } + if apr.Metadata != nil { + objectMap["metadata"] = apr.Metadata + } + if apr.PartnersData != nil { + objectMap["partnersData"] = apr.PartnersData + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AssessmentPropertiesResponse struct. +func (apr *AssessmentPropertiesResponse) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { case "status": if v != nil { - var status AssessmentStatus + var status AssessmentStatusResponse err = json.Unmarshal(*v, &status) if err != nil { return err } - ap.Status = &status + apr.Status = &status + } + case "resourceDetails": + if v != nil { + resourceDetails, err := unmarshalBasicResourceDetails(*v) + if err != nil { + return err + } + apr.ResourceDetails = resourceDetails + } + case "displayName": + if v != nil { + var displayName string + err = json.Unmarshal(*v, &displayName) + if err != nil { + return err + } + apr.DisplayName = &displayName } case "additionalData": if v != nil { @@ -4055,7 +4422,7 @@ func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { if err != nil { return err } - ap.AdditionalData = additionalData + apr.AdditionalData = additionalData } case "links": if v != nil { @@ -4064,7 +4431,7 @@ func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { if err != nil { return err } - ap.Links = &links + apr.Links = &links } case "metadata": if v != nil { @@ -4073,7 +4440,7 @@ func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { if err != nil { return err } - ap.Metadata = &metadata + apr.Metadata = &metadata } case "partnersData": if v != nil { @@ -4082,7 +4449,79 @@ func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { if err != nil { return err } - ap.PartnersData = &partnersData + apr.PartnersData = &partnersData + } + } + } + + return nil +} + +// AssessmentResponse security assessment on a resource - response format +type AssessmentResponse struct { + autorest.Response `json:"-"` + *AssessmentPropertiesResponse `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentResponse. +func (ar AssessmentResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ar.AssessmentPropertiesResponse != nil { + objectMap["properties"] = ar.AssessmentPropertiesResponse + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AssessmentResponse struct. +func (ar *AssessmentResponse) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var assessmentPropertiesResponse AssessmentPropertiesResponse + err = json.Unmarshal(*v, &assessmentPropertiesResponse) + if err != nil { + return err + } + ar.AssessmentPropertiesResponse = &assessmentPropertiesResponse + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ar.Type = &typeVar } } } @@ -4100,6 +4539,35 @@ type AssessmentStatus struct { Description *string `json:"description,omitempty"` } +// AssessmentStatusResponse the result of the assessment +type AssessmentStatusResponse struct { + // FirstEvaluationDate - READ-ONLY; The time that the assessment was created and first evaluated. Returned as UTC time in ISO 8601 format + FirstEvaluationDate *date.Time `json:"firstEvaluationDate,omitempty"` + // StatusChangeDate - READ-ONLY; The time that the status of the assessment last changed. Returned as UTC time in ISO 8601 format + StatusChangeDate *date.Time `json:"statusChangeDate,omitempty"` + // Code - Programmatic code for the status of the assessment. Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' + Code AssessmentStatusCode `json:"code,omitempty"` + // Cause - Programmatic code for the cause of the assessment status + Cause *string `json:"cause,omitempty"` + // Description - Human readable description of the assessment status + Description *string `json:"description,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentStatusResponse. +func (asr AssessmentStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asr.Code != "" { + objectMap["code"] = asr.Code + } + if asr.Cause != nil { + objectMap["cause"] = asr.Cause + } + if asr.Description != nil { + objectMap["description"] = asr.Description + } + return json.Marshal(objectMap) +} + // AtaExternalSecuritySolution represents an ATA security solution which sends logs to an OMS workspace type AtaExternalSecuritySolution struct { Properties *AtaSolutionProperties `json:"properties,omitempty"` @@ -7958,11 +8426,11 @@ func (dcar DenylistCustomAlertRule) AsBasicCustomAlertRule() (BasicCustomAlertRu return &dcar, true } -// Device device model -type Device struct { +// DeviceSecurityGroup the device security group resource +type DeviceSecurityGroup struct { autorest.Response `json:"-"` - // DeviceProperties - Device data - *DeviceProperties `json:"properties,omitempty"` + // DeviceSecurityGroupProperties - Device Security group data + *DeviceSecurityGroupProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -7971,331 +8439,11 @@ type Device struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for Device. -func (d Device) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DeviceSecurityGroup. +func (dsg DeviceSecurityGroup) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if d.DeviceProperties != nil { - objectMap["properties"] = d.DeviceProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Device struct. -func (d *Device) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var deviceProperties DeviceProperties - err = json.Unmarshal(*v, &deviceProperties) - if err != nil { - return err - } - d.DeviceProperties = &deviceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - d.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - d.Type = &typeVar - } - } - } - - return nil -} - -// DeviceList list of Devices -type DeviceList struct { - autorest.Response `json:"-"` - // Value - List of devices - Value *[]Device `json:"value,omitempty"` - // NextLink - READ-ONLY; When there are too many devices for one page, use this URI to fetch the next page. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for DeviceList. -func (dl DeviceList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dl.Value != nil { - objectMap["value"] = dl.Value - } - return json.Marshal(objectMap) -} - -// DeviceListIterator provides access to a complete listing of Device values. -type DeviceListIterator struct { - i int - page DeviceListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DeviceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DeviceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DeviceListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DeviceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DeviceListIterator) Response() DeviceList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DeviceListIterator) Value() Device { - if !iter.page.NotDone() { - return Device{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DeviceListIterator type. -func NewDeviceListIterator(page DeviceListPage) DeviceListIterator { - return DeviceListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dl DeviceList) IsEmpty() bool { - return dl.Value == nil || len(*dl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (dl DeviceList) hasNextLink() bool { - return dl.NextLink != nil && len(*dl.NextLink) != 0 -} - -// deviceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dl DeviceList) deviceListPreparer(ctx context.Context) (*http.Request, error) { - if !dl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dl.NextLink))) -} - -// DeviceListPage contains a page of Device values. -type DeviceListPage struct { - fn func(context.Context, DeviceList) (DeviceList, error) - dl DeviceList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DeviceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DeviceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.dl) - if err != nil { - return err - } - page.dl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DeviceListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DeviceListPage) NotDone() bool { - return !page.dl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DeviceListPage) Response() DeviceList { - return page.dl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DeviceListPage) Values() []Device { - if page.dl.IsEmpty() { - return nil - } - return *page.dl.Value -} - -// Creates a new instance of the DeviceListPage type. -func NewDeviceListPage(cur DeviceList, getNextPage func(context.Context, DeviceList) (DeviceList, error)) DeviceListPage { - return DeviceListPage{ - fn: getNextPage, - dl: cur, - } -} - -// DeviceProperties device Information -type DeviceProperties struct { - // DisplayName - Device display name given by the collector - DisplayName *string `json:"displayName,omitempty"` - // DeviceType - Device type. - DeviceType *string `json:"deviceType,omitempty"` - // SourceName - READ-ONLY; The source that created the device - SourceName *string `json:"sourceName,omitempty"` - // NetworkInterfaces - READ-ONLY; List of network interfaces. - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - // Vendor - READ-ONLY; Device vendor - Vendor *string `json:"vendor,omitempty"` - // OsName - Device operating system name. - OsName *string `json:"osName,omitempty"` - // Protocols - READ-ONLY; List of protocols. - Protocols *[]Protocol1 `json:"protocols,omitempty"` - // LastActiveTime - READ-ONLY; last time the device was active in the network - LastActiveTime *date.Time `json:"lastActiveTime,omitempty"` - // LastUpdateTime - READ-ONLY; last time the device was updated - LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` - // ManagementState - READ-ONLY; Managed state of the device. Possible values include: 'Managed', 'Unmanaged' - ManagementState ManagementState `json:"managementState,omitempty"` - // AuthorizationState - Authorized state of the device. Possible values include: 'Authorized', 'Unauthorized' - AuthorizationState AuthorizationState `json:"authorizationState,omitempty"` - // DeviceCriticality - Device criticality. Possible values include: 'Important', 'Standard' - DeviceCriticality DeviceCriticality `json:"deviceCriticality,omitempty"` - // PurdueLevel - Purdue level of the device. Possible values include: 'ProcessControl', 'Supervisory', 'Enterprise' - PurdueLevel PurdueLevel `json:"purdueLevel,omitempty"` - // Notes - user notes for the device, up to 300 characters. - Notes *string `json:"notes,omitempty"` - // Firmwares - READ-ONLY; List of device firmwares. - Firmwares *[]Firmware `json:"firmwares,omitempty"` - // DiscoveryTime - READ-ONLY; Discovered time of the device. - DiscoveryTime *date.Time `json:"discoveryTime,omitempty"` - // ProgrammingState - READ-ONLY; Indicates whether this device is programming. Possible values include: 'ProgrammingDevice', 'NotProgrammingDevice' - ProgrammingState ProgrammingState `json:"programmingState,omitempty"` - // LastProgrammingTime - READ-ONLY; last time the device was programming or programed. - LastProgrammingTime *date.Time `json:"lastProgrammingTime,omitempty"` - // ScanningFunctionality - READ-ONLY; Indicates whether the device is a scanner. Possible values include: 'ScannerDevice', 'NotScannerDevice' - ScanningFunctionality ScanningFunctionality `json:"scanningFunctionality,omitempty"` - // LastScanTime - READ-ONLY; last time the device was scanning. - LastScanTime *date.Time `json:"lastScanTime,omitempty"` - // RiskScore - READ-ONLY; risk score of the device. - RiskScore *int32 `json:"riskScore,omitempty"` - // Sensors - READ-ONLY; List of sensors that scanned this device. - Sensors *[]Sensor `json:"sensors,omitempty"` - // Site - READ-ONLY - Site *Site `json:"site,omitempty"` - // DeviceStatus - READ-ONLY; Device status. Possible values include: 'DeviceStatusActive', 'DeviceStatusRemoved' - DeviceStatus DeviceStatus `json:"deviceStatus,omitempty"` -} - -// MarshalJSON is the custom marshaler for DeviceProperties. -func (dp DeviceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dp.DisplayName != nil { - objectMap["displayName"] = dp.DisplayName - } - if dp.DeviceType != nil { - objectMap["deviceType"] = dp.DeviceType - } - if dp.OsName != nil { - objectMap["osName"] = dp.OsName - } - if dp.AuthorizationState != "" { - objectMap["authorizationState"] = dp.AuthorizationState - } - if dp.DeviceCriticality != "" { - objectMap["deviceCriticality"] = dp.DeviceCriticality - } - if dp.PurdueLevel != "" { - objectMap["purdueLevel"] = dp.PurdueLevel - } - if dp.Notes != nil { - objectMap["notes"] = dp.Notes - } - return json.Marshal(objectMap) -} - -// DeviceSecurityGroup the device security group resource -type DeviceSecurityGroup struct { - autorest.Response `json:"-"` - // DeviceSecurityGroupProperties - Device Security group data - *DeviceSecurityGroupProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DeviceSecurityGroup. -func (dsg DeviceSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dsg.DeviceSecurityGroupProperties != nil { - objectMap["properties"] = dsg.DeviceSecurityGroupProperties + if dsg.DeviceSecurityGroupProperties != nil { + objectMap["properties"] = dsg.DeviceSecurityGroupProperties } return json.Marshal(objectMap) } @@ -9864,30 +10012,6 @@ func (funiar FileUploadsNotInAllowedRange) AsBasicCustomAlertRule() (BasicCustom return &funiar, true } -// Firmware firmware information -type Firmware struct { - // ModuleAddress - READ-ONLY; Address of the specific module a firmware is related to - ModuleAddress *string `json:"moduleAddress,omitempty"` - // Rack - READ-ONLY; Rack number of the module a firmware is related to. - Rack *string `json:"rack,omitempty"` - // Slot - READ-ONLY; Slot number in the rack of the module a firmware is related to - Slot *string `json:"slot,omitempty"` - // Serial - READ-ONLY; Serial of the firmware - Serial *string `json:"serial,omitempty"` - // Model - READ-ONLY; Firmware model - Model *string `json:"model,omitempty"` - // Version - READ-ONLY; Firmware version - Version *string `json:"version,omitempty"` - // AdditionalData - READ-ONLY; A bag of fields which extends the firmware information. - AdditionalData interface{} `json:"additionalData,omitempty"` -} - -// MarshalJSON is the custom marshaler for Firmware. -func (f Firmware) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // GcpCredentialsDetailsProperties GCP cloud account connector based service to service credentials, the // credentials are composed of the organization ID and a JSON API key (write only) type GcpCredentialsDetailsProperties struct { @@ -11047,938 +11171,81 @@ func (isl IngestionSettingList) ingestionSettingListPreparer(ctx context.Context autorest.WithBaseURL(to.String(isl.NextLink))) } -// IngestionSettingListPage contains a page of IngestionSetting values. -type IngestionSettingListPage struct { - fn func(context.Context, IngestionSettingList) (IngestionSettingList, error) - isl IngestionSettingList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IngestionSettingListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.isl) - if err != nil { - return err - } - page.isl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IngestionSettingListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IngestionSettingListPage) NotDone() bool { - return !page.isl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IngestionSettingListPage) Response() IngestionSettingList { - return page.isl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IngestionSettingListPage) Values() []IngestionSetting { - if page.isl.IsEmpty() { - return nil - } - return *page.isl.Value -} - -// Creates a new instance of the IngestionSettingListPage type. -func NewIngestionSettingListPage(cur IngestionSettingList, getNextPage func(context.Context, IngestionSettingList) (IngestionSettingList, error)) IngestionSettingListPage { - return IngestionSettingListPage{ - fn: getNextPage, - isl: cur, - } -} - -// IngestionSettingToken configures how to correlate scan data and logs with resources associated with the -// subscription. -type IngestionSettingToken struct { - autorest.Response `json:"-"` - // Token - READ-ONLY; The token is used for correlating security data and logs with the resources in the subscription. - Token *string `json:"token,omitempty"` -} - -// MarshalJSON is the custom marshaler for IngestionSettingToken. -func (ist IngestionSettingToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IotAlertListModel list of IoT alerts -type IotAlertListModel struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List data - Value *[]IotAlertModel `json:"value,omitempty"` - // NextLink - READ-ONLY; When available, follow the URI to get the next page of data - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotAlertListModel. -func (ialm IotAlertListModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IotAlertListModelIterator provides access to a complete listing of IotAlertModel values. -type IotAlertListModelIterator struct { - i int - page IotAlertListModelPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IotAlertListModelIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertListModelIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IotAlertListModelIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IotAlertListModelIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IotAlertListModelIterator) Response() IotAlertListModel { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IotAlertListModelIterator) Value() IotAlertModel { - if !iter.page.NotDone() { - return IotAlertModel{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IotAlertListModelIterator type. -func NewIotAlertListModelIterator(page IotAlertListModelPage) IotAlertListModelIterator { - return IotAlertListModelIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ialm IotAlertListModel) IsEmpty() bool { - return ialm.Value == nil || len(*ialm.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ialm IotAlertListModel) hasNextLink() bool { - return ialm.NextLink != nil && len(*ialm.NextLink) != 0 -} - -// iotAlertListModelPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ialm IotAlertListModel) iotAlertListModelPreparer(ctx context.Context) (*http.Request, error) { - if !ialm.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ialm.NextLink))) -} - -// IotAlertListModelPage contains a page of IotAlertModel values. -type IotAlertListModelPage struct { - fn func(context.Context, IotAlertListModel) (IotAlertListModel, error) - ialm IotAlertListModel -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IotAlertListModelPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotAlertListModelPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.ialm) - if err != nil { - return err - } - page.ialm = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IotAlertListModelPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IotAlertListModelPage) NotDone() bool { - return !page.ialm.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IotAlertListModelPage) Response() IotAlertListModel { - return page.ialm -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IotAlertListModelPage) Values() []IotAlertModel { - if page.ialm.IsEmpty() { - return nil - } - return *page.ialm.Value -} - -// Creates a new instance of the IotAlertListModelPage type. -func NewIotAlertListModelPage(cur IotAlertListModel, getNextPage func(context.Context, IotAlertListModel) (IotAlertListModel, error)) IotAlertListModelPage { - return IotAlertListModelPage{ - fn: getNextPage, - ialm: cur, - } -} - -// IotAlertModel ioT alert -type IotAlertModel struct { - autorest.Response `json:"-"` - // IotAlertPropertiesModel - Alert properties - *IotAlertPropertiesModel `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotAlertModel. -func (iam IotAlertModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iam.IotAlertPropertiesModel != nil { - objectMap["properties"] = iam.IotAlertPropertiesModel - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IotAlertModel struct. -func (iam *IotAlertModel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotAlertPropertiesModel IotAlertPropertiesModel - err = json.Unmarshal(*v, &iotAlertPropertiesModel) - if err != nil { - return err - } - iam.IotAlertPropertiesModel = &iotAlertPropertiesModel - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iam.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iam.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iam.Type = &typeVar - } - } - } - - return nil -} - -// IotAlertPropertiesModel ioT alert properties -type IotAlertPropertiesModel struct { - // SystemAlertID - READ-ONLY; Holds the product canonical identifier of the alert within the scope of a product - SystemAlertID *string `json:"systemAlertId,omitempty"` - // CompromisedEntity - READ-ONLY; Display name of the main entity being reported on - CompromisedEntity *string `json:"compromisedEntity,omitempty"` - // AlertType - READ-ONLY; The type name of the alert - AlertType *string `json:"alertType,omitempty"` - // StartTimeUtc - READ-ONLY; The impact start time of the alert (the time of the first event or activity included in the alert) - StartTimeUtc *string `json:"startTimeUtc,omitempty"` - // EndTimeUtc - READ-ONLY; The impact end time of the alert (the time of the last event or activity included in the alert) - EndTimeUtc *string `json:"endTimeUtc,omitempty"` - // Entities - A list of entities related to the alert - Entities *[]interface{} `json:"entities,omitempty"` - // ExtendedProperties - A bag of fields which extends the alert information - ExtendedProperties interface{} `json:"extendedProperties,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotAlertPropertiesModel. -func (iapm IotAlertPropertiesModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iapm.Entities != nil { - objectMap["entities"] = iapm.Entities - } - if iapm.ExtendedProperties != nil { - objectMap["extendedProperties"] = iapm.ExtendedProperties - } - return json.Marshal(objectMap) -} - -// IotAlertType ioT alert type. -type IotAlertType struct { - autorest.Response `json:"-"` - // IotAlertTypeProperties - Alert type properties - *IotAlertTypeProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotAlertType. -func (iat IotAlertType) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iat.IotAlertTypeProperties != nil { - objectMap["properties"] = iat.IotAlertTypeProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IotAlertType struct. -func (iat *IotAlertType) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotAlertTypeProperties IotAlertTypeProperties - err = json.Unmarshal(*v, &iotAlertTypeProperties) - if err != nil { - return err - } - iat.IotAlertTypeProperties = &iotAlertTypeProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iat.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iat.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iat.Type = &typeVar - } - } - } - - return nil -} - -// IotAlertTypeList list of alert types -type IotAlertTypeList struct { - autorest.Response `json:"-"` - // Value - List data - Value *[]IotAlertType `json:"value,omitempty"` -} - -// IotAlertTypeProperties ioT alert type information. -type IotAlertTypeProperties struct { - // AlertDisplayName - READ-ONLY; The display name of the alert - AlertDisplayName *string `json:"alertDisplayName,omitempty"` - // Severity - READ-ONLY; The severity of the alert. Possible values include: 'Informational', 'Low', 'Medium', 'High' - Severity AlertSeverity `json:"severity,omitempty"` - // Description - READ-ONLY; Description of the suspected vulnerability and meaning. - Description *string `json:"description,omitempty"` - // ProviderName - READ-ONLY; The name of the alert provider or internal partner - ProviderName *string `json:"providerName,omitempty"` - // ProductName - READ-ONLY; The name of the product which published this alert - ProductName *string `json:"productName,omitempty"` - // ProductComponentName - READ-ONLY; The name of a component inside the product which generated the alert - ProductComponentName *string `json:"productComponentName,omitempty"` - // VendorName - READ-ONLY; The name of the vendor that raise the alert - VendorName *string `json:"vendorName,omitempty"` - // Intent - READ-ONLY; Kill chain related intent behind the alert. Could contain multiple enum values (separated by commas). Possible values include: 'Unknown', 'PreAttack', 'InitialAccess', 'Persistence', 'PrivilegeEscalation', 'DefenseEvasion', 'CredentialAccess', 'Discovery', 'LateralMovement', 'Execution', 'Collection', 'Exfiltration', 'CommandAndControl', 'Impact', 'Probing', 'Exploitation' - Intent AlertIntent `json:"intent,omitempty"` - // RemediationSteps - READ-ONLY; Manual action items to take to remediate the alert - RemediationSteps *[]string `json:"remediationSteps,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotAlertTypeProperties. -func (iatp IotAlertTypeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IotDefenderSettingsList list of IoT Defender settings -type IotDefenderSettingsList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List data - Value *[]IotDefenderSettingsModel `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotDefenderSettingsList. -func (idsl IotDefenderSettingsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IotDefenderSettingsModel ioT Defender settings -type IotDefenderSettingsModel struct { - autorest.Response `json:"-"` - // IotDefenderSettingsProperties - IoT Defender settings properties - *IotDefenderSettingsProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotDefenderSettingsModel. -func (idsm IotDefenderSettingsModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if idsm.IotDefenderSettingsProperties != nil { - objectMap["properties"] = idsm.IotDefenderSettingsProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IotDefenderSettingsModel struct. -func (idsm *IotDefenderSettingsModel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotDefenderSettingsProperties IotDefenderSettingsProperties - err = json.Unmarshal(*v, &iotDefenderSettingsProperties) - if err != nil { - return err - } - idsm.IotDefenderSettingsProperties = &iotDefenderSettingsProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - idsm.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - idsm.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - idsm.Type = &typeVar - } - } - } - - return nil -} - -// IotDefenderSettingsProperties ioT Defender settings properties -type IotDefenderSettingsProperties struct { - // DeviceQuota - Size of the device quota (as a opposed to a Pay as You Go billing model). Value is required to be in multiples of 1000. - DeviceQuota *int32 `json:"deviceQuota,omitempty"` - // SentinelWorkspaceResourceIds - Sentinel Workspace Resource Ids - SentinelWorkspaceResourceIds *[]string `json:"sentinelWorkspaceResourceIds,omitempty"` - // OnboardingKind - The kind of onboarding for the subscription. Possible values include: 'Default', 'MigratedToAzure', 'Evaluation', 'Purchased' - OnboardingKind OnboardingKind `json:"onboardingKind,omitempty"` - // EvaluationEndTime - READ-ONLY; End time of the evaluation period, if such exist - EvaluationEndTime *date.Time `json:"evaluationEndTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotDefenderSettingsProperties. -func (idsp IotDefenderSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if idsp.DeviceQuota != nil { - objectMap["deviceQuota"] = idsp.DeviceQuota - } - if idsp.SentinelWorkspaceResourceIds != nil { - objectMap["sentinelWorkspaceResourceIds"] = idsp.SentinelWorkspaceResourceIds - } - if idsp.OnboardingKind != "" { - objectMap["onboardingKind"] = idsp.OnboardingKind - } - return json.Marshal(objectMap) -} - -// IotRecommendationListModel list of IoT recommendations -type IotRecommendationListModel struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List data - Value *[]IotRecommendationModel `json:"value,omitempty"` - // NextLink - READ-ONLY; When available, follow the URI to get the next page of data - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotRecommendationListModel. -func (irlm IotRecommendationListModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IotRecommendationListModelIterator provides access to a complete listing of IotRecommendationModel -// values. -type IotRecommendationListModelIterator struct { - i int - page IotRecommendationListModelPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IotRecommendationListModelIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationListModelIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IotRecommendationListModelIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IotRecommendationListModelIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IotRecommendationListModelIterator) Response() IotRecommendationListModel { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IotRecommendationListModelIterator) Value() IotRecommendationModel { - if !iter.page.NotDone() { - return IotRecommendationModel{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IotRecommendationListModelIterator type. -func NewIotRecommendationListModelIterator(page IotRecommendationListModelPage) IotRecommendationListModelIterator { - return IotRecommendationListModelIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (irlm IotRecommendationListModel) IsEmpty() bool { - return irlm.Value == nil || len(*irlm.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (irlm IotRecommendationListModel) hasNextLink() bool { - return irlm.NextLink != nil && len(*irlm.NextLink) != 0 -} - -// iotRecommendationListModelPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (irlm IotRecommendationListModel) iotRecommendationListModelPreparer(ctx context.Context) (*http.Request, error) { - if !irlm.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(irlm.NextLink))) -} - -// IotRecommendationListModelPage contains a page of IotRecommendationModel values. -type IotRecommendationListModelPage struct { - fn func(context.Context, IotRecommendationListModel) (IotRecommendationListModel, error) - irlm IotRecommendationListModel -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IotRecommendationListModelPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IotRecommendationListModelPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.irlm) - if err != nil { - return err - } - page.irlm = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IotRecommendationListModelPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IotRecommendationListModelPage) NotDone() bool { - return !page.irlm.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IotRecommendationListModelPage) Response() IotRecommendationListModel { - return page.irlm -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IotRecommendationListModelPage) Values() []IotRecommendationModel { - if page.irlm.IsEmpty() { - return nil - } - return *page.irlm.Value -} - -// Creates a new instance of the IotRecommendationListModelPage type. -func NewIotRecommendationListModelPage(cur IotRecommendationListModel, getNextPage func(context.Context, IotRecommendationListModel) (IotRecommendationListModel, error)) IotRecommendationListModelPage { - return IotRecommendationListModelPage{ - fn: getNextPage, - irlm: cur, - } -} - -// IotRecommendationModel ioT recommendation -type IotRecommendationModel struct { - autorest.Response `json:"-"` - // IotRecommendationPropertiesModel - Recommendation properties - *IotRecommendationPropertiesModel `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotRecommendationModel. -func (irm IotRecommendationModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if irm.IotRecommendationPropertiesModel != nil { - objectMap["properties"] = irm.IotRecommendationPropertiesModel - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IotRecommendationModel struct. -func (irm *IotRecommendationModel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotRecommendationPropertiesModel IotRecommendationPropertiesModel - err = json.Unmarshal(*v, &iotRecommendationPropertiesModel) - if err != nil { - return err - } - irm.IotRecommendationPropertiesModel = &iotRecommendationPropertiesModel - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - irm.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - irm.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - irm.Type = &typeVar +// IngestionSettingListPage contains a page of IngestionSetting values. +type IngestionSettingListPage struct { + fn func(context.Context, IngestionSettingList) (IngestionSettingList, error) + isl IngestionSettingList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *IngestionSettingListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IngestionSettingListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.isl) + if err != nil { + return err + } + page.isl = next + if !next.hasNextLink() || !next.IsEmpty() { + break } } - return nil } -// IotRecommendationPropertiesModel ioT recommendation properties -type IotRecommendationPropertiesModel struct { - // DeviceID - READ-ONLY; Identifier of the device being reported on - DeviceID *string `json:"deviceId,omitempty"` - // RecommendationType - READ-ONLY; The type name of the recommendation - RecommendationType *string `json:"recommendationType,omitempty"` - // DiscoveredTimeUtc - READ-ONLY; The discovery time of the recommendation - DiscoveredTimeUtc *string `json:"discoveredTimeUtc,omitempty"` - // RecommendationAdditionalData - A bag of fields which extends the recommendation information - RecommendationAdditionalData interface{} `json:"recommendationAdditionalData,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *IngestionSettingListPage) Next() error { + return page.NextWithContext(context.Background()) } -// MarshalJSON is the custom marshaler for IotRecommendationPropertiesModel. -func (irpm IotRecommendationPropertiesModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if irpm.RecommendationAdditionalData != nil { - objectMap["recommendationAdditionalData"] = irpm.RecommendationAdditionalData - } - return json.Marshal(objectMap) +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IngestionSettingListPage) NotDone() bool { + return !page.isl.IsEmpty() } -// IotRecommendationType ioT recommendation type. -type IotRecommendationType struct { - autorest.Response `json:"-"` - // IotRecommendationTypeProperties - Recommendation type properties - *IotRecommendationTypeProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` +// Response returns the raw server response from the last page request. +func (page IngestionSettingListPage) Response() IngestionSettingList { + return page.isl } -// MarshalJSON is the custom marshaler for IotRecommendationType. -func (irt IotRecommendationType) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if irt.IotRecommendationTypeProperties != nil { - objectMap["properties"] = irt.IotRecommendationTypeProperties +// Values returns the slice of values for the current page or nil if there are no values. +func (page IngestionSettingListPage) Values() []IngestionSetting { + if page.isl.IsEmpty() { + return nil } - return json.Marshal(objectMap) + return *page.isl.Value } -// UnmarshalJSON is the custom unmarshaler for IotRecommendationType struct. -func (irt *IotRecommendationType) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotRecommendationTypeProperties IotRecommendationTypeProperties - err = json.Unmarshal(*v, &iotRecommendationTypeProperties) - if err != nil { - return err - } - irt.IotRecommendationTypeProperties = &iotRecommendationTypeProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - irt.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - irt.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - irt.Type = &typeVar - } - } +// Creates a new instance of the IngestionSettingListPage type. +func NewIngestionSettingListPage(cur IngestionSettingList, getNextPage func(context.Context, IngestionSettingList) (IngestionSettingList, error)) IngestionSettingListPage { + return IngestionSettingListPage{ + fn: getNextPage, + isl: cur, } - - return nil } -// IotRecommendationTypeList list of recommendation types -type IotRecommendationTypeList struct { +// IngestionSettingToken configures how to correlate scan data and logs with resources associated with the +// subscription. +type IngestionSettingToken struct { autorest.Response `json:"-"` - // Value - List data - Value *[]IotRecommendationType `json:"value,omitempty"` -} - -// IotRecommendationTypeProperties ioT recommendation type information. -type IotRecommendationTypeProperties struct { - // RecommendationDisplayName - READ-ONLY; The display name of the recommendation - RecommendationDisplayName *string `json:"recommendationDisplayName,omitempty"` - // Severity - READ-ONLY; The severity of the recommendation. Possible values include: 'RecommendationSeverityUnknown', 'RecommendationSeverityNotApplicable', 'RecommendationSeverityHealthy', 'RecommendationSeverityOffByPolicy', 'RecommendationSeverityLow', 'RecommendationSeverityMedium', 'RecommendationSeverityHigh' - Severity RecommendationSeverity `json:"severity,omitempty"` - // Description - READ-ONLY; Description of the suspected vulnerability and meaning. - Description *string `json:"description,omitempty"` - // ProductName - READ-ONLY; The name of the product which published this recommendation - ProductName *string `json:"productName,omitempty"` - // ProductComponentName - READ-ONLY; The name of a component inside the product which generated the recommendation - ProductComponentName *string `json:"productComponentName,omitempty"` - // VendorName - READ-ONLY; The name of the vendor that raised the recommendation - VendorName *string `json:"vendorName,omitempty"` - // Control - READ-ONLY; The name of the recommendation's control category - Control *string `json:"control,omitempty"` - // RemediationSteps - READ-ONLY; Manual action items to take to resolve the recommendation - RemediationSteps *[]string `json:"remediationSteps,omitempty"` - // DataSource - READ-ONLY; The alert's data source - DataSource *string `json:"dataSource,omitempty"` + // Token - READ-ONLY; The token is used for correlating security data and logs with the resources in the subscription. + Token *string `json:"token,omitempty"` } -// MarshalJSON is the custom marshaler for IotRecommendationTypeProperties. -func (irtp IotRecommendationTypeProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for IngestionSettingToken. +func (ist IngestionSettingToken) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } @@ -13029,340 +12296,87 @@ func (itssl IoTSecuritySolutionsList) hasNextLink() bool { // It returns nil if no more results exist. func (itssl IoTSecuritySolutionsList) ioTSecuritySolutionsListPreparer(ctx context.Context) (*http.Request, error) { if !itssl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(itssl.NextLink))) -} - -// IoTSecuritySolutionsListPage contains a page of IoTSecuritySolutionModel values. -type IoTSecuritySolutionsListPage struct { - fn func(context.Context, IoTSecuritySolutionsList) (IoTSecuritySolutionsList, error) - itssl IoTSecuritySolutionsList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IoTSecuritySolutionsListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IoTSecuritySolutionsListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.itssl) - if err != nil { - return err - } - page.itssl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IoTSecuritySolutionsListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IoTSecuritySolutionsListPage) NotDone() bool { - return !page.itssl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IoTSecuritySolutionsListPage) Response() IoTSecuritySolutionsList { - return page.itssl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IoTSecuritySolutionsListPage) Values() []IoTSecuritySolutionModel { - if page.itssl.IsEmpty() { - return nil - } - return *page.itssl.Value -} - -// Creates a new instance of the IoTSecuritySolutionsListPage type. -func NewIoTSecuritySolutionsListPage(cur IoTSecuritySolutionsList, getNextPage func(context.Context, IoTSecuritySolutionsList) (IoTSecuritySolutionsList, error)) IoTSecuritySolutionsListPage { - return IoTSecuritySolutionsListPage{ - fn: getNextPage, - itssl: cur, - } -} - -// IotSensorProperties ioT sensor properties -type IotSensorProperties struct { - // ConnectivityTime - READ-ONLY; Last connectivity time of the IoT sensor - ConnectivityTime *string `json:"connectivityTime,omitempty"` - // CreationTime - READ-ONLY; Creation time of the IoT sensor - CreationTime *string `json:"creationTime,omitempty"` - // DynamicLearning - READ-ONLY; Dynamic mode status of the IoT sensor - DynamicLearning *bool `json:"dynamicLearning,omitempty"` - // LearningMode - READ-ONLY; Learning mode status of the IoT sensor - LearningMode *bool `json:"learningMode,omitempty"` - // SensorStatus - READ-ONLY; Status of the IoT sensor. Possible values include: 'Ok', 'Disconnected', 'Unavailable' - SensorStatus SensorStatus `json:"sensorStatus,omitempty"` - // SensorVersion - READ-ONLY; Version of the IoT sensor - SensorVersion *string `json:"sensorVersion,omitempty"` - // TiAutomaticUpdates - TI Automatic mode status of the IoT sensor - TiAutomaticUpdates *bool `json:"tiAutomaticUpdates,omitempty"` - // TiStatus - READ-ONLY; TI Status of the IoT sensor. Possible values include: 'TiStatusOk', 'TiStatusFailed', 'TiStatusInProgress', 'TiStatusUpdateAvailable' - TiStatus TiStatus `json:"tiStatus,omitempty"` - // TiVersion - READ-ONLY; TI Version of the IoT sensor - TiVersion *string `json:"tiVersion,omitempty"` - // Zone - Zone of the IoT sensor - Zone *string `json:"zone,omitempty"` - // SensorType - Type of sensor. Possible values include: 'SensorTypeOt', 'SensorTypeEnterprise' - SensorType SensorType `json:"sensorType,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotSensorProperties. -func (isp IotSensorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if isp.TiAutomaticUpdates != nil { - objectMap["tiAutomaticUpdates"] = isp.TiAutomaticUpdates - } - if isp.Zone != nil { - objectMap["zone"] = isp.Zone - } - if isp.SensorType != "" { - objectMap["sensorType"] = isp.SensorType - } - return json.Marshal(objectMap) -} - -// IotSensorsList list of IoT sensors -type IotSensorsList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List data - Value *[]IotSensorsModel `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotSensorsList. -func (isl IotSensorsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// IotSensorsModel ioT sensor model -type IotSensorsModel struct { - autorest.Response `json:"-"` - // IotSensorProperties - IoT sensor properties - *IotSensorProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for IotSensorsModel. -func (ism IotSensorsModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ism.IotSensorProperties != nil { - objectMap["properties"] = ism.IotSensorProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IotSensorsModel struct. -func (ism *IotSensorsModel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotSensorProperties IotSensorProperties - err = json.Unmarshal(*v, &iotSensorProperties) - if err != nil { - return err - } - ism.IotSensorProperties = &iotSensorProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ism.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ism.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ism.Type = &typeVar - } - } + return nil, nil } - - return nil -} - -// IoTSeverityMetrics ioT Security solution analytics severity metrics. -type IoTSeverityMetrics struct { - // High - Count of high severity alerts/recommendations. - High *int64 `json:"high,omitempty"` - // Medium - Count of medium severity alerts/recommendations. - Medium *int64 `json:"medium,omitempty"` - // Low - Count of low severity alerts/recommendations. - Low *int64 `json:"low,omitempty"` + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(itssl.NextLink))) } -// IotSiteProperties ioT site properties -type IotSiteProperties struct { - // DisplayName - Display name of the IoT site - DisplayName *string `json:"displayName,omitempty"` - // Tags - Tags of the IoT site - Tags map[string]*string `json:"tags"` +// IoTSecuritySolutionsListPage contains a page of IoTSecuritySolutionModel values. +type IoTSecuritySolutionsListPage struct { + fn func(context.Context, IoTSecuritySolutionsList) (IoTSecuritySolutionsList, error) + itssl IoTSecuritySolutionsList } -// MarshalJSON is the custom marshaler for IotSiteProperties. -func (isp IotSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if isp.DisplayName != nil { - objectMap["displayName"] = isp.DisplayName +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *IoTSecuritySolutionsListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IoTSecuritySolutionsListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if isp.Tags != nil { - objectMap["tags"] = isp.Tags + for { + next, err := page.fn(ctx, page.itssl) + if err != nil { + return err + } + page.itssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - return json.Marshal(objectMap) + return nil } -// IotSitesList list of IoT sites -type IotSitesList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List data - Value *[]IotSitesModel `json:"value,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *IoTSecuritySolutionsListPage) Next() error { + return page.NextWithContext(context.Background()) } -// MarshalJSON is the custom marshaler for IotSitesList. -func (isl IotSitesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IoTSecuritySolutionsListPage) NotDone() bool { + return !page.itssl.IsEmpty() } -// IotSitesModel ioT site model -type IotSitesModel struct { - autorest.Response `json:"-"` - // IotSiteProperties - IoT site properties - *IotSiteProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` +// Response returns the raw server response from the last page request. +func (page IoTSecuritySolutionsListPage) Response() IoTSecuritySolutionsList { + return page.itssl } -// MarshalJSON is the custom marshaler for IotSitesModel. -func (ism IotSitesModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ism.IotSiteProperties != nil { - objectMap["properties"] = ism.IotSiteProperties +// Values returns the slice of values for the current page or nil if there are no values. +func (page IoTSecuritySolutionsListPage) Values() []IoTSecuritySolutionModel { + if page.itssl.IsEmpty() { + return nil } - return json.Marshal(objectMap) + return *page.itssl.Value } -// UnmarshalJSON is the custom unmarshaler for IotSitesModel struct. -func (ism *IotSitesModel) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var iotSiteProperties IotSiteProperties - err = json.Unmarshal(*v, &iotSiteProperties) - if err != nil { - return err - } - ism.IotSiteProperties = &iotSiteProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ism.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ism.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ism.Type = &typeVar - } - } +// Creates a new instance of the IoTSecuritySolutionsListPage type. +func NewIoTSecuritySolutionsListPage(cur IoTSecuritySolutionsList, getNextPage func(context.Context, IoTSecuritySolutionsList) (IoTSecuritySolutionsList, error)) IoTSecuritySolutionsListPage { + return IoTSecuritySolutionsListPage{ + fn: getNextPage, + itssl: cur, } - - return nil } -// IPAddress IP Address information -type IPAddress struct { - // V4Address - READ-ONLY; IPV4 address - V4Address *string `json:"v4Address,omitempty"` - // DetectionTime - READ-ONLY; Detection time of the ip address. - DetectionTime *date.Time `json:"detectionTime,omitempty"` - // SubnetCidr - READ-ONLY; Subnet Classless Inter-Domain Routing - SubnetCidr *string `json:"subnetCidr,omitempty"` - // Fqdn - READ-ONLY; Fully qualified domain name - Fqdn *string `json:"fqdn,omitempty"` - // FqdnLastLookupTime - READ-ONLY; FQDN last lookup time. - FqdnLastLookupTime *date.Time `json:"fqdnLastLookupTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for IPAddress. -func (ia IPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// IoTSeverityMetrics ioT Security solution analytics severity metrics. +type IoTSeverityMetrics struct { + // High - Count of high severity alerts/recommendations. + High *int64 `json:"high,omitempty"` + // Medium - Count of medium severity alerts/recommendations. + Medium *int64 `json:"medium,omitempty"` + // Low - Count of low severity alerts/recommendations. + Low *int64 `json:"low,omitempty"` } // JitNetworkAccessPoliciesList ... @@ -14237,24 +13251,6 @@ func (lai LogAnalyticsIdentifier) AsBasicResourceIdentifier() (BasicResourceIden return &lai, true } -// MacAddress MAC Address information -type MacAddress struct { - // Address - READ-ONLY; MAC address - Address *string `json:"address,omitempty"` - // DetectionTime - READ-ONLY; Detection time of the mac address. - DetectionTime *date.Time `json:"detectionTime,omitempty"` - // Significance - READ-ONLY; Indicates whether this is the primary secondary MAC address of the device. Possible values include: 'Primary', 'Secondary' - Significance MacSignificance `json:"significance,omitempty"` - // RelationToIPStatus - READ-ONLY; Indicates whether the relation of the mac to the ip address is certain or a guess. Possible values include: 'Guess', 'Certain' - RelationToIPStatus RelationToIPStatus `json:"relationToIpStatus,omitempty"` -} - -// MarshalJSON is the custom marshaler for MacAddress. -func (ma MacAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // MqttC2DMessagesNotInAllowedRange number of cloud to device messages (MQTT protocol) is not in allowed // range. type MqttC2DMessagesNotInAllowedRange struct { @@ -14843,61 +13839,6 @@ func (mdmniar MqttD2CMessagesNotInAllowedRange) AsBasicCustomAlertRule() (BasicC return &mdmniar, true } -// NetworkInterface network interface -type NetworkInterface struct { - IPAddress *IPAddress `json:"ipAddress,omitempty"` - MacAddress *MacAddress `json:"macAddress,omitempty"` - // Vlans - READ-ONLY; List of device vlans. - Vlans *[]string `json:"vlans,omitempty"` -} - -// MarshalJSON is the custom marshaler for NetworkInterface. -func (ni NetworkInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ni.IPAddress != nil { - objectMap["ipAddress"] = ni.IPAddress - } - if ni.MacAddress != nil { - objectMap["macAddress"] = ni.MacAddress - } - return json.Marshal(objectMap) -} - -// OnPremiseIotSensor on-premise IoT sensor -type OnPremiseIotSensor struct { - autorest.Response `json:"-"` - // Properties - On-premise IoT sensor properties - Properties interface{} `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for OnPremiseIotSensor. -func (opis OnPremiseIotSensor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if opis.Properties != nil { - objectMap["properties"] = opis.Properties - } - return json.Marshal(objectMap) -} - -// OnPremiseIotSensorsList list of on-premise IoT sensors -type OnPremiseIotSensorsList struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List data - Value *[]OnPremiseIotSensor `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for OnPremiseIotSensorsList. -func (opisl OnPremiseIotSensorsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // BasicOnPremiseResourceDetails details of the On Premise resource that was assessed type BasicOnPremiseResourceDetails interface { AsOnPremiseSQLResourceDetails() (*OnPremiseSQLResourceDetails, bool) @@ -15287,147 +14228,6 @@ func NewOperationListPage(cur OperationList, getNextPage func(context.Context, O } } -// PackageDownloadInfo information on a specific package download -type PackageDownloadInfo struct { - // Version - READ-ONLY; Version number - Version *string `json:"version,omitempty"` - // Link - Download link - Link *string `json:"link,omitempty"` - // VersionKind - READ-ONLY; Kind of the version. Possible values include: 'Latest', 'Previous', 'Preview' - VersionKind VersionKind `json:"versionKind,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadInfo. -func (pdi PackageDownloadInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pdi.Link != nil { - objectMap["link"] = pdi.Link - } - return json.Marshal(objectMap) -} - -// PackageDownloads information about package downloads -type PackageDownloads struct { - autorest.Response `json:"-"` - // Sensor - READ-ONLY; Contains all Sensor binary downloads - Sensor *PackageDownloadsSensor `json:"sensor,omitempty"` - // CentralManager - READ-ONLY; All downloads for Central Manager - CentralManager *PackageDownloadsCentralManager `json:"centralManager,omitempty"` - // ThreatIntelligence - READ-ONLY; All downloads for threat intelligence - ThreatIntelligence *[]PackageDownloadInfo `json:"threatIntelligence,omitempty"` - // Snmp - READ-ONLY; SNMP Server file - Snmp *[]PackageDownloadInfo `json:"snmp,omitempty"` - // WmiTool - READ-ONLY; Used for local configuration export - WmiTool *[]PackageDownloadInfo `json:"wmiTool,omitempty"` - // AuthorizedDevicesImportTemplate - READ-ONLY; Authorized devices import template - AuthorizedDevicesImportTemplate *[]PackageDownloadInfo `json:"authorizedDevicesImportTemplate,omitempty"` - // DeviceInformationUpdateImportTemplate - READ-ONLY; Authorized devices import template - DeviceInformationUpdateImportTemplate *[]PackageDownloadInfo `json:"deviceInformationUpdateImportTemplate,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloads. -func (pd PackageDownloads) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PackageDownloadsCentralManager all downloads for Central Manager -type PackageDownloadsCentralManager struct { - // Full - READ-ONLY; Contains full package downloads - Full *PackageDownloadsCentralManagerFull `json:"full,omitempty"` - // Upgrade - READ-ONLY; Central Manager upgrade package downloads (on existing installations) - Upgrade *[]UpgradePackageDownloadInfo `json:"upgrade,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadsCentralManager. -func (pdM PackageDownloadsCentralManager) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PackageDownloadsCentralManagerFull contains full package downloads -type PackageDownloadsCentralManagerFull struct { - // Iso - READ-ONLY; Contains all ISO full versions of the Central Manager - Iso *[]PackageDownloadInfo `json:"iso,omitempty"` - // Ovf - READ-ONLY; Contains all OVF (virtual machine) full versions of the Central Manager - Ovf *PackageDownloadsCentralManagerFullOvf `json:"ovf,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadsCentralManagerFull. -func (pdM PackageDownloadsCentralManagerFull) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PackageDownloadsCentralManagerFullOvf contains all OVF (virtual machine) full versions of the Central -// Manager -type PackageDownloadsCentralManagerFullOvf struct { - // Enterprise - READ-ONLY; The Enterprise package type - Enterprise *[]PackageDownloadInfo `json:"enterprise,omitempty"` - // EnterpriseHighAvailability - READ-ONLY; The EnterpriseHighAvailability package type - EnterpriseHighAvailability *[]PackageDownloadInfo `json:"enterpriseHighAvailability,omitempty"` - // Medium - READ-ONLY; The Medium package type - Medium *[]PackageDownloadInfo `json:"medium,omitempty"` - // MediumHighAvailability - READ-ONLY; The MediumHighAvailability package type - MediumHighAvailability *[]PackageDownloadInfo `json:"mediumHighAvailability,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadsCentralManagerFullOvf. -func (pdM PackageDownloadsCentralManagerFullOvf) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PackageDownloadsSensor contains all Sensor binary downloads -type PackageDownloadsSensor struct { - // Full - READ-ONLY; Contains full package downloads - Full *PackageDownloadsSensorFull `json:"full,omitempty"` - // Upgrade - Sensor upgrade package downloads (on existing installations) - Upgrade *[]UpgradePackageDownloadInfo `json:"upgrade,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadsSensor. -func (pd PackageDownloadsSensor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pd.Upgrade != nil { - objectMap["upgrade"] = pd.Upgrade - } - return json.Marshal(objectMap) -} - -// PackageDownloadsSensorFull contains full package downloads -type PackageDownloadsSensorFull struct { - // Iso - READ-ONLY; Contains all ISO full versions for the sensor - Iso *[]PackageDownloadInfo `json:"iso,omitempty"` - // Ovf - Contains all OVF (virtual machine) full versions for the sensor - Ovf *PackageDownloadsSensorFullOvf `json:"ovf,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadsSensorFull. -func (pd PackageDownloadsSensorFull) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pd.Ovf != nil { - objectMap["ovf"] = pd.Ovf - } - return json.Marshal(objectMap) -} - -// PackageDownloadsSensorFullOvf contains all OVF (virtual machine) full versions for the sensor -type PackageDownloadsSensorFullOvf struct { - // Enterprise - READ-ONLY; Enterprise package type - Enterprise *[]PackageDownloadInfo `json:"enterprise,omitempty"` - // Medium - READ-ONLY; Medium package type - Medium *[]PackageDownloadInfo `json:"medium,omitempty"` - // Line - READ-ONLY; Line package type - Line *[]PackageDownloadInfo `json:"line,omitempty"` -} - -// MarshalJSON is the custom marshaler for PackageDownloadsSensorFullOvf. -func (pd PackageDownloadsSensorFullOvf) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // PathRecommendation represents a path that is recommended to be allowed and its properties type PathRecommendation struct { // Path - The full path of the file, or an identifier of the application @@ -15531,7 +14331,7 @@ type PricingList struct { // PricingProperties pricing properties for the relevant scope type PricingProperties struct { - // PricingTier - The pricing tier value. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. Possible values include: 'PricingTierFree', 'PricingTierStandard' + // PricingTier - The pricing tier value. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. Possible values include: 'Free', 'Standard' PricingTier PricingTier `json:"pricingTier,omitempty"` // FreeTrialRemainingTime - READ-ONLY; The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). FreeTrialRemainingTime *string `json:"freeTrialRemainingTime,omitempty"` @@ -15747,23 +14547,6 @@ type ProtectionMode struct { Executable Executable `json:"executable,omitempty"` } -// Protocol1 protocol data -type Protocol1 struct { - // Name - READ-ONLY; Protocol name - Name *string `json:"name,omitempty"` - // Identifiers - list of protocol identifiers. - Identifiers *string `json:"identifiers,omitempty"` -} - -// MarshalJSON is the custom marshaler for Protocol1. -func (p1 Protocol1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if p1.Identifiers != nil { - objectMap["identifiers"] = p1.Identifiers - } - return json.Marshal(objectMap) -} - // ProxyServerProperties for a non-Azure machine that is not connected directly to the internet, specify a // proxy server that the non-Azure machine can use. type ProxyServerProperties struct { @@ -15990,12 +14773,6 @@ func (qpniar QueuePurgesNotInAllowedRange) AsBasicCustomAlertRule() (BasicCustom return &qpniar, true } -// ReadCloser ... -type ReadCloser struct { - autorest.Response `json:"-"` - Value *io.ReadCloser `json:"value,omitempty"` -} - // RecommendationConfigurationProperties the type of IoT Security recommendation. type RecommendationConfigurationProperties struct { // RecommendationType - The type of IoT Security recommendation. Possible values include: 'IoTACRAuthentication', 'IoTAgentSendsUnutilizedMessages', 'IoTBaseline', 'IoTEdgeHubMemOptimize', 'IoTEdgeLoggingOptions', 'IoTInconsistentModuleSettings', 'IoTInstallAgent', 'IoTIPFilterDenyAll', 'IoTIPFilterPermissiveRule', 'IoTOpenPorts', 'IoTPermissiveFirewallPolicy', 'IoTPermissiveInputFirewallRules', 'IoTPermissiveOutputFirewallRules', 'IoTPrivilegedDockerOptions', 'IoTSharedCredentials', 'IoTVulnerableTLSCipherSuite' @@ -16829,12 +15606,6 @@ type Remediation struct { PortalLink *string `json:"portalLink,omitempty"` } -// ResetPasswordInput reset password input. -type ResetPasswordInput struct { - // ApplianceID - The appliance id of the sensor. - ApplianceID *string `json:"applianceId,omitempty"` -} - // Resource describes an Azure resource. type Resource struct { // ID - READ-ONLY; Resource Id @@ -18222,20 +16993,6 @@ type SensitivityLabel struct { Enabled *bool `json:"enabled,omitempty"` } -// Sensor sensor data -type Sensor struct { - // Name - READ-ONLY; Sensor name - Name *string `json:"name,omitempty"` - // Zone - READ-ONLY; Zone Name. - Zone *string `json:"zone,omitempty"` -} - -// MarshalJSON is the custom marshaler for Sensor. -func (s Sensor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // ServerVulnerabilityAssessment describes the server vulnerability assessment details on a resource type ServerVulnerabilityAssessment struct { autorest.Response `json:"-"` @@ -18734,18 +17491,6 @@ func NewSettingsListPage(cur SettingsList, getNextPage func(context.Context, Set } } -// Site site data -type Site struct { - // DisplayName - READ-ONLY; Site display name - DisplayName *string `json:"displayName,omitempty"` -} - -// MarshalJSON is the custom marshaler for Site. -func (s Site) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - // Software represents a software data type Software struct { autorest.Response `json:"-"` @@ -21602,27 +20347,6 @@ type UpdateIoTSecuritySolutionProperties struct { RecommendationsConfiguration *[]RecommendationConfigurationProperties `json:"recommendationsConfiguration,omitempty"` } -// UpgradePackageDownloadInfo information on a specific package upgrade download -type UpgradePackageDownloadInfo struct { - // FromVersion - READ-ONLY; Minimum base version for upgrade - FromVersion *string `json:"fromVersion,omitempty"` - // Version - READ-ONLY; Version number - Version *string `json:"version,omitempty"` - // Link - Download link - Link *string `json:"link,omitempty"` - // VersionKind - READ-ONLY; Kind of the version. Possible values include: 'Latest', 'Previous', 'Preview' - VersionKind VersionKind `json:"versionKind,omitempty"` -} - -// MarshalJSON is the custom marshaler for UpgradePackageDownloadInfo. -func (updi UpgradePackageDownloadInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if updi.Link != nil { - objectMap["link"] = updi.Link - } - return json.Marshal(objectMap) -} - // UserDefinedResourcesProperties properties of the IoT Security solution's user defined resources. type UserDefinedResourcesProperties struct { // Query - Azure Resource Graph query which represents the security solution's user defined resources. Required to start with "where type != "Microsoft.Devices/IotHubs"" @@ -21681,7 +20405,7 @@ type VMRecommendation struct { // RecommendationAction - Possible values include: 'RecommendationActionRecommended', 'RecommendationActionAdd', 'RecommendationActionRemove' RecommendationAction RecommendationAction `json:"recommendationAction,omitempty"` ResourceID *string `json:"resourceId,omitempty"` - // EnforcementSupport - Possible values include: 'EnforcementSupportSupported', 'EnforcementSupportNotSupported', 'EnforcementSupportUnknown' + // EnforcementSupport - Possible values include: 'Supported', 'NotSupported', 'Unknown' EnforcementSupport EnforcementSupport `json:"enforcementSupport,omitempty"` } diff --git a/services/preview/security/mgmt/v3.0/security/onpremiseiotsensors.go b/services/preview/security/mgmt/v3.0/security/onpremiseiotsensors.go deleted file mode 100644 index 9eaca29d5669..000000000000 --- a/services/preview/security/mgmt/v3.0/security/onpremiseiotsensors.go +++ /dev/null @@ -1,510 +0,0 @@ -package security - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OnPremiseIotSensorsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider -type OnPremiseIotSensorsClient struct { - BaseClient -} - -// NewOnPremiseIotSensorsClient creates an instance of the OnPremiseIotSensorsClient client. -func NewOnPremiseIotSensorsClient(subscriptionID string, ascLocation string) OnPremiseIotSensorsClient { - return NewOnPremiseIotSensorsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) -} - -// NewOnPremiseIotSensorsClientWithBaseURI creates an instance of the OnPremiseIotSensorsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewOnPremiseIotSensorsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) OnPremiseIotSensorsClient { - return OnPremiseIotSensorsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} -} - -// CreateOrUpdate create or update on-premise IoT sensor -// Parameters: -// onPremiseIotSensorName - name of the on-premise IoT sensor -func (client OnPremiseIotSensorsClient) CreateOrUpdate(ctx context.Context, onPremiseIotSensorName string) (result OnPremiseIotSensor, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OnPremiseIotSensorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.OnPremiseIotSensorsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, onPremiseIotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client OnPremiseIotSensorsClient) CreateOrUpdatePreparer(ctx context.Context, onPremiseIotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "onPremiseIotSensorName": autorest.Encode("path", onPremiseIotSensorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client OnPremiseIotSensorsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client OnPremiseIotSensorsClient) CreateOrUpdateResponder(resp *http.Response) (result OnPremiseIotSensor, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete on-premise IoT sensor -// Parameters: -// onPremiseIotSensorName - name of the on-premise IoT sensor -func (client OnPremiseIotSensorsClient) Delete(ctx context.Context, onPremiseIotSensorName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OnPremiseIotSensorsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.OnPremiseIotSensorsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, onPremiseIotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client OnPremiseIotSensorsClient) DeletePreparer(ctx context.Context, onPremiseIotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "onPremiseIotSensorName": autorest.Encode("path", onPremiseIotSensorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client OnPremiseIotSensorsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client OnPremiseIotSensorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DownloadActivation download sensor activation file -// Parameters: -// onPremiseIotSensorName - name of the on-premise IoT sensor -func (client OnPremiseIotSensorsClient) DownloadActivation(ctx context.Context, onPremiseIotSensorName string) (result ReadCloser, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OnPremiseIotSensorsClient.DownloadActivation") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.OnPremiseIotSensorsClient", "DownloadActivation", err.Error()) - } - - req, err := client.DownloadActivationPreparer(ctx, onPremiseIotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "DownloadActivation", nil, "Failure preparing request") - return - } - - resp, err := client.DownloadActivationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "DownloadActivation", resp, "Failure sending request") - return - } - - result, err = client.DownloadActivationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "DownloadActivation", resp, "Failure responding to request") - return - } - - return -} - -// DownloadActivationPreparer prepares the DownloadActivation request. -func (client OnPremiseIotSensorsClient) DownloadActivationPreparer(ctx context.Context, onPremiseIotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "onPremiseIotSensorName": autorest.Encode("path", onPremiseIotSensorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}/downloadActivation", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DownloadActivationSender sends the DownloadActivation request. The method will close the -// http.Response Body if it receives an error. -func (client OnPremiseIotSensorsClient) DownloadActivationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DownloadActivationResponder handles the response to the DownloadActivation request. The method always -// closes the http.Response Body. -func (client OnPremiseIotSensorsClient) DownloadActivationResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK)) - result.Response = autorest.Response{Response: resp} - return -} - -// DownloadResetPassword download file for reset password of the sensor -// Parameters: -// onPremiseIotSensorName - name of the on-premise IoT sensor -// body - input for reset password. -func (client OnPremiseIotSensorsClient) DownloadResetPassword(ctx context.Context, onPremiseIotSensorName string, body ResetPasswordInput) (result ReadCloser, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OnPremiseIotSensorsClient.DownloadResetPassword") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.OnPremiseIotSensorsClient", "DownloadResetPassword", err.Error()) - } - - req, err := client.DownloadResetPasswordPreparer(ctx, onPremiseIotSensorName, body) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "DownloadResetPassword", nil, "Failure preparing request") - return - } - - resp, err := client.DownloadResetPasswordSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "DownloadResetPassword", resp, "Failure sending request") - return - } - - result, err = client.DownloadResetPasswordResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "DownloadResetPassword", resp, "Failure responding to request") - return - } - - return -} - -// DownloadResetPasswordPreparer prepares the DownloadResetPassword request. -func (client OnPremiseIotSensorsClient) DownloadResetPasswordPreparer(ctx context.Context, onPremiseIotSensorName string, body ResetPasswordInput) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "onPremiseIotSensorName": autorest.Encode("path", onPremiseIotSensorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}/downloadResetPassword", pathParameters), - autorest.WithJSON(body), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DownloadResetPasswordSender sends the DownloadResetPassword request. The method will close the -// http.Response Body if it receives an error. -func (client OnPremiseIotSensorsClient) DownloadResetPasswordSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DownloadResetPasswordResponder handles the response to the DownloadResetPassword request. The method always -// closes the http.Response Body. -func (client OnPremiseIotSensorsClient) DownloadResetPasswordResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK)) - result.Response = autorest.Response{Response: resp} - return -} - -// Get get on-premise IoT sensor -// Parameters: -// onPremiseIotSensorName - name of the on-premise IoT sensor -func (client OnPremiseIotSensorsClient) Get(ctx context.Context, onPremiseIotSensorName string) (result OnPremiseIotSensor, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OnPremiseIotSensorsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.OnPremiseIotSensorsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, onPremiseIotSensorName) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client OnPremiseIotSensorsClient) GetPreparer(ctx context.Context, onPremiseIotSensorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "onPremiseIotSensorName": autorest.Encode("path", onPremiseIotSensorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client OnPremiseIotSensorsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client OnPremiseIotSensorsClient) GetResponder(resp *http.Response) (result OnPremiseIotSensor, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list on-premise IoT sensors -func (client OnPremiseIotSensorsClient) List(ctx context.Context) (result OnPremiseIotSensorsList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OnPremiseIotSensorsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.OnPremiseIotSensorsClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "security.OnPremiseIotSensorsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OnPremiseIotSensorsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-08-06-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OnPremiseIotSensorsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OnPremiseIotSensorsClient) ListResponder(resp *http.Response) (result OnPremiseIotSensorsList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go index 9e2da968bde0..b6ad3019acca 100644 --- a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go @@ -251,23 +251,23 @@ var _ ServerVulnerabilityAssessmentClientAPI = (*security.ServerVulnerabilityAss // AssessmentsMetadataClientAPI contains the set of methods on the AssessmentsMetadataClient type. type AssessmentsMetadataClientAPI interface { - CreateInSubscription(ctx context.Context, assessmentMetadataName string, assessmentMetadata security.AssessmentMetadata) (result security.AssessmentMetadata, err error) + CreateInSubscription(ctx context.Context, assessmentMetadataName string, assessmentMetadata security.AssessmentMetadataResponse) (result security.AssessmentMetadataResponse, err error) DeleteInSubscription(ctx context.Context, assessmentMetadataName string) (result autorest.Response, err error) - Get(ctx context.Context, assessmentMetadataName string) (result security.AssessmentMetadata, err error) - GetInSubscription(ctx context.Context, assessmentMetadataName string) (result security.AssessmentMetadata, err error) - List(ctx context.Context) (result security.AssessmentMetadataListPage, err error) - ListComplete(ctx context.Context) (result security.AssessmentMetadataListIterator, err error) - ListBySubscription(ctx context.Context) (result security.AssessmentMetadataListPage, err error) - ListBySubscriptionComplete(ctx context.Context) (result security.AssessmentMetadataListIterator, err error) + Get(ctx context.Context, assessmentMetadataName string) (result security.AssessmentMetadataResponse, err error) + GetInSubscription(ctx context.Context, assessmentMetadataName string) (result security.AssessmentMetadataResponse, err error) + List(ctx context.Context) (result security.AssessmentMetadataResponseListPage, err error) + ListComplete(ctx context.Context) (result security.AssessmentMetadataResponseListIterator, err error) + ListBySubscription(ctx context.Context) (result security.AssessmentMetadataResponseListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result security.AssessmentMetadataResponseListIterator, err error) } var _ AssessmentsMetadataClientAPI = (*security.AssessmentsMetadataClient)(nil) // AssessmentsClientAPI contains the set of methods on the AssessmentsClient type. type AssessmentsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment security.Assessment) (result security.Assessment, err error) + CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment security.Assessment) (result security.AssessmentResponse, err error) Delete(ctx context.Context, resourceID string, assessmentName string) (result autorest.Response, err error) - Get(ctx context.Context, resourceID string, assessmentName string, expand security.ExpandEnum) (result security.Assessment, err error) + Get(ctx context.Context, resourceID string, assessmentName string, expand security.ExpandEnum) (result security.AssessmentResponse, err error) List(ctx context.Context, scope string) (result security.AssessmentListPage, err error) ListComplete(ctx context.Context, scope string) (result security.AssessmentListIterator, err error) } @@ -440,110 +440,6 @@ type SQLVulnerabilityAssessmentBaselineRulesClientAPI interface { var _ SQLVulnerabilityAssessmentBaselineRulesClientAPI = (*security.SQLVulnerabilityAssessmentBaselineRulesClient)(nil) -// IotDefenderSettingsClientAPI contains the set of methods on the IotDefenderSettingsClient type. -type IotDefenderSettingsClientAPI interface { - CreateOrUpdate(ctx context.Context, iotDefenderSettingsModel security.IotDefenderSettingsModel) (result security.IotDefenderSettingsModel, err error) - Delete(ctx context.Context) (result autorest.Response, err error) - DownloadManagerActivation(ctx context.Context) (result security.ReadCloser, err error) - Get(ctx context.Context) (result security.IotDefenderSettingsModel, err error) - List(ctx context.Context) (result security.IotDefenderSettingsList, err error) - PackageDownloadsMethod(ctx context.Context) (result security.PackageDownloads, err error) -} - -var _ IotDefenderSettingsClientAPI = (*security.IotDefenderSettingsClient)(nil) - -// IotSensorsClientAPI contains the set of methods on the IotSensorsClient type. -type IotSensorsClientAPI interface { - CreateOrUpdate(ctx context.Context, scope string, iotSensorName string, iotSensorsModel security.IotSensorsModel) (result security.IotSensorsModel, err error) - Delete(ctx context.Context, scope string, iotSensorName string) (result autorest.Response, err error) - DownloadActivation(ctx context.Context, scope string, iotSensorName string) (result security.ReadCloser, err error) - DownloadResetPassword(ctx context.Context, scope string, iotSensorName string, body security.ResetPasswordInput) (result security.ReadCloser, err error) - Get(ctx context.Context, scope string, iotSensorName string) (result security.IotSensorsModel, err error) - List(ctx context.Context, scope string) (result security.IotSensorsList, err error) - TriggerTiPackageUpdate(ctx context.Context, scope string, iotSensorName string) (result autorest.Response, err error) -} - -var _ IotSensorsClientAPI = (*security.IotSensorsClient)(nil) - -// DevicesForSubscriptionClientAPI contains the set of methods on the DevicesForSubscriptionClient type. -type DevicesForSubscriptionClientAPI interface { - List(ctx context.Context, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListPage, err error) - ListComplete(ctx context.Context, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListIterator, err error) -} - -var _ DevicesForSubscriptionClientAPI = (*security.DevicesForSubscriptionClient)(nil) - -// DevicesForHubClientAPI contains the set of methods on the DevicesForHubClient type. -type DevicesForHubClientAPI interface { - List(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListPage, err error) - ListComplete(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListIterator, err error) -} - -var _ DevicesForHubClientAPI = (*security.DevicesForHubClient)(nil) - -// DeviceClientAPI contains the set of methods on the DeviceClient type. -type DeviceClientAPI interface { - Get(ctx context.Context, resourceID string, deviceID string) (result security.Device, err error) -} - -var _ DeviceClientAPI = (*security.DeviceClient)(nil) - -// OnPremiseIotSensorsClientAPI contains the set of methods on the OnPremiseIotSensorsClient type. -type OnPremiseIotSensorsClientAPI interface { - CreateOrUpdate(ctx context.Context, onPremiseIotSensorName string) (result security.OnPremiseIotSensor, err error) - Delete(ctx context.Context, onPremiseIotSensorName string) (result autorest.Response, err error) - DownloadActivation(ctx context.Context, onPremiseIotSensorName string) (result security.ReadCloser, err error) - DownloadResetPassword(ctx context.Context, onPremiseIotSensorName string, body security.ResetPasswordInput) (result security.ReadCloser, err error) - Get(ctx context.Context, onPremiseIotSensorName string) (result security.OnPremiseIotSensor, err error) - List(ctx context.Context) (result security.OnPremiseIotSensorsList, err error) -} - -var _ OnPremiseIotSensorsClientAPI = (*security.OnPremiseIotSensorsClient)(nil) - -// IotSitesClientAPI contains the set of methods on the IotSitesClient type. -type IotSitesClientAPI interface { - CreateOrUpdate(ctx context.Context, scope string, iotSitesModel security.IotSitesModel) (result security.IotSitesModel, err error) - Delete(ctx context.Context, scope string) (result autorest.Response, err error) - Get(ctx context.Context, scope string) (result security.IotSitesModel, err error) - List(ctx context.Context, scope string) (result security.IotSitesList, err error) -} - -var _ IotSitesClientAPI = (*security.IotSitesClient)(nil) - -// IotAlertsClientAPI contains the set of methods on the IotAlertsClient type. -type IotAlertsClientAPI interface { - Get(ctx context.Context, scope string, iotAlertID string) (result security.IotAlertModel, err error) - List(ctx context.Context, scope string, minStartTimeUtc string, maxStartTimeUtc string, alertType string, deviceManagementType security.ManagementState, compromisedEntity string, limit *int32, skipToken string) (result security.IotAlertListModelPage, err error) - ListComplete(ctx context.Context, scope string, minStartTimeUtc string, maxStartTimeUtc string, alertType string, deviceManagementType security.ManagementState, compromisedEntity string, limit *int32, skipToken string) (result security.IotAlertListModelIterator, err error) -} - -var _ IotAlertsClientAPI = (*security.IotAlertsClient)(nil) - -// IotAlertTypesClientAPI contains the set of methods on the IotAlertTypesClient type. -type IotAlertTypesClientAPI interface { - Get(ctx context.Context, iotAlertTypeName string) (result security.IotAlertType, err error) - List(ctx context.Context) (result security.IotAlertTypeList, err error) -} - -var _ IotAlertTypesClientAPI = (*security.IotAlertTypesClient)(nil) - -// IotRecommendationsClientAPI contains the set of methods on the IotRecommendationsClient type. -type IotRecommendationsClientAPI interface { - Get(ctx context.Context, scope string, iotRecommendationID string) (result security.IotRecommendationModel, err error) - List(ctx context.Context, scope string, recommendationType string, deviceID string, limit *int32, skipToken string) (result security.IotRecommendationListModelPage, err error) - ListComplete(ctx context.Context, scope string, recommendationType string, deviceID string, limit *int32, skipToken string) (result security.IotRecommendationListModelIterator, err error) -} - -var _ IotRecommendationsClientAPI = (*security.IotRecommendationsClient)(nil) - -// IotRecommendationTypesClientAPI contains the set of methods on the IotRecommendationTypesClient type. -type IotRecommendationTypesClientAPI interface { - Get(ctx context.Context, iotRecommendationTypeName string) (result security.IotRecommendationType, err error) - List(ctx context.Context) (result security.IotRecommendationTypeList, err error) -} - -var _ IotRecommendationTypesClientAPI = (*security.IotRecommendationTypesClient)(nil) - // AlertsClientAPI contains the set of methods on the AlertsClient type. type AlertsClientAPI interface { GetResourceGroupLevel(ctx context.Context, alertName string, resourceGroupName string) (result security.Alert, err error) diff --git a/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go b/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go index 38b230997c03..0909571c9e2f 100644 --- a/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go +++ b/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go @@ -161,7 +161,7 @@ func (client ServerVulnerabilityAssessmentClient) Delete(ctx context.Context, re result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "security.ServerVulnerabilityAssessmentClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.ServerVulnerabilityAssessmentClient", "Delete", result.Response(), "Failure sending request") return } @@ -196,6 +196,7 @@ func (client ServerVulnerabilityAssessmentClient) DeletePreparer(ctx context.Con // http.Response Body if it receives an error. func (client ServerVulnerabilityAssessmentClient) DeleteSender(req *http.Request) (future ServerVulnerabilityAssessmentDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/security/mgmt/v3.0/security/settings.go b/services/preview/security/mgmt/v3.0/security/settings.go index 6ff57dc8da26..77e8fc10b204 100644 --- a/services/preview/security/mgmt/v3.0/security/settings.go +++ b/services/preview/security/mgmt/v3.0/security/settings.go @@ -80,7 +80,7 @@ func (client SettingsClient) GetPreparer(ctx context.Context, settingName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-06-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client SettingsClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-06-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,7 +280,7 @@ func (client SettingsClient) UpdatePreparer(ctx context.Context, settingName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-06-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/CHANGELOG.md b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/CHANGELOG.md index fa0ec354fa9f..a1ecf841edb0 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/CHANGELOG.md +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/CHANGELOG.md @@ -1,7 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ApplicationTypeProperties.MarshalJSON() ([]byte, error) diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/_meta.json b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/_meta.json index e7969c00e617..69e6d396eb66 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/_meta.json +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "tag": "package-2017-07", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2017-07 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-07 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go index 78a4053e56b7..ba8672290efb 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go @@ -109,7 +109,7 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", result.Response(), "Failure sending request") return } @@ -142,6 +142,7 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -493,7 +494,7 @@ func (client ClustersClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", result.Response(), "Failure sending request") return } @@ -526,6 +527,7 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/CHANGELOG.md b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/CHANGELOG.md index d306fe1ff4c3..a1ecf841edb0 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/CHANGELOG.md +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/CHANGELOG.md @@ -1,7 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ApplicationTypeResourceProperties.MarshalJSON() ([]byte, error) diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/_meta.json b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/_meta.json index 08ec1efeb27a..875e04934d3d 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/_meta.json +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "tag": "package-2018-02", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-02 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-02 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applications.go b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applications.go index ed4f3af2c0f6..3270388ed9ce 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applications.go +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applications.go @@ -55,7 +55,7 @@ func (client ApplicationsClient) Create(ctx context.Context, resourceGroupName s result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Create", result.Response(), "Failure sending request") return } @@ -90,6 +90,7 @@ func (client ApplicationsClient) CreatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) CreateSender(req *http.Request) (future ApplicationsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -137,7 +138,7 @@ func (client ApplicationsClient) Delete(ctx context.Context, resourceGroupName s result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", result.Response(), "Failure sending request") return } @@ -170,6 +171,7 @@ func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -373,7 +375,7 @@ func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName s result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", result.Response(), "Failure sending request") return } @@ -408,6 +410,7 @@ func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) UpdateSender(req *http.Request) (future ApplicationsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypes.go b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypes.go index db73c51435f4..af16b3b89d6e 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypes.go +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypes.go @@ -136,7 +136,7 @@ func (client ApplicationTypesClient) Delete(ctx context.Context, resourceGroupNa result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", result.Response(), "Failure sending request") return } @@ -169,6 +169,7 @@ func (client ApplicationTypesClient) DeletePreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ApplicationTypesClient) DeleteSender(req *http.Request) (future ApplicationTypesDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypeversions.go b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypeversions.go index 9d6fad008f1d..cc13b1211b14 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypeversions.go +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/applicationtypeversions.go @@ -65,7 +65,7 @@ func (client ApplicationTypeVersionsClient) Create(ctx context.Context, resource result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Create", result.Response(), "Failure sending request") return } @@ -101,6 +101,7 @@ func (client ApplicationTypeVersionsClient) CreatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ApplicationTypeVersionsClient) CreateSender(req *http.Request) (future ApplicationTypeVersionsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -149,7 +150,7 @@ func (client ApplicationTypeVersionsClient) Delete(ctx context.Context, resource result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", result.Response(), "Failure sending request") return } @@ -183,6 +184,7 @@ func (client ApplicationTypeVersionsClient) DeletePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ApplicationTypeVersionsClient) DeleteSender(req *http.Request) (future ApplicationTypeVersionsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/clusters.go index 96e1951529d7..865ea1189238 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/clusters.go @@ -107,7 +107,7 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", result.Response(), "Failure sending request") return } @@ -141,6 +141,7 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -487,7 +488,7 @@ func (client ClustersClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", result.Response(), "Failure sending request") return } @@ -521,6 +522,7 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/services.go b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/services.go index f20a849ea8a8..f68600f195ca 100644 --- a/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/services.go +++ b/services/preview/servicefabric/mgmt/2018-02-01-preview/servicefabric/services.go @@ -56,7 +56,7 @@ func (client ServicesClient) Create(ctx context.Context, resourceGroupName strin result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Create", result.Response(), "Failure sending request") return } @@ -92,6 +92,7 @@ func (client ServicesClient) CreatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) CreateSender(req *http.Request) (future ServicesCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -140,7 +141,7 @@ func (client ServicesClient) Delete(ctx context.Context, resourceGroupName strin result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", result.Response(), "Failure sending request") return } @@ -174,6 +175,7 @@ func (client ServicesClient) DeletePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) DeleteSender(req *http.Request) (future ServicesDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -382,7 +384,7 @@ func (client ServicesClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", result.Response(), "Failure sending request") return } @@ -418,6 +420,7 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/CHANGELOG.md b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/CHANGELOG.md index d306fe1ff4c3..a1ecf841edb0 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/CHANGELOG.md +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/CHANGELOG.md @@ -1,7 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ApplicationTypeResourceProperties.MarshalJSON() ([]byte, error) diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/_meta.json b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/_meta.json index 3d16bcd9f979..4096629209a3 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/_meta.json +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "tag": "package-2019-03-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-03-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go index 3acd222dd6b8..b948f33c6fc5 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go @@ -55,7 +55,7 @@ func (client ApplicationsClient) Create(ctx context.Context, resourceGroupName s result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Create", result.Response(), "Failure sending request") return } @@ -90,6 +90,7 @@ func (client ApplicationsClient) CreatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) CreateSender(req *http.Request) (future ApplicationsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -137,7 +138,7 @@ func (client ApplicationsClient) Delete(ctx context.Context, resourceGroupName s result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", result.Response(), "Failure sending request") return } @@ -170,6 +171,7 @@ func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -373,7 +375,7 @@ func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName s result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", result.Response(), "Failure sending request") return } @@ -408,6 +410,7 @@ func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) UpdateSender(req *http.Request) (future ApplicationsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go index d2580e34206b..8af160719c8c 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go @@ -136,7 +136,7 @@ func (client ApplicationTypesClient) Delete(ctx context.Context, resourceGroupNa result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", result.Response(), "Failure sending request") return } @@ -169,6 +169,7 @@ func (client ApplicationTypesClient) DeletePreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ApplicationTypesClient) DeleteSender(req *http.Request) (future ApplicationTypesDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go index 619fa13c044b..216fabce80dc 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go @@ -65,7 +65,7 @@ func (client ApplicationTypeVersionsClient) Create(ctx context.Context, resource result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Create", result.Response(), "Failure sending request") return } @@ -101,6 +101,7 @@ func (client ApplicationTypeVersionsClient) CreatePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ApplicationTypeVersionsClient) CreateSender(req *http.Request) (future ApplicationTypeVersionsCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -149,7 +150,7 @@ func (client ApplicationTypeVersionsClient) Delete(ctx context.Context, resource result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", result.Response(), "Failure sending request") return } @@ -183,6 +184,7 @@ func (client ApplicationTypeVersionsClient) DeletePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ApplicationTypeVersionsClient) DeleteSender(req *http.Request) (future ApplicationTypeVersionsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go index d0921a720f39..99f6b0eefa04 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go @@ -107,7 +107,7 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", result.Response(), "Failure sending request") return } @@ -141,6 +141,7 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -487,7 +488,7 @@ func (client ClustersClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", result.Response(), "Failure sending request") return } @@ -521,6 +522,7 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go index e93f6aa6f5ef..fcbb4c4bb909 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go @@ -56,7 +56,7 @@ func (client ServicesClient) Create(ctx context.Context, resourceGroupName strin result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Create", result.Response(), "Failure sending request") return } @@ -92,6 +92,7 @@ func (client ServicesClient) CreatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) CreateSender(req *http.Request) (future ServicesCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -140,7 +141,7 @@ func (client ServicesClient) Delete(ctx context.Context, resourceGroupName strin result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", result.Response(), "Failure sending request") return } @@ -174,6 +175,7 @@ func (client ServicesClient) DeletePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) DeleteSender(req *http.Request) (future ServicesDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -382,7 +384,7 @@ func (client ServicesClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", result.Response(), "Failure sending request") return } @@ -418,6 +420,7 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/CHANGELOG.md b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/CHANGELOG.md index 030549292fc2..a1ecf841edb0 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/CHANGELOG.md +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/CHANGELOG.md @@ -1,13 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. AvailabilityGroupListenerListResult.MarshalJSON() ([]byte, error) -1. GroupListResult.MarshalJSON() ([]byte, error) -1. ListResult.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. OperationListResult.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/_meta.json b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/_meta.json index 5e672cd8ff6a..428513980323 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/_meta.json +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/sqlvirtualmachine/resource-manager/readme.md", "tag": "package-2017-03-01-preview", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2017-03-01-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/sqlvirtualmachine/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-03-01-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/sqlvirtualmachine/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go index 47499db067da..8d05ba1c0c77 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go @@ -60,7 +60,7 @@ func (client AvailabilityGroupListenersClient) CreateOrUpdate(ctx context.Contex result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -95,6 +95,7 @@ func (client AvailabilityGroupListenersClient) CreateOrUpdatePreparer(ctx contex // http.Response Body if it receives an error. func (client AvailabilityGroupListenersClient) CreateOrUpdateSender(req *http.Request) (future AvailabilityGroupListenersCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -143,7 +144,7 @@ func (client AvailabilityGroupListenersClient) Delete(ctx context.Context, resou result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersClient", "Delete", result.Response(), "Failure sending request") return } @@ -176,6 +177,7 @@ func (client AvailabilityGroupListenersClient) DeletePreparer(ctx context.Contex // http.Response Body if it receives an error. func (client AvailabilityGroupListenersClient) DeleteSender(req *http.Request) (future AvailabilityGroupListenersDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go index 9b0f3e92bd72..ea07209245de 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go @@ -57,7 +57,7 @@ func (client GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -91,6 +91,7 @@ func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG // http.Response Body if it receives an error. func (client GroupsClient) CreateOrUpdateSender(req *http.Request) (future GroupsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -138,7 +139,7 @@ func (client GroupsClient) Delete(ctx context.Context, resourceGroupName string, result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsClient", "Delete", result.Response(), "Failure sending request") return } @@ -170,6 +171,7 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName // http.Response Body if it receives an error. func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -524,7 +526,7 @@ func (client GroupsClient) Update(ctx context.Context, resourceGroupName string, result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsClient", "Update", result.Response(), "Failure sending request") return } @@ -558,6 +560,7 @@ func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName // http.Response Body if it receives an error. func (client GroupsClient) UpdateSender(req *http.Request) (future GroupsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go index 567f3cd8f43d..aac9c00401ce 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go @@ -59,7 +59,7 @@ func (client SQLVirtualMachinesClient) CreateOrUpdate(ctx context.Context, resou result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -93,6 +93,7 @@ func (client SQLVirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Contex // http.Response Body if it receives an error. func (client SQLVirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future SQLVirtualMachinesCreateOrUpdateFutureType, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -140,7 +141,7 @@ func (client SQLVirtualMachinesClient) Delete(ctx context.Context, resourceGroup result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesClient", "Delete", result.Response(), "Failure sending request") return } @@ -172,6 +173,7 @@ func (client SQLVirtualMachinesClient) DeletePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client SQLVirtualMachinesClient) DeleteSender(req *http.Request) (future SQLVirtualMachinesDeleteFutureType, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -649,7 +651,7 @@ func (client SQLVirtualMachinesClient) Update(ctx context.Context, resourceGroup result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesClient", "Update", result.Response(), "Failure sending request") return } @@ -683,6 +685,7 @@ func (client SQLVirtualMachinesClient) UpdatePreparer(ctx context.Context, resou // http.Response Body if it receives an error. func (client SQLVirtualMachinesClient) UpdateSender(req *http.Request) (future SQLVirtualMachinesUpdateFutureType, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/CHANGELOG.md b/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/CHANGELOG.md index 4a0e9bec8e2f..a1ecf841edb0 100644 --- a/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/CHANGELOG.md +++ b/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/CHANGELOG.md @@ -1,9 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. AzureEntityResource.MarshalJSON() ([]byte, error) -1. ProxyResource.MarshalJSON() ([]byte, error) -1. Resource.MarshalJSON() ([]byte, error) diff --git a/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/_meta.json b/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/_meta.json index 63c9fbeff2bb..5ed40a3edd74 100644 --- a/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/_meta.json +++ b/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/redhatopenshift/resource-manager/readme.md", "tag": "package-2020-04-30", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-04-30 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/redhatopenshift/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-04-30 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/redhatopenshift/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/openshiftclusters.go b/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/openshiftclusters.go index 3b00d30d1ab9..434011899fe1 100644 --- a/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/openshiftclusters.go +++ b/services/redhatopenshift/mgmt/2020-04-30/redhatopenshift/openshiftclusters.go @@ -53,8 +53,7 @@ func (client OpenShiftClustersClient) CreateOrUpdate(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("redhatopenshift.OpenShiftClustersClient", "CreateOrUpdate", err.Error()) } @@ -66,7 +65,7 @@ func (client OpenShiftClustersClient) CreateOrUpdate(ctx context.Context, resour result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftClustersClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -100,6 +99,7 @@ func (client OpenShiftClustersClient) CreateOrUpdatePreparer(ctx context.Context // http.Response Body if it receives an error. func (client OpenShiftClustersClient) CreateOrUpdateSender(req *http.Request) (future OpenShiftClustersCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -143,8 +143,7 @@ func (client OpenShiftClustersClient) Delete(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("redhatopenshift.OpenShiftClustersClient", "Delete", err.Error()) } @@ -156,7 +155,7 @@ func (client OpenShiftClustersClient) Delete(ctx context.Context, resourceGroupN result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftClustersClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftClustersClient", "Delete", result.Response(), "Failure sending request") return } @@ -188,6 +187,7 @@ func (client OpenShiftClustersClient) DeletePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client OpenShiftClustersClient) DeleteSender(req *http.Request) (future OpenShiftClustersDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -230,8 +230,7 @@ func (client OpenShiftClustersClient) Get(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("redhatopenshift.OpenShiftClustersClient", "Get", err.Error()) } @@ -434,8 +433,7 @@ func (client OpenShiftClustersClient) ListByResourceGroup(ctx context.Context, r Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("redhatopenshift.OpenShiftClustersClient", "ListByResourceGroup", err.Error()) } @@ -561,8 +559,7 @@ func (client OpenShiftClustersClient) ListCredentials(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("redhatopenshift.OpenShiftClustersClient", "ListCredentials", err.Error()) } @@ -648,8 +645,7 @@ func (client OpenShiftClustersClient) Update(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("redhatopenshift.OpenShiftClustersClient", "Update", err.Error()) } @@ -661,7 +657,7 @@ func (client OpenShiftClustersClient) Update(ctx context.Context, resourceGroupN result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftClustersClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "redhatopenshift.OpenShiftClustersClient", "Update", result.Response(), "Failure sending request") return } @@ -695,6 +691,7 @@ func (client OpenShiftClustersClient) UpdatePreparer(ctx context.Context, resour // http.Response Body if it receives an error. func (client OpenShiftClustersClient) UpdateSender(req *http.Request) (future OpenShiftClustersUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/CHANGELOG.md b/services/servicefabric/mgmt/2016-09-01/servicefabric/CHANGELOG.md index 97c7a48f8f7f..a1ecf841edb0 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/CHANGELOG.md +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/CHANGELOG.md @@ -1,7 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. OperationListResult.MarshalJSON() ([]byte, error) diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/_meta.json b/services/servicefabric/mgmt/2016-09-01/servicefabric/_meta.json index d4ae9cf1822f..12a904a6124d 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/_meta.json +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "tag": "package-2016-09", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2016-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2016-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go index d20c3a1c46b5..2e50784ed5bd 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go @@ -107,7 +107,7 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Create", result.Response(), "Failure sending request") return } @@ -141,6 +141,7 @@ func (client ClustersClient) CreatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) CreateSender(req *http.Request) (future ClustersCreateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -569,7 +570,7 @@ func (client ClustersClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", result.Response(), "Failure sending request") return } @@ -603,6 +604,7 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/CHANGELOG.md b/services/servicefabric/mgmt/2019-03-01/servicefabric/CHANGELOG.md index d306fe1ff4c3..a1ecf841edb0 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/CHANGELOG.md +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/CHANGELOG.md @@ -1,7 +1,2 @@ -# Change History +# Unreleased -## Additive Changes - -### New Funcs - -1. ApplicationTypeResourceProperties.MarshalJSON() ([]byte, error) diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/_meta.json b/services/servicefabric/mgmt/2019-03-01/servicefabric/_meta.json index 2c876e13fb61..4c7314c9267e 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/_meta.json +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/_meta.json @@ -1,10 +1,10 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "tag": "package-2019-03", - "use": "@microsoft.azure/autorest.go@2.1.183", + "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-03 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-03 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go index e31612d0c11f..d534cb63c714 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go @@ -55,7 +55,7 @@ func (client ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGro result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -90,6 +90,7 @@ func (client ApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, res // http.Response Body if it receives an error. func (client ApplicationsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -137,7 +138,7 @@ func (client ApplicationsClient) Delete(ctx context.Context, resourceGroupName s result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Delete", result.Response(), "Failure sending request") return } @@ -170,6 +171,7 @@ func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -373,7 +375,7 @@ func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName s result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsClient", "Update", result.Response(), "Failure sending request") return } @@ -408,6 +410,7 @@ func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGro // http.Response Body if it receives an error. func (client ApplicationsClient) UpdateSender(req *http.Request) (future ApplicationsUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go index 2f01aff70c76..eacc9bfa4d6b 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go @@ -136,7 +136,7 @@ func (client ApplicationTypesClient) Delete(ctx context.Context, resourceGroupNa result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypesClient", "Delete", result.Response(), "Failure sending request") return } @@ -169,6 +169,7 @@ func (client ApplicationTypesClient) DeletePreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ApplicationTypesClient) DeleteSender(req *http.Request) (future ApplicationTypesDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go index 2f5758d4017b..d4ed04fea703 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go @@ -65,7 +65,7 @@ func (client ApplicationTypeVersionsClient) CreateOrUpdate(ctx context.Context, result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -101,6 +101,7 @@ func (client ApplicationTypeVersionsClient) CreateOrUpdatePreparer(ctx context.C // http.Response Body if it receives an error. func (client ApplicationTypeVersionsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationTypeVersionsCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -149,7 +150,7 @@ func (client ApplicationTypeVersionsClient) Delete(ctx context.Context, resource result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ApplicationTypeVersionsClient", "Delete", result.Response(), "Failure sending request") return } @@ -183,6 +184,7 @@ func (client ApplicationTypeVersionsClient) DeletePreparer(ctx context.Context, // http.Response Body if it receives an error. func (client ApplicationTypeVersionsClient) DeleteSender(req *http.Request) (future ApplicationTypeVersionsDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go index 47a11ecf9b15..d486f36ba335 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go @@ -107,7 +107,7 @@ func (client ClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupNa result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -141,6 +141,7 @@ func (client ClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ClustersClient) CreateOrUpdateSender(req *http.Request) (future ClustersCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -487,7 +488,7 @@ func (client ClustersClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ClustersClient", "Update", result.Response(), "Failure sending request") return } @@ -521,6 +522,7 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go index 3de306a19d22..f9fe9b14d6dd 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go @@ -56,7 +56,7 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "CreateOrUpdate", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -92,6 +92,7 @@ func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourc // http.Response Body if it receives an error. func (client ServicesClient) CreateOrUpdateSender(req *http.Request) (future ServicesCreateOrUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -140,7 +141,7 @@ func (client ServicesClient) Delete(ctx context.Context, resourceGroupName strin result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Delete", result.Response(), "Failure sending request") return } @@ -174,6 +175,7 @@ func (client ServicesClient) DeletePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) DeleteSender(req *http.Request) (future ServicesDeleteFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return @@ -382,7 +384,7 @@ func (client ServicesClient) Update(ctx context.Context, resourceGroupName strin result, err = client.UpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", nil, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicefabric.ServicesClient", "Update", result.Response(), "Failure sending request") return } @@ -418,6 +420,7 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa // http.Response Body if it receives an error. func (client ServicesClient) UpdateSender(req *http.Request) (future ServicesUpdateFuture, err error) { var resp *http.Response + future.FutureAPI = &azure.Future{} resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return diff --git a/services/servicefabric/mgmt/2021-06-01/servicefabric/CHANGELOG.md b/services/servicefabric/mgmt/2021-06-01/servicefabric/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/servicefabric/mgmt/2021-06-01/servicefabric/CHANGELOG.md +++ b/services/servicefabric/mgmt/2021-06-01/servicefabric/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/servicefabric/mgmt/2021-06-01/servicefabric/_meta.json b/services/servicefabric/mgmt/2021-06-01/servicefabric/_meta.json index 965a93e15ce3..f2e45a74054b 100644 --- a/services/servicefabric/mgmt/2021-06-01/servicefabric/_meta.json +++ b/services/servicefabric/mgmt/2021-06-01/servicefabric/_meta.json @@ -1,5 +1,5 @@ { - "commit": "51b37b069ecbb9d2fcd300eabd4b10b7911b7d7d", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "readme": "/_/azure-rest-api-specs/specification/servicefabric/resource-manager/readme.md", "tag": "package-2021-06", "use": "@microsoft.azure/autorest.go@2.1.187",