From 2f03253f39f62c0f51410cc7d618a5997800c73f Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Wed, 4 Jul 2018 18:26:08 +0200 Subject: [PATCH] Updating to v18.0.0 of Azure/azure-sdk-for-go / v10.12.0 of Azure/go-autorest (#1487) * Updating to v18.0.0 of Azure/azure-sdk-for-go / v10.12.0 of Azure/go-autorest * Fixing the build --- azurerm/resource_arm_application_gateway.go | 4 +- azurerm/resource_arm_express_route_circuit.go | 4 +- .../resource_arm_log_analytics_solution.go | 26 +- .../{analyticsitem.go => analyticsitems.go} | 72 +- .../mgmt/2015-05-01/insights/annotations.go | 6 +- .../mgmt/2015-05-01/insights/components.go | 97 +- .../mgmt/2015-05-01/insights/favorite.go | 322 - .../mgmt/2015-05-01/insights/favorites.go | 282 + .../mgmt/2015-05-01/insights/models.go | 185 +- .../mgmt/2015-05-01/insights/workbook.go | 326 - .../mgmt/2015-05-01/insights/workbooks.go | 290 +- .../insights/workitemconfigurations.go | 6 +- .../mgmt/2015-10-31/automation/account.go | 48 +- .../mgmt/2015-10-31/automation/activity.go | 23 +- .../agentregistrationinformation.go | 20 +- .../mgmt/2015-10-31/automation/certificate.go | 57 +- .../mgmt/2015-10-31/automation/connection.go | 57 +- .../2015-10-31/automation/connectiontype.go | 44 +- .../mgmt/2015-10-31/automation/credential.go | 57 +- .../automation/dsccompilationjob.go | 47 +- .../automation/dsccompilationjobstream.go | 11 +- .../2015-10-31/automation/dscconfiguration.go | 94 +- .../mgmt/2015-10-31/automation/dscnode.go | 45 +- .../automation/dscnodeconfiguration.go | 46 +- .../mgmt/2015-10-31/automation/fields.go | 12 +- .../automation/hybridrunbookworkergroup.go | 58 +- .../mgmt/2015-10-31/automation/job.go | 89 +- .../mgmt/2015-10-31/automation/jobschedule.go | 58 +- .../mgmt/2015-10-31/automation/jobstream.go | 24 +- .../mgmt/2015-10-31/automation/keys.go | 9 +- .../2015-10-31/automation/linkedworkspace.go | 9 +- .../mgmt/2015-10-31/automation/models.go | 733 +- .../mgmt/2015-10-31/automation/module.go | 55 +- .../mgmt/2015-10-31/automation/nodereports.go | 36 +- .../2015-10-31/automation/objectdatatypes.go | 23 +- .../mgmt/2015-10-31/automation/runbook.go | 68 +- .../2015-10-31/automation/runbookdraft.go | 89 +- .../mgmt/2015-10-31/automation/schedule.go | 57 +- .../mgmt/2015-10-31/automation/statistics.go | 11 +- .../mgmt/2015-10-31/automation/testjob.go | 57 +- .../2015-10-31/automation/testjobstreams.go | 24 +- .../mgmt/2015-10-31/automation/usages.go | 9 +- .../mgmt/2015-10-31/automation/variable.go | 55 +- .../mgmt/2015-10-31/automation/webhook.go | 66 +- .../2015-04-08/documentdb/databaseaccounts.go | 4 +- .../2017-04-01/eventhub/consumergroups.go | 4 +- .../mgmt/2017-04-01/eventhub/eventhubs.go | 8 +- .../mgmt/2017-04-01/eventhub/models.go | 2 + .../mgmt/2017-04-01/eventhub/namespaces.go | 4 +- .../mgmt/2017-07-01/devices/iothubresource.go | 4 +- .../keyvault/2016-10-01/keyvault/client.go | 24 +- .../keyvault/2016-10-01/keyvault/models.go | 53 +- .../2018-04-01/network/applicationgateways.go | 8 +- .../mgmt/2018-04-01/network/azurefirewalls.go | 434 + .../network/expressroutecircuitpeerings.go | 2 +- .../network/hubvirtualnetworkconnections.go | 205 + .../network/mgmt/2018-04-01/network/models.go | 18758 +++++++++------- .../mgmt/2018-04-01/network/virtualhubs.go | 508 + .../virtualnetworkgatewayconnections.go | 4 +- .../mgmt/2018-04-01/network/virtualwans.go | 508 + .../mgmt/2018-04-01/network/vpnconnections.go | 351 + .../mgmt/2018-04-01/network/vpngateways.go | 508 + .../mgmt/2018-04-01/network/vpnsites.go | 508 + .../network/vpnsitesconfiguration.go | 113 + .../dns/mgmt/2018-03-01-preview/dns/models.go | 32 +- .../mgmt/2018-03-01-preview/dns/recordsets.go | 71 +- .../dns/mgmt/2018-03-01-preview/dns/zones.go | 65 +- .../operationalinsights/workspaces.go | 2 +- .../operationsmanagement/models.go | 53 + .../operationsmanagement/solutions.go | 54 +- .../2017-04-01/relay/hybridconnections.go | 2 +- .../relay/mgmt/2017-04-01/relay/wcfrelays.go | 2 +- .../mgmt/2016-03-01/scheduler/jobs.go | 4 +- .../search/mgmt/2015-08-19/search/services.go | 4 +- .../mgmt/2017-04-01/servicebus/models.go | 4 + .../mgmt/2017-04-01/servicebus/queues.go | 4 +- .../mgmt/2017-04-01/servicebus/rules.go | 4 +- .../2017-04-01/servicebus/subscriptions.go | 4 +- .../mgmt/2017-04-01/servicebus/topics.go | 4 +- .../services/web/mgmt/2016-09-01/web/apps.go | 4 +- .../web/appservicecertificateorders.go | 4 +- .../storage/blobserviceclient.go | 6 +- .../Azure/azure-sdk-for-go/storage/client.go | 67 +- .../Azure/azure-sdk-for-go/storage/message.go | 3 +- .../Azure/azure-sdk-for-go/version/version.go | 2 +- .../Azure/go-autorest/autorest/adal/token.go | 17 +- .../Azure/go-autorest/autorest/version.go | 2 +- vendor/vendor.json | 414 +- 88 files changed, 16462 insertions(+), 10087 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/{analyticsitem.go => analyticsitems.go} (71%) delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorite.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbook.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/azurefirewalls.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualhubs.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualwans.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnconnections.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpngateways.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsites.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go diff --git a/azurerm/resource_arm_application_gateway.go b/azurerm/resource_arm_application_gateway.go index 910b42b588a7..969de9b0852c 100644 --- a/azurerm/resource_arm_application_gateway.go +++ b/azurerm/resource_arm_application_gateway.go @@ -68,8 +68,8 @@ func resourceArmApplicationGateway() *schema.Resource { Required: true, DiffSuppressFunc: ignoreCaseDiffSuppressFunc, ValidateFunc: validation.StringInSlice([]string{ - string(network.Standard), - string(network.WAF), + string(network.ApplicationGatewayTierStandard), + string(network.ApplicationGatewayTierWAF), }, true), }, diff --git a/azurerm/resource_arm_express_route_circuit.go b/azurerm/resource_arm_express_route_circuit.go index cfacbc218fee..a1609ecc2d09 100644 --- a/azurerm/resource_arm_express_route_circuit.go +++ b/azurerm/resource_arm_express_route_circuit.go @@ -61,8 +61,8 @@ func resourceArmExpressRouteCircuit() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(network.ExpressRouteCircuitSkuTierStandard), - string(network.ExpressRouteCircuitSkuTierPremium), + string(network.Standard), + string(network.Premium), }, true), DiffSuppressFunc: ignoreCaseDiffSuppressFunc, }, diff --git a/azurerm/resource_arm_log_analytics_solution.go b/azurerm/resource_arm_log_analytics_solution.go index 077967c036a6..f06074a1d32f 100644 --- a/azurerm/resource_arm_log_analytics_solution.go +++ b/azurerm/resource_arm_log_analytics_solution.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement" "github.com/hashicorp/terraform/helper/schema" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) @@ -104,14 +105,21 @@ func resourceArmLogAnalyticsSolutionCreateUpdate(d *schema.ResourceData, meta in res, err := client.CreateOrUpdate(ctx, resGroup, name, parameters) //Currently this is required to work around successful creation resulting in an error // being returned - if err != nil && res.StatusCode != 201 { - return err + if err != nil && res.Response().StatusCode != 201 { + if resp := res.Response(); resp != nil { + if resp.StatusCode != 201 { + return err + } + } } - solution, _ := client.Get(ctx, resGroup, name) + solution, err := client.Get(ctx, resGroup, name) + if err != nil { + return fmt.Errorf("Error retrieving Log Analytics Solution %q (Resource Group %q): %+v", name, resGroup, err) + } if solution.ID == nil { - return fmt.Errorf("Cannot read Log Analytics Solution '%s' (resource group %s) ID", name, resGroup) + return fmt.Errorf("Cannot read Log Analytics Solution %q (Resource Group %q) ID", name, resGroup) } d.SetId(*solution.ID) @@ -182,14 +190,18 @@ func resourceArmLogAnalyticsSolutionDelete(d *schema.ResourceData, meta interfac resGroup := id.ResourceGroup name := id.Path["solutions"] - resp, err := client.Delete(ctx, resGroup, name) + future, err := client.Delete(ctx, resGroup, name) + if err != nil { + return fmt.Errorf("Error deleting Log Analytics Solution %q (Resource Group %q): %+v", name, resGroup, err) + } + err = future.WaitForCompletionRef(ctx, client.Client) if err != nil { - if utils.ResponseWasNotFound(resp) { + if response.WasNotFound(future.Response()) { return nil } - return fmt.Errorf("Error issuing AzureRM delete request for Log Analytics Solution '%s': %+v", name, err) + return fmt.Errorf("Error waiting for deletion of Log Analytics Solution %q (Resource Group %q): %+v", name, resGroup, err) } return nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitem.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go similarity index 71% rename from vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitem.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go index a3a3c27d658d..c4949b0fa0bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitem.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go @@ -24,19 +24,19 @@ import ( "net/http" ) -// AnalyticsItemClient is the composite Swagger for Application Insights Management Client -type AnalyticsItemClient struct { +// AnalyticsItemsClient is the composite Swagger for Application Insights Management Client +type AnalyticsItemsClient struct { BaseClient } -// NewAnalyticsItemClient creates an instance of the AnalyticsItemClient client. -func NewAnalyticsItemClient(subscriptionID string) AnalyticsItemClient { - return NewAnalyticsItemClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewAnalyticsItemsClient creates an instance of the AnalyticsItemsClient client. +func NewAnalyticsItemsClient(subscriptionID string) AnalyticsItemsClient { + return NewAnalyticsItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAnalyticsItemClientWithBaseURI creates an instance of the AnalyticsItemClient client. -func NewAnalyticsItemClientWithBaseURI(baseURI string, subscriptionID string) AnalyticsItemClient { - return AnalyticsItemClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewAnalyticsItemsClientWithBaseURI creates an instance of the AnalyticsItemsClient client. +func NewAnalyticsItemsClientWithBaseURI(baseURI string, subscriptionID string) AnalyticsItemsClient { + return AnalyticsItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete deletes a specific Analytics Items defined within an Application Insights component. @@ -47,30 +47,30 @@ func NewAnalyticsItemClientWithBaseURI(baseURI string, subscriptionID string) An // users with access to the Application Insights component. // ID - the Id of a specific item defined in the Application Insights component // name - the name of a specific item defined in the Application Insights component -func (client AnalyticsItemClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (result autorest.Response, err error) { +func (client AnalyticsItemsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, scopePath, ID, name) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Delete", nil, "Failure preparing request") return } resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Delete", resp, "Failure sending request") return } result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Delete", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Delete", resp, "Failure responding to request") } return } // DeletePreparer prepares the Delete request. -func (client AnalyticsItemClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (*http.Request, error) { +func (client AnalyticsItemsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -99,14 +99,14 @@ func (client AnalyticsItemClient) DeletePreparer(ctx context.Context, resourceGr // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client AnalyticsItemClient) DeleteSender(req *http.Request) (*http.Response, error) { +func (client AnalyticsItemsClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client AnalyticsItemClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AnalyticsItemsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -124,30 +124,30 @@ func (client AnalyticsItemClient) DeleteResponder(resp *http.Response) (result a // users with access to the Application Insights component. // ID - the Id of a specific item defined in the Application Insights component // name - the name of a specific item defined in the Application Insights component -func (client AnalyticsItemClient) Get(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (result ApplicationInsightsComponentAnalyticsItem, err error) { +func (client AnalyticsItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (result ApplicationInsightsComponentAnalyticsItem, err error) { req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, scopePath, ID, name) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client AnalyticsItemClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (*http.Request, error) { +func (client AnalyticsItemsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -176,14 +176,14 @@ func (client AnalyticsItemClient) GetPreparer(ctx context.Context, resourceGroup // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client AnalyticsItemClient) GetSender(req *http.Request) (*http.Response, error) { +func (client AnalyticsItemsClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client AnalyticsItemClient) GetResponder(resp *http.Response) (result ApplicationInsightsComponentAnalyticsItem, err error) { +func (client AnalyticsItemsClient) GetResponder(resp *http.Response) (result ApplicationInsightsComponentAnalyticsItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -205,30 +205,30 @@ func (client AnalyticsItemClient) GetResponder(resp *http.Response) (result Appl // typeParameter - enum indicating the type of the Analytics item. // includeContent - flag indicating whether or not to return the content of each applicable item. If false, // only return the item information. -func (client AnalyticsItemClient) List(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, scope ItemScope, typeParameter ItemTypeParameter, includeContent *bool) (result ListApplicationInsightsComponentAnalyticsItem, err error) { +func (client AnalyticsItemsClient) List(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, scope ItemScope, typeParameter ItemTypeParameter, includeContent *bool) (result ListApplicationInsightsComponentAnalyticsItem, err error) { req, err := client.ListPreparer(ctx, resourceGroupName, resourceName, scopePath, scope, typeParameter, includeContent) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "List", resp, "Failure sending request") return } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client AnalyticsItemClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, scope ItemScope, typeParameter ItemTypeParameter, includeContent *bool) (*http.Request, error) { +func (client AnalyticsItemsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, scope ItemScope, typeParameter ItemTypeParameter, includeContent *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -264,14 +264,14 @@ func (client AnalyticsItemClient) ListPreparer(ctx context.Context, resourceGrou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client AnalyticsItemClient) ListSender(req *http.Request) (*http.Response, error) { +func (client AnalyticsItemsClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client AnalyticsItemClient) ListResponder(resp *http.Response) (result ListApplicationInsightsComponentAnalyticsItem, err error) { +func (client AnalyticsItemsClient) ListResponder(resp *http.Response) (result ListApplicationInsightsComponentAnalyticsItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -292,30 +292,30 @@ func (client AnalyticsItemClient) ListResponder(resp *http.Response) (result Lis // Insights component. // overrideItem - flag indicating whether or not to force save an item. This allows overriding an item if it // already exists. -func (client AnalyticsItemClient) Put(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ApplicationInsightsComponentAnalyticsItem, overrideItem *bool) (result ApplicationInsightsComponentAnalyticsItem, err error) { +func (client AnalyticsItemsClient) Put(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ApplicationInsightsComponentAnalyticsItem, overrideItem *bool) (result ApplicationInsightsComponentAnalyticsItem, err error) { req, err := client.PutPreparer(ctx, resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Put", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Put", nil, "Failure preparing request") return } resp, err := client.PutSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Put", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Put", resp, "Failure sending request") return } result, err = client.PutResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "insights.AnalyticsItemClient", "Put", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Put", resp, "Failure responding to request") } return } // PutPreparer prepares the Put request. -func (client AnalyticsItemClient) PutPreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ApplicationInsightsComponentAnalyticsItem, overrideItem *bool) (*http.Request, error) { +func (client AnalyticsItemsClient) PutPreparer(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ApplicationInsightsComponentAnalyticsItem, overrideItem *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -343,14 +343,14 @@ func (client AnalyticsItemClient) PutPreparer(ctx context.Context, resourceGroup // PutSender sends the Put request. The method will close the // http.Response Body if it receives an error. -func (client AnalyticsItemClient) PutSender(req *http.Request) (*http.Response, error) { +func (client AnalyticsItemsClient) PutSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // PutResponder handles the response to the Put request. The method always // closes the http.Response Body. -func (client AnalyticsItemClient) PutResponder(resp *http.Response) (result ApplicationInsightsComponentAnalyticsItem, err error) { +func (client AnalyticsItemsClient) PutResponder(resp *http.Response) (result ApplicationInsightsComponentAnalyticsItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go index 7e548ea9ad83..fab37ef31a3c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go @@ -254,7 +254,7 @@ func (client AnnotationsClient) GetResponder(resp *http.Response) (result ListAn // resourceName - the name of the Application Insights component resource. // start - the start time to query from for annotations, cannot be older than 90 days from current date. // end - the end time to query for annotations. -func (client AnnotationsClient) List(ctx context.Context, resourceGroupName string, resourceName string, start string, end string) (result ListAnnotation, err error) { +func (client AnnotationsClient) List(ctx context.Context, resourceGroupName string, resourceName string, start string, end string) (result AnnotationsListResult, err error) { req, err := client.ListPreparer(ctx, resourceGroupName, resourceName, start, end) if err != nil { err = autorest.NewErrorWithError(err, "insights.AnnotationsClient", "List", nil, "Failure preparing request") @@ -308,12 +308,12 @@ func (client AnnotationsClient) ListSender(req *http.Request) (*http.Response, e // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client AnnotationsClient) ListResponder(resp *http.Response) (result ListAnnotation, err error) { +func (client AnnotationsClient) ListResponder(resp *http.Response) (result AnnotationsListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go index 556529872eba..e52d86e5f36c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go @@ -250,6 +250,75 @@ func (client ComponentsClient) GetResponder(resp *http.Response) (result Applica return } +// GetPurgeStatus get status for an ongoing purge operation. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// purgeID - in a purge status request, this is the Id of the operation the status of which is returned. +func (client ComponentsClient) GetPurgeStatus(ctx context.Context, resourceGroupName string, resourceName string, purgeID string) (result ComponentPurgeStatusResponse, err error) { + req, err := client.GetPurgeStatusPreparer(ctx, resourceGroupName, resourceName, purgeID) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "GetPurgeStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetPurgeStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "GetPurgeStatus", resp, "Failure sending request") + return + } + + result, err = client.GetPurgeStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "GetPurgeStatus", resp, "Failure responding to request") + } + + return +} + +// GetPurgeStatusPreparer prepares the GetPurgeStatus request. +func (client ComponentsClient) GetPurgeStatusPreparer(ctx context.Context, resourceGroupName string, resourceName string, purgeID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "purgeId": autorest.Encode("path", purgeID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPurgeStatusSender sends the GetPurgeStatus request. The method will close the +// http.Response Body if it receives an error. +func (client ComponentsClient) GetPurgeStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetPurgeStatusResponder handles the response to the GetPurgeStatus request. The method always +// closes the http.Response Body. +func (client ComponentsClient) GetPurgeStatusResponder(resp *http.Response) (result ComponentPurgeStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List gets a list of all Application Insights components within a subscription. func (client ComponentsClient) List(ctx context.Context) (result ApplicationInsightsComponentListResultPage, err error) { result.fn = client.listNextResults @@ -438,7 +507,7 @@ func (client ComponentsClient) ListByResourceGroupComplete(ctx context.Context, // resourceGroupName - the name of the resource group. // resourceName - the name of the Application Insights component resource. // body - describes the body of a request to purge data in a single table of an Application Insights component -func (client ComponentsClient) Purge(ctx context.Context, resourceGroupName string, resourceName string, body ComponentPurgeBody) (result ComponentsPurgeFuture, err error) { +func (client ComponentsClient) Purge(ctx context.Context, resourceGroupName string, resourceName string, body ComponentPurgeBody) (result ComponentPurgeResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: body, Constraints: []validation.Constraint{{Target: "body.Table", Name: validation.Null, Rule: true, Chain: nil}, @@ -452,12 +521,18 @@ func (client ComponentsClient) Purge(ctx context.Context, resourceGroupName stri return } - result, err = client.PurgeSender(req) + resp, err := client.PurgeSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "Purge", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "Purge", resp, "Failure sending request") return } + result, err = client.PurgeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "Purge", resp, "Failure responding to request") + } + return } @@ -486,24 +561,14 @@ func (client ComponentsClient) PurgePreparer(ctx context.Context, resourceGroupN // PurgeSender sends the Purge request. The method will close the // http.Response Body if it receives an error. -func (client ComponentsClient) PurgeSender(req *http.Request) (future ComponentsPurgeFuture, err error) { - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, +func (client ComponentsClient) PurgeSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return } // PurgeResponder handles the response to the Purge request. The method always // closes the http.Response Body. -func (client ComponentsClient) PurgeResponder(resp *http.Response) (result SetObject, err error) { +func (client ComponentsClient) PurgeResponder(resp *http.Response) (result ComponentPurgeResponse, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorite.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorite.go deleted file mode 100644 index 298cbefb4801..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorite.go +++ /dev/null @@ -1,322 +0,0 @@ -package insights - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// 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" - "net/http" -) - -// FavoriteClient is the composite Swagger for Application Insights Management Client -type FavoriteClient struct { - BaseClient -} - -// NewFavoriteClient creates an instance of the FavoriteClient client. -func NewFavoriteClient(subscriptionID string) FavoriteClient { - return NewFavoriteClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFavoriteClientWithBaseURI creates an instance of the FavoriteClient client. -func NewFavoriteClientWithBaseURI(baseURI string, subscriptionID string) FavoriteClient { - return FavoriteClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Add adds a new favorites to an Application Insights component. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -// favoriteID - the Id of a specific favorite defined in the Application Insights component -// favoriteProperties - properties that need to be specified to create a new favorite and add it to an -// Application Insights component. -func (client FavoriteClient) Add(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (result ApplicationInsightsComponentFavorite, err error) { - req, err := client.AddPreparer(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Add", nil, "Failure preparing request") - return - } - - resp, err := client.AddSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Add", resp, "Failure sending request") - return - } - - result, err = client.AddResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Add", resp, "Failure responding to request") - } - - return -} - -// AddPreparer prepares the Add request. -func (client FavoriteClient) AddPreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "favoriteId": autorest.Encode("path", favoriteID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", pathParameters), - autorest.WithJSON(favoriteProperties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// AddSender sends the Add request. The method will close the -// http.Response Body if it receives an error. -func (client FavoriteClient) AddSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// AddResponder handles the response to the Add request. The method always -// closes the http.Response Body. -func (client FavoriteClient) AddResponder(resp *http.Response) (result ApplicationInsightsComponentFavorite, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete remove a favorite that is associated to an Application Insights component. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -// favoriteID - the Id of a specific favorite defined in the Application Insights component -func (client FavoriteClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (result autorest.Response, err error) { - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, favoriteID) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Delete", resp, "Failure responding to request") - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FavoriteClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "favoriteId": autorest.Encode("path", favoriteID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", 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 FavoriteClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FavoriteClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get get a single favorite by its FavoriteId, defined within an Application Insights component. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -// favoriteID - the Id of a specific favorite defined in the Application Insights component -func (client FavoriteClient) Get(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (result ApplicationInsightsComponentFavorite, err error) { - req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, favoriteID) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client FavoriteClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "favoriteId": autorest.Encode("path", favoriteID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", 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 FavoriteClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client FavoriteClient) GetResponder(resp *http.Response) (result ApplicationInsightsComponentFavorite, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates a favorite that has already been added to an Application Insights component. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -// favoriteID - the Id of a specific favorite defined in the Application Insights component -// favoriteProperties - properties that need to be specified to update the existing favorite. -func (client FavoriteClient) Update(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (result ApplicationInsightsComponentFavorite, err error) { - req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.FavoriteClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client FavoriteClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "favoriteId": autorest.Encode("path", favoriteID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", pathParameters), - autorest.WithJSON(favoriteProperties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client FavoriteClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client FavoriteClient) UpdateResponder(resp *http.Response) (result ApplicationInsightsComponentFavorite, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go index 644e74980cd6..3da83bbe489d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go @@ -39,6 +39,216 @@ func NewFavoritesClientWithBaseURI(baseURI string, subscriptionID string) Favori return FavoritesClient{NewWithBaseURI(baseURI, subscriptionID)} } +// Add adds a new favorites to an Application Insights component. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// favoriteID - the Id of a specific favorite defined in the Application Insights component +// favoriteProperties - properties that need to be specified to create a new favorite and add it to an +// Application Insights component. +func (client FavoritesClient) Add(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (result ApplicationInsightsComponentFavorite, err error) { + req, err := client.AddPreparer(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Add", nil, "Failure preparing request") + return + } + + resp, err := client.AddSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Add", resp, "Failure sending request") + return + } + + result, err = client.AddResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Add", resp, "Failure responding to request") + } + + return +} + +// AddPreparer prepares the Add request. +func (client FavoritesClient) AddPreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "favoriteId": autorest.Encode("path", favoriteID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", pathParameters), + autorest.WithJSON(favoriteProperties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AddSender sends the Add request. The method will close the +// http.Response Body if it receives an error. +func (client FavoritesClient) AddSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// AddResponder handles the response to the Add request. The method always +// closes the http.Response Body. +func (client FavoritesClient) AddResponder(resp *http.Response) (result ApplicationInsightsComponentFavorite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete remove a favorite that is associated to an Application Insights component. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// favoriteID - the Id of a specific favorite defined in the Application Insights component +func (client FavoritesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, favoriteID) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FavoritesClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "favoriteId": autorest.Encode("path", favoriteID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", 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 FavoritesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FavoritesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a single favorite by its FavoriteId, defined within an Application Insights component. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// favoriteID - the Id of a specific favorite defined in the Application Insights component +func (client FavoritesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (result ApplicationInsightsComponentFavorite, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, favoriteID) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client FavoritesClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "favoriteId": autorest.Encode("path", favoriteID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", 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 FavoritesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FavoritesClient) GetResponder(resp *http.Response) (result ApplicationInsightsComponentFavorite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List gets a list of favorites defined within an Application Insights component. // Parameters: // resourceGroupName - the name of the resource group. @@ -125,3 +335,75 @@ func (client FavoritesClient) ListResponder(resp *http.Response) (result ListApp result.Response = autorest.Response{Response: resp} return } + +// Update updates a favorite that has already been added to an Application Insights component. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// favoriteID - the Id of a specific favorite defined in the Application Insights component +// favoriteProperties - properties that need to be specified to update the existing favorite. +func (client FavoritesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (result ApplicationInsightsComponentFavorite, err error) { + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client FavoritesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "favoriteId": autorest.Encode("path", favoriteID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", pathParameters), + autorest.WithJSON(favoriteProperties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client FavoritesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client FavoritesClient) UpdateResponder(resp *http.Response) (result ApplicationInsightsComponentFavorite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go index 827ee3305899..3222af87998d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go @@ -20,7 +20,6 @@ package insights import ( "encoding/json" "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "net/http" @@ -190,9 +189,9 @@ type PurgeState string const ( // Completed ... - Completed PurgeState = "Completed" + Completed PurgeState = "completed" // Pending ... - Pending PurgeState = "Pending" + Pending PurgeState = "pending" ) // PossiblePurgeStateValues returns an array of possible values for the PurgeState const type. @@ -268,6 +267,13 @@ type AnnotationError struct { Innererror *InnerError `json:"innererror,omitempty"` } +// AnnotationsListResult annotations list result. +type AnnotationsListResult struct { + autorest.Response `json:"-"` + // Value - An array of annotations. + Value *[]Annotation `json:"value,omitempty"` +} + // APIKeyRequest an Application Insights component API Key createion request definition. type APIKeyRequest struct { // Name - The name of the API Key. @@ -876,42 +882,51 @@ type ComponentPurgeBodyFilters struct { // ComponentPurgeResponse response containing operationId for a specific purge action. type ComponentPurgeResponse struct { + autorest.Response `json:"-"` // OperationID - Id to use when querying for status for a particular purge operation. OperationID *string `json:"operationId,omitempty"` } // ComponentPurgeStatusResponse response containing status for a specific purge operation. type ComponentPurgeStatusResponse struct { + autorest.Response `json:"-"` // Status - Status of the operation represented by the requested Id. Possible values include: 'Pending', 'Completed' Status PurgeState `json:"status,omitempty"` } -// ComponentsPurgeFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type ComponentsPurgeFuture struct { - azure.Future +// ComponentsResource an azure resource object +type ComponentsResource struct { + // ID - Azure resource Id + ID *string `json:"id,omitempty"` + // Name - Azure resource name + Name *string `json:"name,omitempty"` + // Type - Azure resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ComponentsPurgeFuture) Result(client ComponentsClient) (so SetObject, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.ComponentsPurgeFuture", "Result", future.Response(), "Polling failure") - return +// MarshalJSON is the custom marshaler for ComponentsResource. +func (cr ComponentsResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cr.ID != nil { + objectMap["id"] = cr.ID } - if !done { - err = azure.NewAsyncOpIncompleteError("insights.ComponentsPurgeFuture") - return + if cr.Name != nil { + objectMap["name"] = cr.Name } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { - so, err = client.PurgeResponder(so.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.ComponentsPurgeFuture", "Result", so.Response.Response, "Failure responding to request") - } + if cr.Type != nil { + objectMap["type"] = cr.Type } - return + if cr.Location != nil { + objectMap["location"] = cr.Location + } + if cr.Tags != nil { + objectMap["tags"] = cr.Tags + } + return json.Marshal(objectMap) } // ErrorFieldContract error Field contract. @@ -981,12 +996,6 @@ type ListApplicationInsightsComponentProactiveDetectionConfiguration struct { Value *[]ApplicationInsightsComponentProactiveDetectionConfiguration `json:"value,omitempty"` } -// ListWorkItemConfiguration ... -type ListWorkItemConfiguration struct { - autorest.Response `json:"-"` - Value *[]WorkItemConfiguration `json:"value,omitempty"` -} - // Operation CDN REST API operation type Operation struct { // Name - Operation name: {provider}/{resource}/{operation} @@ -1108,41 +1117,6 @@ func (page OperationListResultPage) Values() []Operation { return *page.olr.Value } -// Resource an azure resource object -type Resource struct { - // ID - Azure resource Id - ID *string `json:"id,omitempty"` - // Name - Azure resource name - Name *string `json:"name,omitempty"` - // Type - Azure resource type - Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.ID != nil { - objectMap["id"] = r.ID - } - if r.Name != nil { - objectMap["name"] = r.Name - } - if r.Type != nil { - objectMap["type"] = r.Type - } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - // SetObject ... type SetObject struct { autorest.Response `json:"-"` @@ -1430,6 +1404,41 @@ type WebTestPropertiesConfiguration struct { WebTest *string `json:"WebTest,omitempty"` } +// WebtestsResource an azure resource object +type WebtestsResource struct { + // ID - Azure resource Id + ID *string `json:"id,omitempty"` + // Name - Azure resource name + Name *string `json:"name,omitempty"` + // Type - Azure resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for WebtestsResource. +func (wr WebtestsResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wr.ID != nil { + objectMap["id"] = wr.ID + } + if wr.Name != nil { + objectMap["name"] = wr.Name + } + if wr.Type != nil { + objectMap["type"] = wr.Type + } + if wr.Location != nil { + objectMap["location"] = wr.Location + } + if wr.Tags != nil { + objectMap["tags"] = wr.Tags + } + return json.Marshal(objectMap) +} + // Workbook an Application Insights workbook definition. type Workbook struct { autorest.Response `json:"-"` @@ -1588,8 +1597,43 @@ type WorkbookProperties struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` } -// Workbooks workbook list result. -type Workbooks struct { +// WorkbookResource an azure resource object +type WorkbookResource struct { + // ID - Azure resource Id + ID *string `json:"id,omitempty"` + // Name - Azure resource name + Name *string `json:"name,omitempty"` + // Type - Azure resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for WorkbookResource. +func (wr WorkbookResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wr.ID != nil { + objectMap["id"] = wr.ID + } + if wr.Name != nil { + objectMap["name"] = wr.Name + } + if wr.Type != nil { + objectMap["type"] = wr.Type + } + if wr.Location != nil { + objectMap["location"] = wr.Location + } + if wr.Tags != nil { + objectMap["tags"] = wr.Tags + } + return json.Marshal(objectMap) +} + +// WorkbooksListResult workbook list result. +type WorkbooksListResult struct { autorest.Response `json:"-"` // Value - An array of workbooks. Value *[]Workbook `json:"value,omitempty"` @@ -1619,6 +1663,13 @@ type WorkItemConfigurationError struct { Innererror *InnerError `json:"innererror,omitempty"` } +// WorkItemConfigurationsListResult work item configuration list result. +type WorkItemConfigurationsListResult struct { + autorest.Response `json:"-"` + // Value - An array of work item configurations. + Value *[]WorkItemConfiguration `json:"value,omitempty"` +} + // WorkItemCreateConfiguration work item configuration creation payload type WorkItemCreateConfiguration struct { // ConnectorID - Unique connector id diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbook.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbook.go deleted file mode 100644 index 65e002ea71fb..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbook.go +++ /dev/null @@ -1,326 +0,0 @@ -package insights - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// 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" - "net/http" -) - -// WorkbookClient is the composite Swagger for Application Insights Management Client -type WorkbookClient struct { - BaseClient -} - -// NewWorkbookClient creates an instance of the WorkbookClient client. -func NewWorkbookClient(subscriptionID string) WorkbookClient { - return NewWorkbookClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkbookClientWithBaseURI creates an instance of the WorkbookClient client. -func NewWorkbookClientWithBaseURI(baseURI string, subscriptionID string) WorkbookClient { - return WorkbookClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create a new workbook. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -// workbookProperties - properties that need to be specified to create a new workbook. -func (client WorkbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (result Workbook, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: workbookProperties, - Constraints: []validation.Constraint{{Target: "workbookProperties.WorkbookProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "workbookProperties.WorkbookProperties.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "workbookProperties.WorkbookProperties.SerializedData", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "workbookProperties.WorkbookProperties.WorkbookID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "workbookProperties.WorkbookProperties.Category", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "workbookProperties.WorkbookProperties.UserID", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("insights.WorkbookClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, workbookProperties) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "CreateOrUpdate", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WorkbookClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - 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}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", pathParameters), - autorest.WithJSON(workbookProperties), - 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 WorkbookClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client WorkbookClient) CreateOrUpdateResponder(resp *http.Response) (result Workbook, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a workbook. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -func (client WorkbookClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) { - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Delete", resp, "Failure responding to request") - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client WorkbookClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", 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 WorkbookClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client WorkbookClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get get a single workbook by its resourceName. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -func (client WorkbookClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Workbook, err error) { - req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkbookClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", 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 WorkbookClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkbookClient) GetResponder(resp *http.Response) (result Workbook, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates a workbook that has already been added. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the Application Insights component resource. -// workbookProperties - properties that need to be specified to create a new workbook. -func (client WorkbookClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (result Workbook, err error) { - req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, workbookProperties) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "insights.WorkbookClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client WorkbookClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", pathParameters), - autorest.WithJSON(workbookProperties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client WorkbookClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client WorkbookClient) UpdateResponder(resp *http.Response) (result Workbook, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go index 46e4f0d82c87..7dc771d3813d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -39,6 +40,221 @@ func NewWorkbooksClientWithBaseURI(baseURI string, subscriptionID string) Workbo return WorkbooksClient{NewWithBaseURI(baseURI, subscriptionID)} } +// CreateOrUpdate create a new workbook. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// workbookProperties - properties that need to be specified to create a new workbook. +func (client WorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (result Workbook, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: workbookProperties, + Constraints: []validation.Constraint{{Target: "workbookProperties.WorkbookProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "workbookProperties.WorkbookProperties.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "workbookProperties.WorkbookProperties.SerializedData", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "workbookProperties.WorkbookProperties.WorkbookID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "workbookProperties.WorkbookProperties.Category", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "workbookProperties.WorkbookProperties.UserID", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("insights.WorkbooksClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, workbookProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkbooksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + 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}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", pathParameters), + autorest.WithJSON(workbookProperties), + 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 WorkbooksClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkbooksClient) CreateOrUpdateResponder(resp *http.Response) (result Workbook, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a workbook. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +func (client WorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkbooksClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", 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 WorkbooksClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkbooksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a single workbook by its resourceName. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +func (client WorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Workbook, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkbooksClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", 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 WorkbooksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkbooksClient) GetResponder(resp *http.Response) (result Workbook, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListByResourceGroup get all Workbooks defined within a specified resource group and category. // Parameters: // resourceGroupName - the name of the resource group. @@ -46,7 +262,7 @@ func NewWorkbooksClientWithBaseURI(baseURI string, subscriptionID string) Workbo // tags - tags presents on each workbook returned. // canFetchContent - flag indicating whether or not to return the full content for each applicable workbook. If // false, only return summary content for workbooks. -func (client WorkbooksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, category CategoryType, tags []string, canFetchContent *bool) (result Workbooks, err error) { +func (client WorkbooksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, category CategoryType, tags []string, canFetchContent *bool) (result WorkbooksListResult, err error) { req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, category, tags, canFetchContent) if err != nil { err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "ListByResourceGroup", nil, "Failure preparing request") @@ -104,7 +320,77 @@ func (client WorkbooksClient) ListByResourceGroupSender(req *http.Request) (*htt // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client WorkbooksClient) ListByResourceGroupResponder(resp *http.Response) (result Workbooks, err error) { +func (client WorkbooksClient) ListByResourceGroupResponder(resp *http.Response) (result WorkbooksListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a workbook that has already been added. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the Application Insights component resource. +// workbookProperties - properties that need to be specified to create a new workbook. +func (client WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (result Workbook, err error) { + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, workbookProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client WorkbooksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", pathParameters), + autorest.WithJSON(workbookProperties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client WorkbooksClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client WorkbooksClient) UpdateResponder(resp *http.Response) (result Workbook, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go index a8bab87a38b5..1c4e259ec45f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go @@ -251,7 +251,7 @@ func (client WorkItemConfigurationsClient) GetDefaultResponder(resp *http.Respon // Parameters: // resourceGroupName - the name of the resource group. // resourceName - the name of the Application Insights component resource. -func (client WorkItemConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result ListWorkItemConfiguration, err error) { +func (client WorkItemConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result WorkItemConfigurationsListResult, err error) { req, err := client.ListPreparer(ctx, resourceGroupName, resourceName) if err != nil { err = autorest.NewErrorWithError(err, "insights.WorkItemConfigurationsClient", "List", nil, "Failure preparing request") @@ -303,12 +303,12 @@ func (client WorkItemConfigurationsClient) ListSender(req *http.Request) (*http. // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client WorkItemConfigurationsClient) ListResponder(resp *http.Response) (result ListWorkItemConfiguration, err error) { +func (client WorkItemConfigurationsClient) ListResponder(resp *http.Response) (result WorkItemConfigurationsListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go index 037f73a92408..5d3b9f1d1d05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go @@ -41,13 +41,16 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC } // CreateOrUpdate create or update automation account. -// -// resourceGroupName is the resource group name. automationAccountName is parameters supplied to the create or -// update automation account. parameters is parameters supplied to the create or update automation account. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// parameters - parameters supplied to the create or update automation account. func (client AccountClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AccountClient", "CreateOrUpdate", err.Error()) } @@ -116,12 +119,15 @@ func (client AccountClient) CreateOrUpdateResponder(resp *http.Response) (result } // Delete delete an automation account. -// -// resourceGroupName is the resource group name. automationAccountName is automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client AccountClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AccountClient", "Delete", err.Error()) } @@ -187,12 +193,15 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores } // Get get information about an Automation Account. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client AccountClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AccountClient", "Get", err.Error()) } @@ -349,12 +358,14 @@ func (client AccountClient) ListComplete(ctx context.Context) (result AccountLis } // ListByResourceGroup retrieve a list of accounts within a given resource group. -// -// resourceGroupName is the resource group name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. func (client AccountClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AccountClient", "ListByResourceGroup", err.Error()) } @@ -448,13 +459,16 @@ func (client AccountClient) ListByResourceGroupComplete(ctx context.Context, res } // Update update an automation account. -// -// resourceGroupName is the resource group name. automationAccountName is automation account name. parameters is -// parameters supplied to the update automation account. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// parameters - parameters supplied to the update automation account. func (client AccountClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AccountClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go index ac9db9eb863f..9cb37f954224 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go @@ -41,13 +41,17 @@ func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) Activit } // Get retrieve the activity in the module identified by module name and activity name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the name of module. activityName is the name of activity. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the name of module. +// activityName - the name of activity. func (client ActivityClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ActivityClient", "Get", err.Error()) } @@ -116,13 +120,16 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity, } // ListByModule retrieve a list of activities in the module identified by module name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the name of module. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the name of module. func (client ActivityClient) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ActivityClient", "ListByModule", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go index 365936df4f91..ac1fc3e08727 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go @@ -42,12 +42,15 @@ func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscripti } // Get retrieve the automation agent registration information. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client AgentRegistrationInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AgentRegistrationInformationClient", "Get", err.Error()) } @@ -114,13 +117,16 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons } // RegenerateKey regenerate a primary or secondary agent registration key -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. parameters -// is the name of the agent registration key to be regenerated +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// parameters - the name of the agent registration key to be regenerated func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.AgentRegistrationInformationClient", "RegenerateKey", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go index 11a65b7c908b..bb46d3d1e975 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go @@ -41,14 +41,17 @@ func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) Cert } // CreateOrUpdate create a certificate. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// certificateName is the parameters supplied to the create or update certificate operation. parameters is the -// parameters supplied to the create or update certificate operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// certificateName - the parameters supplied to the create or update certificate operation. +// parameters - the parameters supplied to the create or update certificate operation. func (client CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CertificateCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -122,13 +125,16 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re } // Delete delete the certificate. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// certificateName is the name of certificate. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// certificateName - the name of certificate. func (client CertificateClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CertificateClient", "Delete", err.Error()) } @@ -195,13 +201,16 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut } // Get retrieve the certificate identified by certificate name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// certificateName is the name of certificate. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// certificateName - the name of certificate. func (client CertificateClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CertificateClient", "Get", err.Error()) } @@ -269,12 +278,15 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif } // ListByAutomationAccount retrieve a list of certificates. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client CertificateClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CertificateClient", "ListByAutomationAccount", err.Error()) } @@ -369,14 +381,17 @@ func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Cont } // Update update a certificate. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// certificateName is the parameters supplied to the update certificate operation. parameters is the parameters -// supplied to the update certificate operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// certificateName - the parameters supplied to the update certificate operation. +// parameters - the parameters supplied to the update certificate operation. func (client CertificateClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CertificateClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go index 39287927d6eb..f29f9359388a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go @@ -41,14 +41,17 @@ func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) Conne } // CreateOrUpdate create or update a connection. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionName is the parameters supplied to the create or update connection operation. parameters is the -// parameters supplied to the create or update connection operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionName - the parameters supplied to the create or update connection operation. +// parameters - the parameters supplied to the create or update connection operation. func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ConnectionCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -122,13 +125,16 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res } // Delete delete the connection. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionName is the name of connection. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionName - the name of connection. func (client ConnectionClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionClient", "Delete", err.Error()) } @@ -196,13 +202,16 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn } // Get retrieve the connection identified by connection name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionName is the name of connection. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionName - the name of connection. func (client ConnectionClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionClient", "Get", err.Error()) } @@ -270,12 +279,15 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect } // ListByAutomationAccount retrieve a list of connections. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionClient", "ListByAutomationAccount", err.Error()) } @@ -370,14 +382,17 @@ func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Conte } // Update update a connection. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionName is the parameters supplied to the update a connection operation. parameters is the parameters -// supplied to the update a connection operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionName - the parameters supplied to the update a connection operation. +// parameters - the parameters supplied to the update a connection operation. func (client ConnectionClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go index a5ce642d08d0..7ec6c994a39b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go @@ -41,14 +41,17 @@ func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) C } // CreateOrUpdate create a connectiontype. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionTypeName is the parameters supplied to the create or update connectiontype operation. parameters is -// the parameters supplied to the create or update connectiontype operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionTypeName - the parameters supplied to the create or update connectiontype operation. +// parameters - the parameters supplied to the create or update connectiontype operation. func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ConnectionTypeCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -122,13 +125,16 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response) } // Delete delete the connectiontype. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionTypeName is the name of connectiontype. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionTypeName - the name of connectiontype. func (client ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionTypeClient", "Delete", err.Error()) } @@ -195,13 +201,16 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result } // Get retrieve the connectiontype identified by connectiontype name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// connectionTypeName is the name of connectiontype. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// connectionTypeName - the name of connectiontype. func (client ConnectionTypeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionTypeClient", "Get", err.Error()) } @@ -269,12 +278,15 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con } // ListByAutomationAccount retrieve a list of connectiontypes. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ConnectionTypeClient", "ListByAutomationAccount", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go index 11f696368414..c54ccec48327 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go @@ -41,14 +41,17 @@ func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) Crede } // CreateOrUpdate create a credential. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// credentialName is the parameters supplied to the create or update credential operation. parameters is the -// parameters supplied to the create or update credential operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// credentialName - the parameters supplied to the create or update credential operation. +// parameters - the parameters supplied to the create or update credential operation. func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CredentialCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -124,13 +127,16 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res } // Delete delete the credential. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// credentialName is the name of credential. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// credentialName - the name of credential. func (client CredentialClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CredentialClient", "Delete", err.Error()) } @@ -197,13 +203,16 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto } // Get retrieve the credential identified by credential name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// credentialName is the name of credential. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// credentialName - the name of credential. func (client CredentialClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CredentialClient", "Get", err.Error()) } @@ -271,12 +280,15 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent } // ListByAutomationAccount retrieve a list of credentials. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client CredentialClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CredentialClient", "ListByAutomationAccount", err.Error()) } @@ -371,14 +383,17 @@ func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Conte } // Update update a credential. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// credentialName is the parameters supplied to the Update credential operation. parameters is the parameters -// supplied to the Update credential operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// credentialName - the parameters supplied to the Update credential operation. +// parameters - the parameters supplied to the Update credential operation. func (client CredentialClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.CredentialClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go index 148d7c66aebb..3ed11e06bc91 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go @@ -42,14 +42,17 @@ func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string } // Create creates the Dsc compilation job of the configuration. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// compilationJobID is the the DSC configuration Id. parameters is the parameters supplied to the create -// compilation job operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// compilationJobID - the the DSC configuration Id. +// parameters - the parameters supplied to the create compilation job operation. func (client DscCompilationJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DscCompilationJobCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DscCompilationJobCreateProperties.Configuration", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { @@ -122,13 +125,16 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu } // Get retrieve the Dsc configuration compilation job identified by job id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// compilationJobID is the Dsc configuration compilation job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// compilationJobID - the Dsc configuration compilation job id. func (client DscCompilationJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscCompilationJobClient", "Get", err.Error()) } @@ -196,13 +202,17 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result } // GetStream retrieve the job stream identified by job stream id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. jobStreamID is the job stream id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. +// jobStreamID - the job stream id. func (client DscCompilationJobClient) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscCompilationJobClient", "GetStream", err.Error()) } @@ -271,13 +281,16 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r } // ListByAutomationAccount retrieve a list of dsc compilation jobs. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is -// the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscCompilationJobClient", "ListByAutomationAccount", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go index 6e103018fe4c..4b3723035159 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go @@ -42,13 +42,16 @@ func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID } // ListByJob retrieve all the job streams for the compilation Job. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result JobStreamListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscCompilationJobStreamClient", "ListByJob", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go index bd6e51e2fa8e..72c361a04d08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go @@ -41,14 +41,17 @@ func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) } // CreateOrUpdate create the configuration identified by configuration name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// configurationName is the create or update parameters for configuration. parameters is the create or update -// parameters for configuration. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// configurationName - the create or update parameters for configuration. +// parameters - the create or update parameters for configuration. func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DscConfigurationCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DscConfigurationCreateOrUpdateProperties.Source", Name: validation.Null, Rule: true, @@ -127,13 +130,16 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response } // Delete delete the dsc configuration identified by configuration name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// configurationName is the configuration name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// configurationName - the configuration name. func (client DscConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscConfigurationClient", "Delete", err.Error()) } @@ -200,13 +206,16 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul } // Get retrieve the configuration identified by configuration name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// configurationName is the configuration name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// configurationName - the configuration name. func (client DscConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscConfigurationClient", "Get", err.Error()) } @@ -274,13 +283,16 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D } // GetContent retrieve the configuration script identified by configuration name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// configurationName is the configuration name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// configurationName - the configuration name. func (client DscConfigurationClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscConfigurationClient", "GetContent", err.Error()) } @@ -348,17 +360,24 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r } // ListByAutomationAccount retrieve a list of configurations. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultPage, err error) { +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. +// skip - the number of rows to skip. +// top - the the number of rows to take. +// inlinecount - return total rows. +func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result DscConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscConfigurationClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter, skip, top, inlinecount) if err != nil { err = autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -380,7 +399,7 @@ func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -391,6 +410,18 @@ func (client DscConfigurationClient) ListByAutomationAccountPreparer(ctx context queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if skip != nil { + queryParameters["$skip"] = autorest.Encode("query", *skip) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(inlinecount) > 0 { + queryParameters["$inlinecount"] = autorest.Encode("query", inlinecount) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -442,20 +473,23 @@ func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResu } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result DscConfigurationListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result DscConfigurationListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter, skip, top, inlinecount) return } // Update create the configuration identified by configuration name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// configurationName is the create or update parameters for configuration. parameters is the create or update -// parameters for configuration. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// configurationName - the create or update parameters for configuration. +// parameters - the create or update parameters for configuration. func (client DscConfigurationClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters *DscConfigurationUpdateParameters) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscConfigurationClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go index a51206bccabe..e61c56e58c50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go @@ -41,13 +41,16 @@ func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeC } // Delete delete the dsc node identified by node id. -// -// resourceGroupName is the resource group name. automationAccountName is automation account name. nodeID is the -// node id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeID - the node id. func (client DscNodeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeClient", "Delete", err.Error()) } @@ -115,13 +118,16 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode } // Get retrieve the dsc node identified by node id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is -// the node id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeID - the node id. func (client DscNodeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeClient", "Get", err.Error()) } @@ -189,13 +195,16 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e } // ListByAutomationAccount retrieve a list of dsc nodes. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is -// the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeClient", "ListByAutomationAccount", err.Error()) } @@ -293,13 +302,17 @@ func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, } // Update update the dsc node. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is -// parameters supplied to the update dsc node. parameters is parameters supplied to the update dsc node. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeID - parameters supplied to the update dsc node. +// parameters - parameters supplied to the update dsc node. func (client DscNodeClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go index e2684c9b1552..dc292bbd8b59 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go @@ -41,14 +41,17 @@ func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID str } // CreateOrUpdate create the node configuration identified by node configuration name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// nodeConfigurationName is the create or update parameters for configuration. parameters is the create or update -// parameters for configuration. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeConfigurationName - the create or update parameters for configuration. +// parameters - the create or update parameters for configuration. func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Source.Hash", Name: validation.Null, Rule: false, @@ -127,13 +130,16 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp } // Delete delete the Dsc node configurations by node configuration. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// nodeConfigurationName is the Dsc node configuration name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeConfigurationName - the Dsc node configuration name. func (client DscNodeConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeConfigurationClient", "Delete", err.Error()) } @@ -200,13 +206,16 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r } // Get retrieve the Dsc node configurations by node configuration. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// nodeConfigurationName is the Dsc node configuration name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeConfigurationName - the Dsc node configuration name. func (client DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeConfigurationClient", "Get", err.Error()) } @@ -274,13 +283,16 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu } // ListByAutomationAccount retrieve a list of dsc node configurations. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is -// the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.DscNodeConfigurationClient", "ListByAutomationAccount", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go index 756ad090d914..61c80c6ebc5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go @@ -41,13 +41,17 @@ func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsCli } // ListByType retrieve a list of fields of a given type identified by module name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the name of module. typeName is the name of type. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the name of module. +// typeName - the name of type. func (client FieldsClient) ListByType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.FieldsClient", "ListByType", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go index d480a44178ce..86bd913bf4df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go @@ -41,13 +41,16 @@ func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID } // Delete delete a hybrid runbook worker group. -// -// resourceGroupName is the resource group name. automationAccountName is automation account name. -// hybridRunbookWorkerGroupName is the hybrid runbook worker group name +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// hybridRunbookWorkerGroupName - the hybrid runbook worker group name func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.HybridRunbookWorkerGroupClient", "Delete", err.Error()) } @@ -114,13 +117,16 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response } // Get retrieve a hybrid runbook worker group. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// hybridRunbookWorkerGroupName is the hybrid runbook worker group name +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// hybridRunbookWorkerGroupName - the hybrid runbook worker group name func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.HybridRunbookWorkerGroupClient", "Get", err.Error()) } @@ -188,17 +194,21 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) ( } // ListByAutomationAccount retrieve a list of hybrid runbook worker groups. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultPage, err error) { +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result HybridRunbookWorkerGroupsListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.HybridRunbookWorkerGroupClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -220,7 +230,7 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -231,6 +241,9 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountPreparer(ctx queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -282,20 +295,23 @@ func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults( } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result HybridRunbookWorkerGroupsListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } // Update update a hybrid runbook worker group. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// hybridRunbookWorkerGroupName is the hybrid runbook worker group name parameters is the hybrid runbook worker -// group +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// hybridRunbookWorkerGroupName - the hybrid runbook worker group name +// parameters - the hybrid runbook worker group func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.HybridRunbookWorkerGroupClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go index 72cd180f957b..cc3e1d1cfd84 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go @@ -42,13 +42,17 @@ func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { } // Create create a job of the runbook. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. parameters is the parameters supplied to the create job operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. +// parameters - the parameters supplied to the create job operation. func (client JobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.JobCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.JobCreateProperties.Runbook", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { @@ -121,13 +125,16 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er } // Get retrieve the job identified by job id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client JobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result Job, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "Get", err.Error()) } @@ -195,13 +202,16 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error } // GetOutput retrieve the job output identified by job id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client JobClient) GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "GetOutput", err.Error()) } @@ -268,13 +278,16 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos } // GetRunbookContent retrieve the runbook content of the job identified by job id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client JobClient) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "GetRunbookContent", err.Error()) } @@ -341,13 +354,16 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result } // ListByAutomationAccount retrieve a list of jobs. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is -// the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. func (client JobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "ListByAutomationAccount", err.Error()) } @@ -445,13 +461,16 @@ func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, res } // Resume resume the job identified by jobId. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client JobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "Resume", err.Error()) } @@ -518,13 +537,16 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re } // Stop stop the job identified by jobId. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client JobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "Stop", err.Error()) } @@ -591,13 +613,16 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp } // Suspend suspend the job identified by jobId. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. func (client JobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobClient", "Suspend", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go index 4d9819392c1f..1dbcb8ed2537 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go @@ -43,14 +43,17 @@ func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobS } // Create create a job schedule. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// jobScheduleID is the job schedule name. parameters is the parameters supplied to the create job schedule -// operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobScheduleID - the job schedule name. +// parameters - the parameters supplied to the create job schedule operation. func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.JobScheduleCreateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.JobScheduleCreateProperties.Schedule", Name: validation.Null, Rule: true, Chain: nil}, @@ -125,13 +128,16 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job } // Delete delete the job schedule identified by job schedule name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// jobScheduleID is the job schedule name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobScheduleID - the job schedule name. func (client JobScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobScheduleClient", "Delete", err.Error()) } @@ -198,13 +204,16 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut } // Get retrieve the job schedule identified by job schedule name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -// jobScheduleID is the job schedule name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobScheduleID - the job schedule name. func (client JobScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobScheduleClient", "Get", err.Error()) } @@ -272,17 +281,21 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch } // ListByAutomationAccount retrieve a list of job schedules. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. -func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultPage, err error) { +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. +func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobScheduleClient", "ListByAutomationAccount", err.Error()) } result.fn = client.listByAutomationAccountNextResults - req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName) + req, err := client.ListByAutomationAccountPreparer(ctx, resourceGroupName, automationAccountName, filter) if err != nil { err = autorest.NewErrorWithError(err, "automation.JobScheduleClient", "ListByAutomationAccount", nil, "Failure preparing request") return @@ -304,7 +317,7 @@ func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, res } // ListByAutomationAccountPreparer prepares the ListByAutomationAccount request. -func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string) (*http.Request, error) { +func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "automationAccountName": autorest.Encode("path", automationAccountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -315,6 +328,9 @@ func (client JobScheduleClient) ListByAutomationAccountPreparer(ctx context.Cont queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -366,7 +382,7 @@ func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults J } // ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result JobScheduleListResultIterator, err error) { - result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName) +func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobScheduleListResultIterator, err error) { + result.page, err = client.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go index 71d0b27fbbe3..3cc4c6d2b7bf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go @@ -41,13 +41,17 @@ func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStr } // Get retrieve the job stream identified by job stream id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job id. jobStreamID is the job stream id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job id. +// jobStreamID - the job stream id. func (client JobStreamClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobStreamClient", "Get", err.Error()) } @@ -116,13 +120,17 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea } // ListByJob retrieve a list of jobs streams identified by job id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the -// job Id. filter is the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// jobID - the job Id. +// filter - the filter to apply on the operation. func (client JobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.JobStreamClient", "ListByJob", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go index 2f3b9cac4a0d..a063a20de6ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go @@ -41,12 +41,15 @@ func NewKeysClientWithBaseURI(baseURI string, subscriptionID string) KeysClient } // ListByAutomationAccount retrieve the automation keys for an account. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client KeysClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result KeyListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.KeysClient", "ListByAutomationAccount", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go index 07bd7f664551..0ddea23c643f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go @@ -41,12 +41,15 @@ func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) } // Get retrieve the linked workspace for the account id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client LinkedWorkspaceClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result LinkedWorkspace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.LinkedWorkspaceClient", "Get", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go index dcdd6f820004..70f8dfdd7d49 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go @@ -105,6 +105,21 @@ func PossibleDscConfigurationStateValues() []DscConfigurationState { return []DscConfigurationState{DscConfigurationStateEdit, DscConfigurationStateNew, DscConfigurationStatePublished} } +// GroupTypeEnum enumerates the values for group type enum. +type GroupTypeEnum string + +const ( + // System ... + System GroupTypeEnum = "System" + // User ... + User GroupTypeEnum = "User" +) + +// PossibleGroupTypeEnumValues returns an array of possible values for the GroupTypeEnum const type. +func PossibleGroupTypeEnumValues() []GroupTypeEnum { + return []GroupTypeEnum{System, User} +} + // HTTPStatusCode enumerates the values for http status code. type HTTPStatusCode string @@ -296,9 +311,9 @@ type KeyName string const ( // KeyNamePrimary ... - KeyNamePrimary KeyName = "primary" + KeyNamePrimary KeyName = "Primary" // KeyNameSecondary ... - KeyNameSecondary KeyName = "secondary" + KeyNameSecondary KeyName = "Secondary" ) // PossibleKeyNameValues returns an array of possible values for the KeyName const type. @@ -312,11 +327,13 @@ type KeyPermissions string const ( // Full ... Full KeyPermissions = "Full" + // Read ... + Read KeyPermissions = "Read" ) // PossibleKeyPermissionsValues returns an array of possible values for the KeyPermissions const type. func PossibleKeyPermissionsValues() []KeyPermissions { - return []KeyPermissions{Full} + return []KeyPermissions{Full, Read} } // ModuleProvisioningState enumerates the values for module provisioning state. @@ -483,16 +500,16 @@ type Account struct { *AccountProperties `json:"properties,omitempty"` // Etag - Gets or sets the etag of the resource. Etag *string `json:"etag,omitempty"` - // ID - Resource Id + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The Azure Region where the resource lives + Location *string `json:"location,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for Account. @@ -504,6 +521,12 @@ func (a Account) MarshalJSON() ([]byte, error) { if a.Etag != nil { objectMap["etag"] = a.Etag } + if a.Tags != nil { + objectMap["tags"] = a.Tags + } + if a.Location != nil { + objectMap["location"] = a.Location + } if a.ID != nil { objectMap["id"] = a.ID } @@ -513,12 +536,6 @@ func (a Account) MarshalJSON() ([]byte, error) { if a.Type != nil { objectMap["type"] = a.Type } - if a.Location != nil { - objectMap["location"] = a.Location - } - if a.Tags != nil { - objectMap["tags"] = a.Tags - } return json.Marshal(objectMap) } @@ -549,6 +566,24 @@ func (a *Account) UnmarshalJSON(body []byte) error { } a.Etag = &etag } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + a.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + a.Location = &location + } case "id": if v != nil { var ID string @@ -576,24 +611,6 @@ func (a *Account) UnmarshalJSON(body []byte) error { } a.Type = &typeVar } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - a.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - a.Tags = tags - } } } @@ -1081,13 +1098,17 @@ type ActivityParameter struct { // IsDynamic - Gets or sets a Boolean value that indicates true if the parameter is dynamic. IsDynamic *bool `json:"isDynamic,omitempty"` // Position - Gets or sets the position of the activity parameter. - Position *bool `json:"position,omitempty"` + Position *int64 `json:"position,omitempty"` // ValueFromPipeline - Gets or sets a Boolean value that indicates true if the parameter can take values from the incoming pipeline objects. This setting is used if the cmdlet must access the complete input object. false indicates that the parameter cannot take values from the complete input object. ValueFromPipeline *bool `json:"valueFromPipeline,omitempty"` // ValueFromPipelineByPropertyName - Gets or sets a Boolean value that indicates true if the parameter can be filled from a property of the incoming pipeline object that has the same name as this parameter. false indicates that the parameter cannot be filled from the incoming pipeline object property with the same name. ValueFromPipelineByPropertyName *bool `json:"valueFromPipelineByPropertyName,omitempty"` // ValueFromRemainingArguments - Gets or sets a Boolean value that indicates true if the cmdlet parameter accepts all the remaining command-line arguments that are associated with this parameter in the form of an array. false if the cmdlet parameter does not accept all the remaining argument values. ValueFromRemainingArguments *bool `json:"valueFromRemainingArguments,omitempty"` + // Description - Gets or sets the description of the activity parameter. + Description *string `json:"description,omitempty"` + // ValidationSet - Gets or sets the validation set of activity parameter. + ValidationSet *[]ActivityParameterValidationSet `json:"validationSet,omitempty"` } // ActivityParameterSet definition of the activity parameter set. @@ -1098,6 +1119,12 @@ type ActivityParameterSet struct { Parameters *[]ActivityParameter `json:"parameters,omitempty"` } +// ActivityParameterValidationSet definition of the activity parameter validation set. +type ActivityParameterValidationSet struct { + // MemberValue - Gets or sets the name of the activity parameter validation set member. + MemberValue *string `json:"memberValue,omitempty"` +} + // ActivityProperties properties of the activity. type ActivityProperties struct { // Definition - Gets or sets the user name of the activity. @@ -1128,7 +1155,7 @@ type AdvancedSchedule struct { type AdvancedScheduleMonthlyOccurrence struct { // Occurrence - Occurrence of the week within the month. Must be between 1 and 5 Occurrence *int32 `json:"occurrence,omitempty"` - // Day - Day of the occurrence. Must be one of monday, tuesday, wednesday,thursday, friday, saturday, sunday. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' + // Day - Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' Day ScheduleDay `json:"day,omitempty"` } @@ -1186,19 +1213,22 @@ func (arrkp AgentRegistrationRegenerateKeyParameter) MarshalJSON() ([]byte, erro // Certificate definition of the certificate. type Certificate struct { autorest.Response `json:"-"` - // ID - Gets the id of the resource. + // CertificateProperties - Gets or sets the properties of the certificate. + *CertificateProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Gets the name of the certificate. + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // CertificateProperties - Gets or sets the properties of the certificate. - *CertificateProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for Certificate. func (c Certificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if c.CertificateProperties != nil { + objectMap["properties"] = c.CertificateProperties + } if c.ID != nil { objectMap["id"] = c.ID } @@ -1208,9 +1238,6 @@ func (c Certificate) MarshalJSON() ([]byte, error) { if c.Type != nil { objectMap["type"] = c.Type } - if c.CertificateProperties != nil { - objectMap["properties"] = c.CertificateProperties - } return json.Marshal(objectMap) } @@ -1223,6 +1250,15 @@ func (c *Certificate) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var certificateProperties CertificateProperties + err = json.Unmarshal(*v, &certificateProperties) + if err != nil { + return err + } + c.CertificateProperties = &certificateProperties + } case "id": if v != nil { var ID string @@ -1250,15 +1286,6 @@ func (c *Certificate) UnmarshalJSON(body []byte) error { } c.Type = &typeVar } - case "properties": - if v != nil { - var certificateProperties CertificateProperties - err = json.Unmarshal(*v, &certificateProperties) - if err != nil { - return err - } - c.CertificateProperties = &certificateProperties - } } } @@ -1511,19 +1538,22 @@ type CertificateUpdateProperties struct { // Connection definition of the connection. type Connection struct { autorest.Response `json:"-"` - // ID - Gets the id of the resource. + // ConnectionProperties - Gets or sets the properties of the connection. + *ConnectionProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Gets the name of the connection. + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // ConnectionProperties - Gets or sets the properties of the connection. - *ConnectionProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for Connection. func (c Connection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if c.ConnectionProperties != nil { + objectMap["properties"] = c.ConnectionProperties + } if c.ID != nil { objectMap["id"] = c.ID } @@ -1533,9 +1563,6 @@ func (c Connection) MarshalJSON() ([]byte, error) { if c.Type != nil { objectMap["type"] = c.Type } - if c.ConnectionProperties != nil { - objectMap["properties"] = c.ConnectionProperties - } return json.Marshal(objectMap) } @@ -1548,6 +1575,15 @@ func (c *Connection) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var connectionProperties ConnectionProperties + err = json.Unmarshal(*v, &connectionProperties) + if err != nil { + return err + } + c.ConnectionProperties = &connectionProperties + } case "id": if v != nil { var ID string @@ -1575,15 +1611,6 @@ func (c *Connection) UnmarshalJSON(body []byte) error { } c.Type = &typeVar } - case "properties": - if v != nil { - var connectionProperties ConnectionProperties - err = json.Unmarshal(*v, &connectionProperties) - if err != nil { - return err - } - c.ConnectionProperties = &connectionProperties - } } } @@ -2210,19 +2237,22 @@ type ContentSource struct { // Credential definition of the credential. type Credential struct { autorest.Response `json:"-"` - // ID - Gets the id of the resource. + // CredentialProperties - Gets or sets the properties of the credential. + *CredentialProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Gets the name of the credential. + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // CredentialProperties - Gets or sets the properties of the credential. - *CredentialProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for Credential. func (c Credential) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if c.CredentialProperties != nil { + objectMap["properties"] = c.CredentialProperties + } if c.ID != nil { objectMap["id"] = c.ID } @@ -2232,9 +2262,6 @@ func (c Credential) MarshalJSON() ([]byte, error) { if c.Type != nil { objectMap["type"] = c.Type } - if c.CredentialProperties != nil { - objectMap["properties"] = c.CredentialProperties - } return json.Marshal(objectMap) } @@ -2247,6 +2274,15 @@ func (c *Credential) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var credentialProperties CredentialProperties + err = json.Unmarshal(*v, &credentialProperties) + if err != nil { + return err + } + c.CredentialProperties = &credentialProperties + } case "id": if v != nil { var ID string @@ -2274,15 +2310,6 @@ func (c *Credential) UnmarshalJSON(body []byte) error { } c.Type = &typeVar } - case "properties": - if v != nil { - var credentialProperties CredentialProperties - err = json.Unmarshal(*v, &credentialProperties) - if err != nil { - return err - } - c.CredentialProperties = &credentialProperties - } } } @@ -2534,11 +2561,11 @@ type DscCompilationJob struct { autorest.Response `json:"-"` // DscCompilationJobProperties - Gets or sets the properties of the Dsc Compilation job. *DscCompilationJobProperties `json:"properties,omitempty"` - // ID - Resource Id + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` } @@ -2698,8 +2725,8 @@ type DscCompilationJobCreateProperties struct { Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"` // Parameters - Gets or sets the parameters of the job. Parameters map[string]*string `json:"parameters"` - // NewNodeConfigurationBuildVersionRequired - If a new build version of NodeConfiguration is required. - NewNodeConfigurationBuildVersionRequired *bool `json:"newNodeConfigurationBuildVersionRequired,omitempty"` + // IncrementNodeConfigurationBuild - If a new build version of NodeConfiguration is required. + IncrementNodeConfigurationBuild *bool `json:"incrementNodeConfigurationBuild,omitempty"` } // MarshalJSON is the custom marshaler for DscCompilationJobCreateProperties. @@ -2711,8 +2738,8 @@ func (dcjcp DscCompilationJobCreateProperties) MarshalJSON() ([]byte, error) { if dcjcp.Parameters != nil { objectMap["parameters"] = dcjcp.Parameters } - if dcjcp.NewNodeConfigurationBuildVersionRequired != nil { - objectMap["newNodeConfigurationBuildVersionRequired"] = dcjcp.NewNodeConfigurationBuildVersionRequired + if dcjcp.IncrementNodeConfigurationBuild != nil { + objectMap["incrementNodeConfigurationBuild"] = dcjcp.IncrementNodeConfigurationBuild } return json.Marshal(objectMap) } @@ -2829,8 +2856,8 @@ type DscCompilationJobProperties struct { JobID *uuid.UUID `json:"jobId,omitempty"` // CreationTime - Gets the creation time of the job. CreationTime *date.Time `json:"creationTime,omitempty"` - // ProvisioningState - The current provisioning state of the job. - ProvisioningState *JobProvisioningStateProperty `json:"provisioningState,omitempty"` + // ProvisioningState - The current provisioning state of the job. Possible values include: 'JobProvisioningStateFailed', 'JobProvisioningStateSucceeded', 'JobProvisioningStateSuspended', 'JobProvisioningStateProcessing' + ProvisioningState JobProvisioningState `json:"provisioningState,omitempty"` // RunOn - Gets or sets the runOn which specifies the group name where the job is to be executed. RunOn *string `json:"runOn,omitempty"` // Status - Gets or sets the status of the job. Possible values include: 'JobStatusNew', 'JobStatusActivating', 'JobStatusRunning', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusStopped', 'JobStatusBlocked', 'JobStatusSuspended', 'JobStatusDisconnected', 'JobStatusSuspending', 'JobStatusStopping', 'JobStatusResuming', 'JobStatusRemoving' @@ -2866,7 +2893,7 @@ func (dcjp DscCompilationJobProperties) MarshalJSON() ([]byte, error) { if dcjp.CreationTime != nil { objectMap["creationTime"] = dcjp.CreationTime } - if dcjp.ProvisioningState != nil { + if dcjp.ProvisioningState != "" { objectMap["provisioningState"] = dcjp.ProvisioningState } if dcjp.RunOn != nil { @@ -2906,16 +2933,16 @@ type DscConfiguration struct { *DscConfigurationProperties `json:"properties,omitempty"` // Etag - Gets or sets the etag of the resource. Etag *string `json:"etag,omitempty"` - // ID - Resource Id + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The Azure Region where the resource lives + Location *string `json:"location,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for DscConfiguration. @@ -2927,6 +2954,12 @@ func (dc DscConfiguration) MarshalJSON() ([]byte, error) { if dc.Etag != nil { objectMap["etag"] = dc.Etag } + if dc.Tags != nil { + objectMap["tags"] = dc.Tags + } + if dc.Location != nil { + objectMap["location"] = dc.Location + } if dc.ID != nil { objectMap["id"] = dc.ID } @@ -2936,12 +2969,6 @@ func (dc DscConfiguration) MarshalJSON() ([]byte, error) { if dc.Type != nil { objectMap["type"] = dc.Type } - if dc.Location != nil { - objectMap["location"] = dc.Location - } - if dc.Tags != nil { - objectMap["tags"] = dc.Tags - } return json.Marshal(objectMap) } @@ -2972,6 +2999,24 @@ func (dc *DscConfiguration) UnmarshalJSON(body []byte) error { } dc.Etag = &etag } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dc.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dc.Location = &location + } case "id": if v != nil { var ID string @@ -2999,24 +3044,6 @@ func (dc *DscConfiguration) UnmarshalJSON(body []byte) error { } dc.Type = &typeVar } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dc.Tags = tags - } } } @@ -3153,6 +3180,8 @@ type DscConfigurationListResult struct { Value *[]DscConfiguration `json:"value,omitempty"` // NextLink - Gets or sets the next link. NextLink *string `json:"nextLink,omitempty"` + // TotalCount - Gets the total number of configurations matching filter criteria. + TotalCount *int32 `json:"totalCount,omitempty"` } // DscConfigurationListResultIterator provides access to a complete listing of DscConfiguration values. @@ -3278,6 +3307,8 @@ type DscConfigurationProperties struct { CreationTime *date.Time `json:"creationTime,omitempty"` // LastModifiedTime - Gets or sets the last modified time. LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // NodeConfigurationCount - Gets the number of compiled node configurations. + NodeConfigurationCount *int32 `json:"nodeConfigurationCount,omitempty"` // Description - Gets or sets the description. Description *string `json:"description,omitempty"` } @@ -3309,6 +3340,9 @@ func (dcp DscConfigurationProperties) MarshalJSON() ([]byte, error) { if dcp.LastModifiedTime != nil { objectMap["lastModifiedTime"] = dcp.LastModifiedTime } + if dcp.NodeConfigurationCount != nil { + objectMap["nodeConfigurationCount"] = dcp.NodeConfigurationCount + } if dcp.Description != nil { objectMap["description"] = dcp.Description } @@ -3421,11 +3455,11 @@ type DscNode struct { Etag *string `json:"etag,omitempty"` // ExtensionHandler - Gets or sets the list of extensionHandler properties for a Node. ExtensionHandler *[]DscNodeExtensionHandlerAssociationProperty `json:"extensionHandler,omitempty"` - // ID - Resource Id + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` } @@ -3438,11 +3472,11 @@ type DscNodeConfiguration struct { CreationTime *date.Time `json:"creationTime,omitempty"` // Configuration - Gets or sets the configuration of the node. Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"` - // ID - Resource Id + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` } @@ -3457,12 +3491,12 @@ type DscNodeConfigurationAssociationProperty struct { type DscNodeConfigurationCreateOrUpdateParameters struct { // Source - Gets or sets the source. Source *ContentSource `json:"source,omitempty"` - // Name - Gets or sets the type of the parameter. + // Name - Name of the node configuration. Name *string `json:"name,omitempty"` // Configuration - Gets or sets the configuration of the node. Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"` - // NewNodeConfigurationBuildVersionRequired - If a new build version of NodeConfiguration is required. - NewNodeConfigurationBuildVersionRequired *bool `json:"newNodeConfigurationBuildVersionRequired,omitempty"` + // IncrementNodeConfigurationBuild - If a new build version of NodeConfiguration is required. + IncrementNodeConfigurationBuild *bool `json:"incrementNodeConfigurationBuild,omitempty"` } // DscNodeConfigurationListResult the response model for the list job operation. @@ -3902,6 +3936,8 @@ type HybridRunbookWorker struct { IP *string `json:"ip,omitempty"` // RegistrationTime - Gets or sets the registration time of the worker machine. RegistrationTime *date.Time `json:"registrationTime,omitempty"` + // LastSeenDateTime - Last Heartbeat from the Worker + LastSeenDateTime *date.Time `json:"lastSeenDateTime,omitempty"` } // HybridRunbookWorkerGroup definition of hybrid runbook worker group. @@ -3915,6 +3951,8 @@ type HybridRunbookWorkerGroup struct { HybridRunbookWorkers *[]HybridRunbookWorker `json:"hybridRunbookWorkers,omitempty"` // Credential - Sets the credential of a worker group. Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"` + // GroupType - Type of the HybridWorkerGroup. Possible values include: 'User', 'System' + GroupType GroupTypeEnum `json:"groupType,omitempty"` } // HybridRunbookWorkerGroupsListResult the response model for the list hybrid runbook worker groups. @@ -4274,8 +4312,12 @@ type JobProperties struct { LastStatusModifiedTime *date.Time `json:"lastStatusModifiedTime,omitempty"` // Parameters - Gets or sets the parameters of the job. Parameters map[string]*string `json:"parameters"` - // ProvisioningState - The provisioning state of a resource. - ProvisioningState *JobProvisioningStateProperty `json:"provisioningState,omitempty"` + // ProvisioningState - The provisioning state of a resource. Possible values include: 'JobProvisioningStateFailed', 'JobProvisioningStateSucceeded', 'JobProvisioningStateSuspended', 'JobProvisioningStateProcessing' + ProvisioningState JobProvisioningState `json:"provisioningState,omitempty"` + // JobScheduleID - Gets or sets the id of job schedule. + JobScheduleID *string `json:"jobScheduleId,omitempty"` + // Schedule - Gets or sets the runbook. + Schedule *ScheduleAssociationProperty `json:"schedule,omitempty"` } // MarshalJSON is the custom marshaler for JobProperties. @@ -4320,18 +4362,18 @@ func (jp JobProperties) MarshalJSON() ([]byte, error) { if jp.Parameters != nil { objectMap["parameters"] = jp.Parameters } - if jp.ProvisioningState != nil { + if jp.ProvisioningState != "" { objectMap["provisioningState"] = jp.ProvisioningState } + if jp.JobScheduleID != nil { + objectMap["jobScheduleId"] = jp.JobScheduleID + } + if jp.Schedule != nil { + objectMap["schedule"] = jp.Schedule + } return json.Marshal(objectMap) } -// JobProvisioningStateProperty the provisioning state property. -type JobProvisioningStateProperty struct { - // ProvisioningState - The provisioning state of the resource. Possible values include: 'JobProvisioningStateFailed', 'JobProvisioningStateSucceeded', 'JobProvisioningStateSuspended', 'JobProvisioningStateProcessing' - ProvisioningState JobProvisioningState `json:"provisioningState,omitempty"` -} - // JobSchedule definition of the job schedule. type JobSchedule struct { autorest.Response `json:"-"` @@ -4819,18 +4861,18 @@ func (jsp JobStreamProperties) MarshalJSON() ([]byte, error) { // Key automation key which is used to register a DSC Node type Key struct { // KeyName - Automation key name. Possible values include: 'KeyNamePrimary', 'KeyNameSecondary' - KeyName KeyName `json:"keyName,omitempty"` - // Permissions - Automation key permissions. Possible values include: 'Full' - Permissions KeyPermissions `json:"permissions,omitempty"` + KeyName KeyName `json:"KeyName,omitempty"` + // Permissions - Automation key permissions. Possible values include: 'Read', 'Full' + Permissions KeyPermissions `json:"Permissions,omitempty"` // Value - Value of the Automation Key used for registration. - Value *string `json:"value,omitempty"` + Value *string `json:"Value,omitempty"` } // KeyListResult ... type KeyListResult struct { autorest.Response `json:"-"` - // Value - Lists the automation keys. - Value *[]Key `json:"value,omitempty"` + // Keys - Lists the automation keys. + Keys *[]Key `json:"keys,omitempty"` } // LinkedWorkspace definition of the linked workspace. @@ -4847,16 +4889,16 @@ type Module struct { *ModuleProperties `json:"properties,omitempty"` // Etag - Gets or sets the etag of the resource. Etag *string `json:"etag,omitempty"` - // ID - Resource Id + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The Azure Region where the resource lives + Location *string `json:"location,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for Module. @@ -4868,6 +4910,12 @@ func (mVar Module) MarshalJSON() ([]byte, error) { if mVar.Etag != nil { objectMap["etag"] = mVar.Etag } + if mVar.Tags != nil { + objectMap["tags"] = mVar.Tags + } + if mVar.Location != nil { + objectMap["location"] = mVar.Location + } if mVar.ID != nil { objectMap["id"] = mVar.ID } @@ -4877,12 +4925,6 @@ func (mVar Module) MarshalJSON() ([]byte, error) { if mVar.Type != nil { objectMap["type"] = mVar.Type } - if mVar.Location != nil { - objectMap["location"] = mVar.Location - } - if mVar.Tags != nil { - objectMap["tags"] = mVar.Tags - } return json.Marshal(objectMap) } @@ -4913,6 +4955,24 @@ func (mVar *Module) UnmarshalJSON(body []byte) error { } mVar.Etag = &etag } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mVar.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mVar.Location = &location + } case "id": if v != nil { var ID string @@ -4940,24 +5000,6 @@ func (mVar *Module) UnmarshalJSON(body []byte) error { } mVar.Type = &typeVar } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - mVar.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mVar.Tags = tags - } } } @@ -5183,6 +5225,8 @@ type ModuleProperties struct { LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` // Description - Gets or sets the description. Description *string `json:"description,omitempty"` + // IsComposite - Gets or sets type of module, if its composite or not. + IsComposite *bool `json:"isComposite,omitempty"` } // ModuleUpdateParameters the parameters supplied to the update module operation. @@ -5297,13 +5341,13 @@ type OperationListResult struct { Value *[]Operation `json:"value,omitempty"` } -// ProxyResource the Resource definition. +// ProxyResource ARM proxy resource. type ProxyResource struct { - // ID - Resource Id + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` } @@ -5313,39 +5357,14 @@ type ReadCloser struct { Value *io.ReadCloser `json:"value,omitempty"` } -// Resource the Resource definition. +// Resource the core properties of ARM resources type Resource struct { - // ID - Resource Id + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.ID != nil { - objectMap["id"] = r.ID - } - if r.Name != nil { - objectMap["name"] = r.Name - } - if r.Type != nil { - objectMap["type"] = r.Type - } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) } // RunAsCredentialAssociationProperty definition of runas credential to use for hybrid worker. @@ -5361,16 +5380,16 @@ type Runbook struct { *RunbookProperties `json:"properties,omitempty"` // Etag - Gets or sets the etag of the resource. Etag *string `json:"etag,omitempty"` - // ID - Resource Id + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The Azure Region where the resource lives + Location *string `json:"location,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for Runbook. @@ -5382,6 +5401,12 @@ func (r Runbook) MarshalJSON() ([]byte, error) { if r.Etag != nil { objectMap["etag"] = r.Etag } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + if r.Location != nil { + objectMap["location"] = r.Location + } if r.ID != nil { objectMap["id"] = r.ID } @@ -5391,12 +5416,6 @@ func (r Runbook) MarshalJSON() ([]byte, error) { if r.Type != nil { objectMap["type"] = r.Type } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } return json.Marshal(objectMap) } @@ -5427,6 +5446,24 @@ func (r *Runbook) UnmarshalJSON(body []byte) error { } r.Etag = &etag } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + r.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + r.Location = &location + } case "id": if v != nil { var ID string @@ -5454,24 +5491,6 @@ func (r *Runbook) UnmarshalJSON(body []byte) error { } r.Type = &typeVar } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - r.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - r.Tags = tags - } } } @@ -5605,7 +5624,7 @@ type RunbookCreateOrUpdateProperties struct { LogActivityTrace *int32 `json:"logActivityTrace,omitempty"` } -// RunbookDraft definition of the runbook type. +// RunbookDraft ... type RunbookDraft struct { autorest.Response `json:"-"` // InEdit - Gets or sets whether runbook is in edit mode. @@ -5649,12 +5668,11 @@ func (rd RunbookDraft) MarshalJSON() ([]byte, error) { // RunbookDraftPublishFuture an abstraction for monitoring and retrieving the results of a long-running operation. type RunbookDraftPublishFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future RunbookDraftPublishFuture) Result(client RunbookDraftClient) (s String, err error) { +func (future *RunbookDraftPublishFuture) Result(client RunbookDraftClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -5662,35 +5680,10 @@ func (future RunbookDraftPublishFuture) Result(client RunbookDraftClient) (s Str return } if !done { - return s, azure.NewAsyncOpIncompleteError("automation.RunbookDraftPublishFuture") - } - if future.PollingMethod() == azure.PollingLocation { - s, err = client.PublishResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.RunbookDraftPublishFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("automation.RunbookDraftPublishFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.RunbookDraftPublishFuture", "Result", resp, "Failure sending request") - return - } - s, err = client.PublishResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.RunbookDraftPublishFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } @@ -5698,12 +5691,11 @@ func (future RunbookDraftPublishFuture) Result(client RunbookDraftClient) (s Str // operation. type RunbookDraftReplaceContentFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future RunbookDraftReplaceContentFuture) Result(client RunbookDraftClient) (s String, err error) { +func (future *RunbookDraftReplaceContentFuture) Result(client RunbookDraftClient) (s String, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -5711,34 +5703,15 @@ func (future RunbookDraftReplaceContentFuture) Result(client RunbookDraftClient) return } if !done { - return s, azure.NewAsyncOpIncompleteError("automation.RunbookDraftReplaceContentFuture") - } - if future.PollingMethod() == azure.PollingLocation { - s, err = client.ReplaceContentResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.RunbookDraftReplaceContentFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("automation.RunbookDraftReplaceContentFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.ReplaceContentResponder(s.Response.Response) if err != nil { - return + err = autorest.NewErrorWithError(err, "automation.RunbookDraftReplaceContentFuture", "Result", s.Response.Response, "Failure responding to request") } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.RunbookDraftReplaceContentFuture", "Result", resp, "Failure sending request") - return - } - s, err = client.ReplaceContentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "automation.RunbookDraftReplaceContentFuture", "Result", resp, "Failure responding to request") } return } @@ -6046,19 +6019,22 @@ type RunbookUpdateProperties struct { // Schedule definition of the schedule. type Schedule struct { autorest.Response `json:"-"` - // ID - Gets the id of the resource. + // ScheduleProperties - Gets or sets the properties of the schedule. + *ScheduleProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Gets name of the schedule. + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // ScheduleProperties - Gets or sets the properties of the schedule. - *ScheduleProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for Schedule. func (s Schedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if s.ScheduleProperties != nil { + objectMap["properties"] = s.ScheduleProperties + } if s.ID != nil { objectMap["id"] = s.ID } @@ -6068,9 +6044,6 @@ func (s Schedule) MarshalJSON() ([]byte, error) { if s.Type != nil { objectMap["type"] = s.Type } - if s.ScheduleProperties != nil { - objectMap["properties"] = s.ScheduleProperties - } return json.Marshal(objectMap) } @@ -6083,6 +6056,15 @@ func (s *Schedule) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var scheduleProperties ScheduleProperties + err = json.Unmarshal(*v, &scheduleProperties) + if err != nil { + return err + } + s.ScheduleProperties = &scheduleProperties + } case "id": if v != nil { var ID string @@ -6110,15 +6092,6 @@ func (s *Schedule) UnmarshalJSON(body []byte) error { } s.Type = &typeVar } - case "properties": - if v != nil { - var scheduleProperties ScheduleProperties - err = json.Unmarshal(*v, &scheduleProperties) - if err != nil { - return err - } - s.ScheduleProperties = &scheduleProperties - } } } @@ -6127,13 +6100,13 @@ func (s *Schedule) UnmarshalJSON(body []byte) error { // ScheduleAssociationProperty the schedule property associated with the entity. type ScheduleAssociationProperty struct { - // Name - Gets or sets the name of the schedule. + // Name - Gets or sets the name of the Schedule. Name *string `json:"name,omitempty"` } // ScheduleCreateOrUpdateParameters the parameters supplied to the create or update schedule operation. type ScheduleCreateOrUpdateParameters struct { - // Name - Gets or sets the name of the schedule. + // Name - Gets or sets the name of the Schedule. Name *string `json:"name,omitempty"` // ScheduleCreateOrUpdateProperties - Gets or sets the list of schedule properties. *ScheduleCreateOrUpdateProperties `json:"properties,omitempty"` @@ -6338,7 +6311,7 @@ type ScheduleProperties struct { // ScheduleUpdateParameters the parameters supplied to the update schedule operation. type ScheduleUpdateParameters struct { - // Name - Gets or sets the name of the schedule. + // Name - Gets or sets the name of the Schedule. Name *string `json:"name,omitempty"` // ScheduleUpdateProperties - Gets or sets the list of schedule properties. *ScheduleUpdateProperties `json:"properties,omitempty"` @@ -6440,12 +6413,6 @@ type String struct { Value *string `json:"value,omitempty"` } -// SubResource the Sub Resource definition. -type SubResource struct { - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - // TestJob definition of the test job. type TestJob struct { autorest.Response `json:"-"` @@ -6532,6 +6499,41 @@ func (tjcp TestJobCreateParameters) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// TrackedResource the resource model definition for a ARM tracked top level resource +type TrackedResource struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The Azure Region where the resource lives + Location *string `json:"location,omitempty"` + // ID - Fully qualified resource Id for the resource + ID *string `json:"id,omitempty"` + // Name - The name of the resource + Name *string `json:"name,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + if tr.Location != nil { + objectMap["location"] = tr.Location + } + if tr.ID != nil { + objectMap["id"] = tr.ID + } + if tr.Name != nil { + objectMap["name"] = tr.Name + } + if tr.Type != nil { + objectMap["type"] = tr.Type + } + return json.Marshal(objectMap) +} + // TypeField information about a field of a type. type TypeField struct { // Name - Gets or sets the name of the field. @@ -6581,19 +6583,22 @@ type UsageListResult struct { // Variable definition of the varible. type Variable struct { autorest.Response `json:"-"` - // ID - Gets the id of the resource. + // VariableProperties - Gets or sets the properties of the variable. + *VariableProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Gets the name of the variable. + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // VariableProperties - Gets or sets the properties of the variable. - *VariableProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for Variable. func (vVar Variable) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if vVar.VariableProperties != nil { + objectMap["properties"] = vVar.VariableProperties + } if vVar.ID != nil { objectMap["id"] = vVar.ID } @@ -6603,9 +6608,6 @@ func (vVar Variable) MarshalJSON() ([]byte, error) { if vVar.Type != nil { objectMap["type"] = vVar.Type } - if vVar.VariableProperties != nil { - objectMap["properties"] = vVar.VariableProperties - } return json.Marshal(objectMap) } @@ -6618,6 +6620,15 @@ func (vVar *Variable) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var variableProperties VariableProperties + err = json.Unmarshal(*v, &variableProperties) + if err != nil { + return err + } + vVar.VariableProperties = &variableProperties + } case "id": if v != nil { var ID string @@ -6645,15 +6656,6 @@ func (vVar *Variable) UnmarshalJSON(body []byte) error { } vVar.Type = &typeVar } - case "properties": - if v != nil { - var variableProperties VariableProperties - err = json.Unmarshal(*v, &variableProperties) - if err != nil { - return err - } - vVar.VariableProperties = &variableProperties - } } } @@ -6903,19 +6905,22 @@ type VariableUpdateProperties struct { // Webhook definition of the webhook type. type Webhook struct { autorest.Response `json:"-"` - // ID - Gets the id of the resource. + // WebhookProperties - Gets or sets the webhook properties. + *WebhookProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource ID *string `json:"id,omitempty"` - // Name - Gets the name of the webhook. + // Name - The name of the resource Name *string `json:"name,omitempty"` - // Type - Gets the type of the resource. + // Type - The type of the resource. Type *string `json:"type,omitempty"` - // WebhookProperties - Gets or sets the webhook properties. - *WebhookProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for Webhook. func (w Webhook) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if w.WebhookProperties != nil { + objectMap["properties"] = w.WebhookProperties + } if w.ID != nil { objectMap["id"] = w.ID } @@ -6925,9 +6930,6 @@ func (w Webhook) MarshalJSON() ([]byte, error) { if w.Type != nil { objectMap["type"] = w.Type } - if w.WebhookProperties != nil { - objectMap["properties"] = w.WebhookProperties - } return json.Marshal(objectMap) } @@ -6940,6 +6942,15 @@ func (w *Webhook) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var webhookProperties WebhookProperties + err = json.Unmarshal(*v, &webhookProperties) + if err != nil { + return err + } + w.WebhookProperties = &webhookProperties + } case "id": if v != nil { var ID string @@ -6967,15 +6978,6 @@ func (w *Webhook) UnmarshalJSON(body []byte) error { } w.Type = &typeVar } - case "properties": - if v != nil { - var webhookProperties WebhookProperties - err = json.Unmarshal(*v, &webhookProperties) - if err != nil { - return err - } - w.WebhookProperties = &webhookProperties - } } } @@ -7197,6 +7199,8 @@ type WebhookProperties struct { CreationTime *date.Time `json:"creationTime,omitempty"` // LastModifiedTime - Gets or sets the last modified time. LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // LastModifiedBy - Details of the user who last modified the Webhook + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // Description - Gets or sets the description. Description *string `json:"description,omitempty"` } @@ -7231,6 +7235,9 @@ func (wp WebhookProperties) MarshalJSON() ([]byte, error) { if wp.LastModifiedTime != nil { objectMap["lastModifiedTime"] = wp.LastModifiedTime } + if wp.LastModifiedBy != nil { + objectMap["lastModifiedBy"] = wp.LastModifiedBy + } if wp.Description != nil { objectMap["description"] = wp.Description } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go index 929cc72ca68b..d75a0d02f7f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go @@ -41,13 +41,17 @@ func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleCli } // CreateOrUpdate create or Update the module identified by module name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the name of module. parameters is the create or update parameters for module. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the name of module. +// parameters - the create or update parameters for module. func (client ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ModuleCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ModuleCreateOrUpdateProperties.ContentLink", Name: validation.Null, Rule: true, @@ -126,13 +130,16 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result } // Delete delete the module by name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the module name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the module name. func (client ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ModuleClient", "Delete", err.Error()) } @@ -199,13 +206,16 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest } // Get retrieve the module identified by module name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the module name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the module name. func (client ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ModuleClient", "Get", err.Error()) } @@ -273,12 +283,15 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err } // ListByAutomationAccount retrieve a list of modules. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client ModuleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ModuleClient", "ListByAutomationAccount", err.Error()) } @@ -373,13 +386,17 @@ func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, } // Update update the module identified by module name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the name of module. parameters is the update parameters for module. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the name of module. +// parameters - the update parameters for module. func (client ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ModuleClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go index 2cdc9b7ee487..32a8f9af74db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go @@ -41,13 +41,17 @@ func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) Node } // Get retrieve the Dsc node report data by node id and report id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is -// the Dsc node id. reportID is the report id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeID - the Dsc node id. +// reportID - the report id. func (client NodeReportsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.NodeReportsClient", "Get", err.Error()) } @@ -116,13 +120,17 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod } // GetContent retrieve the Dsc node reports by node id and report id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is -// the Dsc node id. reportID is the report id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeID - the Dsc node id. +// reportID - the report id. func (client NodeReportsClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result SetObject, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.NodeReportsClient", "GetContent", err.Error()) } @@ -191,13 +199,17 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result } // ListByNode retrieve the Dsc node report list by node id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is -// the parameters supplied to the list operation. filter is the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// nodeID - the parameters supplied to the list operation. +// filter - the filter to apply on the operation. func (client NodeReportsClient) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.NodeReportsClient", "ListByNode", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go index 80f1cb735be0..04791f5ad5b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go @@ -41,13 +41,17 @@ func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) } // ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName -// is the name of module. typeName is the name of type. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// moduleName - the name of module. +// typeName - the name of type. func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ObjectDataTypesClient", "ListFieldsByModuleAndType", err.Error()) } @@ -116,13 +120,16 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt } // ListFieldsByType retrieve a list of fields of a given type across all accessible modules. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. typeName is -// the name of type. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// typeName - the name of type. func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ObjectDataTypesClient", "ListFieldsByType", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go index fc316a1d7c9a..af0abb9909f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go @@ -41,14 +41,18 @@ func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookC } // CreateOrUpdate create the runbook identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. parameters is the create or update parameters for runbook. Provide either content link for -// a published runbook or draft, not both. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. +// parameters - the create or update parameters for runbook. Provide either content link for a published +// runbook or draft, not both. func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.RunbookCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.RunbookCreateOrUpdateProperties.Draft", Name: validation.Null, Rule: false, @@ -135,13 +139,16 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result } // Delete delete the runbook by name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client RunbookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookClient", "Delete", err.Error()) } @@ -208,13 +215,16 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores } // Get retrieve the runbook identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client RunbookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookClient", "Get", err.Error()) } @@ -282,13 +292,16 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e } // GetContent retrieve the content of runbook identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client RunbookClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookClient", "GetContent", err.Error()) } @@ -356,12 +369,15 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Str } // ListByAutomationAccount retrieve a list of runbooks. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client RunbookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookClient", "ListByAutomationAccount", err.Error()) } @@ -456,13 +472,17 @@ func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, } // Update update the runbook identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. parameters is the update parameters for runbook. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. +// parameters - the update parameters for runbook. func (client RunbookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go index 4bc9805d5944..b3c0c9ad86f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go @@ -41,13 +41,16 @@ func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) Run } // Get retrieve the runbook draft identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client RunbookDraftClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookDraftClient", "Get", err.Error()) } @@ -115,13 +118,16 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo } // GetContent retrieve the content of runbook draft identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client RunbookDraftClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookDraftClient", "GetContent", err.Error()) } @@ -189,13 +195,16 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul } // Publish publish runbook draft. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the parameters supplied to the publish runbook operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the parameters supplied to the publish runbook operation. func (client RunbookDraftClient) Publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftPublishFuture, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookDraftClient", "Publish", err.Error()) } @@ -239,39 +248,44 @@ func (client RunbookDraftClient) PublishPreparer(ctx context.Context, resourceGr // PublishSender sends the Publish request. The method will close the // http.Response Body if it receives an error. func (client RunbookDraftClient) PublishSender(req *http.Request) (future RunbookDraftPublishFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) return } // PublishResponder handles the response to the Publish request. The method always // closes the http.Response Body. -func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result String, err error) { +func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } // ReplaceContent replaces the runbook draft content. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. runbookContent is the runbook draft content. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. +// runbookContent - the runbook draft content. func (client RunbookDraftClient) ReplaceContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent string) (result RunbookDraftReplaceContentFuture, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookDraftClient", "ReplaceContent", err.Error()) } @@ -317,15 +331,17 @@ func (client RunbookDraftClient) ReplaceContentPreparer(ctx context.Context, res // ReplaceContentSender sends the ReplaceContent request. The method will close the // http.Response Body if it receives an error. func (client RunbookDraftClient) ReplaceContentSender(req *http.Request) (future RunbookDraftReplaceContentFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -343,13 +359,16 @@ func (client RunbookDraftClient) ReplaceContentResponder(resp *http.Response) (r } // UndoEdit undo draft edit to last known published state identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.RunbookDraftClient", "UndoEdit", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go index ee673e96001e..c6635f076f56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go @@ -41,13 +41,17 @@ func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) Schedul } // CreateOrUpdate create a schedule. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName -// is the schedule name. parameters is the parameters supplied to the create or update schedule operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// scheduleName - the schedule name. +// parameters - the parameters supplied to the create or update schedule operation. func (client ScheduleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ScheduleCreateOrUpdateProperties", Name: validation.Null, Rule: true, @@ -121,13 +125,16 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul } // Delete delete the schedule identified by schedule name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName -// is the schedule name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// scheduleName - the schedule name. func (client ScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ScheduleClient", "Delete", err.Error()) } @@ -187,20 +194,23 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } // Get retrieve the schedule identified by schedule name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName -// is the schedule name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// scheduleName - the schedule name. func (client ScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ScheduleClient", "Get", err.Error()) } @@ -268,12 +278,15 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule, } // ListByAutomationAccount retrieve a list of schedules. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ScheduleClient", "ListByAutomationAccount", err.Error()) } @@ -368,13 +381,17 @@ func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context } // Update update the schedule identified by schedule name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName -// is the schedule name. parameters is the parameters supplied to the update schedule operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// scheduleName - the schedule name. +// parameters - the parameters supplied to the update schedule operation. func (client ScheduleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.ScheduleClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go index 4ebfa7f129f5..94c03fd22047 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go @@ -41,13 +41,16 @@ func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) Stati } // ListByAutomationAccount retrieve the statistics for the account. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is -// the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. func (client StatisticsClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result StatisticsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.StatisticsClient", "ListByAutomationAccount", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go index 63af34493587..38da3d182a88 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go @@ -41,14 +41,17 @@ func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobC } // Create create a test job of the runbook. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the parameters supplied to the create test job operation. parameters is the parameters supplied to the create -// test job operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the parameters supplied to the create test job operation. +// parameters - the parameters supplied to the create test job operation. func (client TestJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobClient", "Create", err.Error()) } @@ -118,13 +121,16 @@ func (client TestJobClient) CreateResponder(resp *http.Response) (result TestJob } // Get retrieve the test job for the specified runbook. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client TestJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobClient", "Get", err.Error()) } @@ -192,13 +198,16 @@ func (client TestJobClient) GetResponder(resp *http.Response) (result TestJob, e } // Resume resume the test job. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client TestJobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobClient", "Resume", err.Error()) } @@ -265,13 +274,16 @@ func (client TestJobClient) ResumeResponder(resp *http.Response) (result autores } // Stop stop the test job. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client TestJobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobClient", "Stop", err.Error()) } @@ -338,13 +350,16 @@ func (client TestJobClient) StopResponder(resp *http.Response) (result autorest. } // Suspend suspend the test job. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. func (client TestJobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobClient", "Suspend", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go index 5c7f9707cb26..3e6219040420 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go @@ -41,13 +41,17 @@ func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) T } // Get retrieve a test job stream of the test job identified by runbook name and stream id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. jobStreamID is the job stream id. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. +// jobStreamID - the job stream id. func (client TestJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobStreamsClient", "Get", err.Error()) } @@ -116,13 +120,17 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job } // ListByTestJob retrieve a list of test job streams identified by runbook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName -// is the runbook name. filter is the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// runbookName - the runbook name. +// filter - the filter to apply on the operation. func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.TestJobStreamsClient", "ListByTestJob", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go index 9c8726a20aef..39f4e6b683b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go @@ -41,12 +41,15 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli } // ListByAutomationAccount retrieve the usage for the account id. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client UsagesClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result UsageListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.UsagesClient", "ListByAutomationAccount", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go index e957827d4a3f..df53908dba5e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go @@ -41,13 +41,17 @@ func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) Variabl } // CreateOrUpdate create a variable. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName -// is the variable name. parameters is the parameters supplied to the create or update variable operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// variableName - the variable name. +// parameters - the parameters supplied to the create or update variable operation. func (client VariableClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.VariableCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -120,13 +124,16 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul } // Delete delete the variable. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName -// is the name of variable. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// variableName - the name of variable. func (client VariableClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.VariableClient", "Delete", err.Error()) } @@ -193,13 +200,16 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore } // Get retrieve the variable identified by variable name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName -// is the name of variable. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// variableName - the name of variable. func (client VariableClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.VariableClient", "Get", err.Error()) } @@ -267,12 +277,15 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable, } // ListByAutomationAccount retrieve a list of variables. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client VariableClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.VariableClient", "ListByAutomationAccount", err.Error()) } @@ -367,13 +380,17 @@ func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context } // Update update a variable. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName -// is the variable name. parameters is the parameters supplied to the update variable operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// variableName - the variable name. +// parameters - the parameters supplied to the update variable operation. func (client VariableClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.VariableClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go index e55131849aba..186ab20e4d82 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go @@ -41,13 +41,17 @@ func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookC } // CreateOrUpdate create the webhook identified by webhook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName -// is the webhook name. parameters is the create or update parameters for webhook. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// webhookName - the webhook name. +// parameters - the create or update parameters for webhook. func (client WebhookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, + 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}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.WebhookCreateOrUpdateProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -120,13 +124,16 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result } // Delete delete the webhook by name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName -// is the webhook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// webhookName - the webhook name. func (client WebhookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.WebhookClient", "Delete", err.Error()) } @@ -193,12 +200,15 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores } // GenerateURI generates a Uri for use in creating a webhook. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. func (client WebhookClient) GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.WebhookClient", "GenerateURI", err.Error()) } @@ -265,13 +275,16 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St } // Get retrieve the webhook identified by webhook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName -// is the webhook name. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// webhookName - the webhook name. func (client WebhookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.WebhookClient", "Get", err.Error()) } @@ -339,13 +352,16 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e } // ListByAutomationAccount retrieve a list of webhooks. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is -// the filter to apply on the operation. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// filter - the filter to apply on the operation. func (client WebhookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultPage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.WebhookClient", "ListByAutomationAccount", err.Error()) } @@ -443,13 +459,17 @@ func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, } // Update update the webhook identified by webhook name. -// -// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName -// is the webhook name. parameters is the update parameters for webhook. +// Parameters: +// resourceGroupName - name of an Azure Resource group. +// automationAccountName - the name of the automation account. +// webhookName - the webhook name. +// parameters - the update parameters for webhook. func (client WebhookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + 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("automation.WebhookClient", "Update", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go index 58fc95c6d6cd..fa75356dcb73 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go @@ -129,11 +129,11 @@ func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourc Constraints: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMaximum, Rule: 2147483647, Chain: nil}, + Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: 86400, Chain: nil}, + Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(86400), Chain: nil}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, }}, }}, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index 386d0c64bee2..95869944dd81 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -322,12 +322,12 @@ func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("eventhub.ConsumerGroupsClient", "ListByEventHub", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index 7228f2e33213..4f553202a13e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -64,11 +64,11 @@ func (client EventHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupN Chain: []validation.Constraint{{Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, {Target: "parameters.Properties.CaptureDescription", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMaximum, Rule: 900, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(900), Chain: nil}, {Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 60, Chain: nil}, }}, {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMaximum, Rule: 524288000, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMaximum, Rule: int64(524288000), Chain: nil}, {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMinimum, Rule: 10485760, Chain: nil}, }}, }}, @@ -689,12 +689,12 @@ func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroup {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListByNamespace", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go index 30cfd7c93c37..0cb524f67ec4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go @@ -403,6 +403,8 @@ type ArmDisasterRecoveryProperties struct { AlternateName *string `json:"alternateName,omitempty"` // Role - role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' Role RoleDisasterRecovery `json:"role,omitempty"` + // PendingReplicationOperationsCount - Number of entities pending to be replicated. + PendingReplicationOperationsCount *int64 `json:"pendingReplicationOperationsCount,omitempty"` } // AuthorizationRule single item in a List or Get AuthorizationRule operation diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go index ee8818989074..fb7ed1ddff53 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go @@ -129,13 +129,13 @@ func (client NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroup {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: 20, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}, {Target: "parameters.EHNamespaceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMaximum, Rule: 20, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}}}}); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go index 591a82626708..45879941de4e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go @@ -211,12 +211,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG }}, {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, }}, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go index 73558939d68f..731e99857f56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go @@ -1316,7 +1316,7 @@ func (client BaseClient) GetCertificateIssuers(ctx context.Context, vaultBaseURL if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateIssuers", err.Error()) @@ -1563,7 +1563,7 @@ func (client BaseClient) GetCertificates(ctx context.Context, vaultBaseURL strin if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificates", err.Error()) @@ -1671,7 +1671,7 @@ func (client BaseClient) GetCertificateVersions(ctx context.Context, vaultBaseUR if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateVersions", err.Error()) @@ -1855,7 +1855,7 @@ func (client BaseClient) GetDeletedCertificates(ctx context.Context, vaultBaseUR if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedCertificates", err.Error()) @@ -2035,7 +2035,7 @@ func (client BaseClient) GetDeletedKeys(ctx context.Context, vaultBaseURL string if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedKeys", err.Error()) @@ -2212,7 +2212,7 @@ func (client BaseClient) GetDeletedSecrets(ctx context.Context, vaultBaseURL str if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedSecrets", err.Error()) @@ -2393,7 +2393,7 @@ func (client BaseClient) GetKeys(ctx context.Context, vaultBaseURL string, maxre if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeys", err.Error()) @@ -2501,7 +2501,7 @@ func (client BaseClient) GetKeyVersions(ctx context.Context, vaultBaseURL string if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeyVersions", err.Error()) @@ -2695,7 +2695,7 @@ func (client BaseClient) GetSasDefinitions(ctx context.Context, vaultBaseURL str Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSasDefinitions", err.Error()) @@ -2879,7 +2879,7 @@ func (client BaseClient) GetSecrets(ctx context.Context, vaultBaseURL string, ma if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecrets", err.Error()) @@ -2987,7 +2987,7 @@ func (client BaseClient) GetSecretVersions(ctx context.Context, vaultBaseURL str if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecretVersions", err.Error()) @@ -3174,7 +3174,7 @@ func (client BaseClient) GetStorageAccounts(ctx context.Context, vaultBaseURL st if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetStorageAccounts", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go index 399f505677d4..95fea5137d89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go @@ -240,14 +240,14 @@ type Attributes struct { // BackupKeyResult the backup key result, containing the backup blob. type BackupKeyResult struct { autorest.Response `json:"-"` - // Value - The backup blob containing the backed up key. + // Value - The backup blob containing the backed up key. (a URL-encoded base64 string) Value *string `json:"value,omitempty"` } // BackupSecretResult the backup secret result, containing the backup blob. type BackupSecretResult struct { autorest.Response `json:"-"` - // Value - The backup blob containing the backed up secret. + // Value - The backup blob containing the backed up secret. (a URL-encoded base64 string) Value *string `json:"value,omitempty"` } @@ -276,7 +276,7 @@ type CertificateBundle struct { Kid *string `json:"kid,omitempty"` // Sid - The secret id. Sid *string `json:"sid,omitempty"` - // X509Thumbprint - Thumbprint of the certificate. + // X509Thumbprint - Thumbprint of the certificate. (a URL-encoded base64 string) X509Thumbprint *string `json:"x5t,omitempty"` // Policy - The management policy. Policy *CertificatePolicy `json:"policy,omitempty"` @@ -525,7 +525,7 @@ type CertificateItem struct { Attributes *CertificateAttributes `json:"attributes,omitempty"` // Tags - Application specific metadata in the form of key-value pairs. Tags map[string]*string `json:"tags"` - // X509Thumbprint - Thumbprint of the certificate. + // X509Thumbprint - Thumbprint of the certificate. (a URL-encoded base64 string) X509Thumbprint *string `json:"x5t,omitempty"` } @@ -782,7 +782,7 @@ type DeletedCertificateBundle struct { Kid *string `json:"kid,omitempty"` // Sid - The secret id. Sid *string `json:"sid,omitempty"` - // X509Thumbprint - Thumbprint of the certificate. + // X509Thumbprint - Thumbprint of the certificate. (a URL-encoded base64 string) X509Thumbprint *string `json:"x5t,omitempty"` // Policy - The management policy. Policy *CertificatePolicy `json:"policy,omitempty"` @@ -852,7 +852,7 @@ type DeletedCertificateItem struct { Attributes *CertificateAttributes `json:"attributes,omitempty"` // Tags - Application specific metadata in the form of key-value pairs. Tags map[string]*string `json:"tags"` - // X509Thumbprint - Thumbprint of the certificate. + // X509Thumbprint - Thumbprint of the certificate. (a URL-encoded base64 string) X509Thumbprint *string `json:"x5t,omitempty"` } @@ -1454,31 +1454,31 @@ type JSONWebKey struct { // Kty - JsonWebKey key type (kty). Possible values include: 'EC', 'ECHSM', 'RSA', 'RSAHSM', 'Oct' Kty JSONWebKeyType `json:"kty,omitempty"` KeyOps *[]string `json:"key_ops,omitempty"` - // N - RSA modulus. + // N - RSA modulus. (a URL-encoded base64 string) N *string `json:"n,omitempty"` - // E - RSA public exponent. + // E - RSA public exponent. (a URL-encoded base64 string) E *string `json:"e,omitempty"` - // D - RSA private exponent, or the D component of an EC private key. + // D - RSA private exponent, or the D component of an EC private key. (a URL-encoded base64 string) D *string `json:"d,omitempty"` - // DP - RSA private key parameter. + // DP - RSA private key parameter. (a URL-encoded base64 string) DP *string `json:"dp,omitempty"` - // DQ - RSA private key parameter. + // DQ - RSA private key parameter. (a URL-encoded base64 string) DQ *string `json:"dq,omitempty"` - // QI - RSA private key parameter. + // QI - RSA private key parameter. (a URL-encoded base64 string) QI *string `json:"qi,omitempty"` - // P - RSA secret prime. + // P - RSA secret prime. (a URL-encoded base64 string) P *string `json:"p,omitempty"` - // Q - RSA secret prime, with p < q. + // Q - RSA secret prime, with p < q. (a URL-encoded base64 string) Q *string `json:"q,omitempty"` - // K - Symmetric key. + // K - Symmetric key. (a URL-encoded base64 string) K *string `json:"k,omitempty"` - // T - HSM Token, used with 'Bring Your Own Key'. + // T - HSM Token, used with 'Bring Your Own Key'. (a URL-encoded base64 string) T *string `json:"key_hsm,omitempty"` // Crv - Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: 'P256', 'P384', 'P521', 'SECP256K1' Crv JSONWebKeyCurveName `json:"crv,omitempty"` - // X - X component of an EC public key. + // X - X component of an EC public key. (a URL-encoded base64 string) X *string `json:"x,omitempty"` - // Y - Y component of an EC public key. + // Y - Y component of an EC public key. (a URL-encoded base64 string) Y *string `json:"y,omitempty"` } @@ -1733,7 +1733,8 @@ func (page KeyListResultPage) Values() []KeyItem { type KeyOperationResult struct { autorest.Response `json:"-"` // Kid - Key identifier - Kid *string `json:"kid,omitempty"` + Kid *string `json:"kid,omitempty"` + // Result - a URL-encoded base64 string Result *string `json:"value,omitempty"` } @@ -1741,7 +1742,8 @@ type KeyOperationResult struct { type KeyOperationsParameters struct { // Algorithm - algorithm identifier. Possible values include: 'RSAOAEP', 'RSAOAEP256', 'RSA15' Algorithm JSONWebKeyEncryptionAlgorithm `json:"alg,omitempty"` - Value *string `json:"value,omitempty"` + // Value - a URL-encoded base64 string + Value *string `json:"value,omitempty"` } // KeyProperties properties of the key pair backing a certificate. @@ -1758,7 +1760,7 @@ type KeyProperties struct { // KeyRestoreParameters the key restore parameters. type KeyRestoreParameters struct { - // KeyBundleBackup - The backup blob associated with a key bundle. + // KeyBundleBackup - The backup blob associated with a key bundle. (a URL-encoded base64 string) KeyBundleBackup *string `json:"value,omitempty"` } @@ -1766,7 +1768,8 @@ type KeyRestoreParameters struct { type KeySignParameters struct { // Algorithm - The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' Algorithm JSONWebKeySignatureAlgorithm `json:"alg,omitempty"` - Value *string `json:"value,omitempty"` + // Value - a URL-encoded base64 string + Value *string `json:"value,omitempty"` } // KeyUpdateParameters the key update parameters. @@ -1797,9 +1800,9 @@ func (kup KeyUpdateParameters) MarshalJSON() ([]byte, error) { type KeyVerifyParameters struct { // Algorithm - The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ECDSA256' Algorithm JSONWebKeySignatureAlgorithm `json:"alg,omitempty"` - // Digest - The digest used for signing. + // Digest - The digest used for signing. (a URL-encoded base64 string) Digest *string `json:"digest,omitempty"` - // Signature - The signature to be verified. + // Signature - The signature to be verified. (a URL-encoded base64 string) Signature *string `json:"value,omitempty"` } @@ -2267,7 +2270,7 @@ type SecretProperties struct { // SecretRestoreParameters the secret restore parameters. type SecretRestoreParameters struct { - // SecretBundleBackup - The backup blob associated with a secret bundle. + // SecretBundleBackup - The backup blob associated with a secret bundle. (a URL-encoded base64 string) SecretBundleBackup *string `json:"value,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go index e697a3fe0937..b1eb5106c0a3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/applicationgateways.go @@ -129,10 +129,16 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetType", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: 128, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, }}, }}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.Bounds", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.Bounds.Min", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.Bounds.Max", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/azurefirewalls.go new file mode 100644 index 000000000000..fd16f434a469 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/azurefirewalls.go @@ -0,0 +1,434 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// AzureFirewallsClient is the network Client +type AzureFirewallsClient struct { + BaseClient +} + +// NewAzureFirewallsClient creates an instance of the AzureFirewallsClient client. +func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { + return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { + return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Azure Firewall. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +// parameters - parameters supplied to the create or update Azure Firewall operation. +func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewallsCreateOrUpdateFuture, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, azureFirewallName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", pathParameters), + autorest.WithJSON(parameters), + 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 AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) CreateOrUpdateResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Azure Firewall. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewallsDeleteFuture, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, azureFirewallName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Azure Firewall. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +func (client AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewall, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, azureFirewallName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) GetResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Azure Firewalls in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client AzureFirewallsClient) List(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultPage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure sending request") + return + } + + result.aflr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls", 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 AzureFirewallsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) ListResponder(resp *http.Response) (result AzureFirewallListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 AzureFirewallsClient) listNextResults(lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) { + req, err := lastResults.azureFirewallListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "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, "network.AzureFirewallsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AzureFirewallsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultIterator, err error) { + result.page, err = client.List(ctx, resourceGroupName) + return +} + +// ListAll gets all the Azure Firewalls in a subscription. +func (client AzureFirewallsClient) ListAll(ctx context.Context) (result AzureFirewallListResultPage, err error) { + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.aflr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure sending request") + return + } + + result.aflr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure responding to request") + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client AzureFirewallsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) ListAllResponder(resp *http.Response) (result AzureFirewallListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAllNextResults retrieves the next set of results, if any. +func (client AzureFirewallsClient) listAllNextResults(lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) { + req, err := lastResults.azureFirewallListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result AzureFirewallListResultIterator, err error) { + result.page, err = client.ListAll(ctx) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go index c35da42b365e..acc7373586d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go @@ -199,7 +199,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Respo return } -// Get gets the specified authorization from the specified express route circuit. +// Get gets the specified peering for the express route circuit. // Parameters: // resourceGroupName - the name of the resource group. // circuitName - the name of the express route circuit. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go new file mode 100644 index 000000000000..3d0779e17fbf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go @@ -0,0 +1,205 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// HubVirtualNetworkConnectionsClient is the network Client +type HubVirtualNetworkConnectionsClient struct { + BaseClient +} + +// NewHubVirtualNetworkConnectionsClient creates an instance of the HubVirtualNetworkConnectionsClient client. +func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetworkConnectionsClient { + return NewHubVirtualNetworkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient +// client. +func NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { + return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves the details of a HubVirtualNetworkConnection. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// connectionName - the name of the vpn connection. +func (client HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result HubVirtualNetworkConnection, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, virtualHubName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", 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 HubVirtualNetworkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) GetResponder(resp *http.Response) (result HubVirtualNetworkConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all HubVirtualNetworkConnections. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client HubVirtualNetworkConnectionsClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultPage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lhvncr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.lhvncr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections", 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 HubVirtualNetworkConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) ListResponder(resp *http.Response) (result ListHubVirtualNetworkConnectionsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 HubVirtualNetworkConnectionsClient) listNextResults(lastResults ListHubVirtualNetworkConnectionsResult) (result ListHubVirtualNetworkConnectionsResult, err error) { + req, err := lastResults.listHubVirtualNetworkConnectionsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "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, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client HubVirtualNetworkConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultIterator, err error) { + result.page, err = client.List(ctx, resourceGroupName, virtualHubName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go index 647dd9674c0a..f2488eb15c4e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/models.go @@ -172,15 +172,19 @@ const ( StandardMedium ApplicationGatewaySkuName = "Standard_Medium" // StandardSmall ... StandardSmall ApplicationGatewaySkuName = "Standard_Small" + // StandardV2 ... + StandardV2 ApplicationGatewaySkuName = "Standard_v2" // WAFLarge ... WAFLarge ApplicationGatewaySkuName = "WAF_Large" // WAFMedium ... WAFMedium ApplicationGatewaySkuName = "WAF_Medium" + // WAFV2 ... + WAFV2 ApplicationGatewaySkuName = "WAF_v2" ) // PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { - return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, WAFLarge, WAFMedium} + return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, StandardV2, WAFLarge, WAFMedium, WAFV2} } // ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. @@ -297,15 +301,19 @@ func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtoc type ApplicationGatewayTier string const ( - // Standard ... - Standard ApplicationGatewayTier = "Standard" - // WAF ... - WAF ApplicationGatewayTier = "WAF" + // ApplicationGatewayTierStandard ... + ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" + // ApplicationGatewayTierStandardV2 ... + ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2" + // ApplicationGatewayTierWAF ... + ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" + // ApplicationGatewayTierWAFV2 ... + ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2" ) // PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type. func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { - return []ApplicationGatewayTier{Standard, WAF} + return []ApplicationGatewayTier{ApplicationGatewayTierStandard, ApplicationGatewayTierStandardV2, ApplicationGatewayTierWAF, ApplicationGatewayTierWAFV2} } // AssociationType enumerates the values for association type. @@ -353,6 +361,56 @@ func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { return []AuthorizationUseStatus{Available, InUse} } +// AzureFirewallApplicationRuleProtocolType enumerates the values for azure firewall application rule protocol +// type. +type AzureFirewallApplicationRuleProtocolType string + +const ( + // AzureFirewallApplicationRuleProtocolTypeHTTP ... + AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" + // AzureFirewallApplicationRuleProtocolTypeHTTPS ... + AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" +) + +// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type. +func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { + return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS} +} + +// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol. +type AzureFirewallNetworkRuleProtocol string + +const ( + // Any ... + Any AzureFirewallNetworkRuleProtocol = "Any" + // ICMP ... + ICMP AzureFirewallNetworkRuleProtocol = "ICMP" + // TCP ... + TCP AzureFirewallNetworkRuleProtocol = "TCP" + // UDP ... + UDP AzureFirewallNetworkRuleProtocol = "UDP" +) + +// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type. +func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { + return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP} +} + +// AzureFirewallRCActionType enumerates the values for azure firewall rc action type. +type AzureFirewallRCActionType string + +const ( + // AzureFirewallRCActionTypeAllow ... + AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" + // AzureFirewallRCActionTypeDeny ... + AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" +) + +// PossibleAzureFirewallRCActionTypeValues returns an array of possible values for the AzureFirewallRCActionType const type. +func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { + return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny} +} + // BgpPeerState enumerates the values for bgp peer state. type BgpPeerState string @@ -524,17 +582,17 @@ func PossibleEffectiveRouteStateValues() []EffectiveRouteState { type EffectiveSecurityRuleProtocol string const ( - // All ... - All EffectiveSecurityRuleProtocol = "All" - // TCP ... - TCP EffectiveSecurityRuleProtocol = "Tcp" - // UDP ... - UDP EffectiveSecurityRuleProtocol = "Udp" + // EffectiveSecurityRuleProtocolAll ... + EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" + // EffectiveSecurityRuleProtocolTCP ... + EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp" + // EffectiveSecurityRuleProtocolUDP ... + EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp" ) // PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type. func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { - return []EffectiveSecurityRuleProtocol{All, TCP, UDP} + return []EffectiveSecurityRuleProtocol{EffectiveSecurityRuleProtocolAll, EffectiveSecurityRuleProtocolTCP, EffectiveSecurityRuleProtocolUDP} } // EvaluationState enumerates the values for evaluation state. @@ -608,15 +666,15 @@ func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily type ExpressRouteCircuitSkuTier string const ( - // ExpressRouteCircuitSkuTierPremium ... - ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" - // ExpressRouteCircuitSkuTierStandard ... - ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" + // Premium ... + Premium ExpressRouteCircuitSkuTier = "Premium" + // Standard ... + Standard ExpressRouteCircuitSkuTier = "Standard" ) // PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { - return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} + return []ExpressRouteCircuitSkuTier{Premium, Standard} } // ExpressRoutePeeringState enumerates the values for express route peering state. @@ -664,6 +722,25 @@ func PossibleHTTPMethodValues() []HTTPMethod { return []HTTPMethod{Get} } +// HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status. +type HubVirtualNetworkConnectionStatus string + +const ( + // HubVirtualNetworkConnectionStatusConnected ... + HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected" + // HubVirtualNetworkConnectionStatusConnecting ... + HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting" + // HubVirtualNetworkConnectionStatusNotConnected ... + HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected" + // HubVirtualNetworkConnectionStatusUnknown ... + HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown" +) + +// PossibleHubVirtualNetworkConnectionStatusValues returns an array of possible values for the HubVirtualNetworkConnectionStatus const type. +func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus { + return []HubVirtualNetworkConnectionStatus{HubVirtualNetworkConnectionStatusConnected, HubVirtualNetworkConnectionStatusConnecting, HubVirtualNetworkConnectionStatusNotConnected, HubVirtualNetworkConnectionStatusUnknown} +} + // IkeEncryption enumerates the values for ike encryption. type IkeEncryption string @@ -1219,6 +1296,25 @@ func PossibleTransportProtocolValues() []TransportProtocol { return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP} } +// TunnelConnectionStatus enumerates the values for tunnel connection status. +type TunnelConnectionStatus string + +const ( + // TunnelConnectionStatusConnected ... + TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected" + // TunnelConnectionStatusConnecting ... + TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting" + // TunnelConnectionStatusNotConnected ... + TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected" + // TunnelConnectionStatusUnknown ... + TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown" +) + +// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type. +func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { + return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown} +} + // VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. type VirtualNetworkGatewayConnectionStatus string @@ -1369,13 +1465,34 @@ type VpnClientProtocol string const ( // IkeV2 ... IkeV2 VpnClientProtocol = "IkeV2" + // OpenVPN ... + OpenVPN VpnClientProtocol = "OpenVPN" // SSTP ... SSTP VpnClientProtocol = "SSTP" ) // PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. func PossibleVpnClientProtocolValues() []VpnClientProtocol { - return []VpnClientProtocol{IkeV2, SSTP} + return []VpnClientProtocol{IkeV2, OpenVPN, SSTP} +} + +// VpnConnectionStatus enumerates the values for vpn connection status. +type VpnConnectionStatus string + +const ( + // VpnConnectionStatusConnected ... + VpnConnectionStatusConnected VpnConnectionStatus = "Connected" + // VpnConnectionStatusConnecting ... + VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" + // VpnConnectionStatusNotConnected ... + VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" + // VpnConnectionStatusUnknown ... + VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" +) + +// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type. +func PossibleVpnConnectionStatusValues() []VpnConnectionStatus { + return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown} } // VpnType enumerates the values for vpn type. @@ -1406,6 +1523,8 @@ type ApplicationGateway struct { *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting where the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - Resource name. @@ -1427,6 +1546,9 @@ func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { if ag.Etag != nil { objectMap["etag"] = ag.Etag } + if ag.Zones != nil { + objectMap["zones"] = ag.Zones + } if ag.ID != nil { objectMap["id"] = ag.ID } @@ -1472,6 +1594,15 @@ func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { } ag.Etag = &etag } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + ag.Zones = &zones + } case "id": if v != nil { var ID string @@ -1626,6 +1757,21 @@ type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } +// ApplicationGatewayAutoscaleBounds application Gateway autoscale bounds on number of Application Gateway +// instance. +type ApplicationGatewayAutoscaleBounds struct { + // Min - Lower bound on number of Application Gateway instances. + Min *int32 `json:"min,omitempty"` + // Max - Upper bound on number of Application Gateway instances. + Max *int32 `json:"max,omitempty"` +} + +// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration. +type ApplicationGatewayAutoscaleConfiguration struct { + // Bounds - Autoscale bounds + Bounds *ApplicationGatewayAutoscaleBounds `json:"bounds,omitempty"` +} + // ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service call. type ApplicationGatewayAvailableSslOptions struct { autorest.Response `json:"-"` @@ -3083,6 +3229,10 @@ type ApplicationGatewayPropertiesFormat struct { WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource. EnableHTTP2 *bool `json:"enableHttp2,omitempty"` + // EnableFips - Whether FIPS is enabled on the application gateway resource. + EnableFips *bool `json:"enableFips,omitempty"` + // AutoscaleConfiguration - Autoscale Configuration. + AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` // ResourceGUID - Resource GUID property of the application gateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. @@ -3400,9 +3550,9 @@ func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGateways // ApplicationGatewaySku SKU of an application gateway type ApplicationGatewaySku struct { - // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge' + // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2' Name ApplicationGatewaySkuName `json:"name,omitempty"` - // Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF' + // Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2' Tier ApplicationGatewayTier `json:"tier,omitempty"` // Capacity - Capacity (instance count) of an application gateway. Capacity *int32 `json:"capacity,omitempty"` @@ -4276,90 +4426,174 @@ type AzureAsyncOperationResult struct { Error *Error `json:"error,omitempty"` } -// AzureReachabilityReport azure reachability report details. -type AzureReachabilityReport struct { - autorest.Response `json:"-"` - // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. - AggregationLevel *string `json:"aggregationLevel,omitempty"` - ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` - // ReachabilityReport - List of Azure reachability report items. - ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` +// AzureFirewall azure Firewall resource +type AzureFirewall struct { + autorest.Response `json:"-"` + *AzureFirewallPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// AzureReachabilityReportItem azure reachability report details for a given provider location. -type AzureReachabilityReportItem struct { - // Provider - The Internet service provider. - Provider *string `json:"provider,omitempty"` - // AzureLocation - The Azure region. - AzureLocation *string `json:"azureLocation,omitempty"` - // Latencies - List of latency details for each of the time series. - Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` +// MarshalJSON is the custom marshaler for AzureFirewall. +func (af AzureFirewall) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if af.AzureFirewallPropertiesFormat != nil { + objectMap["properties"] = af.AzureFirewallPropertiesFormat + } + if af.Etag != nil { + objectMap["etag"] = af.Etag + } + if af.ID != nil { + objectMap["id"] = af.ID + } + if af.Name != nil { + objectMap["name"] = af.Name + } + if af.Type != nil { + objectMap["type"] = af.Type + } + if af.Location != nil { + objectMap["location"] = af.Location + } + if af.Tags != nil { + objectMap["tags"] = af.Tags + } + return json.Marshal(objectMap) } -// AzureReachabilityReportLatencyInfo details on latency for a time series. -type AzureReachabilityReportLatencyInfo struct { - // TimeStamp - The time stamp. - TimeStamp *date.Time `json:"timeStamp,omitempty"` - // Score - The relative latency score between 1 and 100, higher values indicating a faster connection. - Score *int32 `json:"score,omitempty"` -} +// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct. +func (af *AzureFirewall) 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 azureFirewallPropertiesFormat AzureFirewallPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallPropertiesFormat) + if err != nil { + return err + } + af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + af.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + af.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + af.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + af.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + af.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + af.Tags = tags + } + } + } -// AzureReachabilityReportLocation parameters that define a geographic location. -type AzureReachabilityReportLocation struct { - // Country - The name of the country. - Country *string `json:"country,omitempty"` - // State - The name of the state. - State *string `json:"state,omitempty"` - // City - The name of the city or town. - City *string `json:"city,omitempty"` + return nil } -// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. -type AzureReachabilityReportParameters struct { - ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` - // Providers - List of Internet service providers. - Providers *[]string `json:"providers,omitempty"` - // AzureLocations - Optional Azure regions to scope the query to. - AzureLocations *[]string `json:"azureLocations,omitempty"` - // StartTime - The start time for the Azure reachability report. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time for the Azure reachability report. - EndTime *date.Time `json:"endTime,omitempty"` +// AzureFirewallApplicationRule properties of an application rule. +type AzureFirewallApplicationRule struct { + // Name - Name of the application rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // Protocols - Array of ApplicationRuleProtocols. + Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"` + // TargetUrls - List of URLs for this rule. + TargetUrls *[]string `json:"targetUrls,omitempty"` } -// BackendAddressPool pool of backend IP addresses. -type BackendAddressPool struct { - autorest.Response `json:"-"` - // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. - *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` +// AzureFirewallApplicationRuleCollection application rule collection resource +type AzureFirewallApplicationRuleCollection struct { + *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for BackendAddressPool. -func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection. +func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if bap.BackendAddressPoolPropertiesFormat != nil { - objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat + if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil { + objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat } - if bap.Name != nil { - objectMap["name"] = bap.Name + if afarc.Name != nil { + objectMap["name"] = afarc.Name } - if bap.Etag != nil { - objectMap["etag"] = bap.Etag + if afarc.Etag != nil { + objectMap["etag"] = afarc.Etag } - if bap.ID != nil { - objectMap["id"] = bap.ID + if afarc.ID != nil { + objectMap["id"] = afarc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. -func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct. +func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -4369,12 +4603,12 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat - err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) + var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat) if err != nil { return err } - bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat + afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat } case "name": if v != nil { @@ -4383,7 +4617,7 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { if err != nil { return err } - bap.Name = &name + afarc.Name = &name } case "etag": if v != nil { @@ -4392,7 +4626,7 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { if err != nil { return err } - bap.Etag = &etag + afarc.Etag = &etag } case "id": if v != nil { @@ -4401,7 +4635,7 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { if err != nil { return err } - bap.ID = &ID + afarc.ID = &ID } } } @@ -4409,102 +4643,57 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { return nil } -// BackendAddressPoolPropertiesFormat properties of the backend address pool. -type BackendAddressPoolPropertiesFormat struct { - // BackendIPConfigurations - Gets collection of references to IP addresses defined in network interfaces. - BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - // LoadBalancingRules - Gets load balancing rules that use this backend address pool. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // OutboundNatRule - Gets outbound rules that use this backend address pool. - OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"` - // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection. +type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { + // Priority - Priority of the application rule collection resource. + Priority *int32 `json:"priority,omitempty"` + // Action - The action type of a rule collection + Action *AzureFirewallRCAction `json:"action,omitempty"` + // Rules - Collection of rules used by a application rule collection. + Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// BGPCommunity contains bgp community information offered in Service Community resources. -type BGPCommunity struct { - // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. - ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` - // CommunityName - The name of the bgp community. e.g. Skype. - CommunityName *string `json:"communityName,omitempty"` - // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - CommunityValue *string `json:"communityValue,omitempty"` - // CommunityPrefixes - The prefixes that the bgp community contains. - CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` - // IsAuthorizedToUse - Customer is authorized to use bgp community or not. - IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` - // ServiceGroup - The service group of the bgp community contains. - ServiceGroup *string `json:"serviceGroup,omitempty"` +// AzureFirewallApplicationRuleProtocol properties of the application rule protocol. +type AzureFirewallApplicationRuleProtocol struct { + // ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS' + ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"` + // Port - Port number for the protocol, cannot be greater than 64000. This field is optional. + Port *int32 `json:"port,omitempty"` } -// BgpPeerStatus BGP peer status details -type BgpPeerStatus struct { - // LocalAddress - The virtual network gateway's local address - LocalAddress *string `json:"localAddress,omitempty"` - // Neighbor - The remote BGP peer - Neighbor *string `json:"neighbor,omitempty"` - // Asn - The autonomous system number of the remote BGP peer - Asn *int32 `json:"asn,omitempty"` - // State - The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' - State BgpPeerState `json:"state,omitempty"` - // ConnectedDuration - For how long the peering has been up - ConnectedDuration *string `json:"connectedDuration,omitempty"` - // RoutesReceived - The number of routes learned from this peer - RoutesReceived *int64 `json:"routesReceived,omitempty"` - // MessagesSent - The number of BGP messages sent - MessagesSent *int64 `json:"messagesSent,omitempty"` - // MessagesReceived - The number of BGP messages received - MessagesReceived *int64 `json:"messagesReceived,omitempty"` -} - -// BgpPeerStatusListResult response for list BGP peer status API service call -type BgpPeerStatusListResult struct { - autorest.Response `json:"-"` - // Value - List of BGP peers - Value *[]BgpPeerStatus `json:"value,omitempty"` -} - -// BgpServiceCommunity service Community Properties. -type BgpServiceCommunity struct { - *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` +// AzureFirewallIPConfiguration IP configuration of an Azure Firewall. +type AzureFirewallIPConfiguration struct { + *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for BgpServiceCommunity. -func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration. +func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if bsc.BgpServiceCommunityPropertiesFormat != nil { - objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat - } - if bsc.ID != nil { - objectMap["id"] = bsc.ID - } - if bsc.Name != nil { - objectMap["name"] = bsc.Name + if afic.AzureFirewallIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat } - if bsc.Type != nil { - objectMap["type"] = bsc.Type + if afic.Name != nil { + objectMap["name"] = afic.Name } - if bsc.Location != nil { - objectMap["location"] = bsc.Location + if afic.Etag != nil { + objectMap["etag"] = afic.Etag } - if bsc.Tags != nil { - objectMap["tags"] = bsc.Tags + if afic.ID != nil { + objectMap["id"] = afic.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. -func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct. +func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -4514,21 +4703,12 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat - err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) - if err != nil { - return err - } - bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat) if err != nil { return err } - bsc.ID = &ID + afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat } case "name": if v != nil { @@ -4537,34 +4717,25 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { if err != nil { return err } - bsc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bsc.Type = &typeVar + afic.Name = &name } - case "location": + case "etag": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - bsc.Location = &location + afic.Etag = &etag } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - bsc.Tags = tags + afic.ID = &ID } } } @@ -4572,24 +4743,38 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { return nil } -// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. -type BgpServiceCommunityListResult struct { +// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall. +type AzureFirewallIPConfigurationPropertiesFormat struct { + // PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. + Subnet *SubResource `json:"subnet,omitempty"` + // InternalPublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input. + InternalPublicIPAddress *SubResource `json:"internalPublicIpAddress,omitempty"` + // PublicIPAddress - Reference of the PublicIP resource. This field is populated in the output. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// AzureFirewallListResult response for ListAzureFirewalls API service call. +type AzureFirewallListResult struct { autorest.Response `json:"-"` - // Value - A list of service community resources. - Value *[]BgpServiceCommunity `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // Value - List of a Azure Firewalls in a resource group. + Value *[]AzureFirewall `json:"value,omitempty"` + // NextLink - URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity values. -type BgpServiceCommunityListResultIterator struct { +// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values. +type AzureFirewallListResultIterator struct { i int - page BgpServiceCommunityListResultPage + page AzureFirewallListResultPage } // Next 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 *BgpServiceCommunityListResultIterator) Next() error { +func (iter *AzureFirewallListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -4604,120 +4789,123 @@ func (iter *BgpServiceCommunityListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter BgpServiceCommunityListResultIterator) NotDone() bool { +func (iter AzureFirewallListResultIterator) 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 BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { +func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult { 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 BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { +func (iter AzureFirewallListResultIterator) Value() AzureFirewall { if !iter.page.NotDone() { - return BgpServiceCommunity{} + return AzureFirewall{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { - return bsclr.Value == nil || len(*bsclr.Value) == 0 +func (aflr AzureFirewallListResult) IsEmpty() bool { + return aflr.Value == nil || len(*aflr.Value) == 0 } -// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. +// azureFirewallListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer() (*http.Request, error) { - if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { +func (aflr AzureFirewallListResult) azureFirewallListResultPreparer() (*http.Request, error) { + if aflr.NextLink == nil || len(to.String(aflr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(bsclr.NextLink))) + autorest.WithBaseURL(to.String(aflr.NextLink))) } -// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. -type BgpServiceCommunityListResultPage struct { - fn func(BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) - bsclr BgpServiceCommunityListResult +// AzureFirewallListResultPage contains a page of AzureFirewall values. +type AzureFirewallListResultPage struct { + fn func(AzureFirewallListResult) (AzureFirewallListResult, error) + aflr AzureFirewallListResult } // 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. -func (page *BgpServiceCommunityListResultPage) Next() error { - next, err := page.fn(page.bsclr) +func (page *AzureFirewallListResultPage) Next() error { + next, err := page.fn(page.aflr) if err != nil { return err } - page.bsclr = next + page.aflr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page BgpServiceCommunityListResultPage) NotDone() bool { - return !page.bsclr.IsEmpty() +func (page AzureFirewallListResultPage) NotDone() bool { + return !page.aflr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { - return page.bsclr +func (page AzureFirewallListResultPage) Response() AzureFirewallListResult { + return page.aflr } // Values returns the slice of values for the current page or nil if there are no values. -func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { - if page.bsclr.IsEmpty() { +func (page AzureFirewallListResultPage) Values() []AzureFirewall { + if page.aflr.IsEmpty() { return nil } - return *page.bsclr.Value -} - -// BgpServiceCommunityPropertiesFormat properties of Service Community. -type BgpServiceCommunityPropertiesFormat struct { - // ServiceName - The name of the bgp community. e.g. Skype. - ServiceName *string `json:"serviceName,omitempty"` - // BgpCommunities - Get a list of bgp communities. - BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` -} - -// BgpSettings BGP settings details -type BgpSettings struct { - // Asn - The BGP speaker's ASN. - Asn *int64 `json:"asn,omitempty"` - // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - // PeerWeight - The weight added to routes learned from this BGP speaker. - PeerWeight *int32 `json:"peerWeight,omitempty"` + return *page.aflr.Value } -// ConnectionMonitor parameters that define the operation to create a connection monitor. -type ConnectionMonitor struct { - // Location - Connection monitor location. - Location *string `json:"location,omitempty"` - // Tags - Connection monitor tags. - Tags map[string]*string `json:"tags"` - *ConnectionMonitorParameters `json:"properties,omitempty"` +// AzureFirewallNetworkRule properties of the network rule. +type AzureFirewallNetworkRule struct { + // Name - Name of the network rule. + Name *string `json:"name,omitempty"` + // Description - Description of the rule. + Description *string `json:"description,omitempty"` + // Protocols - Array of AzureFirewallNetworkRuleProtocols. + Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` + // SourceAddresses - List of source IP addresses for this rule. + SourceAddresses *[]string `json:"sourceAddresses,omitempty"` + // DestinationAddresses - List of destination IP addresses. + DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` + // DestinationPorts - List of destination ports. + DestinationPorts *[]string `json:"destinationPorts,omitempty"` +} + +// AzureFirewallNetworkRuleCollection network rule collection resource +type AzureFirewallNetworkRuleCollection struct { + *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ConnectionMonitor. -func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection. +func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if cm.Location != nil { - objectMap["location"] = cm.Location + if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil { + objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat } - if cm.Tags != nil { - objectMap["tags"] = cm.Tags + if afnrc.Name != nil { + objectMap["name"] = afnrc.Name } - if cm.ConnectionMonitorParameters != nil { - objectMap["properties"] = cm.ConnectionMonitorParameters + if afnrc.Etag != nil { + objectMap["etag"] = afnrc.Etag + } + if afnrc.ID != nil { + objectMap["id"] = afnrc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. -func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct. +func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -4725,32 +4913,41 @@ func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "location": + case "properties": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat + err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat) if err != nil { return err } - cm.Location = &location + afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat } - case "tags": + case "name": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - cm.Tags = tags + afnrc.Name = &name } - case "properties": + case "etag": if v != nil { - var connectionMonitorParameters ConnectionMonitorParameters - err = json.Unmarshal(*v, &connectionMonitorParameters) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - cm.ConnectionMonitorParameters = &connectionMonitorParameters + afnrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + afnrc.ID = &ID } } } @@ -4758,88 +4955,171 @@ func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { return nil } -// ConnectionMonitorDestination describes the destination of connection monitor. -type ConnectionMonitorDestination struct { - // ResourceID - The ID of the resource used as the destination by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - // Address - Address of the connection monitor destination (IP or domain name). - Address *string `json:"address,omitempty"` - // Port - The destination port used by connection monitor. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorListResult list of connection monitors. -type ConnectionMonitorListResult struct { - autorest.Response `json:"-"` - // Value - Information about connection monitors. - Value *[]ConnectionMonitorResult `json:"value,omitempty"` +// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection. +type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { + // Priority - Priority of the network rule collection resource. + Priority *int32 `json:"priority,omitempty"` + // Action - The action type of a rule collection + Action *AzureFirewallRCAction `json:"action,omitempty"` + // Rules - Collection of rules used by a network rule collection. + Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. -type ConnectionMonitorParameters struct { - Source *ConnectionMonitorSource `json:"source,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - // AutoStart - Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - // MonitoringIntervalInSeconds - Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` +// AzureFirewallPropertiesFormat properties of the Azure Firewall. +type AzureFirewallPropertiesFormat struct { + // ApplicationRuleCollections - Collection of application rule collections used by a Azure Firewall. + ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"` + // NetworkRuleCollections - Collection of network rule collections used by a Azure Firewall. + NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` + // IPConfigurations - IP configuration of the Azure Firewall resource. + IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// ConnectionMonitorQueryResult list of connection states snaphots. -type ConnectionMonitorQueryResult struct { - autorest.Response `json:"-"` - // SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive' - SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` - // States - Information about connection states. - States *[]ConnectionStateSnapshot `json:"states,omitempty"` +// AzureFirewallRCAction properties of the AzureFirewallRCAction. +type AzureFirewallRCAction struct { + // Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny' + Type AzureFirewallRCActionType `json:"type,omitempty"` } -// ConnectionMonitorResult information about the connection monitor. -type ConnectionMonitorResult struct { - autorest.Response `json:"-"` - // Name - Name of the connection monitor. - Name *string `json:"name,omitempty"` - // ID - ID of the connection monitor. - ID *string `json:"id,omitempty"` - Etag *string `json:"etag,omitempty"` - // Type - Connection monitor type. - Type *string `json:"type,omitempty"` - // Location - Connection monitor location. - Location *string `json:"location,omitempty"` - // Tags - Connection monitor tags. - Tags map[string]*string `json:"tags"` - *ConnectionMonitorResultProperties `json:"properties,omitempty"` +// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AzureFirewallsCreateOrUpdateFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for ConnectionMonitorResult. -func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cmr.Name != nil { - objectMap["name"] = cmr.Name +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AzureFirewallsCreateOrUpdateFuture) Result(client AzureFirewallsClient) (af AzureFirewall, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - if cmr.ID != nil { - objectMap["id"] = cmr.ID + if !done { + err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture") + return } - if cmr.Etag != nil { - objectMap["etag"] = cmr.Etag + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent { + af, err = client.CreateOrUpdateResponder(af.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request") + } } - if cmr.Type != nil { - objectMap["type"] = cmr.Type + return +} + +// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type AzureFirewallsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AzureFirewallsDeleteFuture) Result(client AzureFirewallsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure") + return } - if cmr.Location != nil { - objectMap["location"] = cmr.Location + if !done { + err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture") + return } - if cmr.Tags != nil { - objectMap["tags"] = cmr.Tags + ar.Response = future.Response() + return +} + +// AzureReachabilityReport azure reachability report details. +type AzureReachabilityReport struct { + autorest.Response `json:"-"` + // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. + AggregationLevel *string `json:"aggregationLevel,omitempty"` + ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` + // ReachabilityReport - List of Azure reachability report items. + ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` +} + +// AzureReachabilityReportItem azure reachability report details for a given provider location. +type AzureReachabilityReportItem struct { + // Provider - The Internet service provider. + Provider *string `json:"provider,omitempty"` + // AzureLocation - The Azure region. + AzureLocation *string `json:"azureLocation,omitempty"` + // Latencies - List of latency details for each of the time series. + Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` +} + +// AzureReachabilityReportLatencyInfo details on latency for a time series. +type AzureReachabilityReportLatencyInfo struct { + // TimeStamp - The time stamp. + TimeStamp *date.Time `json:"timeStamp,omitempty"` + // Score - The relative latency score between 1 and 100, higher values indicating a faster connection. + Score *int32 `json:"score,omitempty"` +} + +// AzureReachabilityReportLocation parameters that define a geographic location. +type AzureReachabilityReportLocation struct { + // Country - The name of the country. + Country *string `json:"country,omitempty"` + // State - The name of the state. + State *string `json:"state,omitempty"` + // City - The name of the city or town. + City *string `json:"city,omitempty"` +} + +// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. +type AzureReachabilityReportParameters struct { + ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` + // Providers - List of Internet service providers. + Providers *[]string `json:"providers,omitempty"` + // AzureLocations - Optional Azure regions to scope the query to. + AzureLocations *[]string `json:"azureLocations,omitempty"` + // StartTime - The start time for the Azure reachability report. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time for the Azure reachability report. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// BackendAddressPool pool of backend IP addresses. +type BackendAddressPool struct { + autorest.Response `json:"-"` + // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. + *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for BackendAddressPool. +func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bap.BackendAddressPoolPropertiesFormat != nil { + objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat } - if cmr.ConnectionMonitorResultProperties != nil { - objectMap["properties"] = cmr.ConnectionMonitorResultProperties + if bap.Name != nil { + objectMap["name"] = bap.Name + } + if bap.Etag != nil { + objectMap["etag"] = bap.Etag + } + if bap.ID != nil { + objectMap["id"] = bap.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. -func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. +func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -4847,23 +5127,23 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "name": + case "properties": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat + err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) if err != nil { return err } - cmr.Name = &name + bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat } - case "id": + case "name": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - cmr.ID = &ID + bap.Name = &name } case "etag": if v != nil { @@ -4872,43 +5152,16 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - cmr.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cmr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - cmr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - cmr.Tags = tags + bap.Etag = &etag } - case "properties": + case "id": if v != nil { - var connectionMonitorResultProperties ConnectionMonitorResultProperties - err = json.Unmarshal(*v, &connectionMonitorResultProperties) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties + bap.ID = &ID } } } @@ -4916,262 +5169,64 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { return nil } -// ConnectionMonitorResultProperties describes the properties of a connection monitor. -type ConnectionMonitorResultProperties struct { - // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // StartTime - The date and time when the connection monitor was started. - StartTime *date.Time `json:"startTime,omitempty"` - // MonitoringStatus - The monitoring status of the connection monitor. - MonitoringStatus *string `json:"monitoringStatus,omitempty"` - Source *ConnectionMonitorSource `json:"source,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - // AutoStart - Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - // MonitoringIntervalInSeconds - Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` -} - -// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ConnectionMonitorsCreateOrUpdateFuture struct { - azure.Future +// BackendAddressPoolPropertiesFormat properties of the backend address pool. +type BackendAddressPoolPropertiesFormat struct { + // BackendIPConfigurations - Gets collection of references to IP addresses defined in network interfaces. + BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` + // LoadBalancingRules - Gets load balancing rules that use this backend address pool. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // OutboundNatRule - Gets outbound rules that use this backend address pool. + OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"` + // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { - cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") - } - } - return +// BGPCommunity contains bgp community information offered in Service Community resources. +type BGPCommunity struct { + // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. + ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` + // CommunityName - The name of the bgp community. e.g. Skype. + CommunityName *string `json:"communityName,omitempty"` + // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + CommunityValue *string `json:"communityValue,omitempty"` + // CommunityPrefixes - The prefixes that the bgp community contains. + CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` + // IsAuthorizedToUse - Customer is authorized to use bgp community or not. + IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` + // ServiceGroup - The service group of the bgp community contains. + ServiceGroup *string `json:"serviceGroup,omitempty"` } -// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsDeleteFuture struct { - azure.Future +// BgpPeerStatus BGP peer status details +type BgpPeerStatus struct { + // LocalAddress - The virtual network gateway's local address + LocalAddress *string `json:"localAddress,omitempty"` + // Neighbor - The remote BGP peer + Neighbor *string `json:"neighbor,omitempty"` + // Asn - The autonomous system number of the remote BGP peer + Asn *int32 `json:"asn,omitempty"` + // State - The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' + State BgpPeerState `json:"state,omitempty"` + // ConnectedDuration - For how long the peering has been up + ConnectedDuration *string `json:"connectedDuration,omitempty"` + // RoutesReceived - The number of routes learned from this peer + RoutesReceived *int64 `json:"routesReceived,omitempty"` + // MessagesSent - The number of BGP messages sent + MessagesSent *int64 `json:"messagesSent,omitempty"` + // MessagesReceived - The number of BGP messages received + MessagesReceived *int64 `json:"messagesReceived,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ConnectionMonitorSource describes the source of connection monitor. -type ConnectionMonitorSource struct { - // ResourceID - The ID of the resource used as the source by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - // Port - The source port used by connection monitor. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsQueryFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { - cmqr, err = client.QueryResponder(cmqr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") - } - } - return -} - -// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsStartFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") - return - } - ar.Response = future.Response() - return -} - -// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsStopFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") - return - } - ar.Response = future.Response() - return -} - -// ConnectionResetSharedKey the virtual network connection reset shared key -type ConnectionResetSharedKey struct { - autorest.Response `json:"-"` - // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. - KeyLength *int32 `json:"keyLength,omitempty"` -} - -// ConnectionSharedKey response for GetConnectionSharedKey API service call -type ConnectionSharedKey struct { - autorest.Response `json:"-"` - // Value - The virtual network connection shared key value. - Value *string `json:"value,omitempty"` -} - -// ConnectionStateSnapshot connection state snapshot. -type ConnectionStateSnapshot struct { - // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' - ConnectionState ConnectionState `json:"connectionState,omitempty"` - // StartTime - The start time of the connection snapshot. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the connection snapshot. - EndTime *date.Time `json:"endTime,omitempty"` - // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' - EvaluationState EvaluationState `json:"evaluationState,omitempty"` - // Hops - List of hops between the source and the destination. - Hops *[]ConnectivityHop `json:"hops,omitempty"` -} - -// ConnectivityDestination parameters that define destination of connection. -type ConnectivityDestination struct { - // ResourceID - The ID of the resource to which a connection attempt will be made. - ResourceID *string `json:"resourceId,omitempty"` - // Address - The IP address or URI the resource to which a connection attempt will be made. - Address *string `json:"address,omitempty"` - // Port - Port on which check connectivity will be performed. - Port *int32 `json:"port,omitempty"` -} - -// ConnectivityHop information about a hop between the source and the destination. -type ConnectivityHop struct { - // Type - The type of the hop. - Type *string `json:"type,omitempty"` - // ID - The ID of the hop. - ID *string `json:"id,omitempty"` - // Address - The IP address of the hop. - Address *string `json:"address,omitempty"` - // ResourceID - The ID of the resource corresponding to this hop. - ResourceID *string `json:"resourceId,omitempty"` - // NextHopIds - List of next hop identifiers. - NextHopIds *[]string `json:"nextHopIds,omitempty"` - // Issues - List of issues. - Issues *[]ConnectivityIssue `json:"issues,omitempty"` -} - -// ConnectivityInformation information on the connectivity status. -type ConnectivityInformation struct { +// BgpPeerStatusListResult response for list BGP peer status API service call +type BgpPeerStatusListResult struct { autorest.Response `json:"-"` - // Hops - List of hops between the source and the destination. - Hops *[]ConnectivityHop `json:"hops,omitempty"` - // ConnectionStatus - The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' - ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` - // AvgLatencyInMs - Average latency in milliseconds. - AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` - // MinLatencyInMs - Minimum latency in milliseconds. - MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` - // MaxLatencyInMs - Maximum latency in milliseconds. - MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` - // ProbesSent - Total number of probes sent. - ProbesSent *int32 `json:"probesSent,omitempty"` - // ProbesFailed - Number of failed probes. - ProbesFailed *int32 `json:"probesFailed,omitempty"` -} - -// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. -type ConnectivityIssue struct { - // Origin - The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' - Origin Origin `json:"origin,omitempty"` - // Severity - The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' - Severity Severity `json:"severity,omitempty"` - // Type - The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' - Type IssueType `json:"type,omitempty"` - // Context - Provides additional context on the issue. - Context *[]map[string]*string `json:"context,omitempty"` -} - -// ConnectivityParameters parameters that determine how the connectivity check will be performed. -type ConnectivityParameters struct { - Source *ConnectivitySource `json:"source,omitempty"` - Destination *ConnectivityDestination `json:"destination,omitempty"` - // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' - Protocol Protocol `json:"protocol,omitempty"` - ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` -} - -// ConnectivitySource parameters that define the source of the connection. -type ConnectivitySource struct { - // ResourceID - The ID of the resource from which a connectivity check will be initiated. - ResourceID *string `json:"resourceId,omitempty"` - // Port - The source port from which a connectivity check will be performed. - Port *int32 `json:"port,omitempty"` + // Value - List of BGP peers + Value *[]BgpPeerStatus `json:"value,omitempty"` } -// DdosProtectionPlan a DDoS protection plan in a resource group. -type DdosProtectionPlan struct { - autorest.Response `json:"-"` +// BgpServiceCommunity service Community Properties. +type BgpServiceCommunity struct { + *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - Resource name. @@ -5182,41 +5237,34 @@ type DdosProtectionPlan struct { Location *string `json:"location,omitempty"` // Tags - Resource tags. Tags map[string]*string `json:"tags"` - // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. - *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` } -// MarshalJSON is the custom marshaler for DdosProtectionPlan. -func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for BgpServiceCommunity. +func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if dpp.ID != nil { - objectMap["id"] = dpp.ID - } - if dpp.Name != nil { - objectMap["name"] = dpp.Name + if bsc.BgpServiceCommunityPropertiesFormat != nil { + objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat } - if dpp.Type != nil { - objectMap["type"] = dpp.Type + if bsc.ID != nil { + objectMap["id"] = bsc.ID } - if dpp.Location != nil { - objectMap["location"] = dpp.Location + if bsc.Name != nil { + objectMap["name"] = bsc.Name } - if dpp.Tags != nil { - objectMap["tags"] = dpp.Tags + if bsc.Type != nil { + objectMap["type"] = bsc.Type } - if dpp.DdosProtectionPlanPropertiesFormat != nil { - objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat + if bsc.Location != nil { + objectMap["location"] = bsc.Location } - if dpp.Etag != nil { - objectMap["etag"] = dpp.Etag + if bsc.Tags != nil { + objectMap["tags"] = bsc.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. -func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. +func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -5224,6 +5272,15 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat + err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) + if err != nil { + return err + } + bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat + } case "id": if v != nil { var ID string @@ -5231,7 +5288,7 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { if err != nil { return err } - dpp.ID = &ID + bsc.ID = &ID } case "name": if v != nil { @@ -5240,7 +5297,7 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { if err != nil { return err } - dpp.Name = &name + bsc.Name = &name } case "type": if v != nil { @@ -5249,7 +5306,7 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { if err != nil { return err } - dpp.Type = &typeVar + bsc.Type = &typeVar } case "location": if v != nil { @@ -5258,7 +5315,7 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { if err != nil { return err } - dpp.Location = &location + bsc.Location = &location } case "tags": if v != nil { @@ -5267,25 +5324,7 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { if err != nil { return err } - dpp.Tags = tags - } - case "properties": - if v != nil { - var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat - err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) - if err != nil { - return err - } - dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - dpp.Etag = &etag + bsc.Tags = tags } } } @@ -5293,24 +5332,24 @@ func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { return nil } -// DdosProtectionPlanListResult a list of DDoS protection plans. -type DdosProtectionPlanListResult struct { +// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. +type BgpServiceCommunityListResult struct { autorest.Response `json:"-"` - // Value - A list of DDoS protection plans. - Value *[]DdosProtectionPlan `json:"value,omitempty"` + // Value - A list of service community resources. + Value *[]BgpServiceCommunity `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. -type DdosProtectionPlanListResultIterator struct { +// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity values. +type BgpServiceCommunityListResultIterator struct { i int - page DdosProtectionPlanListResultPage + page BgpServiceCommunityListResultPage } // Next 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 *DdosProtectionPlanListResultIterator) Next() error { +func (iter *BgpServiceCommunityListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -5325,448 +5364,621 @@ func (iter *DdosProtectionPlanListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DdosProtectionPlanListResultIterator) NotDone() bool { +func (iter BgpServiceCommunityListResultIterator) 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 DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { +func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { 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 DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { +func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { if !iter.page.NotDone() { - return DdosProtectionPlan{} + return BgpServiceCommunity{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { - return dpplr.Value == nil || len(*dpplr.Value) == 0 +func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { + return bsclr.Value == nil || len(*bsclr.Value) == 0 } -// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. +// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer() (*http.Request, error) { - if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { +func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer() (*http.Request, error) { + if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(dpplr.NextLink))) + autorest.WithBaseURL(to.String(bsclr.NextLink))) } -// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. -type DdosProtectionPlanListResultPage struct { - fn func(DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) - dpplr DdosProtectionPlanListResult +// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. +type BgpServiceCommunityListResultPage struct { + fn func(BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) + bsclr BgpServiceCommunityListResult } // 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. -func (page *DdosProtectionPlanListResultPage) Next() error { - next, err := page.fn(page.dpplr) +func (page *BgpServiceCommunityListResultPage) Next() error { + next, err := page.fn(page.bsclr) if err != nil { return err } - page.dpplr = next + page.bsclr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DdosProtectionPlanListResultPage) NotDone() bool { - return !page.dpplr.IsEmpty() +func (page BgpServiceCommunityListResultPage) NotDone() bool { + return !page.bsclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { - return page.dpplr +func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { + return page.bsclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { - if page.dpplr.IsEmpty() { +func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { + if page.bsclr.IsEmpty() { return nil } - return *page.dpplr.Value + return *page.bsclr.Value } -// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. -type DdosProtectionPlanPropertiesFormat struct { - // ResourceGUID - The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // VirtualNetworks - The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. - VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` +// BgpServiceCommunityPropertiesFormat properties of Service Community. +type BgpServiceCommunityPropertiesFormat struct { + // ServiceName - The name of the bgp community. e.g. Skype. + ServiceName *string `json:"serviceName,omitempty"` + // BgpCommunities - Get a list of bgp communities. + BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` } -// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansCreateOrUpdateFuture struct { - azure.Future +// BgpSettings BGP settings details +type BgpSettings struct { + // Asn - The BGP speaker's ASN. + Asn *int64 `json:"asn,omitempty"` + // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` + // PeerWeight - The weight added to routes learned from this BGP speaker. + PeerWeight *int32 `json:"peerWeight,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return +// ConnectionMonitor parameters that define the operation to create a connection monitor. +type ConnectionMonitor struct { + // Location - Connection monitor location. + Location *string `json:"location,omitempty"` + // Tags - Connection monitor tags. + Tags map[string]*string `json:"tags"` + *ConnectionMonitorParameters `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionMonitor. +func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cm.Location != nil { + objectMap["location"] = cm.Location } - if !done { - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") - return + if cm.Tags != nil { + objectMap["tags"] = cm.Tags } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { - dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request") - } + if cm.ConnectionMonitorParameters != nil { + objectMap["properties"] = cm.ConnectionMonitorParameters } - return -} - -// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DdosProtectionPlansDeleteFuture struct { - azure.Future + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. +func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") - return + return err } - if !done { - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") - return + for k, v := range m { + switch k { + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cm.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cm.Tags = tags + } + case "properties": + if v != nil { + var connectionMonitorParameters ConnectionMonitorParameters + err = json.Unmarshal(*v, &connectionMonitorParameters) + if err != nil { + return err + } + cm.ConnectionMonitorParameters = &connectionMonitorParameters + } + } } - ar.Response = future.Response() - return + + return nil } -// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. -// Standard DHCP option for a subnet overrides VNET DHCP options. -type DhcpOptions struct { - // DNSServers - The list of DNS servers IP addresses. - DNSServers *[]string `json:"dnsServers,omitempty"` +// ConnectionMonitorDestination describes the destination of connection monitor. +type ConnectionMonitorDestination struct { + // ResourceID - The ID of the resource used as the destination by connection monitor. + ResourceID *string `json:"resourceId,omitempty"` + // Address - Address of the connection monitor destination (IP or domain name). + Address *string `json:"address,omitempty"` + // Port - The destination port used by connection monitor. + Port *int32 `json:"port,omitempty"` } -// Dimension dimension of the metric. -type Dimension struct { - // Name - The name of the dimension. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the dimension. - DisplayName *string `json:"displayName,omitempty"` - // InternalName - The internal name of the dimension. - InternalName *string `json:"internalName,omitempty"` +// ConnectionMonitorListResult list of connection monitors. +type ConnectionMonitorListResult struct { + autorest.Response `json:"-"` + // Value - Information about connection monitors. + Value *[]ConnectionMonitorResult `json:"value,omitempty"` } -// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. -type DNSNameAvailabilityResult struct { +// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. +type ConnectionMonitorParameters struct { + Source *ConnectionMonitorSource `json:"source,omitempty"` + Destination *ConnectionMonitorDestination `json:"destination,omitempty"` + // AutoStart - Determines if the connection monitor will start automatically once created. + AutoStart *bool `json:"autoStart,omitempty"` + // MonitoringIntervalInSeconds - Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` +} + +// ConnectionMonitorQueryResult list of connection states snaphots. +type ConnectionMonitorQueryResult struct { autorest.Response `json:"-"` - // Available - Domain availability (True/False). - Available *bool `json:"available,omitempty"` + // SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive' + SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` + // States - Information about connection states. + States *[]ConnectionStateSnapshot `json:"states,omitempty"` } -// EffectiveNetworkSecurityGroup effective network security group. -type EffectiveNetworkSecurityGroup struct { - // NetworkSecurityGroup - The ID of network security group that is applied. - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - // Association - Associated resources. - Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` - // EffectiveSecurityRules - A collection of effective security rules. - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - // TagMap - Mapping of tags to list of IP Addresses included within the tag. - TagMap map[string][]string `json:"tagMap"` +// ConnectionMonitorResult information about the connection monitor. +type ConnectionMonitorResult struct { + autorest.Response `json:"-"` + // Name - Name of the connection monitor. + Name *string `json:"name,omitempty"` + // ID - ID of the connection monitor. + ID *string `json:"id,omitempty"` + Etag *string `json:"etag,omitempty"` + // Type - Connection monitor type. + Type *string `json:"type,omitempty"` + // Location - Connection monitor location. + Location *string `json:"location,omitempty"` + // Tags - Connection monitor tags. + Tags map[string]*string `json:"tags"` + *ConnectionMonitorResultProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. -func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ConnectionMonitorResult. +func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ensg.NetworkSecurityGroup != nil { - objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup + if cmr.Name != nil { + objectMap["name"] = cmr.Name } - if ensg.Association != nil { - objectMap["association"] = ensg.Association + if cmr.ID != nil { + objectMap["id"] = cmr.ID } - if ensg.EffectiveSecurityRules != nil { - objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules + if cmr.Etag != nil { + objectMap["etag"] = cmr.Etag } - if ensg.TagMap != nil { - objectMap["tagMap"] = ensg.TagMap + if cmr.Type != nil { + objectMap["type"] = cmr.Type + } + if cmr.Location != nil { + objectMap["location"] = cmr.Location + } + if cmr.Tags != nil { + objectMap["tags"] = cmr.Tags + } + if cmr.ConnectionMonitorResultProperties != nil { + objectMap["properties"] = cmr.ConnectionMonitorResultProperties } return json.Marshal(objectMap) } -// EffectiveNetworkSecurityGroupAssociation the effective network security group association. -type EffectiveNetworkSecurityGroupAssociation struct { - // Subnet - The ID of the subnet if assigned. - Subnet *SubResource `json:"subnet,omitempty"` - // NetworkInterface - The ID of the network interface if assigned. - NetworkInterface *SubResource `json:"networkInterface,omitempty"` -} - -// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service call. -type EffectiveNetworkSecurityGroupListResult struct { - autorest.Response `json:"-"` - // Value - A list of effective network security groups. - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} +// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. +func (cmr *ConnectionMonitorResult) 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 "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cmr.Name = &name + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cmr.ID = &ID + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cmr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cmr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cmr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cmr.Tags = tags + } + case "properties": + if v != nil { + var connectionMonitorResultProperties ConnectionMonitorResultProperties + err = json.Unmarshal(*v, &connectionMonitorResultProperties) + if err != nil { + return err + } + cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties + } + } + } -// EffectiveNetworkSecurityRule effective network security rules. -type EffectiveNetworkSecurityRule struct { - // Name - The name of the security rule specified by the user (if created by the user). - Name *string `json:"name,omitempty"` - // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All' - Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - // SourcePortRange - The source port or range. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - // DestinationPortRange - The destination port or range. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*) - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*) - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - // SourceAddressPrefix - The source address prefix. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - // DestinationAddressPrefix - The destination address prefix. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - // ExpandedSourceAddressPrefix - The expanded source address prefix. - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - // ExpandedDestinationAddressPrefix - Expanded destination address prefix. - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' - Access SecurityRuleAccess `json:"access,omitempty"` - // Priority - The priority of the rule. - Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' - Direction SecurityRuleDirection `json:"direction,omitempty"` + return nil } -// EffectiveRoute effective Route -type EffectiveRoute struct { - // Name - The name of the user defined route. This is optional. - Name *string `json:"name,omitempty"` - // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' - Source EffectiveRouteSource `json:"source,omitempty"` - // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid' - State EffectiveRouteState `json:"state,omitempty"` - // AddressPrefix - The address prefixes of the effective routes in CIDR notation. - AddressPrefix *[]string `json:"addressPrefix,omitempty"` - // NextHopIPAddress - The IP address of the next hop of the effective route. - NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` - // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' - NextHopType RouteNextHopType `json:"nextHopType,omitempty"` +// ConnectionMonitorResultProperties describes the properties of a connection monitor. +type ConnectionMonitorResultProperties struct { + // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // StartTime - The date and time when the connection monitor was started. + StartTime *date.Time `json:"startTime,omitempty"` + // MonitoringStatus - The monitoring status of the connection monitor. + MonitoringStatus *string `json:"monitoringStatus,omitempty"` + Source *ConnectionMonitorSource `json:"source,omitempty"` + Destination *ConnectionMonitorDestination `json:"destination,omitempty"` + // AutoStart - Determines if the connection monitor will start automatically once created. + AutoStart *bool `json:"autoStart,omitempty"` + // MonitoringIntervalInSeconds - Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` } -// EffectiveRouteListResult response for list effective route API service call. -type EffectiveRouteListResult struct { - autorest.Response `json:"-"` - // Value - A list of effective routes. - Value *[]EffectiveRoute `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConnectionMonitorsCreateOrUpdateFuture struct { + azure.Future } -// EndpointServiceResult endpoint service. -type EndpointServiceResult struct { - // Name - Name of the endpoint service. - Name *string `json:"name,omitempty"` - // Type - Type of the endpoint service. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { + cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") + } + } + return } -// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. -type EndpointServicesListResult struct { - autorest.Response `json:"-"` - // Value - List of available endpoint services in a region. - Value *[]EndpointServiceResult `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsDeleteFuture struct { + azure.Future } -// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult values. -type EndpointServicesListResultIterator struct { - i int - page EndpointServicesListResultPage -} - -// Next 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 *EndpointServicesListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) if err != nil { - iter.i-- - return err + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") + return } - iter.i = 0 - return nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") + return + } + ar.Response = future.Response() + return } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EndpointServicesListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// ConnectionMonitorSource describes the source of connection monitor. +type ConnectionMonitorSource struct { + // ResourceID - The ID of the resource used as the source by connection monitor. + ResourceID *string `json:"resourceId,omitempty"` + // Port - The source port used by connection monitor. + Port *int32 `json:"port,omitempty"` } -// Response returns the raw server response from the last page request. -func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult { - return iter.page.Response() +// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsQueryFuture struct { + azure.Future } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult { - if !iter.page.NotDone() { - return EndpointServiceResult{} +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") + return } - return iter.page.Values()[iter.i] + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { + cmqr, err = client.QueryResponder(cmqr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") + } + } + return } -// IsEmpty returns true if the ListResult contains no values. -func (eslr EndpointServicesListResult) IsEmpty() bool { - return eslr.Value == nil || len(*eslr.Value) == 0 +// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsStartFuture struct { + azure.Future } -// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (eslr EndpointServicesListResult) endpointServicesListResultPreparer() (*http.Request, error) { - if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { - return nil, nil +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") + return } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(eslr.NextLink))) + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") + return + } + ar.Response = future.Response() + return } -// EndpointServicesListResultPage contains a page of EndpointServiceResult values. -type EndpointServicesListResultPage struct { - fn func(EndpointServicesListResult) (EndpointServicesListResult, error) - eslr EndpointServicesListResult +// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsStopFuture struct { + azure.Future } -// 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. -func (page *EndpointServicesListResultPage) Next() error { - next, err := page.fn(page.eslr) +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") + return } - page.eslr = next - return nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") + return + } + ar.Response = future.Response() + return } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EndpointServicesListResultPage) NotDone() bool { - return !page.eslr.IsEmpty() +// ConnectionResetSharedKey the virtual network connection reset shared key +type ConnectionResetSharedKey struct { + autorest.Response `json:"-"` + // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. + KeyLength *int32 `json:"keyLength,omitempty"` } -// Response returns the raw server response from the last page request. -func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { - return page.eslr +// ConnectionSharedKey response for GetConnectionSharedKey API service call +type ConnectionSharedKey struct { + autorest.Response `json:"-"` + // Value - The virtual network connection shared key value. + Value *string `json:"value,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { - if page.eslr.IsEmpty() { - return nil - } - return *page.eslr.Value +// ConnectionStateSnapshot connection state snapshot. +type ConnectionStateSnapshot struct { + // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' + ConnectionState ConnectionState `json:"connectionState,omitempty"` + // StartTime - The start time of the connection snapshot. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the connection snapshot. + EndTime *date.Time `json:"endTime,omitempty"` + // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' + EvaluationState EvaluationState `json:"evaluationState,omitempty"` + // Hops - List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` } -// Error ... -type Error struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` - Details *[]ErrorDetails `json:"details,omitempty"` - InnerError *string `json:"innerError,omitempty"` +// ConnectivityDestination parameters that define destination of connection. +type ConnectivityDestination struct { + // ResourceID - The ID of the resource to which a connection attempt will be made. + ResourceID *string `json:"resourceId,omitempty"` + // Address - The IP address or URI the resource to which a connection attempt will be made. + Address *string `json:"address,omitempty"` + // Port - Port on which check connectivity will be performed. + Port *int32 `json:"port,omitempty"` } -// ErrorDetails ... -type ErrorDetails struct { - Code *string `json:"code,omitempty"` - Target *string `json:"target,omitempty"` - Message *string `json:"message,omitempty"` +// ConnectivityHop information about a hop between the source and the destination. +type ConnectivityHop struct { + // Type - The type of the hop. + Type *string `json:"type,omitempty"` + // ID - The ID of the hop. + ID *string `json:"id,omitempty"` + // Address - The IP address of the hop. + Address *string `json:"address,omitempty"` + // ResourceID - The ID of the resource corresponding to this hop. + ResourceID *string `json:"resourceId,omitempty"` + // NextHopIds - List of next hop identifiers. + NextHopIds *[]string `json:"nextHopIds,omitempty"` + // Issues - List of issues. + Issues *[]ConnectivityIssue `json:"issues,omitempty"` } -// ExpressRouteCircuit expressRouteCircuit resource -type ExpressRouteCircuit struct { +// ConnectivityInformation information on the connectivity status. +type ConnectivityInformation struct { autorest.Response `json:"-"` - // Sku - The SKU. - Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` - *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` + // Hops - List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` + // ConnectionStatus - The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' + ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` + // AvgLatencyInMs - Average latency in milliseconds. + AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` + // MinLatencyInMs - Minimum latency in milliseconds. + MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` + // MaxLatencyInMs - Maximum latency in milliseconds. + MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` + // ProbesSent - Total number of probes sent. + ProbesSent *int32 `json:"probesSent,omitempty"` + // ProbesFailed - Number of failed probes. + ProbesFailed *int32 `json:"probesFailed,omitempty"` } -// MarshalJSON is the custom marshaler for ExpressRouteCircuit. -func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erc.Sku != nil { - objectMap["sku"] = erc.Sku - } - if erc.ExpressRouteCircuitPropertiesFormat != nil { - objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat - } - if erc.Etag != nil { - objectMap["etag"] = erc.Etag - } - if erc.ID != nil { - objectMap["id"] = erc.ID - } - if erc.Name != nil { - objectMap["name"] = erc.Name - } - if erc.Type != nil { - objectMap["type"] = erc.Type - } - if erc.Location != nil { - objectMap["location"] = erc.Location +// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. +type ConnectivityIssue struct { + // Origin - The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' + Origin Origin `json:"origin,omitempty"` + // Severity - The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' + Severity Severity `json:"severity,omitempty"` + // Type - The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' + Type IssueType `json:"type,omitempty"` + // Context - Provides additional context on the issue. + Context *[]map[string]*string `json:"context,omitempty"` +} + +// ConnectivityParameters parameters that determine how the connectivity check will be performed. +type ConnectivityParameters struct { + Source *ConnectivitySource `json:"source,omitempty"` + Destination *ConnectivityDestination `json:"destination,omitempty"` + // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' + Protocol Protocol `json:"protocol,omitempty"` + ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` +} + +// ConnectivitySource parameters that define the source of the connection. +type ConnectivitySource struct { + // ResourceID - The ID of the resource from which a connectivity check will be initiated. + ResourceID *string `json:"resourceId,omitempty"` + // Port - The source port from which a connectivity check will be performed. + Port *int32 `json:"port,omitempty"` +} + +// DdosProtectionPlan a DDoS protection plan in a resource group. +type DdosProtectionPlan struct { + autorest.Response `json:"-"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. + *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for DdosProtectionPlan. +func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpp.ID != nil { + objectMap["id"] = dpp.ID } - if erc.Tags != nil { - objectMap["tags"] = erc.Tags + if dpp.Name != nil { + objectMap["name"] = dpp.Name + } + if dpp.Type != nil { + objectMap["type"] = dpp.Type + } + if dpp.Location != nil { + objectMap["location"] = dpp.Location + } + if dpp.Tags != nil { + objectMap["tags"] = dpp.Tags + } + if dpp.DdosProtectionPlanPropertiesFormat != nil { + objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat + } + if dpp.Etag != nil { + objectMap["etag"] = dpp.Etag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. -func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. +func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -5774,33 +5986,6 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "sku": - if v != nil { - var sku ExpressRouteCircuitSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - erc.Sku = &sku - } - case "properties": - if v != nil { - var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) - if err != nil { - return err - } - erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erc.Etag = &etag - } case "id": if v != nil { var ID string @@ -5808,7 +5993,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.ID = &ID + dpp.ID = &ID } case "name": if v != nil { @@ -5817,7 +6002,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Name = &name + dpp.Name = &name } case "type": if v != nil { @@ -5826,7 +6011,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Type = &typeVar + dpp.Type = &typeVar } case "location": if v != nil { @@ -5835,7 +6020,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Location = &location + dpp.Location = &location } case "tags": if v != nil { @@ -5844,82 +6029,16 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Tags = tags + dpp.Tags = tags } - } - } - - return nil -} - -// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitArpTable struct { - // Age - Entry age in minutes - Age *int32 `json:"age,omitempty"` - // Interface - Interface address - Interface *string `json:"interface,omitempty"` - // IPAddress - The IP address. - IPAddress *string `json:"ipAddress,omitempty"` - // MacAddress - The MAC address. - MacAddress *string `json:"macAddress,omitempty"` -} - -// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. -type ExpressRouteCircuitAuthorization struct { - autorest.Response `json:"-"` - *AuthorizationPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. -func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erca.AuthorizationPropertiesFormat != nil { - objectMap["properties"] = erca.AuthorizationPropertiesFormat - } - if erca.Name != nil { - objectMap["name"] = erca.Name - } - if erca.Etag != nil { - objectMap["etag"] = erca.Etag - } - if erca.ID != nil { - objectMap["id"] = erca.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. -func (erca *ExpressRouteCircuitAuthorization) 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 authorizationPropertiesFormat AuthorizationPropertiesFormat - err = json.Unmarshal(*v, &authorizationPropertiesFormat) - if err != nil { - return err - } - erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat + err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) if err != nil { return err } - erca.Name = &name + dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat } case "etag": if v != nil { @@ -5928,16 +6047,7 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { if err != nil { return err } - erca.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erca.ID = &ID + dpp.Etag = &etag } } } @@ -5945,426 +6055,338 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { - azure.Future +// DdosProtectionPlanListResult a list of DDoS protection plans. +type DdosProtectionPlanListResult struct { + autorest.Response `json:"-"` + // Value - A list of DDoS protection plans. + Value *[]DdosProtectionPlan `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") - return +// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. +type DdosProtectionPlanListResultIterator struct { + i int + page DdosProtectionPlanListResultPage +} + +// Next 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 *DdosProtectionPlanListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { - erca, err = client.CreateOrUpdateResponder(erca.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") - } + err := iter.page.Next() + if err != nil { + iter.i-- + return err } - return + iter.i = 0 + return nil } -// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitAuthorizationsDeleteFuture struct { - azure.Future +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DdosProtectionPlanListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") - return +// Response returns the raw server response from the last page request. +func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { + 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 DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { + if !iter.page.NotDone() { + return DdosProtectionPlan{} } - ar.Response = future.Response() - return + return iter.page.Values()[iter.i] } -// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering resource. -type ExpressRouteCircuitConnection struct { - autorest.Response `json:"-"` - *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// IsEmpty returns true if the ListResult contains no values. +func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { + return dpplr.Value == nil || len(*dpplr.Value) == 0 } -// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. -func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { - objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat - } - if ercc.Name != nil { - objectMap["name"] = ercc.Name - } - if ercc.Etag != nil { - objectMap["etag"] = ercc.Etag - } - if ercc.ID != nil { - objectMap["id"] = ercc.ID +// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer() (*http.Request, error) { + if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { + return nil, nil } - return json.Marshal(objectMap) + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dpplr.NextLink))) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. -func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. +type DdosProtectionPlanListResultPage struct { + fn func(DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) + dpplr DdosProtectionPlanListResult +} + +// 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. +func (page *DdosProtectionPlanListResultPage) Next() error { + next, err := page.fn(page.dpplr) if err != nil { return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) - if err != nil { - return err - } - ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ercc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ercc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ercc.ID = &ID - } - } - } - + page.dpplr = next return nil } -// ExpressRouteCircuitConnectionPropertiesFormat ... -type ExpressRouteCircuitConnectionPropertiesFormat struct { - // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // AuthorizationKey - The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // CircuitConnectionStatus - Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected' - CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - // ProvisioningState - Provisioning state of the circuit connection resource. Possible values are: 'Succeded', 'Updating', 'Deleting', and 'Failed'. +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DdosProtectionPlanListResultPage) NotDone() bool { + return !page.dpplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { + return page.dpplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { + if page.dpplr.IsEmpty() { + return nil + } + return *page.dpplr.Value +} + +// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. +type DdosProtectionPlanPropertiesFormat struct { + // ResourceGUID - The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` + // VirtualNetworks - The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` } -// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { +type DdosProtectionPlansCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { +func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { + dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request") } } return } -// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitConnectionsDeleteFuture struct { +// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DdosProtectionPlansDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { +func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") return } ar.Response = future.Response() return } -// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. -type ExpressRouteCircuitListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRouteCircuits in a resource group. - Value *[]ExpressRouteCircuit `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// DeviceProperties list of properties of the device. +type DeviceProperties struct { + // DeviceVendor - Name of the device Vendor. + DeviceVendor *string `json:"deviceVendor,omitempty"` + // DeviceModel - Model of the device. + DeviceModel *string `json:"deviceModel,omitempty"` + // LinkSpeedInMbps - Link speed. + LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` } -// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values. -type ExpressRouteCircuitListResultIterator struct { - i int - page ExpressRouteCircuitListResultPage +// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. +// Standard DHCP option for a subnet overrides VNET DHCP options. +type DhcpOptions struct { + // DNSServers - The list of DNS servers IP addresses. + DNSServers *[]string `json:"dnsServers,omitempty"` } -// Next 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 *ExpressRouteCircuitListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil +// Dimension dimension of the metric. +type Dimension struct { + // Name - The name of the dimension. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the dimension. + DisplayName *string `json:"displayName,omitempty"` + // InternalName - The internal name of the dimension. + InternalName *string `json:"internalName,omitempty"` } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. +type DNSNameAvailabilityResult struct { + autorest.Response `json:"-"` + // Available - Domain availability (True/False). + Available *bool `json:"available,omitempty"` } -// Response returns the raw server response from the last page request. -func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { - return iter.page.Response() +// EffectiveNetworkSecurityGroup effective network security group. +type EffectiveNetworkSecurityGroup struct { + // NetworkSecurityGroup - The ID of network security group that is applied. + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + // Association - Associated resources. + Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` + // EffectiveSecurityRules - A collection of effective security rules. + EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` + // TagMap - Mapping of tags to list of IP Addresses included within the tag. + TagMap map[string][]string `json:"tagMap"` } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { - if !iter.page.NotDone() { - return ExpressRouteCircuit{} +// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. +func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensg.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { - return erclr.Value == nil || len(*erclr.Value) == 0 -} - -// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) { - if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { - return nil, nil + if ensg.Association != nil { + objectMap["association"] = ensg.Association } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erclr.NextLink))) + if ensg.EffectiveSecurityRules != nil { + objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules + } + if ensg.TagMap != nil { + objectMap["tagMap"] = ensg.TagMap + } + return json.Marshal(objectMap) } -// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. -type ExpressRouteCircuitListResultPage struct { - fn func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) - erclr ExpressRouteCircuitListResult +// EffectiveNetworkSecurityGroupAssociation the effective network security group association. +type EffectiveNetworkSecurityGroupAssociation struct { + // Subnet - The ID of the subnet if assigned. + Subnet *SubResource `json:"subnet,omitempty"` + // NetworkInterface - The ID of the network interface if assigned. + NetworkInterface *SubResource `json:"networkInterface,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. -func (page *ExpressRouteCircuitListResultPage) Next() error { - next, err := page.fn(page.erclr) - if err != nil { - return err - } - page.erclr = next - return nil +// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service call. +type EffectiveNetworkSecurityGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of effective network security groups. + Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitListResultPage) NotDone() bool { - return !page.erclr.IsEmpty() +// EffectiveNetworkSecurityRule effective network security rules. +type EffectiveNetworkSecurityRule struct { + // Name - The name of the security rule specified by the user (if created by the user). + Name *string `json:"name,omitempty"` + // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll' + Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` + // SourcePortRange - The source port or range. + SourcePortRange *string `json:"sourcePortRange,omitempty"` + // DestinationPortRange - The destination port or range. + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*) + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*) + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + // SourceAddressPrefix - The source address prefix. + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + // DestinationAddressPrefix - The destination address prefix. + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + // ExpandedSourceAddressPrefix - The expanded source address prefix. + ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` + // ExpandedDestinationAddressPrefix - Expanded destination address prefix. + ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` + // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + Access SecurityRuleAccess `json:"access,omitempty"` + // Priority - The priority of the rule. + Priority *int32 `json:"priority,omitempty"` + // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' + Direction SecurityRuleDirection `json:"direction,omitempty"` } -// Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { - return page.erclr +// EffectiveRoute effective Route +type EffectiveRoute struct { + // Name - The name of the user defined route. This is optional. + Name *string `json:"name,omitempty"` + // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' + Source EffectiveRouteSource `json:"source,omitempty"` + // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid' + State EffectiveRouteState `json:"state,omitempty"` + // AddressPrefix - The address prefixes of the effective routes in CIDR notation. + AddressPrefix *[]string `json:"addressPrefix,omitempty"` + // NextHopIPAddress - The IP address of the next hop of the effective route. + NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` + // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' + NextHopType RouteNextHopType `json:"nextHopType,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { - if page.erclr.IsEmpty() { - return nil - } - return *page.erclr.Value +// EffectiveRouteListResult response for list effective route API service call. +type EffectiveRouteListResult struct { + autorest.Response `json:"-"` + // Value - A list of effective routes. + Value *[]EffectiveRoute `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. -type ExpressRouteCircuitPeering struct { - autorest.Response `json:"-"` - *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. +// EndpointServiceResult endpoint service. +type EndpointServiceResult struct { + // Name - Name of the endpoint service. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` + // Type - Type of the endpoint service. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. -func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { - objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat - } - if ercp.Name != nil { - objectMap["name"] = ercp.Name - } - if ercp.Etag != nil { - objectMap["etag"] = ercp.Etag - } - if ercp.ID != nil { - objectMap["id"] = ercp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. -func (ercp *ExpressRouteCircuitPeering) 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 expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) - if err != nil { - return err - } - ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ercp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ercp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ercp.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteCircuitPeeringConfig specifies the peering configuration. -type ExpressRouteCircuitPeeringConfig struct { - // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - // AdvertisedCommunities - The communities of bgp peering. Spepcified for microsoft peering - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' - AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - // LegacyMode - The legacy mode of the peering. - LegacyMode *int32 `json:"legacyMode,omitempty"` - // CustomerASN - The CustomerASN of the peering. - CustomerASN *int32 `json:"customerASN,omitempty"` - // RoutingRegistryName - The RoutingRegistryName of the configuration. - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} - -// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that -// belong to an ExpressRouteCircuit. -type ExpressRouteCircuitPeeringListResult struct { +// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. +type EndpointServicesListResult struct { autorest.Response `json:"-"` - // Value - The peerings in an express route circuit. - Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` + // Value - List of available endpoint services in a region. + Value *[]EndpointServiceResult `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering -// values. -type ExpressRouteCircuitPeeringListResultIterator struct { +// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult values. +type EndpointServicesListResultIterator struct { i int - page ExpressRouteCircuitPeeringListResultPage + page EndpointServicesListResultPage } // Next 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 *ExpressRouteCircuitPeeringListResultIterator) Next() error { +func (iter *EndpointServicesListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -6379,518 +6401,168 @@ func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { +func (iter EndpointServicesListResultIterator) 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 ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { +func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult { 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 ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { +func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult { if !iter.page.NotDone() { - return ExpressRouteCircuitPeering{} + return EndpointServiceResult{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { - return ercplr.Value == nil || len(*ercplr.Value) == 0 +func (eslr EndpointServicesListResult) IsEmpty() bool { + return eslr.Value == nil || len(*eslr.Value) == 0 } -// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. +// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) { - if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { +func (eslr EndpointServicesListResult) endpointServicesListResultPreparer() (*http.Request, error) { + if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ercplr.NextLink))) + autorest.WithBaseURL(to.String(eslr.NextLink))) } -// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. -type ExpressRouteCircuitPeeringListResultPage struct { - fn func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) - ercplr ExpressRouteCircuitPeeringListResult +// EndpointServicesListResultPage contains a page of EndpointServiceResult values. +type EndpointServicesListResultPage struct { + fn func(EndpointServicesListResult) (EndpointServicesListResult, error) + eslr EndpointServicesListResult } // 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. -func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { - next, err := page.fn(page.ercplr) +func (page *EndpointServicesListResultPage) Next() error { + next, err := page.fn(page.eslr) if err != nil { return err } - page.ercplr = next + page.eslr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { - return !page.ercplr.IsEmpty() +func (page EndpointServicesListResultPage) NotDone() bool { + return !page.eslr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { - return page.ercplr +func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { + return page.eslr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { - if page.ercplr.IsEmpty() { +func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { + if page.eslr.IsEmpty() { return nil } - return *page.ercplr.Value + return *page.eslr.Value } -// ExpressRouteCircuitPeeringPropertiesFormat ... -type ExpressRouteCircuitPeeringPropertiesFormat struct { - // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' - PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` - // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' - State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - // PeerASN - The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // SharedKey - The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // VlanID - The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // Stats - Gets peering stats. - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Gets whether the provider or the customer last modified the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *RouteFilter `json:"routeFilter,omitempty"` - // Ipv6PeeringConfig - The IPv6 peering configuration. - Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` +// Error ... +type Error struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` + Details *[]ErrorDetails `json:"details,omitempty"` + InnerError *string `json:"innerError,omitempty"` } -// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { - azure.Future +// ErrorDetails ... +type ErrorDetails struct { + Code *string `json:"code,omitempty"` + Target *string `json:"target,omitempty"` + Message *string `json:"message,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return +// ExpressRouteCircuit expressRouteCircuit resource +type ExpressRouteCircuit struct { + autorest.Response `json:"-"` + // Sku - The SKU. + Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` + *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuit. +func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erc.Sku != nil { + objectMap["sku"] = erc.Sku } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") - return + if erc.ExpressRouteCircuitPropertiesFormat != nil { + objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { - ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") - } + if erc.Etag != nil { + objectMap["etag"] = erc.Etag } - return -} - -// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitPeeringsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return + if erc.ID != nil { + objectMap["id"] = erc.ID } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") - return + if erc.Name != nil { + objectMap["name"] = erc.Name } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. -type ExpressRouteCircuitPropertiesFormat struct { - // AllowClassicOperations - Allow classic operations - AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - // CircuitProvisioningState - The CircuitProvisioningState state of the resource. - CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' - ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - // Authorizations - The list of authorizations. - Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` - // Peerings - The list of peerings. - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // ServiceKey - The ServiceKey. - ServiceKey *string `json:"serviceKey,omitempty"` - // ServiceProviderNotes - The ServiceProviderNotes. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - // ServiceProviderProperties - The ServiceProviderProperties. - ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` -} - -// ExpressRouteCircuitReference ... -type ExpressRouteCircuitReference struct { - // ID - Corresponding Express Route Circuit Id. - ID *string `json:"id,omitempty"` -} - -// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit -type ExpressRouteCircuitRoutesTable struct { - // NetworkProperty - IP address of a network entity - NetworkProperty *string `json:"network,omitempty"` - // NextHop - NextHop address - NextHop *string `json:"nextHop,omitempty"` - // LocPrf - Local preference value as set with the set local-preference route-map configuration command - LocPrf *string `json:"locPrf,omitempty"` - // Weight - Route Weight. - Weight *int32 `json:"weight,omitempty"` - // Path - Autonomous system paths to the destination network. - Path *string `json:"path,omitempty"` -} - -// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitRoutesTableSummary struct { - // Neighbor - IP address of the neighbor. - Neighbor *string `json:"neighbor,omitempty"` - // V - BGP version number spoken to the neighbor. - V *int32 `json:"v,omitempty"` - // As - Autonomous system number. - As *int32 `json:"as,omitempty"` - // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. - UpDown *string `json:"upDown,omitempty"` - // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StatePfxRcd *string `json:"statePfxRcd,omitempty"` -} - -// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API. -type ExpressRouteCircuitsArpTableListResult struct { - autorest.Response `json:"-"` - // Value - Gets list of the ARP table. - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return + if erc.Type != nil { + objectMap["type"] = erc.Type } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") - return + if erc.Location != nil { + objectMap["location"] = erc.Location } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.CreateOrUpdateResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") - } + if erc.Tags != nil { + objectMap["tags"] = erc.Tags } - return -} - -// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ExpressRouteCircuitsDeleteFuture struct { - azure.Future + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit. -type ExpressRouteCircuitServiceProviderProperties struct { - // ServiceProviderName - The serviceProviderName. - ServiceProviderName *string `json:"serviceProviderName,omitempty"` - // PeeringLocation - The peering location. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInMbps - The BandwidthInMbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` -} - -// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. -type ExpressRouteCircuitSku struct { - // Name - The name of the SKU. - Name *string `json:"name,omitempty"` - // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium' - Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` - // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData' - Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` -} - -// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListArpTableFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { - ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListRoutesTableFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { - ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { - ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route -// Circuits API. -type ExpressRouteCircuitsRoutesTableListResult struct { - autorest.Response `json:"-"` - // Value - The list of routes table. - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the Express Route -// Circuits API. -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - autorest.Response `json:"-"` - // Value - A list of the routes table. - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitStats contains stats associated with the peering. -type ExpressRouteCircuitStats struct { - autorest.Response `json:"-"` - // PrimarybytesIn - Gets BytesIn of the peering. - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - // PrimarybytesOut - Gets BytesOut of the peering. - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - // SecondarybytesIn - Gets BytesIn of the peering. - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - // SecondarybytesOut - Gets BytesOut of the peering. - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} - -// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ExpressRouteCircuitsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.UpdateTagsResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCrossConnection expressRouteCrossConnection resource -type ExpressRouteCrossConnection struct { - autorest.Response `json:"-"` - *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection. -func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercc.ExpressRouteCrossConnectionProperties != nil { - objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties - } - if ercc.Etag != nil { - objectMap["etag"] = ercc.Etag - } - if ercc.ID != nil { - objectMap["id"] = ercc.ID - } - if ercc.Name != nil { - objectMap["name"] = ercc.Name - } - if ercc.Type != nil { - objectMap["type"] = ercc.Type - } - if ercc.Location != nil { - objectMap["location"] = ercc.Location - } - if ercc.Tags != nil { - objectMap["tags"] = ercc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. -func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. +func (erc *ExpressRouteCircuit) 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 "sku": + if v != nil { + var sku ExpressRouteCircuitSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + erc.Sku = &sku + } case "properties": if v != nil { - var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties - err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) + var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) if err != nil { return err } - ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties + erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat } case "etag": if v != nil { @@ -6899,7 +6571,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Etag = &etag + erc.Etag = &etag } case "id": if v != nil { @@ -6908,7 +6580,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.ID = &ID + erc.ID = &ID } case "name": if v != nil { @@ -6917,7 +6589,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Name = &name + erc.Name = &name } case "type": if v != nil { @@ -6926,7 +6598,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Type = &typeVar + erc.Type = &typeVar } case "location": if v != nil { @@ -6935,7 +6607,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Location = &location + erc.Location = &location } case "tags": if v != nil { @@ -6944,7 +6616,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Tags = tags + erc.Tags = tags } } } @@ -6952,113 +6624,155 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. -type ExpressRouteCrossConnectionListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRouteCrossConnection resources. - Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitArpTable struct { + // Age - Entry age in minutes + Age *int32 `json:"age,omitempty"` + // Interface - Interface address + Interface *string `json:"interface,omitempty"` + // IPAddress - The IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // MacAddress - The MAC address. + MacAddress *string `json:"macAddress,omitempty"` } -// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of -// ExpressRouteCrossConnection values. -type ExpressRouteCrossConnectionListResultIterator struct { - i int - page ExpressRouteCrossConnectionListResultPage +// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. +type ExpressRouteCircuitAuthorization struct { + autorest.Response `json:"-"` + *AuthorizationPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// Next 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 *ExpressRouteCrossConnectionListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil +// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. +func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erca.AuthorizationPropertiesFormat != nil { + objectMap["properties"] = erca.AuthorizationPropertiesFormat } - err := iter.page.Next() + if erca.Name != nil { + objectMap["name"] = erca.Name + } + if erca.Etag != nil { + objectMap["etag"] = erca.Etag + } + if erca.ID != nil { + objectMap["id"] = erca.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. +func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 - return nil -} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var authorizationPropertiesFormat AuthorizationPropertiesFormat + err = json.Unmarshal(*v, &authorizationPropertiesFormat) + if err != nil { + return err + } + erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erca.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erca.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erca.ID = &ID + } + } + } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) + return nil } -// Response returns the raw server response from the last page request. -func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { - return iter.page.Response() +// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { + azure.Future } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { - if !iter.page.NotDone() { - return ExpressRouteCrossConnection{} +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { - return ercclr.Value == nil || len(*ercclr.Value) == 0 -} - -// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer() (*http.Request, error) { - if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { - return nil, nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") + return } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ercclr.NextLink))) + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { + erca, err = client.CreateOrUpdateResponder(erca.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") + } + } + return } -// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. -type ExpressRouteCrossConnectionListResultPage struct { - fn func(ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) - ercclr ExpressRouteCrossConnectionListResult +// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitAuthorizationsDeleteFuture struct { + azure.Future } -// 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. -func (page *ExpressRouteCrossConnectionListResultPage) Next() error { - next, err := page.fn(page.ercclr) +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") + return } - page.ercclr = next - return nil -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { - return !page.ercclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { - return page.ercclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { - if page.ercclr.IsEmpty() { - return nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") + return } - return *page.ercclr.Value + ar.Response = future.Response() + return } -// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. -type ExpressRouteCrossConnectionPeering struct { - autorest.Response `json:"-"` - *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` +// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering resource. +type ExpressRouteCircuitConnection struct { + autorest.Response `json:"-"` + *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. @@ -7067,26 +6781,26 @@ type ExpressRouteCrossConnectionPeering struct { ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. -func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. +func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { - objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties + if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { + objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat } - if erccp.Name != nil { - objectMap["name"] = erccp.Name + if ercc.Name != nil { + objectMap["name"] = ercc.Name } - if erccp.Etag != nil { - objectMap["etag"] = erccp.Etag + if ercc.Etag != nil { + objectMap["etag"] = ercc.Etag } - if erccp.ID != nil { - objectMap["id"] = erccp.ID + if ercc.ID != nil { + objectMap["id"] = ercc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. -func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. +func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -7096,12 +6810,12 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro switch k { case "properties": if v != nil { - var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties - err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) + var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) if err != nil { return err } - erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties + ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat } case "name": if v != nil { @@ -7110,7 +6824,7 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro if err != nil { return err } - erccp.Name = &name + ercc.Name = &name } case "etag": if v != nil { @@ -7119,7 +6833,7 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro if err != nil { return err } - erccp.Etag = &etag + ercc.Etag = &etag } case "id": if v != nil { @@ -7128,7 +6842,7 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro if err != nil { return err } - erccp.ID = &ID + ercc.ID = &ID } } } @@ -7136,26 +6850,92 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro return nil } -// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings that -// belong to an ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionPeeringList struct { - autorest.Response `json:"-"` - // Value - The peerings in an express route cross connection. - Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of -// ExpressRouteCrossConnectionPeering values. -type ExpressRouteCrossConnectionPeeringListIterator struct { +// ExpressRouteCircuitConnectionPropertiesFormat ... +type ExpressRouteCircuitConnectionPropertiesFormat struct { + // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` + // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` + // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // AuthorizationKey - The authorization key. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // CircuitConnectionStatus - Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` + // ProvisioningState - Provisioning state of the circuit connection resource. Possible values are: 'Succeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitConnectionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. +type ExpressRouteCircuitListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRouteCircuits in a resource group. + Value *[]ExpressRouteCircuit `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values. +type ExpressRouteCircuitListResultIterator struct { i int - page ExpressRouteCrossConnectionPeeringListPage + page ExpressRouteCircuitListResultPage } // Next 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 *ExpressRouteCrossConnectionPeeringListIterator) Next() error { +func (iter *ExpressRouteCircuitListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -7170,427 +6950,746 @@ func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool { +func (iter ExpressRouteCircuitListResultIterator) 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 ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { +func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { 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 ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { +func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { if !iter.page.NotDone() { - return ExpressRouteCrossConnectionPeering{} + return ExpressRouteCircuit{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { - return erccpl.Value == nil || len(*erccpl.Value) == 0 +func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { + return erclr.Value == nil || len(*erclr.Value) == 0 } -// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. +// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer() (*http.Request, error) { - if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { +func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) { + if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(erccpl.NextLink))) + autorest.WithBaseURL(to.String(erclr.NextLink))) } -// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. -type ExpressRouteCrossConnectionPeeringListPage struct { - fn func(ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) - erccpl ExpressRouteCrossConnectionPeeringList +// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. +type ExpressRouteCircuitListResultPage struct { + fn func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) + erclr ExpressRouteCircuitListResult } // 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. -func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error { - next, err := page.fn(page.erccpl) +func (page *ExpressRouteCircuitListResultPage) Next() error { + next, err := page.fn(page.erclr) if err != nil { return err } - page.erccpl = next + page.erclr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { - return !page.erccpl.IsEmpty() +func (page ExpressRouteCircuitListResultPage) NotDone() bool { + return !page.erclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { - return page.erccpl +func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { + return page.erclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { - if page.erccpl.IsEmpty() { +func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { + if page.erclr.IsEmpty() { return nil } - return *page.erccpl.Value + return *page.erclr.Value } -// ExpressRouteCrossConnectionPeeringProperties ... -type ExpressRouteCrossConnectionPeeringProperties struct { - // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' - PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` - // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' - State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - // PeerASN - The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // SharedKey - The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // VlanID - The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Gets whether the provider or the customer last modified the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // Ipv6PeeringConfig - The IPv6 peering configuration. - Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` +// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. +type ExpressRouteCircuitPeering struct { + autorest.Response `json:"-"` + *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { - azure.Future +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. +func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { + objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat + } + if ercp.Name != nil { + objectMap["name"] = ercp.Name + } + if ercp.Etag != nil { + objectMap["etag"] = ercp.Etag + } + if ercp.ID != nil { + objectMap["id"] = ercp.ID + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. +func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent { - erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) + if err != nil { + return err + } + ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercp.ID = &ID + } } } - return + + return nil } -// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { - azure.Future +// ExpressRouteCircuitPeeringConfig specifies the peering configuration. +type ExpressRouteCircuitPeeringConfig struct { + // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. + AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` + // AdvertisedCommunities - The communities of bgp peering. Spepcified for microsoft peering + AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` + // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' + AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` + // LegacyMode - The legacy mode of the peering. + LegacyMode *int32 `json:"legacyMode,omitempty"` + // CustomerASN - The CustomerASN of the peering. + CustomerASN *int32 `json:"customerASN,omitempty"` + // RoutingRegistryName - The RoutingRegistryName of the configuration. + RoutingRegistryName *string `json:"routingRegistryName,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) +// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that +// belong to an ExpressRouteCircuit. +type ExpressRouteCircuitPeeringListResult struct { + autorest.Response `json:"-"` + // Value - The peerings in an express route circuit. + Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering +// values. +type ExpressRouteCircuitPeeringListResultIterator struct { + i int + page ExpressRouteCircuitPeeringListResultPage +} + +// Next 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 *ExpressRouteCircuitPeeringListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return + iter.i-- + return err } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") - return + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitPeeringListResultIterator) 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 ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { + 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 ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { + if !iter.page.NotDone() { + return ExpressRouteCircuitPeering{} } - ar.Response = future.Response() - return + return iter.page.Values()[iter.i] } -// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionProperties struct { - // PrimaryAzurePort - The name of the primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - The name of the secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // STag - The identifier of the circuit traffic. - STag *int32 `json:"sTag,omitempty"` - // PeeringLocation - The peering location of the ExpressRoute circuit. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInMbps - The circuit bandwidth In Mbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` - // ExpressRouteCircuit - The ExpressRouteCircuit - ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` - // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' - ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - // ServiceProviderNotes - Additional read only notes set by the connectivity provider. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Peerings - The list of peerings. - Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` +// IsEmpty returns true if the ListResult contains no values. +func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { + return ercplr.Value == nil || len(*ercplr.Value) == 0 } -// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. -type ExpressRouteCrossConnectionRoutesTableSummary struct { - // Neighbor - IP address of Neighbor router - Neighbor *string `json:"neighbor,omitempty"` - // Asn - Autonomous system number. - Asn *int32 `json:"asn,omitempty"` - // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. - UpDown *string `json:"upDown,omitempty"` - // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` +// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) { + if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercplr.NextLink))) } -// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { - azure.Future +// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. +type ExpressRouteCircuitPeeringListResultPage struct { + fn func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) + ercplr ExpressRouteCircuitPeeringListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { - var done bool - done, err = future.Done(client) +// 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. +func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { + next, err := page.fn(page.ercplr) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") - } + page.ercplr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { + return !page.ercplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { + return page.ercplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { + if page.ercplr.IsEmpty() { + return nil } - return + return *page.ercplr.Value } -// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results of a +// ExpressRouteCircuitPeeringPropertiesFormat ... +type ExpressRouteCircuitPeeringPropertiesFormat struct { + // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` + // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' + State ExpressRoutePeeringState `json:"state,omitempty"` + // AzureASN - The Azure ASN. + AzureASN *int32 `json:"azureASN,omitempty"` + // PeerASN - The peer ASN. + PeerASN *int64 `json:"peerASN,omitempty"` + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // PrimaryAzurePort - The primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - The secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // SharedKey - The shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // VlanID - The VLAN ID. + VlanID *int32 `json:"vlanId,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // Stats - Gets peering stats. + Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // LastModifiedBy - Gets whether the provider or the customer last modified the peering. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // RouteFilter - The reference of the RouteFilter resource. + RouteFilter *RouteFilter `json:"routeFilter,omitempty"` + // Ipv6PeeringConfig - The IPv6 peering configuration. + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` + // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. + Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` +} + +// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type ExpressRouteCrossConnectionsListArpTableFuture struct { +type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { +func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { - ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) + if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { + ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") } } return } -// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a +// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type ExpressRouteCrossConnectionsListRoutesTableFuture struct { +type ExpressRouteCircuitPeeringsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { +func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { - ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } -// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { - var done bool +// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. +type ExpressRouteCircuitPropertiesFormat struct { + // AllowClassicOperations - Allow classic operations + AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` + // CircuitProvisioningState - The CircuitProvisioningState state of the resource. + CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` + // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` + // Authorizations - The list of authorizations. + Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` + // ServiceKey - The ServiceKey. + ServiceKey *string `json:"serviceKey,omitempty"` + // ServiceProviderNotes - The ServiceProviderNotes. + ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` + // ServiceProviderProperties - The ServiceProviderProperties. + ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` +} + +// ExpressRouteCircuitReference ... +type ExpressRouteCircuitReference struct { + // ID - Corresponding Express Route Circuit Id. + ID *string `json:"id,omitempty"` +} + +// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit +type ExpressRouteCircuitRoutesTable struct { + // NetworkProperty - IP address of a network entity + NetworkProperty *string `json:"network,omitempty"` + // NextHop - NextHop address + NextHop *string `json:"nextHop,omitempty"` + // LocPrf - Local preference value as set with the set local-preference route-map configuration command + LocPrf *string `json:"locPrf,omitempty"` + // Weight - Route Weight. + Weight *int32 `json:"weight,omitempty"` + // Path - Autonomous system paths to the destination network. + Path *string `json:"path,omitempty"` +} + +// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTableSummary struct { + // Neighbor - IP address of the neighbor. + Neighbor *string `json:"neighbor,omitempty"` + // V - BGP version number spoken to the neighbor. + V *int32 `json:"v,omitempty"` + // As - Autonomous system number. + As *int32 `json:"as,omitempty"` + // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + UpDown *string `json:"upDown,omitempty"` + // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StatePfxRcd *string `json:"statePfxRcd,omitempty"` +} + +// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API. +type ExpressRouteCircuitsArpTableListResult struct { + autorest.Response `json:"-"` + // Value - Gets list of the ARP table. + Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { + var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent { - erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.CreateOrUpdateResponder(erc.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") } } return } -// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with the -// Express Route Cross Connections. -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - autorest.Response `json:"-"` - // Value - A list of the routes table. - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExpressRouteCircuitsDeleteFuture struct { + azure.Future } -// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit. +type ExpressRouteCircuitServiceProviderProperties struct { + // ServiceProviderName - The serviceProviderName. + ServiceProviderName *string `json:"serviceProviderName,omitempty"` + // PeeringLocation - The peering location. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - The BandwidthInMbps. + BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` +} + +// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. +type ExpressRouteCircuitSku struct { + // Name - The name of the SKU. + Name *string `json:"name,omitempty"` + // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` + // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData' + Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` +} + +// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type ExpressRouteCrossConnectionsUpdateTagsFuture struct { +type ExpressRouteCircuitsListArpTableFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { +func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.UpdateTagsResponder(ercc.Response.Response) + if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { + ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") } } return } -// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. -type ExpressRouteServiceProvider struct { - *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListRoutesTableFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. -func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { - objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + return } - if ersp.ID != nil { - objectMap["id"] = ersp.ID + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") + return } - if ersp.Name != nil { - objectMap["name"] = ersp.Name + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { + ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") + } } - if ersp.Type != nil { - objectMap["type"] = ersp.Type + return +} + +// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + return } - if ersp.Location != nil { - objectMap["location"] = ersp.Location + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") + return } - if ersp.Tags != nil { - objectMap["tags"] = ersp.Tags + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { + ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. -func (ersp *ExpressRouteServiceProvider) 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 expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat - err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) - if err != nil { - return err - } - ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ersp.ID = &ID - } - case "name": +// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route +// Circuits API. +type ExpressRouteCircuitsRoutesTableListResult struct { + autorest.Response `json:"-"` + // Value - The list of routes table. + Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the Express Route +// Circuits API. +type ExpressRouteCircuitsRoutesTableSummaryListResult struct { + autorest.Response `json:"-"` + // Value - A list of the routes table. + Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitStats contains stats associated with the peering. +type ExpressRouteCircuitStats struct { + autorest.Response `json:"-"` + // PrimarybytesIn - Gets BytesIn of the peering. + PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` + // PrimarybytesOut - Gets BytesOut of the peering. + PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` + // SecondarybytesIn - Gets BytesIn of the peering. + SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` + // SecondarybytesOut - Gets BytesOut of the peering. + SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` +} + +// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExpressRouteCircuitsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.UpdateTagsResponder(erc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnection expressRouteCrossConnection resource +type ExpressRouteCrossConnection struct { + autorest.Response `json:"-"` + *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection. +func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercc.ExpressRouteCrossConnectionProperties != nil { + objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties + } + if ercc.Etag != nil { + objectMap["etag"] = ercc.Etag + } + if ercc.ID != nil { + objectMap["id"] = ercc.ID + } + if ercc.Name != nil { + objectMap["name"] = ercc.Name + } + if ercc.Type != nil { + objectMap["type"] = ercc.Type + } + if ercc.Location != nil { + objectMap["location"] = ercc.Location + } + if ercc.Tags != nil { + objectMap["tags"] = ercc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. +func (ercc *ExpressRouteCrossConnection) 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 expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties + err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) + if err != nil { + return err + } + ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercc.ID = &ID + } + case "name": if v != nil { var name string err = json.Unmarshal(*v, &name) if err != nil { return err } - ersp.Name = &name + ercc.Name = &name } case "type": if v != nil { @@ -7599,7 +7698,7 @@ func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { if err != nil { return err } - ersp.Type = &typeVar + ercc.Type = &typeVar } case "location": if v != nil { @@ -7608,7 +7707,7 @@ func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { if err != nil { return err } - ersp.Location = &location + ercc.Location = &location } case "tags": if v != nil { @@ -7617,7 +7716,7 @@ func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { if err != nil { return err } - ersp.Tags = tags + ercc.Tags = tags } } } @@ -7625,34 +7724,25 @@ func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider -// resources. -type ExpressRouteServiceProviderBandwidthsOffered struct { - // OfferName - The OfferName. - OfferName *string `json:"offerName,omitempty"` - // ValueInMbps - The ValueInMbps. - ValueInMbps *int32 `json:"valueInMbps,omitempty"` -} - -// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. -type ExpressRouteServiceProviderListResult struct { +// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. +type ExpressRouteCrossConnectionListResult struct { autorest.Response `json:"-"` - // Value - A list of ExpressRouteResourceProvider resources. - Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` + // Value - A list of ExpressRouteCrossConnection resources. + Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of -// ExpressRouteServiceProvider values. -type ExpressRouteServiceProviderListResultIterator struct { +// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of +// ExpressRouteCrossConnection values. +type ExpressRouteCrossConnectionListResultIterator struct { i int - page ExpressRouteServiceProviderListResultPage + page ExpressRouteCrossConnectionListResultPage } // Next 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 *ExpressRouteServiceProviderListResultIterator) Next() error { +func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -7667,206 +7757,108 @@ func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { +func (iter ExpressRouteCrossConnectionListResultIterator) 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 ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { +func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { 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 ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { +func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { if !iter.page.NotDone() { - return ExpressRouteServiceProvider{} + return ExpressRouteCrossConnection{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { - return ersplr.Value == nil || len(*ersplr.Value) == 0 +func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { + return ercclr.Value == nil || len(*ercclr.Value) == 0 } -// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. +// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) { - if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { +func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer() (*http.Request, error) { + if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ersplr.NextLink))) + autorest.WithBaseURL(to.String(ercclr.NextLink))) } -// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. -type ExpressRouteServiceProviderListResultPage struct { - fn func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) - ersplr ExpressRouteServiceProviderListResult +// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. +type ExpressRouteCrossConnectionListResultPage struct { + fn func(ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) + ercclr ExpressRouteCrossConnectionListResult } // 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. -func (page *ExpressRouteServiceProviderListResultPage) Next() error { - next, err := page.fn(page.ersplr) +func (page *ExpressRouteCrossConnectionListResultPage) Next() error { + next, err := page.fn(page.ercclr) if err != nil { return err } - page.ersplr = next + page.ercclr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { - return !page.ersplr.IsEmpty() +func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { + return !page.ercclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { - return page.ersplr +func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { + return page.ercclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { - if page.ersplr.IsEmpty() { +func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { + if page.ercclr.IsEmpty() { return nil } - return *page.ersplr.Value -} - -// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. -type ExpressRouteServiceProviderPropertiesFormat struct { - // PeeringLocations - Get a list of peering locations. - PeeringLocations *[]string `json:"peeringLocations,omitempty"` - // BandwidthsOffered - Gets bandwidths offered. - BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - // ProvisioningState - Gets the provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` + return *page.ercclr.Value } -// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) . -type FlowLogInformation struct { - autorest.Response `json:"-"` - // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) . - TargetResourceID *string `json:"targetResourceId,omitempty"` - *FlowLogProperties `json:"properties,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` +// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. +type ExpressRouteCrossConnectionPeering struct { + autorest.Response `json:"-"` + *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for FlowLogInformation. -func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fli.TargetResourceID != nil { - objectMap["targetResourceId"] = fli.TargetResourceID - } - if fli.FlowLogProperties != nil { - objectMap["properties"] = fli.FlowLogProperties - } - if fli.FlowAnalyticsConfiguration != nil { - objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. -func (fli *FlowLogInformation) 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 "targetResourceId": - if v != nil { - var targetResourceID string - err = json.Unmarshal(*v, &targetResourceID) - if err != nil { - return err - } - fli.TargetResourceID = &targetResourceID - } - case "properties": - if v != nil { - var flowLogProperties FlowLogProperties - err = json.Unmarshal(*v, &flowLogProperties) - if err != nil { - return err - } - fli.FlowLogProperties = &flowLogProperties - } - case "flowAnalyticsConfiguration": - if v != nil { - var flowAnalyticsConfiguration TrafficAnalyticsProperties - err = json.Unmarshal(*v, &flowAnalyticsConfiguration) - if err != nil { - return err - } - fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration - } - } - } - - return nil -} - -// FlowLogProperties parameters that define the configuration of flow log. -type FlowLogProperties struct { - // StorageID - ID of the storage account which is used to store the flow log. - StorageID *string `json:"storageId,omitempty"` - // Enabled - Flag to enable/disable flow logging. - Enabled *bool `json:"enabled,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` -} - -// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics (optional) -// status. -type FlowLogStatusParameters struct { - // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// FrontendIPConfiguration frontend IP address of the load balancer. -type FrontendIPConfiguration struct { - autorest.Response `json:"-"` - // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. - *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for FrontendIPConfiguration. -func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. +func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if fic.FrontendIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat - } - if fic.Name != nil { - objectMap["name"] = fic.Name + if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { + objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties } - if fic.Etag != nil { - objectMap["etag"] = fic.Etag + if erccp.Name != nil { + objectMap["name"] = erccp.Name } - if fic.Zones != nil { - objectMap["zones"] = fic.Zones + if erccp.Etag != nil { + objectMap["etag"] = erccp.Etag } - if fic.ID != nil { - objectMap["id"] = fic.ID + if erccp.ID != nil { + objectMap["id"] = erccp.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. -func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. +func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -7876,12 +7868,12 @@ func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) + var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties + err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) if err != nil { return err } - fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat + erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties } case "name": if v != nil { @@ -7890,7 +7882,7 @@ func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - fic.Name = &name + erccp.Name = &name } case "etag": if v != nil { @@ -7899,16 +7891,7 @@ func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - fic.Etag = &etag - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - fic.Zones = &zones + erccp.Etag = &etag } case "id": if v != nil { @@ -7917,7 +7900,7 @@ func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - fic.ID = &ID + erccp.ID = &ID } } } @@ -7925,607 +7908,428 @@ func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { return nil } -// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. -type FrontendIPConfigurationPropertiesFormat struct { - // InboundNatRules - Read only. Inbound rules URIs that use this frontend IP. - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - // InboundNatPools - Read only. Inbound pools URIs that use this frontend IP. - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - // OutboundNatRules - Read only. Outbound rules URIs that use this frontend IP. - OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"` - // LoadBalancingRules - Gets load balancing rules URIs that use this frontend IP. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // PrivateIPAddress - The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the Public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// GatewayRoute gateway routing details -type GatewayRoute struct { - // LocalAddress - The gateway's local address - LocalAddress *string `json:"localAddress,omitempty"` - // NetworkProperty - The route's network prefix - NetworkProperty *string `json:"network,omitempty"` - // NextHop - The route's next hop - NextHop *string `json:"nextHop,omitempty"` - // SourcePeer - The peer this route was learned from - SourcePeer *string `json:"sourcePeer,omitempty"` - // Origin - The source this route was learned from - Origin *string `json:"origin,omitempty"` - // AsPath - The route's AS path sequence - AsPath *string `json:"asPath,omitempty"` - // Weight - The route's weight - Weight *int32 `json:"weight,omitempty"` +// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings that +// belong to an ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionPeeringList struct { + autorest.Response `json:"-"` + // Value - The peerings in an express route cross connection. + Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// GatewayRouteListResult list of virtual network gateway routes -type GatewayRouteListResult struct { - autorest.Response `json:"-"` - // Value - List of gateway routes - Value *[]GatewayRoute `json:"value,omitempty"` +// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of +// ExpressRouteCrossConnectionPeering values. +type ExpressRouteCrossConnectionPeeringListIterator struct { + i int + page ExpressRouteCrossConnectionPeeringListPage } -// HTTPConfiguration HTTP configuration of the connectivity check. -type HTTPConfiguration struct { - // Method - HTTP method. Possible values include: 'Get' - Method HTTPMethod `json:"method,omitempty"` - // Headers - List of HTTP headers. - Headers *[]HTTPHeader `json:"headers,omitempty"` - // ValidStatusCodes - Valid status codes. - ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` +// Next 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 *ExpressRouteCrossConnectionPeeringListIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// HTTPHeader describes the HTTP header. -type HTTPHeader struct { - // Name - The name in HTTP header. - Name *string `json:"name,omitempty"` - // Value - The value in HTTP header. - Value *string `json:"value,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// InboundNatPool inbound NAT pool of the load balancer. -type InboundNatPool struct { - // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. - *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// Response returns the raw server response from the last page request. +func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { + return iter.page.Response() } -// MarshalJSON is the custom marshaler for InboundNatPool. -func (inp InboundNatPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if inp.InboundNatPoolPropertiesFormat != nil { - objectMap["properties"] = inp.InboundNatPoolPropertiesFormat - } - if inp.Name != nil { - objectMap["name"] = inp.Name - } - if inp.Etag != nil { - objectMap["etag"] = inp.Etag - } - if inp.ID != nil { - objectMap["id"] = inp.ID +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { + if !iter.page.NotDone() { + return ExpressRouteCrossConnectionPeering{} } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. -func (inp *InboundNatPool) 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 inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat - err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) - if err != nil { - return err - } - inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - inp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - inp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - inp.ID = &ID - } - } - } - - return nil -} - -// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. -type InboundNatPoolPropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. - FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` - // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. - FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` - // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// InboundNatRule inbound NAT rule of the load balancer. -type InboundNatRule struct { - autorest.Response `json:"-"` - // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. - *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for InboundNatRule. -func (inr InboundNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if inr.InboundNatRulePropertiesFormat != nil { - objectMap["properties"] = inr.InboundNatRulePropertiesFormat - } - if inr.Name != nil { - objectMap["name"] = inr.Name - } - if inr.Etag != nil { - objectMap["etag"] = inr.Etag - } - if inr.ID != nil { - objectMap["id"] = inr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. -func (inr *InboundNatRule) 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 inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat - err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) - if err != nil { - return err - } - inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - inr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - inr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - inr.ID = &ID - } - } - } - - return nil -} - -// InboundNatRuleListResult response for ListInboundNatRule API service call. -type InboundNatRuleListResult struct { - autorest.Response `json:"-"` - // Value - A list of inbound nat rules in a load balancer. - Value *[]InboundNatRule `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. -type InboundNatRuleListResultIterator struct { - i int - page InboundNatRuleListResultPage -} - -// Next 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 *InboundNatRuleListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InboundNatRuleListResultIterator) 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 InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { - 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 InboundNatRuleListResultIterator) Value() InboundNatRule { - if !iter.page.NotDone() { - return InboundNatRule{} - } - return iter.page.Values()[iter.i] + return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (inrlr InboundNatRuleListResult) IsEmpty() bool { - return inrlr.Value == nil || len(*inrlr.Value) == 0 +func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { + return erccpl.Value == nil || len(*erccpl.Value) == 0 } -// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. +// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer() (*http.Request, error) { - if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { +func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer() (*http.Request, error) { + if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(inrlr.NextLink))) + autorest.WithBaseURL(to.String(erccpl.NextLink))) } -// InboundNatRuleListResultPage contains a page of InboundNatRule values. -type InboundNatRuleListResultPage struct { - fn func(InboundNatRuleListResult) (InboundNatRuleListResult, error) - inrlr InboundNatRuleListResult +// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. +type ExpressRouteCrossConnectionPeeringListPage struct { + fn func(ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) + erccpl ExpressRouteCrossConnectionPeeringList } // 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. -func (page *InboundNatRuleListResultPage) Next() error { - next, err := page.fn(page.inrlr) +func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error { + next, err := page.fn(page.erccpl) if err != nil { return err } - page.inrlr = next + page.erccpl = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InboundNatRuleListResultPage) NotDone() bool { - return !page.inrlr.IsEmpty() +func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { + return !page.erccpl.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { - return page.inrlr +func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { + return page.erccpl } // Values returns the slice of values for the current page or nil if there are no values. -func (page InboundNatRuleListResultPage) Values() []InboundNatRule { - if page.inrlr.IsEmpty() { +func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { + if page.erccpl.IsEmpty() { return nil } - return *page.inrlr.Value + return *page.erccpl.Value } -// InboundNatRulePropertiesFormat properties of the inbound NAT rule. -type InboundNatRulePropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // BackendIPConfiguration - A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. - BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. - FrontendPort *int32 `json:"frontendPort,omitempty"` - // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` +// ExpressRouteCrossConnectionPeeringProperties ... +type ExpressRouteCrossConnectionPeeringProperties struct { + // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` + // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' + State ExpressRoutePeeringState `json:"state,omitempty"` + // AzureASN - The Azure ASN. + AzureASN *int32 `json:"azureASN,omitempty"` + // PeerASN - The peer ASN. + PeerASN *int64 `json:"peerASN,omitempty"` + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // PrimaryAzurePort - The primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - The secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // SharedKey - The shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // VlanID - The VLAN ID. + VlanID *int32 `json:"vlanId,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // LastModifiedBy - Gets whether the provider or the customer last modified the peering. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // Ipv6PeeringConfig - The IPv6 peering configuration. + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` } -// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InboundNatRulesCreateOrUpdateFuture struct { +// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) { +func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { - inr, err = client.CreateOrUpdateResponder(inr.Response.Response) + if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent { + erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request") } } return } -// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InboundNatRulesDeleteFuture struct { +// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) { +func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") return } ar.Response = future.Response() return } -// Interface a network interface in a resource group. -type Interface struct { - autorest.Response `json:"-"` - // InterfacePropertiesFormat - Properties of the network interface. - *InterfacePropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionProperties struct { + // PrimaryAzurePort - The name of the primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - The name of the secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // STag - The identifier of the circuit traffic. + STag *int32 `json:"sTag,omitempty"` + // PeeringLocation - The peering location of the ExpressRoute circuit. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - The circuit bandwidth In Mbps. + BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` + // ExpressRouteCircuit - The ExpressRouteCircuit + ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` + // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` + // ServiceProviderNotes - Additional read only notes set by the connectivity provider. + ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` } -// MarshalJSON is the custom marshaler for Interface. -func (i Interface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if i.InterfacePropertiesFormat != nil { - objectMap["properties"] = i.InterfacePropertiesFormat - } - if i.Etag != nil { - objectMap["etag"] = i.Etag - } - if i.ID != nil { - objectMap["id"] = i.ID - } - if i.Name != nil { - objectMap["name"] = i.Name - } - if i.Type != nil { - objectMap["type"] = i.Type +// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCrossConnectionRoutesTableSummary struct { + // Neighbor - IP address of Neighbor router + Neighbor *string `json:"neighbor,omitempty"` + // Asn - Autonomous system number. + Asn *int32 `json:"asn,omitempty"` + // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + UpDown *string `json:"upDown,omitempty"` + // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` +} + +// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - if i.Location != nil { - objectMap["location"] = i.Location + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") + return } - if i.Tags != nil { - objectMap["tags"] = i.Tags + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// UnmarshalJSON is the custom unmarshaler for Interface struct. -func (i *Interface) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCrossConnectionsListArpTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { + var done bool + done, err = future.Done(client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var interfacePropertiesFormat InterfacePropertiesFormat - err = json.Unmarshal(*v, &interfacePropertiesFormat) - if err != nil { - return err - } - i.InterfacePropertiesFormat = &interfacePropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - i.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - i.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - i.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - i.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - i.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - i.Tags = tags - } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { + ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") } } - - return nil + return } -// InterfaceAssociation network interface and its custom security rules. -type InterfaceAssociation struct { - // ID - Network interface ID. - ID *string `json:"id,omitempty"` - // SecurityRules - Collection of custom security rules. - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` +// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCrossConnectionsListRoutesTableFuture struct { + azure.Future } -// InterfaceDNSSettings DNS settings of a network interface. -type InterfaceDNSSettings struct { - // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. - DNSServers *[]string `json:"dnsServers,omitempty"` - // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. - AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` - // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. - InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` - // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. - InternalFqdn *string `json:"internalFqdn,omitempty"` - // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { + ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") + } + } + return } -// InterfaceIPConfiguration iPConfiguration in a network interface. -type InterfaceIPConfiguration struct { +// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent { + erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with the +// Express Route Cross Connections. +type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { autorest.Response `json:"-"` - // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. - *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` + // Value - A list of the routes table. + Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCrossConnectionsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.UpdateTagsResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. +type ExpressRouteServiceProvider struct { + *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. -func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. +func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if iic.InterfaceIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat + if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { + objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat } - if iic.Name != nil { - objectMap["name"] = iic.Name + if ersp.ID != nil { + objectMap["id"] = ersp.ID } - if iic.Etag != nil { - objectMap["etag"] = iic.Etag + if ersp.Name != nil { + objectMap["name"] = ersp.Name } - if iic.ID != nil { - objectMap["id"] = iic.ID + if ersp.Type != nil { + objectMap["type"] = ersp.Type + } + if ersp.Location != nil { + objectMap["location"] = ersp.Location + } + if ersp.Tags != nil { + objectMap["tags"] = ersp.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. -func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. +func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -8535,12 +8339,21 @@ func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) + var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat + err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) if err != nil { return err } - iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat + ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ersp.ID = &ID } case "name": if v != nil { @@ -8549,25 +8362,34 @@ func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - iic.Name = &name + ersp.Name = &name } - case "etag": + case "type": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - iic.Etag = &etag + ersp.Type = &typeVar } - case "id": + case "location": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - iic.ID = &ID + ersp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ersp.Tags = tags } } } @@ -8575,25 +8397,34 @@ func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { return nil } -// InterfaceIPConfigurationListResult response for list ip configurations API service call. -type InterfaceIPConfigurationListResult struct { +// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider +// resources. +type ExpressRouteServiceProviderBandwidthsOffered struct { + // OfferName - The OfferName. + OfferName *string `json:"offerName,omitempty"` + // ValueInMbps - The ValueInMbps. + ValueInMbps *int32 `json:"valueInMbps,omitempty"` +} + +// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. +type ExpressRouteServiceProviderListResult struct { autorest.Response `json:"-"` - // Value - A list of ip configurations. - Value *[]InterfaceIPConfiguration `json:"value,omitempty"` + // Value - A list of ExpressRouteResourceProvider resources. + Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// InterfaceIPConfigurationListResultIterator provides access to a complete listing of InterfaceIPConfiguration -// values. -type InterfaceIPConfigurationListResultIterator struct { +// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of +// ExpressRouteServiceProvider values. +type ExpressRouteServiceProviderListResultIterator struct { i int - page InterfaceIPConfigurationListResultPage + page ExpressRouteServiceProviderListResultPage } // Next 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 *InterfaceIPConfigurationListResultIterator) Next() error { +func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -8608,480 +8439,476 @@ func (iter *InterfaceIPConfigurationListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool { +func (iter ExpressRouteServiceProviderListResultIterator) 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 InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { +func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { 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 InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { +func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { if !iter.page.NotDone() { - return InterfaceIPConfiguration{} + return ExpressRouteServiceProvider{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { - return iiclr.Value == nil || len(*iiclr.Value) == 0 +func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { + return ersplr.Value == nil || len(*ersplr.Value) == 0 } -// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer() (*http.Request, error) { - if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { +func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) { + if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(iiclr.NextLink))) + autorest.WithBaseURL(to.String(ersplr.NextLink))) } -// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. -type InterfaceIPConfigurationListResultPage struct { - fn func(InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) - iiclr InterfaceIPConfigurationListResult +// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. +type ExpressRouteServiceProviderListResultPage struct { + fn func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) + ersplr ExpressRouteServiceProviderListResult } // 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. -func (page *InterfaceIPConfigurationListResultPage) Next() error { - next, err := page.fn(page.iiclr) +func (page *ExpressRouteServiceProviderListResultPage) Next() error { + next, err := page.fn(page.ersplr) if err != nil { return err } - page.iiclr = next + page.ersplr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceIPConfigurationListResultPage) NotDone() bool { - return !page.iiclr.IsEmpty() +func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { + return !page.ersplr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { - return page.iiclr +func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { + return page.ersplr } // Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { - if page.iiclr.IsEmpty() { +func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { + if page.ersplr.IsEmpty() { return nil } - return *page.iiclr.Value + return *page.ersplr.Value } -// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. -type InterfaceIPConfigurationPropertiesFormat struct { - // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - // PrivateIPAddress - Private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` - // Subnet - Subnet bound to the IP configuration. - Subnet *Subnet `json:"subnet,omitempty"` - // Primary - Gets whether this is a primary customer address on the network interface. - Primary *bool `json:"primary,omitempty"` - // PublicIPAddress - Public IP address bound to the IP configuration. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. +type ExpressRouteServiceProviderPropertiesFormat struct { + // PeeringLocations - Get a list of peering locations. + PeeringLocations *[]string `json:"peeringLocations,omitempty"` + // BandwidthsOffered - Gets bandwidths offered. + BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` + // ProvisioningState - Gets the provisioning state of the resource. ProvisioningState *string `json:"provisioningState,omitempty"` } -// InterfaceListResult response for the ListNetworkInterface API service call. -type InterfaceListResult struct { +// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) . +type FlowLogInformation struct { autorest.Response `json:"-"` - // Value - A list of network interfaces in a resource group. - Value *[]Interface `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// InterfaceListResultIterator provides access to a complete listing of Interface values. -type InterfaceListResultIterator struct { - i int - page InterfaceListResultPage + // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) . + TargetResourceID *string `json:"targetResourceId,omitempty"` + *FlowLogProperties `json:"properties,omitempty"` + FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` } -// Next 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 *InterfaceListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() - if err != nil { - iter.i-- - return err +// MarshalJSON is the custom marshaler for FlowLogInformation. +func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fli.TargetResourceID != nil { + objectMap["targetResourceId"] = fli.TargetResourceID } - iter.i = 0 - return nil -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceListResultIterator) 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 InterfaceListResultIterator) Response() InterfaceListResult { - 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 InterfaceListResultIterator) Value() Interface { - if !iter.page.NotDone() { - return Interface{} + if fli.FlowLogProperties != nil { + objectMap["properties"] = fli.FlowLogProperties } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (ilr InterfaceListResult) IsEmpty() bool { - return ilr.Value == nil || len(*ilr.Value) == 0 -} - -// interfaceListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) { - if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { - return nil, nil + if fli.FlowAnalyticsConfiguration != nil { + objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ilr.NextLink))) -} - -// InterfaceListResultPage contains a page of Interface values. -type InterfaceListResultPage struct { - fn func(InterfaceListResult) (InterfaceListResult, error) - ilr InterfaceListResult + return json.Marshal(objectMap) } -// 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. -func (page *InterfaceListResultPage) Next() error { - next, err := page.fn(page.ilr) +// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. +func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { return err } - page.ilr = next - return nil -} + for k, v := range m { + switch k { + case "targetResourceId": + if v != nil { + var targetResourceID string + err = json.Unmarshal(*v, &targetResourceID) + if err != nil { + return err + } + fli.TargetResourceID = &targetResourceID + } + case "properties": + if v != nil { + var flowLogProperties FlowLogProperties + err = json.Unmarshal(*v, &flowLogProperties) + if err != nil { + return err + } + fli.FlowLogProperties = &flowLogProperties + } + case "flowAnalyticsConfiguration": + if v != nil { + var flowAnalyticsConfiguration TrafficAnalyticsProperties + err = json.Unmarshal(*v, &flowAnalyticsConfiguration) + if err != nil { + return err + } + fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration + } + } + } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceListResultPage) NotDone() bool { - return !page.ilr.IsEmpty() + return nil } -// Response returns the raw server response from the last page request. -func (page InterfaceListResultPage) Response() InterfaceListResult { - return page.ilr +// FlowLogProperties parameters that define the configuration of flow log. +type FlowLogProperties struct { + // StorageID - ID of the storage account which is used to store the flow log. + StorageID *string `json:"storageId,omitempty"` + // Enabled - Flag to enable/disable flow logging. + Enabled *bool `json:"enabled,omitempty"` + RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceListResultPage) Values() []Interface { - if page.ilr.IsEmpty() { - return nil - } - return *page.ilr.Value +// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics (optional) +// status. +type FlowLogStatusParameters struct { + // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status. + TargetResourceID *string `json:"targetResourceId,omitempty"` } -// InterfaceLoadBalancerListResult response for list ip configurations API service call. -type InterfaceLoadBalancerListResult struct { +// FrontendIPConfiguration frontend IP address of the load balancer. +type FrontendIPConfiguration struct { autorest.Response `json:"-"` - // Value - A list of load balancers. - Value *[]LoadBalancer `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` + // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. + *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. -type InterfaceLoadBalancerListResultIterator struct { - i int - page InterfaceLoadBalancerListResultPage +// MarshalJSON is the custom marshaler for FrontendIPConfiguration. +func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fic.FrontendIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat + } + if fic.Name != nil { + objectMap["name"] = fic.Name + } + if fic.Etag != nil { + objectMap["etag"] = fic.Etag + } + if fic.Zones != nil { + objectMap["zones"] = fic.Zones + } + if fic.ID != nil { + objectMap["id"] = fic.ID + } + return json.Marshal(objectMap) } -// Next 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 *InterfaceLoadBalancerListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. +func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 - return nil -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceLoadBalancerListResultIterator) 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 InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { - 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 InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { - if !iter.page.NotDone() { - return LoadBalancer{} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) + if err != nil { + return err + } + fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + fic.Etag = &etag + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + fic.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fic.ID = &ID + } + } } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { - return ilblr.Value == nil || len(*ilblr.Value) == 0 -} -// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer() (*http.Request, error) { - if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ilblr.NextLink))) + return nil } -// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. -type InterfaceLoadBalancerListResultPage struct { - fn func(InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) - ilblr InterfaceLoadBalancerListResult +// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. +type FrontendIPConfigurationPropertiesFormat struct { + // InboundNatRules - Read only. Inbound rules URIs that use this frontend IP. + InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` + // InboundNatPools - Read only. Inbound pools URIs that use this frontend IP. + InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` + // OutboundNatRules - Read only. Outbound rules URIs that use this frontend IP. + OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"` + // LoadBalancingRules - Gets load balancing rules URIs that use this frontend IP. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference of the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference of the Public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,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. -func (page *InterfaceLoadBalancerListResultPage) Next() error { - next, err := page.fn(page.ilblr) - if err != nil { - return err - } - page.ilblr = next - return nil +// GatewayRoute gateway routing details +type GatewayRoute struct { + // LocalAddress - The gateway's local address + LocalAddress *string `json:"localAddress,omitempty"` + // NetworkProperty - The route's network prefix + NetworkProperty *string `json:"network,omitempty"` + // NextHop - The route's next hop + NextHop *string `json:"nextHop,omitempty"` + // SourcePeer - The peer this route was learned from + SourcePeer *string `json:"sourcePeer,omitempty"` + // Origin - The source this route was learned from + Origin *string `json:"origin,omitempty"` + // AsPath - The route's AS path sequence + AsPath *string `json:"asPath,omitempty"` + // Weight - The route's weight + Weight *int32 `json:"weight,omitempty"` } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceLoadBalancerListResultPage) NotDone() bool { - return !page.ilblr.IsEmpty() +// GatewayRouteListResult list of virtual network gateway routes +type GatewayRouteListResult struct { + autorest.Response `json:"-"` + // Value - List of gateway routes + Value *[]GatewayRoute `json:"value,omitempty"` } -// Response returns the raw server response from the last page request. -func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { - return page.ilblr +// GetVpnSitesConfigurationRequest list of Vpn-Sites +type GetVpnSitesConfigurationRequest struct { + // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded. + VpnSites *[]SubResource `json:"vpnSites,omitempty"` + // OutputBlobSasURL - The sas-url to download the configurations for vpn-sites + OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { - if page.ilblr.IsEmpty() { - return nil - } - return *page.ilblr.Value +// HTTPConfiguration HTTP configuration of the connectivity check. +type HTTPConfiguration struct { + // Method - HTTP method. Possible values include: 'Get' + Method HTTPMethod `json:"method,omitempty"` + // Headers - List of HTTP headers. + Headers *[]HTTPHeader `json:"headers,omitempty"` + // ValidStatusCodes - Valid status codes. + ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` } -// InterfacePropertiesFormat networkInterface properties. -type InterfacePropertiesFormat struct { - // VirtualMachine - The reference of a virtual machine. - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - // IPConfigurations - A list of IPConfigurations of the network interface. - IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - // DNSSettings - The DNS settings in network interface. - DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` - // MacAddress - The MAC address of the network interface. - MacAddress *string `json:"macAddress,omitempty"` - // Primary - Gets whether this is a primary network interface on a virtual machine. - Primary *bool `json:"primary,omitempty"` - // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - // ResourceGUID - The resource GUID property of the network interface resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// HTTPHeader describes the HTTP header. +type HTTPHeader struct { + // Name - The name in HTTP header. + Name *string `json:"name,omitempty"` + // Value - The value in HTTP header. + Value *string `json:"value,omitempty"` } -// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InterfacesCreateOrUpdateFuture struct { - azure.Future +// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource. +type HubVirtualNetworkConnection struct { + autorest.Response `json:"-"` + *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return +// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection. +func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hvnc.HubVirtualNetworkConnectionProperties != nil { + objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") - return + if hvnc.Etag != nil { + objectMap["etag"] = hvnc.Etag } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.CreateOrUpdateResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") - } + if hvnc.ID != nil { + objectMap["id"] = hvnc.ID } - return -} - -// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type InterfacesDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") - return + if hvnc.Name != nil { + objectMap["name"] = hvnc.Name } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") - return + if hvnc.Type != nil { + objectMap["type"] = hvnc.Type } - ar.Response = future.Response() - return -} - -// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfacesGetEffectiveRouteTableFuture struct { - azure.Future + if hvnc.Location != nil { + objectMap["location"] = hvnc.Location + } + if hvnc.Tags != nil { + objectMap["tags"] = hvnc.Tags + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct. +func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") - return + return err } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { - erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { - ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties + err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties) + if err != nil { + return err + } + hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + hvnc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hvnc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hvnc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hvnc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + hvnc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + hvnc.Tags = tags + } } } - return -} -// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type InterfacesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.UpdateTagsResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return + return nil } -// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call -type IPAddressAvailabilityResult struct { - autorest.Response `json:"-"` - // Available - Private IP address availability. - Available *bool `json:"available,omitempty"` - // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. - AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` +// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection +type HubVirtualNetworkConnectionProperties struct { + // RemoteVirtualNetwork - Reference to the remote virtual network. + RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` + // AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not. + AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` + // AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways. + AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// IPConfiguration IP configuration -type IPConfiguration struct { - // IPConfigurationPropertiesFormat - Properties of the IP configuration - *IPConfigurationPropertiesFormat `json:"properties,omitempty"` +// InboundNatPool inbound NAT pool of the load balancer. +type InboundNatPool struct { + // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. + *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. @@ -9090,26 +8917,26 @@ type IPConfiguration struct { ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for IPConfiguration. -func (ic IPConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for InboundNatPool. +func (inp InboundNatPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ic.IPConfigurationPropertiesFormat != nil { - objectMap["properties"] = ic.IPConfigurationPropertiesFormat + if inp.InboundNatPoolPropertiesFormat != nil { + objectMap["properties"] = inp.InboundNatPoolPropertiesFormat } - if ic.Name != nil { - objectMap["name"] = ic.Name + if inp.Name != nil { + objectMap["name"] = inp.Name } - if ic.Etag != nil { - objectMap["etag"] = ic.Etag + if inp.Etag != nil { + objectMap["etag"] = inp.Etag } - if ic.ID != nil { - objectMap["id"] = ic.ID + if inp.ID != nil { + objectMap["id"] = inp.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. -func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. +func (inp *InboundNatPool) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9119,12 +8946,12 @@ func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) + var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat + err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) if err != nil { return err } - ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat + inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat } case "name": if v != nil { @@ -9133,7 +8960,7 @@ func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - ic.Name = &name + inp.Name = &name } case "etag": if v != nil { @@ -9142,7 +8969,7 @@ func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - ic.Etag = &etag + inp.Etag = &etag } case "id": if v != nil { @@ -9151,7 +8978,7 @@ func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - ic.ID = &ID + inp.ID = &ID } } } @@ -9159,115 +8986,59 @@ func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { return nil } -// IPConfigurationPropertiesFormat properties of IP configuration. -type IPConfigurationPropertiesFormat struct { - // PrivateIPAddress - The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. +type InboundNatPoolPropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. + FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` + // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. + FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` + // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection -type IpsecPolicy struct { - // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` - // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' - IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` - // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' - IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' - IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' - IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' - PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +// InboundNatRule inbound NAT rule of the load balancer. +type InboundNatRule struct { + autorest.Response `json:"-"` + // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. + *InboundNatRulePropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// IPTag contains the IpTag associated with the public IP address -type IPTag struct { - // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage. - IPTagType *string `json:"ipTagType,omitempty"` - // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc - Tag *string `json:"tag,omitempty"` +// MarshalJSON is the custom marshaler for InboundNatRule. +func (inr InboundNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inr.InboundNatRulePropertiesFormat != nil { + objectMap["properties"] = inr.InboundNatRulePropertiesFormat + } + if inr.Name != nil { + objectMap["name"] = inr.Name + } + if inr.Etag != nil { + objectMap["etag"] = inr.Etag + } + if inr.ID != nil { + objectMap["id"] = inr.ID + } + return json.Marshal(objectMap) } -// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. -type Ipv6ExpressRouteCircuitPeeringConfig struct { - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *RouteFilter `json:"routeFilter,omitempty"` - // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' - State ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} - -// LoadBalancer loadBalancer resource -type LoadBalancer struct { - autorest.Response `json:"-"` - // Sku - The load balancer SKU. - Sku *LoadBalancerSku `json:"sku,omitempty"` - // LoadBalancerPropertiesFormat - Properties of load balancer. - *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for LoadBalancer. -func (lb LoadBalancer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lb.Sku != nil { - objectMap["sku"] = lb.Sku - } - if lb.LoadBalancerPropertiesFormat != nil { - objectMap["properties"] = lb.LoadBalancerPropertiesFormat - } - if lb.Etag != nil { - objectMap["etag"] = lb.Etag - } - if lb.ID != nil { - objectMap["id"] = lb.ID - } - if lb.Name != nil { - objectMap["name"] = lb.Name - } - if lb.Type != nil { - objectMap["type"] = lb.Type - } - if lb.Location != nil { - objectMap["location"] = lb.Location - } - if lb.Tags != nil { - objectMap["tags"] = lb.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. -func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. +func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9275,23 +9046,23 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "sku": + case "properties": if v != nil { - var sku LoadBalancerSku - err = json.Unmarshal(*v, &sku) + var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat + err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) if err != nil { return err } - lb.Sku = &sku + inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat } - case "properties": + case "name": if v != nil { - var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat - err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat + inr.Name = &name } case "etag": if v != nil { @@ -9300,7 +9071,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.Etag = &etag + inr.Etag = &etag } case "id": if v != nil { @@ -9309,43 +9080,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lb.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lb.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - lb.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - lb.Tags = tags + inr.ID = &ID } } } @@ -9353,25 +9088,24 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { return nil } -// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. -type LoadBalancerBackendAddressPoolListResult struct { +// InboundNatRuleListResult response for ListInboundNatRule API service call. +type InboundNatRuleListResult struct { autorest.Response `json:"-"` - // Value - A list of backend address pools in a load balancer. - Value *[]BackendAddressPool `json:"value,omitempty"` + // Value - A list of inbound nat rules in a load balancer. + Value *[]InboundNatRule `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of BackendAddressPool -// values. -type LoadBalancerBackendAddressPoolListResultIterator struct { +// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. +type InboundNatRuleListResultIterator struct { i int - page LoadBalancerBackendAddressPoolListResultPage + page InboundNatRuleListResultPage } // Next 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 *LoadBalancerBackendAddressPoolListResultIterator) Next() error { +func (iter *InboundNatRuleListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -9386,300 +9120,523 @@ func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool { +func (iter InboundNatRuleListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { +func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { 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 LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { +func (iter InboundNatRuleListResultIterator) Value() InboundNatRule { if !iter.page.NotDone() { - return BackendAddressPool{} + return InboundNatRule{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { - return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 +func (inrlr InboundNatRuleListResult) IsEmpty() bool { + return inrlr.Value == nil || len(*inrlr.Value) == 0 } -// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. +// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer() (*http.Request, error) { - if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { +func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer() (*http.Request, error) { + if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lbbaplr.NextLink))) + autorest.WithBaseURL(to.String(inrlr.NextLink))) } -// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. -type LoadBalancerBackendAddressPoolListResultPage struct { - fn func(LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) - lbbaplr LoadBalancerBackendAddressPoolListResult +// InboundNatRuleListResultPage contains a page of InboundNatRule values. +type InboundNatRuleListResultPage struct { + fn func(InboundNatRuleListResult) (InboundNatRuleListResult, error) + inrlr InboundNatRuleListResult } // 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. -func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error { - next, err := page.fn(page.lbbaplr) +func (page *InboundNatRuleListResultPage) Next() error { + next, err := page.fn(page.inrlr) if err != nil { return err } - page.lbbaplr = next + page.inrlr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { - return !page.lbbaplr.IsEmpty() +func (page InboundNatRuleListResultPage) NotDone() bool { + return !page.inrlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { - return page.lbbaplr +func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { + return page.inrlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { - if page.lbbaplr.IsEmpty() { +func (page InboundNatRuleListResultPage) Values() []InboundNatRule { + if page.inrlr.IsEmpty() { return nil } - return *page.lbbaplr.Value + return *page.inrlr.Value } -// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. -type LoadBalancerFrontendIPConfigurationListResult struct { - autorest.Response `json:"-"` - // Value - A list of frontend IP configurations in a load balancer. - Value *[]FrontendIPConfiguration `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// InboundNatRulePropertiesFormat properties of the inbound NAT rule. +type InboundNatRulePropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // BackendIPConfiguration - A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. + BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` + // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of -// FrontendIPConfiguration values. -type LoadBalancerFrontendIPConfigurationListResultIterator struct { - i int - page LoadBalancerFrontendIPConfigurationListResultPage +// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type InboundNatRulesCreateOrUpdateFuture struct { + azure.Future } -// Next 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 *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) { + var done bool + done, err = future.Done(client) if err != nil { - iter.i-- - return err + err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - iter.i = 0 - return nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { + inr, err = client.CreateOrUpdateResponder(inr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") + } + } + return } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerFrontendIPConfigurationListResultIterator) 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 LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { - return iter.page.Response() +// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type InboundNatRulesDeleteFuture struct { + azure.Future } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { - if !iter.page.NotDone() { - return FrontendIPConfiguration{} +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return } - return iter.page.Values()[iter.i] + if !done { + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") + return + } + ar.Response = future.Response() + return } -// IsEmpty returns true if the ListResult contains no values. -func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { - return lbficlr.Value == nil || len(*lbficlr.Value) == 0 +// Interface a network interface in a resource group. +type Interface struct { + autorest.Response `json:"-"` + // InterfacePropertiesFormat - Properties of the network interface. + *InterfacePropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer() (*http.Request, error) { - if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { - return nil, nil +// MarshalJSON is the custom marshaler for Interface. +func (i Interface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.InterfacePropertiesFormat != nil { + objectMap["properties"] = i.InterfacePropertiesFormat } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lbficlr.NextLink))) -} - -// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. -type LoadBalancerFrontendIPConfigurationListResultPage struct { - fn func(LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) - lbficlr LoadBalancerFrontendIPConfigurationListResult + if i.Etag != nil { + objectMap["etag"] = i.Etag + } + if i.ID != nil { + objectMap["id"] = i.ID + } + if i.Name != nil { + objectMap["name"] = i.Name + } + if i.Type != nil { + objectMap["type"] = i.Type + } + if i.Location != nil { + objectMap["location"] = i.Location + } + if i.Tags != nil { + objectMap["tags"] = i.Tags + } + return json.Marshal(objectMap) } -// 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. -func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { - next, err := page.fn(page.lbficlr) +// UnmarshalJSON is the custom unmarshaler for Interface struct. +func (i *Interface) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { return err } - page.lbficlr = next - return nil -} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var interfacePropertiesFormat InterfacePropertiesFormat + err = json.Unmarshal(*v, &interfacePropertiesFormat) + if err != nil { + return err + } + i.InterfacePropertiesFormat = &interfacePropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + i.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + i.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + i.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + i.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + i.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + i.Tags = tags + } + } + } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { - return !page.lbficlr.IsEmpty() + return nil } -// Response returns the raw server response from the last page request. -func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { - return page.lbficlr +// InterfaceAssociation network interface and its custom security rules. +type InterfaceAssociation struct { + // ID - Network interface ID. + ID *string `json:"id,omitempty"` + // SecurityRules - Collection of custom security rules. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { - if page.lbficlr.IsEmpty() { - return nil - } - return *page.lbficlr.Value +// InterfaceDNSSettings DNS settings of a network interface. +type InterfaceDNSSettings struct { + // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. + DNSServers *[]string `json:"dnsServers,omitempty"` + // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. + AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` + // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. + InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` + // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. + InternalFqdn *string `json:"internalFqdn,omitempty"` + // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. + InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` } -// LoadBalancerListResult response for ListLoadBalancers API service call. -type LoadBalancerListResult struct { +// InterfaceIPConfiguration iPConfiguration in a network interface. +type InterfaceIPConfiguration struct { autorest.Response `json:"-"` - // Value - A list of load balancers in a resource group. - Value *[]LoadBalancer `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` + // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. + *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. -type LoadBalancerListResultIterator struct { - i int - page LoadBalancerListResultPage +// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. +func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iic.InterfaceIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat + } + if iic.Name != nil { + objectMap["name"] = iic.Name + } + if iic.Etag != nil { + objectMap["etag"] = iic.Etag + } + if iic.ID != nil { + objectMap["id"] = iic.ID + } + return json.Marshal(objectMap) } -// Next 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 *LoadBalancerListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. +func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 - return nil -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) + if err != nil { + return err + } + iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + iic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + iic.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + iic.ID = &ID + } + } + } + + return nil +} + +// InterfaceIPConfigurationListResult response for list ip configurations API service call. +type InterfaceIPConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - A list of ip configurations. + Value *[]InterfaceIPConfiguration `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// InterfaceIPConfigurationListResultIterator provides access to a complete listing of InterfaceIPConfiguration +// values. +type InterfaceIPConfigurationListResultIterator struct { + i int + page InterfaceIPConfigurationListResultPage +} + +// Next 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 *InterfaceIPConfigurationListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InterfaceIPConfigurationListResultIterator) 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 LoadBalancerListResultIterator) Response() LoadBalancerListResult { +func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { 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 LoadBalancerListResultIterator) Value() LoadBalancer { +func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { if !iter.page.NotDone() { - return LoadBalancer{} + return InterfaceIPConfiguration{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (lblr LoadBalancerListResult) IsEmpty() bool { - return lblr.Value == nil || len(*lblr.Value) == 0 +func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { + return iiclr.Value == nil || len(*iiclr.Value) == 0 } -// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) { - if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { +func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer() (*http.Request, error) { + if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lblr.NextLink))) + autorest.WithBaseURL(to.String(iiclr.NextLink))) } -// LoadBalancerListResultPage contains a page of LoadBalancer values. -type LoadBalancerListResultPage struct { - fn func(LoadBalancerListResult) (LoadBalancerListResult, error) - lblr LoadBalancerListResult +// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. +type InterfaceIPConfigurationListResultPage struct { + fn func(InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) + iiclr InterfaceIPConfigurationListResult } // 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. -func (page *LoadBalancerListResultPage) Next() error { - next, err := page.fn(page.lblr) +func (page *InterfaceIPConfigurationListResultPage) Next() error { + next, err := page.fn(page.iiclr) if err != nil { return err } - page.lblr = next + page.iiclr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerListResultPage) NotDone() bool { - return !page.lblr.IsEmpty() +func (page InterfaceIPConfigurationListResultPage) NotDone() bool { + return !page.iiclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { - return page.lblr +func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { + return page.iiclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerListResultPage) Values() []LoadBalancer { - if page.lblr.IsEmpty() { +func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { + if page.iiclr.IsEmpty() { return nil } - return *page.lblr.Value + return *page.iiclr.Value } -// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. -type LoadBalancerLoadBalancingRuleListResult struct { +// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. +type InterfaceIPConfigurationPropertiesFormat struct { + // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. + ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` + // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. + LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` + // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. + LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` + // PrivateIPAddress - Private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // Subnet - Subnet bound to the IP configuration. + Subnet *Subnet `json:"subnet,omitempty"` + // Primary - Gets whether this is a primary customer address on the network interface. + Primary *bool `json:"primary,omitempty"` + // PublicIPAddress - Public IP address bound to the IP configuration. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// InterfaceListResult response for the ListNetworkInterface API service call. +type InterfaceListResult struct { autorest.Response `json:"-"` - // Value - A list of load balancing rules in a load balancer. - Value *[]LoadBalancingRule `json:"value,omitempty"` + // Value - A list of network interfaces in a resource group. + Value *[]Interface `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of LoadBalancingRule -// values. -type LoadBalancerLoadBalancingRuleListResultIterator struct { +// InterfaceListResultIterator provides access to a complete listing of Interface values. +type InterfaceListResultIterator struct { i int - page LoadBalancerLoadBalancingRuleListResultPage + page InterfaceListResultPage } // Next 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 *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { +func (iter *InterfaceListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -9694,94 +9651,94 @@ func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool { +func (iter InterfaceListResultIterator) 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 LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { +func (iter InterfaceListResultIterator) Response() InterfaceListResult { 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 LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { +func (iter InterfaceListResultIterator) Value() Interface { if !iter.page.NotDone() { - return LoadBalancingRule{} + return Interface{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { - return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 +func (ilr InterfaceListResult) IsEmpty() bool { + return ilr.Value == nil || len(*ilr.Value) == 0 } -// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. +// interfaceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer() (*http.Request, error) { - if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { +func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) { + if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lblbrlr.NextLink))) + autorest.WithBaseURL(to.String(ilr.NextLink))) } -// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. -type LoadBalancerLoadBalancingRuleListResultPage struct { - fn func(LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) - lblbrlr LoadBalancerLoadBalancingRuleListResult +// InterfaceListResultPage contains a page of Interface values. +type InterfaceListResultPage struct { + fn func(InterfaceListResult) (InterfaceListResult, error) + ilr InterfaceListResult } // 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. -func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error { - next, err := page.fn(page.lblbrlr) +func (page *InterfaceListResultPage) Next() error { + next, err := page.fn(page.ilr) if err != nil { return err } - page.lblbrlr = next + page.ilr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { - return !page.lblbrlr.IsEmpty() +func (page InterfaceListResultPage) NotDone() bool { + return !page.ilr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { - return page.lblbrlr +func (page InterfaceListResultPage) Response() InterfaceListResult { + return page.ilr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { - if page.lblbrlr.IsEmpty() { +func (page InterfaceListResultPage) Values() []Interface { + if page.ilr.IsEmpty() { return nil } - return *page.lblbrlr.Value + return *page.ilr.Value } -// LoadBalancerProbeListResult response for ListProbe API service call. -type LoadBalancerProbeListResult struct { +// InterfaceLoadBalancerListResult response for list ip configurations API service call. +type InterfaceLoadBalancerListResult struct { autorest.Response `json:"-"` - // Value - A list of probes in a load balancer. - Value *[]Probe `json:"value,omitempty"` + // Value - A list of load balancers. + Value *[]LoadBalancer `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. -type LoadBalancerProbeListResultIterator struct { +// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. +type InterfaceLoadBalancerListResultIterator struct { i int - page LoadBalancerProbeListResultPage + page InterfaceLoadBalancerListResultPage } // Next 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 *LoadBalancerProbeListResultIterator) Next() error { +func (iter *InterfaceLoadBalancerListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -9796,189 +9753,250 @@ func (iter *LoadBalancerProbeListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerProbeListResultIterator) NotDone() bool { +func (iter InterfaceLoadBalancerListResultIterator) 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 LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { +func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { 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 LoadBalancerProbeListResultIterator) Value() Probe { +func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { if !iter.page.NotDone() { - return Probe{} + return LoadBalancer{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { - return lbplr.Value == nil || len(*lbplr.Value) == 0 +func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { + return ilblr.Value == nil || len(*ilblr.Value) == 0 } -// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. +// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer() (*http.Request, error) { - if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { +func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer() (*http.Request, error) { + if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lbplr.NextLink))) + autorest.WithBaseURL(to.String(ilblr.NextLink))) } -// LoadBalancerProbeListResultPage contains a page of Probe values. -type LoadBalancerProbeListResultPage struct { - fn func(LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) - lbplr LoadBalancerProbeListResult +// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. +type InterfaceLoadBalancerListResultPage struct { + fn func(InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) + ilblr InterfaceLoadBalancerListResult } // 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. -func (page *LoadBalancerProbeListResultPage) Next() error { - next, err := page.fn(page.lbplr) +func (page *InterfaceLoadBalancerListResultPage) Next() error { + next, err := page.fn(page.ilblr) if err != nil { return err } - page.lbplr = next + page.ilblr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerProbeListResultPage) NotDone() bool { - return !page.lbplr.IsEmpty() +func (page InterfaceLoadBalancerListResultPage) NotDone() bool { + return !page.ilblr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { - return page.lbplr +func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { + return page.ilblr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerProbeListResultPage) Values() []Probe { - if page.lbplr.IsEmpty() { +func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { + if page.ilblr.IsEmpty() { return nil } - return *page.lbplr.Value + return *page.ilblr.Value } -// LoadBalancerPropertiesFormat properties of the load balancer. -type LoadBalancerPropertiesFormat struct { - // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - // BackendAddressPools - Collection of backend address pools used by a load balancer - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - // Probes - Collection of probe objects used in the load balancer - Probes *[]Probe `json:"probes,omitempty"` - // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - // OutboundNatRules - The outbound NAT rules. - OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"` - // ResourceGUID - The resource GUID property of the load balancer resource. +// InterfacePropertiesFormat networkInterface properties. +type InterfacePropertiesFormat struct { + // VirtualMachine - The reference of a virtual machine. + VirtualMachine *SubResource `json:"virtualMachine,omitempty"` + // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` + // IPConfigurations - A list of IPConfigurations of the network interface. + IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + // DNSSettings - The DNS settings in network interface. + DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` + // MacAddress - The MAC address of the network interface. + MacAddress *string `json:"macAddress,omitempty"` + // Primary - Gets whether this is a primary network interface on a virtual machine. + Primary *bool `json:"primary,omitempty"` + // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + // ResourceGUID - The resource GUID property of the network interface resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type LoadBalancersCreateOrUpdateFuture struct { +type InterfacesCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { +func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.CreateOrUpdateResponder(lb.Response.Response) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.CreateOrUpdateResponder(i.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") } } return } -// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type LoadBalancersDeleteFuture struct { +// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type InterfacesDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { +func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") return } ar.Response = future.Response() return } -// LoadBalancerSku SKU of a load balancer -type LoadBalancerSku struct { - // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' - Name LoadBalancerSkuName `json:"name,omitempty"` +// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesGetEffectiveRouteTableFuture struct { + azure.Future } -// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LoadBalancersUpdateTagsFuture struct { +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { + erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") + } + } + return +} + +// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { +func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.UpdateTagsResponder(lb.Response.Response) + if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { + ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") } } return } -// LoadBalancingRule a load balancing rule for a load balancer. -type LoadBalancingRule struct { +// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type InterfacesUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.UpdateTagsResponder(i.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") + } + } + return +} + +// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call +type IPAddressAvailabilityResult struct { autorest.Response `json:"-"` - // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. - *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` + // Available - Private IP address availability. + Available *bool `json:"available,omitempty"` + // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. + AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` +} + +// IPConfiguration IP configuration +type IPConfiguration struct { + // IPConfigurationPropertiesFormat - Properties of the IP configuration + *IPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. @@ -9987,26 +10005,26 @@ type LoadBalancingRule struct { ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for LoadBalancingRule. -func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for IPConfiguration. +func (ic IPConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if lbr.LoadBalancingRulePropertiesFormat != nil { - objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat + if ic.IPConfigurationPropertiesFormat != nil { + objectMap["properties"] = ic.IPConfigurationPropertiesFormat } - if lbr.Name != nil { - objectMap["name"] = lbr.Name + if ic.Name != nil { + objectMap["name"] = ic.Name } - if lbr.Etag != nil { - objectMap["etag"] = lbr.Etag + if ic.Etag != nil { + objectMap["etag"] = ic.Etag } - if lbr.ID != nil { - objectMap["id"] = lbr.ID + if ic.ID != nil { + objectMap["id"] = ic.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. -func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. +func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -10016,12 +10034,12 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat - err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) + var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) if err != nil { return err } - lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat + ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat } case "name": if v != nil { @@ -10030,7 +10048,7 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - lbr.Name = &name + ic.Name = &name } case "etag": if v != nil { @@ -10039,7 +10057,7 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - lbr.Etag = &etag + ic.Etag = &etag } case "id": if v != nil { @@ -10048,7 +10066,7 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - lbr.ID = &ID + ic.ID = &ID } } } @@ -10056,174 +10074,82 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { return nil } -// LoadBalancingRulePropertiesFormat properties of the load balancer. -type LoadBalancingRulePropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // Probe - The reference of the load balancer probe used by the load balancing rule. - Probe *SubResource `json:"probe,omitempty"` - // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol' - LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` - // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port" - FrontendPort *int32 `json:"frontendPort,omitempty"` - // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port" - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// IPConfigurationPropertiesFormat properties of IP configuration. +type IPConfigurationPropertiesFormat struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference of the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference of the public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// LocalNetworkGateway a common class for general resource information -type LocalNetworkGateway struct { - autorest.Response `json:"-"` - // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. - *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection +type IpsecPolicy struct { + // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` + // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` + // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' + IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` + // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' + IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` + // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` + // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' + IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` + // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + DhGroup DhGroup `json:"dhGroup,omitempty"` + // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + PfsGroup PfsGroup `json:"pfsGroup,omitempty"` } -// MarshalJSON is the custom marshaler for LocalNetworkGateway. -func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lng.LocalNetworkGatewayPropertiesFormat != nil { - objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat - } - if lng.Etag != nil { - objectMap["etag"] = lng.Etag - } - if lng.ID != nil { - objectMap["id"] = lng.ID - } - if lng.Name != nil { - objectMap["name"] = lng.Name - } - if lng.Type != nil { - objectMap["type"] = lng.Type - } - if lng.Location != nil { - objectMap["location"] = lng.Location - } - if lng.Tags != nil { - objectMap["tags"] = lng.Tags - } - return json.Marshal(objectMap) +// IPTag contains the IpTag associated with the public IP address +type IPTag struct { + // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage. + IPTagType *string `json:"ipTagType,omitempty"` + // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc + Tag *string `json:"tag,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. -func (lng *LocalNetworkGateway) 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 localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat - err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) - if err != nil { - return err - } - lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - lng.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lng.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lng.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lng.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - lng.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - lng.Tags = tags - } - } - } - - return nil +// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. +type Ipv6ExpressRouteCircuitPeeringConfig struct { + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // RouteFilter - The reference of the RouteFilter resource. + RouteFilter *RouteFilter `json:"routeFilter,omitempty"` + // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' + State ExpressRouteCircuitPeeringState `json:"state,omitempty"` } -// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. -type LocalNetworkGatewayListResult struct { +// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get the next +// set of results. +type ListHubVirtualNetworkConnectionsResult struct { autorest.Response `json:"-"` - // Value - A list of local network gateways that exists in a resource group. - Value *[]LocalNetworkGateway `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // Value - List of HubVirtualNetworkConnections. + Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values. -type LocalNetworkGatewayListResultIterator struct { +// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of +// HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultIterator struct { i int - page LocalNetworkGatewayListResultPage + page ListHubVirtualNetworkConnectionsResultPage } // Next 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 *LocalNetworkGatewayListResultIterator) Next() error { +func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -10238,348 +10164,198 @@ func (iter *LocalNetworkGatewayListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { +func (iter ListHubVirtualNetworkConnectionsResultIterator) 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 LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { +func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult { 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 LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { +func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection { if !iter.page.NotDone() { - return LocalNetworkGateway{} + return HubVirtualNetworkConnection{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { - return lnglr.Value == nil || len(*lnglr.Value) == 0 +func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool { + return lhvncr.Value == nil || len(*lhvncr.Value) == 0 } -// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. +// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) { - if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { +func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer() (*http.Request, error) { + if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lnglr.NextLink))) + autorest.WithBaseURL(to.String(lhvncr.NextLink))) } -// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. -type LocalNetworkGatewayListResultPage struct { - fn func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) - lnglr LocalNetworkGatewayListResult +// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultPage struct { + fn func(ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error) + lhvncr ListHubVirtualNetworkConnectionsResult } // 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. -func (page *LocalNetworkGatewayListResultPage) Next() error { - next, err := page.fn(page.lnglr) +func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error { + next, err := page.fn(page.lhvncr) if err != nil { return err } - page.lnglr = next + page.lhvncr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LocalNetworkGatewayListResultPage) NotDone() bool { - return !page.lnglr.IsEmpty() +func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool { + return !page.lhvncr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { - return page.lnglr +func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult { + return page.lhvncr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { - if page.lnglr.IsEmpty() { +func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection { + if page.lhvncr.IsEmpty() { return nil } - return *page.lnglr.Value + return *page.lhvncr.Value } -// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties -type LocalNetworkGatewayPropertiesFormat struct { - // LocalNetworkAddressSpace - Local network site address space. - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - // GatewayIPAddress - IP address of local network gateway. - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - // BgpSettings - Local network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL +// nextLink to get the next set of results. +type ListVirtualHubsResult struct { + autorest.Response `json:"-"` + // Value - List of VirtualHubs. + Value *[]VirtualHub `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` } -// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysCreateOrUpdateFuture struct { - azure.Future +// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values. +type ListVirtualHubsResultIterator struct { + i int + page ListVirtualHubsResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") - return +// Next 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 *ListVirtualHubsResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.CreateOrUpdateResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") - } + err := iter.page.Next() + if err != nil { + iter.i-- + return err } - return + iter.i = 0 + return nil } -// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LocalNetworkGatewaysDeleteFuture struct { - azure.Future +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualHubsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return +// Response returns the raw server response from the last page request. +func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult { + 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 ListVirtualHubsResultIterator) Value() VirtualHub { + if !iter.page.NotDone() { + return VirtualHub{} } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return + return iter.page.Values()[iter.i] } -// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LocalNetworkGatewaysUpdateTagsFuture struct { - azure.Future +// IsEmpty returns true if the ListResult contains no values. +func (lvhr ListVirtualHubsResult) IsEmpty() bool { + return lvhr.Value == nil || len(*lvhr.Value) == 0 } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.UpdateTagsResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") - } +// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer() (*http.Request, error) { + if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 { + return nil, nil } - return -} - -// LogSpecification description of logging specification. -type LogSpecification struct { - // Name - The name of the specification. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the specification. - DisplayName *string `json:"displayName,omitempty"` - // BlobDuration - Duration of the blob. - BlobDuration *string `json:"blobDuration,omitempty"` -} - -// MetricSpecification description of metrics specification. -type MetricSpecification struct { - // Name - The name of the metric. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the metric. - DisplayName *string `json:"displayName,omitempty"` - // DisplayDescription - The description of the metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - // Unit - Units the metric to be displayed in. - Unit *string `json:"unit,omitempty"` - // AggregationType - The aggregation type. - AggregationType *string `json:"aggregationType,omitempty"` - // Availabilities - List of availability. - Availabilities *[]Availability `json:"availabilities,omitempty"` - // EnableRegionalMdmAccount - Whether regional MDM account enabled. - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - // FillGapWithZero - Whether gaps would be filled with zeros. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - // MetricFilterPattern - Pattern for the filter of the metric. - MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` - // Dimensions - List of dimensions. - Dimensions *[]Dimension `json:"dimensions,omitempty"` - // IsInternal - Whether the metric is internal. - IsInternal *bool `json:"isInternal,omitempty"` - // SourceMdmAccount - The source MDM account. - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - // SourceMdmNamespace - The source MDM namespace. - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - // ResourceIDDimensionNameOverride - The resource Id dimension name override. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvhr.NextLink))) } -// NextHopParameters parameters that define the source and destination endpoint. -type NextHopParameters struct { - // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // SourceIPAddress - The source IP address. - SourceIPAddress *string `json:"sourceIPAddress,omitempty"` - // DestinationIPAddress - The destination IP address. - DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` - // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` +// ListVirtualHubsResultPage contains a page of VirtualHub values. +type ListVirtualHubsResultPage struct { + fn func(ListVirtualHubsResult) (ListVirtualHubsResult, error) + lvhr ListVirtualHubsResult } -// NextHopResult the information about next hop from the specified VM. -type NextHopResult struct { - autorest.Response `json:"-"` - // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' - NextHopType NextHopType `json:"nextHopType,omitempty"` - // NextHopIPAddress - Next hop IP Address - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. - RouteTableID *string `json:"routeTableId,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. +func (page *ListVirtualHubsResultPage) Next() error { + next, err := page.fn(page.lvhr) + if err != nil { + return err + } + page.lvhr = next + return nil } -// Operation network REST API operation definition. -type Operation struct { - // Name - Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` - // Display - Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - // Origin - Origin of the operation. - Origin *string `json:"origin,omitempty"` - // OperationPropertiesFormat - Operation properties format. - *OperationPropertiesFormat `json:"properties,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualHubsResultPage) NotDone() bool { + return !page.lvhr.IsEmpty() } -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if o.Name != nil { - objectMap["name"] = o.Name - } - if o.Display != nil { - objectMap["display"] = o.Display - } - if o.Origin != nil { - objectMap["origin"] = o.Origin - } - if o.OperationPropertiesFormat != nil { - objectMap["properties"] = o.OperationPropertiesFormat - } - return json.Marshal(objectMap) +// Response returns the raw server response from the last page request. +func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult { + return page.lvhr } -// UnmarshalJSON is the custom unmarshaler for Operation struct. -func (o *Operation) 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 "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - o.Name = &name - } - case "display": - if v != nil { - var display OperationDisplay - err = json.Unmarshal(*v, &display) - if err != nil { - return err - } - o.Display = &display - } - case "origin": - if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) - if err != nil { - return err - } - o.Origin = &origin - } - case "properties": - if v != nil { - var operationPropertiesFormat OperationPropertiesFormat - err = json.Unmarshal(*v, &operationPropertiesFormat) - if err != nil { - return err - } - o.OperationPropertiesFormat = &operationPropertiesFormat - } - } +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualHubsResultPage) Values() []VirtualHub { + if page.lvhr.IsEmpty() { + return nil } - - return nil -} - -// OperationDisplay display metadata associated with the operation. -type OperationDisplay struct { - // Provider - Service provider: Microsoft Network. - Provider *string `json:"provider,omitempty"` - // Resource - Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` - // Operation - Type of the operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - // Description - Description of the operation. - Description *string `json:"description,omitempty"` + return *page.lvhr.Value } -// OperationListResult result of the request to list Network operations. It contains a list of operations and a URL -// link to get the next set of results. -type OperationListResult struct { +// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL +// nextLink to get the next set of results. +type ListVirtualWANsResult struct { autorest.Response `json:"-"` - // Value - List of Network operations supported by the Network resource provider. - Value *[]Operation `json:"value,omitempty"` + // Value - List of VirtualWANs. + Value *[]VirtualWAN `json:"value,omitempty"` // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { +// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values. +type ListVirtualWANsResultIterator struct { i int - page OperationListResultPage + page ListVirtualWANsResultPage } // Next 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 *OperationListResultIterator) Next() error { +func (iter *ListVirtualWANsResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -10594,521 +10370,438 @@ func (iter *OperationListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) NotDone() bool { +func (iter ListVirtualWANsResultIterator) 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 OperationListResultIterator) Response() OperationListResult { +func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult { 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 OperationListResultIterator) Value() Operation { +func (iter ListVirtualWANsResultIterator) Value() VirtualWAN { if !iter.page.NotDone() { - return Operation{} + return VirtualWAN{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (olr OperationListResult) IsEmpty() bool { - return olr.Value == nil || len(*olr.Value) == 0 +func (lvwnr ListVirtualWANsResult) IsEmpty() bool { + return lvwnr.Value == nil || len(*lvwnr.Value) == 0 } -// operationListResultPreparer prepares a request to retrieve the next set of results. +// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { +func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer() (*http.Request, error) { + if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) + autorest.WithBaseURL(to.String(lvwnr.NextLink))) } -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(OperationListResult) (OperationListResult, error) - olr OperationListResult +// ListVirtualWANsResultPage contains a page of VirtualWAN values. +type ListVirtualWANsResultPage struct { + fn func(ListVirtualWANsResult) (ListVirtualWANsResult, error) + lvwnr ListVirtualWANsResult } // 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. -func (page *OperationListResultPage) Next() error { - next, err := page.fn(page.olr) +func (page *ListVirtualWANsResultPage) Next() error { + next, err := page.fn(page.lvwnr) if err != nil { return err } - page.olr = next + page.lvwnr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() +func (page ListVirtualWANsResultPage) NotDone() bool { + return !page.lvwnr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr +func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult { + return page.lvwnr } // Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { +func (page ListVirtualWANsResultPage) Values() []VirtualWAN { + if page.lvwnr.IsEmpty() { return nil } - return *page.olr.Value -} - -// OperationPropertiesFormat description of operation properties format. -type OperationPropertiesFormat struct { - // ServiceSpecification - Specification of the service. - ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` + return *page.lvwnr.Value } -// OperationPropertiesFormatServiceSpecification specification of the service. -type OperationPropertiesFormatServiceSpecification struct { - // MetricSpecifications - Operation service specification. - MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` - // LogSpecifications - Operation log specification. - LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` +// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. It +// contains a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVpnConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of Vpn Connections. + Value *[]VpnConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` } -// OutboundNatRule outbound NAT pool of the load balancer. -type OutboundNatRule struct { - // OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule. - *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values. +type ListVpnConnectionsResultIterator struct { + i int + page ListVpnConnectionsResultPage } -// MarshalJSON is the custom marshaler for OutboundNatRule. -func (onr OutboundNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if onr.OutboundNatRulePropertiesFormat != nil { - objectMap["properties"] = onr.OutboundNatRulePropertiesFormat - } - if onr.Name != nil { - objectMap["name"] = onr.Name - } - if onr.Etag != nil { - objectMap["etag"] = onr.Etag - } - if onr.ID != nil { - objectMap["id"] = onr.ID +// Next 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 *ListVpnConnectionsResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct. -func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) + err := iter.page.Next() if err != nil { + iter.i-- return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat - err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat) - if err != nil { - return err - } - onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - onr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - onr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - onr.ID = &ID - } - } - } - + iter.i = 0 return nil } -// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer. -type OutboundNatRulePropertiesFormat struct { - // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. - AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` - // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. - FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` - // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnConnectionsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// PacketCapture parameters that define the create packet capture operation. -type PacketCapture struct { - *PacketCaptureParameters `json:"properties,omitempty"` +// Response returns the raw server response from the last page request. +func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult { + return iter.page.Response() } -// MarshalJSON is the custom marshaler for PacketCapture. -func (pc PacketCapture) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pc.PacketCaptureParameters != nil { - objectMap["properties"] = pc.PacketCaptureParameters +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListVpnConnectionsResultIterator) Value() VpnConnection { + if !iter.page.NotDone() { + return VpnConnection{} } - return json.Marshal(objectMap) + return iter.page.Values()[iter.i] } -// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. -func (pc *PacketCapture) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// IsEmpty returns true if the ListResult contains no values. +func (lvcr ListVpnConnectionsResult) IsEmpty() bool { + return lvcr.Value == nil || len(*lvcr.Value) == 0 +} + +// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer() (*http.Request, error) { + if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvcr.NextLink))) +} + +// ListVpnConnectionsResultPage contains a page of VpnConnection values. +type ListVpnConnectionsResultPage struct { + fn func(ListVpnConnectionsResult) (ListVpnConnectionsResult, error) + lvcr ListVpnConnectionsResult +} + +// 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. +func (page *ListVpnConnectionsResultPage) Next() error { + next, err := page.fn(page.lvcr) if err != nil { return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var packetCaptureParameters PacketCaptureParameters - err = json.Unmarshal(*v, &packetCaptureParameters) - if err != nil { - return err - } - pc.PacketCaptureParameters = &packetCaptureParameters - } - } - } - + page.lvcr = next return nil } -// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. -type PacketCaptureFilter struct { - // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' - Protocol PcProtocol `json:"protocol,omitempty"` - // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalPort *string `json:"localPort,omitempty"` - // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemotePort *string `json:"remotePort,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnConnectionsResultPage) NotDone() bool { + return !page.lvcr.IsEmpty() } -// PacketCaptureListResult list of packet capture sessions. -type PacketCaptureListResult struct { - autorest.Response `json:"-"` - // Value - Information about packet capture sessions. - Value *[]PacketCaptureResult `json:"value,omitempty"` +// Response returns the raw server response from the last page request. +func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult { + return page.lvcr } -// PacketCaptureParameters parameters that define the create packet capture operation. -type PacketCaptureParameters struct { - // Target - The ID of the targeted resource, only VM is currently supported. - Target *string `json:"target,omitempty"` - // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` - // TotalBytesPerSession - Maximum size of the capture output. - TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` - // TimeLimitInSeconds - Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnConnectionsResultPage) Values() []VpnConnection { + if page.lvcr.IsEmpty() { + return nil + } + return *page.lvcr.Value } -// PacketCaptureQueryStatusResult status of packet capture session. -type PacketCaptureQueryStatusResult struct { +// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a URL +// nextLink to get the next set of results. +type ListVpnGatewaysResult struct { autorest.Response `json:"-"` - // Name - The name of the packet capture resource. - Name *string `json:"name,omitempty"` - // ID - The ID of the packet capture resource. - ID *string `json:"id,omitempty"` - // CaptureStartTime - The start time of the packet capture session. - CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` - // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' - PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` - // StopReason - The reason the current packet capture session was stopped. - StopReason *string `json:"stopReason,omitempty"` - // PacketCaptureError - List of errors of packet capture session. - PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` + // Value - List of VpnGateways. + Value *[]VpnGateway `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` } -// PacketCaptureResult information about packet capture session. -type PacketCaptureResult struct { - autorest.Response `json:"-"` - // Name - Name of the packet capture session. - Name *string `json:"name,omitempty"` - // ID - ID of the packet capture operation. - ID *string `json:"id,omitempty"` - Etag *string `json:"etag,omitempty"` - *PacketCaptureResultProperties `json:"properties,omitempty"` +// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values. +type ListVpnGatewaysResultIterator struct { + i int + page ListVpnGatewaysResultPage } -// MarshalJSON is the custom marshaler for PacketCaptureResult. -func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pcr.Name != nil { - objectMap["name"] = pcr.Name +// Next 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 *ListVpnGatewaysResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if pcr.ID != nil { - objectMap["id"] = pcr.ID + err := iter.page.Next() + if err != nil { + iter.i-- + return err } - if pcr.Etag != nil { - objectMap["etag"] = pcr.Etag + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnGatewaysResultIterator) 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 ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult { + 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 ListVpnGatewaysResultIterator) Value() VpnGateway { + if !iter.page.NotDone() { + return VpnGateway{} } - if pcr.PacketCaptureResultProperties != nil { - objectMap["properties"] = pcr.PacketCaptureResultProperties + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvgr ListVpnGatewaysResult) IsEmpty() bool { + return lvgr.Value == nil || len(*lvgr.Value) == 0 +} + +// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer() (*http.Request, error) { + if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 { + return nil, nil } - return json.Marshal(objectMap) + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvgr.NextLink))) } -// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. -func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// ListVpnGatewaysResultPage contains a page of VpnGateway values. +type ListVpnGatewaysResultPage struct { + fn func(ListVpnGatewaysResult) (ListVpnGatewaysResult, error) + lvgr ListVpnGatewaysResult +} + +// 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. +func (page *ListVpnGatewaysResultPage) Next() error { + next, err := page.fn(page.lvgr) if err != nil { return err } - for k, v := range m { - switch k { - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pcr.Name = &name - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pcr.ID = &ID - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pcr.Etag = &etag - } - case "properties": - if v != nil { - var packetCaptureResultProperties PacketCaptureResultProperties - err = json.Unmarshal(*v, &packetCaptureResultProperties) - if err != nil { - return err - } - pcr.PacketCaptureResultProperties = &packetCaptureResultProperties - } - } - } - + page.lvgr = next return nil } -// PacketCaptureResultProperties describes the properties of a packet capture session. -type PacketCaptureResultProperties struct { - // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Target - The ID of the targeted resource, only VM is currently supported. - Target *string `json:"target,omitempty"` - // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` - // TotalBytesPerSession - Maximum size of the capture output. - TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` - // TimeLimitInSeconds - Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnGatewaysResultPage) NotDone() bool { + return !page.lvgr.IsEmpty() } -// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type PacketCapturesCreateFuture struct { - azure.Future +// Response returns the raw server response from the last page request. +func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult { + return page.lvgr } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { - pcr, err = client.CreateResponder(pcr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") - } +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnGatewaysResultPage) Values() []VpnGateway { + if page.lvgr.IsEmpty() { + return nil } - return + return *page.lvgr.Value } -// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type PacketCapturesDeleteFuture struct { - azure.Future +// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to +// get the next set of results. +type ListVpnSitesResult struct { + autorest.Response `json:"-"` + // Value - List of VpnSites. + Value *[]VpnSite `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") - return +// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values. +type ListVpnSitesResultIterator struct { + i int + page ListVpnSitesResultPage +} + +// Next 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 *ListVpnSitesResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") - return + err := iter.page.Next() + if err != nil { + iter.i-- + return err } - ar.Response = future.Response() - return + iter.i = 0 + return nil } -// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesGetStatusFuture struct { - azure.Future +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnSitesResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") - return +// Response returns the raw server response from the last page request. +func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult { + 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 ListVpnSitesResultIterator) Value() VpnSite { + if !iter.page.NotDone() { + return VpnSite{} } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { - pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") - } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvsr ListVpnSitesResult) IsEmpty() bool { + return lvsr.Value == nil || len(*lvsr.Value) == 0 +} + +// listVpnSitesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer() (*http.Request, error) { + if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvsr.NextLink))) } -// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type PacketCapturesStopFuture struct { - azure.Future +// ListVpnSitesResultPage contains a page of VpnSite values. +type ListVpnSitesResultPage struct { + fn func(ListVpnSitesResult) (ListVpnSitesResult, error) + lvsr ListVpnSitesResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) +// 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. +func (page *ListVpnSitesResultPage) Next() error { + next, err := page.fn(page.lvsr) if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") - return + return err } - ar.Response = future.Response() - return + page.lvsr = next + return nil } -// PacketCaptureStorageLocation describes the storage location for a packet capture session. -type PacketCaptureStorageLocation struct { - // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. - StorageID *string `json:"storageId,omitempty"` - // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. - StoragePath *string `json:"storagePath,omitempty"` - // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. - FilePath *string `json:"filePath,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSitesResultPage) NotDone() bool { + return !page.lvsr.IsEmpty() } -// PatchRouteFilter route Filter Resource. -type PatchRouteFilter struct { - *RouteFilterPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` +// Response returns the raw server response from the last page request. +func (page ListVpnSitesResultPage) Response() ListVpnSitesResult { + return page.lvsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSitesResultPage) Values() []VpnSite { + if page.lvsr.IsEmpty() { + return nil + } + return *page.lvsr.Value +} + +// LoadBalancer loadBalancer resource +type LoadBalancer struct { + autorest.Response `json:"-"` + // Sku - The load balancer SKU. + Sku *LoadBalancerSku `json:"sku,omitempty"` + // LoadBalancerPropertiesFormat - Properties of load balancer. + *LoadBalancerPropertiesFormat `json:"properties,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` // Type - Resource type. Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` // Tags - Resource tags. Tags map[string]*string `json:"tags"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for PatchRouteFilter. -func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for LoadBalancer. +func (lb LoadBalancer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if prf.RouteFilterPropertiesFormat != nil { - objectMap["properties"] = prf.RouteFilterPropertiesFormat + if lb.Sku != nil { + objectMap["sku"] = lb.Sku } - if prf.Name != nil { - objectMap["name"] = prf.Name + if lb.LoadBalancerPropertiesFormat != nil { + objectMap["properties"] = lb.LoadBalancerPropertiesFormat } - if prf.Etag != nil { - objectMap["etag"] = prf.Etag + if lb.Etag != nil { + objectMap["etag"] = lb.Etag } - if prf.Type != nil { - objectMap["type"] = prf.Type + if lb.ID != nil { + objectMap["id"] = lb.ID } - if prf.Tags != nil { - objectMap["tags"] = prf.Tags + if lb.Name != nil { + objectMap["name"] = lb.Name } - if prf.ID != nil { - objectMap["id"] = prf.ID + if lb.Type != nil { + objectMap["type"] = lb.Type + } + if lb.Location != nil { + objectMap["location"] = lb.Location + } + if lb.Tags != nil { + objectMap["tags"] = lb.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. -func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. +func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -11116,23 +10809,23 @@ func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": + case "sku": if v != nil { - var routeFilterPropertiesFormat RouteFilterPropertiesFormat - err = json.Unmarshal(*v, &routeFilterPropertiesFormat) + var sku LoadBalancerSku + err = json.Unmarshal(*v, &sku) if err != nil { return err } - prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat + lb.Sku = &sku } - case "name": + case "properties": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat + err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) if err != nil { return err } - prf.Name = &name + lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat } case "etag": if v != nil { @@ -11141,25 +10834,7 @@ func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { if err != nil { return err } - prf.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - prf.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - prf.Tags = tags + lb.Etag = &etag } case "id": if v != nil { @@ -11168,87 +10843,43 @@ func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { if err != nil { return err } - prf.ID = &ID + lb.ID = &ID } - } - } - - return nil -} - -// PatchRouteFilterRule route Filter Rule Resource -type PatchRouteFilterRule struct { - *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PatchRouteFilterRule. -func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if prfr.RouteFilterRulePropertiesFormat != nil { - objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat - } - if prfr.Name != nil { - objectMap["name"] = prfr.Name - } - if prfr.Etag != nil { - objectMap["etag"] = prfr.Etag - } - if prfr.ID != nil { - objectMap["id"] = prfr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. -func (prfr *PatchRouteFilterRule) 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": + case "name": if v != nil { - var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat - err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat + lb.Name = &name } - case "name": + case "type": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - prfr.Name = &name + lb.Type = &typeVar } - case "etag": + case "location": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - prfr.Etag = &etag + lb.Location = &location } - case "id": + case "tags": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var tags map[string]*string + err = json.Unmarshal(*v, &tags) if err != nil { return err } - prfr.ID = &ID + lb.Tags = tags } } } @@ -11256,372 +10887,128 @@ func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error { return nil } -// Probe a load balancer probe. -type Probe struct { +// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. +type LoadBalancerBackendAddressPoolListResult struct { autorest.Response `json:"-"` - // ProbePropertiesFormat - Properties of load balancer probe. - *ProbePropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` + // Value - A list of backend address pools in a load balancer. + Value *[]BackendAddressPool `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for Probe. -func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if p.ProbePropertiesFormat != nil { - objectMap["properties"] = p.ProbePropertiesFormat - } - if p.Name != nil { - objectMap["name"] = p.Name - } - if p.Etag != nil { - objectMap["etag"] = p.Etag - } - if p.ID != nil { - objectMap["id"] = p.ID - } - return json.Marshal(objectMap) +// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of BackendAddressPool +// values. +type LoadBalancerBackendAddressPoolListResultIterator struct { + i int + page LoadBalancerBackendAddressPoolListResultPage } -// UnmarshalJSON is the custom unmarshaler for Probe struct. -func (p *Probe) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// Next 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 *LoadBalancerBackendAddressPoolListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() if err != nil { + iter.i-- return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var probePropertiesFormat ProbePropertiesFormat - err = json.Unmarshal(*v, &probePropertiesFormat) - if err != nil { - return err - } - p.ProbePropertiesFormat = &probePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - p.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - p.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - p.ID = &ID - } - } - } - + iter.i = 0 return nil } -// ProbePropertiesFormat load balancer probe resource. -type ProbePropertiesFormat struct { - // LoadBalancingRules - The load balancer rules that use this probe. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS' - Protocol ProbeProtocol `json:"protocol,omitempty"` - // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. - Port *int32 `json:"port,omitempty"` - // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. - IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` - // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. - NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` - // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. - RequestPath *string `json:"requestPath,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// ProtocolConfiguration configuration of the protocol. -type ProtocolConfiguration struct { - HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` +// Response returns the raw server response from the last page request. +func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { + return iter.page.Response() } -// PublicIPAddress public IP address resource. -type PublicIPAddress struct { - autorest.Response `json:"-"` - // Sku - The public IP address SKU. - Sku *PublicIPAddressSku `json:"sku,omitempty"` - // PublicIPAddressPropertiesFormat - Public IP address properties. - *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { + if !iter.page.NotDone() { + return BackendAddressPool{} + } + return iter.page.Values()[iter.i] } -// MarshalJSON is the custom marshaler for PublicIPAddress. -func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pia.Sku != nil { - objectMap["sku"] = pia.Sku +// IsEmpty returns true if the ListResult contains no values. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { + return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 +} + +// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer() (*http.Request, error) { + if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { + return nil, nil } - if pia.PublicIPAddressPropertiesFormat != nil { - objectMap["properties"] = pia.PublicIPAddressPropertiesFormat - } - if pia.Etag != nil { - objectMap["etag"] = pia.Etag - } - if pia.Zones != nil { - objectMap["zones"] = pia.Zones - } - if pia.ID != nil { - objectMap["id"] = pia.ID - } - if pia.Name != nil { - objectMap["name"] = pia.Name - } - if pia.Type != nil { - objectMap["type"] = pia.Type - } - if pia.Location != nil { - objectMap["location"] = pia.Location - } - if pia.Tags != nil { - objectMap["tags"] = pia.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. -func (pia *PublicIPAddress) 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 "sku": - if v != nil { - var sku PublicIPAddressSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - pia.Sku = &sku - } - case "properties": - if v != nil { - var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat - err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) - if err != nil { - return err - } - pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pia.Etag = &etag - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - pia.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pia.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pia.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pia.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pia.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pia.Tags = tags - } - } - } - - return nil -} - -// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address -type PublicIPAddressDNSSettings struct { - // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - Fqdn *string `json:"fqdn,omitempty"` - // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - ReverseFqdn *string `json:"reverseFqdn,omitempty"` + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lbbaplr.NextLink))) } -// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PublicIPAddressesCreateOrUpdateFuture struct { - azure.Future +// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. +type LoadBalancerBackendAddressPoolListResultPage struct { + fn func(LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) + lbbaplr LoadBalancerBackendAddressPoolListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { - var done bool - done, err = future.Done(client) +// 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. +func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error { + next, err := page.fn(page.lbbaplr) if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { - pia, err = client.CreateOrUpdateResponder(pia.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request") - } + return err } - return -} - -// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PublicIPAddressesDeleteFuture struct { - azure.Future + page.lbbaplr = next + return nil } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") - return - } - ar.Response = future.Response() - return +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { + return !page.lbbaplr.IsEmpty() } -// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PublicIPAddressesUpdateTagsFuture struct { - azure.Future +// Response returns the raw server response from the last page request. +func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { + return page.lbbaplr } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { - pia, err = client.UpdateTagsResponder(pia.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request") - } +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { + if page.lbbaplr.IsEmpty() { + return nil } - return + return *page.lbbaplr.Value } -// PublicIPAddressListResult response for ListPublicIpAddresses API service call. -type PublicIPAddressListResult struct { +// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. +type LoadBalancerFrontendIPConfigurationListResult struct { autorest.Response `json:"-"` - // Value - A list of public IP addresses that exists in a resource group. - Value *[]PublicIPAddress `json:"value,omitempty"` + // Value - A list of frontend IP configurations in a load balancer. + Value *[]FrontendIPConfiguration `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. -type PublicIPAddressListResultIterator struct { +// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of +// FrontendIPConfiguration values. +type LoadBalancerFrontendIPConfigurationListResultIterator struct { i int - page PublicIPAddressListResultPage + page LoadBalancerFrontendIPConfigurationListResultPage } // Next 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 *PublicIPAddressListResultIterator) Next() error { +func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -11636,467 +11023,197 @@ func (iter *PublicIPAddressListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PublicIPAddressListResultIterator) NotDone() bool { +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) 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 PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { 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 PublicIPAddressListResultIterator) Value() PublicIPAddress { +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { if !iter.page.NotDone() { - return PublicIPAddress{} + return FrontendIPConfiguration{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (pialr PublicIPAddressListResult) IsEmpty() bool { - return pialr.Value == nil || len(*pialr.Value) == 0 +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { + return lbficlr.Value == nil || len(*lbficlr.Value) == 0 } -// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) { - if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer() (*http.Request, error) { + if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(pialr.NextLink))) + autorest.WithBaseURL(to.String(lbficlr.NextLink))) } -// PublicIPAddressListResultPage contains a page of PublicIPAddress values. -type PublicIPAddressListResultPage struct { - fn func(PublicIPAddressListResult) (PublicIPAddressListResult, error) - pialr PublicIPAddressListResult +// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. +type LoadBalancerFrontendIPConfigurationListResultPage struct { + fn func(LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) + lbficlr LoadBalancerFrontendIPConfigurationListResult } // 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. -func (page *PublicIPAddressListResultPage) Next() error { - next, err := page.fn(page.pialr) +func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { + next, err := page.fn(page.lbficlr) if err != nil { return err } - page.pialr = next + page.lbficlr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PublicIPAddressListResultPage) NotDone() bool { - return !page.pialr.IsEmpty() +func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { + return !page.lbficlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { - return page.pialr +func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { + return page.lbficlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { - if page.pialr.IsEmpty() { +func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { + if page.lbficlr.IsEmpty() { return nil } - return *page.pialr.Value + return *page.lbficlr.Value } -// PublicIPAddressPropertiesFormat public IP address properties. -type PublicIPAddressPropertiesFormat struct { - // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' - PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` - // IPConfiguration - The IP configuration associated with the public IP address. - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - // DNSSettings - The FQDN of the DNS record associated with the public IP address. - DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` - // IPTags - The list of tags associated with the public IP address. - IPTags *[]IPTag `json:"ipTags,omitempty"` - // IPAddress - The IP address associated with the public IP address resource. - IPAddress *string `json:"ipAddress,omitempty"` - // IdleTimeoutInMinutes - The idle timeout of the public IP address. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // ResourceGUID - The resource GUID property of the public IP resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// LoadBalancerListResult response for ListLoadBalancers API service call. +type LoadBalancerListResult struct { + autorest.Response `json:"-"` + // Value - A list of load balancers in a resource group. + Value *[]LoadBalancer `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// PublicIPAddressSku SKU of a public IP address -type PublicIPAddressSku struct { - // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' - Name PublicIPAddressSkuName `json:"name,omitempty"` +// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. +type LoadBalancerListResultIterator struct { + i int + page LoadBalancerListResultPage } -// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. -type QueryTroubleshootingParameters struct { - // TargetResourceID - The target resource ID to query the troubleshooting result. - TargetResourceID *string `json:"targetResourceId,omitempty"` +// Next 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 *LoadBalancerListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// Resource common resource representation. -type Resource struct { - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LoadBalancerListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.ID != nil { - objectMap["id"] = r.ID - } - if r.Name != nil { - objectMap["name"] = r.Name - } - if r.Type != nil { - objectMap["type"] = r.Type - } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags +// Response returns the raw server response from the last page request. +func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult { + 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 LoadBalancerListResultIterator) Value() LoadBalancer { + if !iter.page.NotDone() { + return LoadBalancer{} } - return json.Marshal(objectMap) + return iter.page.Values()[iter.i] } -// ResourceNavigationLink resourceNavigationLink resource. -type ResourceNavigationLink struct { - // ResourceNavigationLinkFormat - Resource navigation link properties format. - *ResourceNavigationLinkFormat `json:"properties,omitempty"` - // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// IsEmpty returns true if the ListResult contains no values. +func (lblr LoadBalancerListResult) IsEmpty() bool { + return lblr.Value == nil || len(*lblr.Value) == 0 } -// MarshalJSON is the custom marshaler for ResourceNavigationLink. -func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rnl.ResourceNavigationLinkFormat != nil { - objectMap["properties"] = rnl.ResourceNavigationLinkFormat - } - if rnl.Name != nil { - objectMap["name"] = rnl.Name - } - if rnl.Etag != nil { - objectMap["etag"] = rnl.Etag - } - if rnl.ID != nil { - objectMap["id"] = rnl.ID +// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) { + if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { + return nil, nil } - return json.Marshal(objectMap) + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lblr.NextLink))) } -// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct. -func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// LoadBalancerListResultPage contains a page of LoadBalancer values. +type LoadBalancerListResultPage struct { + fn func(LoadBalancerListResult) (LoadBalancerListResult, error) + lblr LoadBalancerListResult +} + +// 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. +func (page *LoadBalancerListResultPage) Next() error { + next, err := page.fn(page.lblr) if err != nil { return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var resourceNavigationLinkFormat ResourceNavigationLinkFormat - err = json.Unmarshal(*v, &resourceNavigationLinkFormat) - if err != nil { - return err - } - rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rnl.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rnl.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rnl.ID = &ID - } - } - } - + page.lblr = next return nil } -// ResourceNavigationLinkFormat properties of ResourceNavigationLink. -type ResourceNavigationLinkFormat struct { - // LinkedResourceType - Resource type of the linked resource. - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - // Link - Link to the external resource - Link *string `json:"link,omitempty"` - // ProvisioningState - Provisioning state of the ResourceNavigationLink resource. - ProvisioningState *string `json:"provisioningState,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LoadBalancerListResultPage) NotDone() bool { + return !page.lblr.IsEmpty() } -// RetentionPolicyParameters parameters that define the retention policy for flow log. -type RetentionPolicyParameters struct { - // Days - Number of days to retain flow log records. - Days *int32 `json:"days,omitempty"` - // Enabled - Flag to enable/disable retention. - Enabled *bool `json:"enabled,omitempty"` +// Response returns the raw server response from the last page request. +func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { + return page.lblr } -// Route route resource -type Route struct { +// Values returns the slice of values for the current page or nil if there are no values. +func (page LoadBalancerListResultPage) Values() []LoadBalancer { + if page.lblr.IsEmpty() { + return nil + } + return *page.lblr.Value +} + +// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. +type LoadBalancerLoadBalancingRuleListResult struct { autorest.Response `json:"-"` - // RoutePropertiesFormat - Properties of the route. - *RoutePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for Route. -func (r Route) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.RoutePropertiesFormat != nil { - objectMap["properties"] = r.RoutePropertiesFormat - } - if r.Name != nil { - objectMap["name"] = r.Name - } - if r.Etag != nil { - objectMap["etag"] = r.Etag - } - if r.ID != nil { - objectMap["id"] = r.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Route struct. -func (r *Route) 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 routePropertiesFormat RoutePropertiesFormat - err = json.Unmarshal(*v, &routePropertiesFormat) - if err != nil { - return err - } - r.RoutePropertiesFormat = &routePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - r.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - r.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - r.ID = &ID - } - } - } - - return nil -} - -// RouteFilter route Filter Resource. -type RouteFilter struct { - autorest.Response `json:"-"` - *RouteFilterPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for RouteFilter. -func (rf RouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rf.RouteFilterPropertiesFormat != nil { - objectMap["properties"] = rf.RouteFilterPropertiesFormat - } - if rf.Etag != nil { - objectMap["etag"] = rf.Etag - } - if rf.ID != nil { - objectMap["id"] = rf.ID - } - if rf.Name != nil { - objectMap["name"] = rf.Name - } - if rf.Type != nil { - objectMap["type"] = rf.Type - } - if rf.Location != nil { - objectMap["location"] = rf.Location - } - if rf.Tags != nil { - objectMap["tags"] = rf.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RouteFilter struct. -func (rf *RouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat - err = json.Unmarshal(*v, &routeFilterPropertiesFormat) - if err != nil { - return err - } - rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rf.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rf.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rf.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rf.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rf.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - rf.Tags = tags - } - } - } - - return nil -} - -// RouteFilterListResult response for the ListRouteFilters API service call. -type RouteFilterListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of route filters in a resource group. - Value *[]RouteFilter `json:"value,omitempty"` + // Value - A list of load balancing rules in a load balancer. + Value *[]LoadBalancingRule `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values. -type RouteFilterListResultIterator struct { +// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of LoadBalancingRule +// values. +type LoadBalancerLoadBalancingRuleListResultIterator struct { i int - page RouteFilterListResultPage + page LoadBalancerLoadBalancingRuleListResultPage } // Next 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 *RouteFilterListResultIterator) Next() error { +func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -12111,199 +11228,94 @@ func (iter *RouteFilterListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteFilterListResultIterator) NotDone() bool { +func (iter LoadBalancerLoadBalancingRuleListResultIterator) 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 RouteFilterListResultIterator) Response() RouteFilterListResult { +func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { 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 RouteFilterListResultIterator) Value() RouteFilter { +func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { if !iter.page.NotDone() { - return RouteFilter{} + return LoadBalancingRule{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (rflr RouteFilterListResult) IsEmpty() bool { - return rflr.Value == nil || len(*rflr.Value) == 0 +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { + return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 } -// routeFilterListResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rflr RouteFilterListResult) routeFilterListResultPreparer() (*http.Request, error) { - if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 { +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer() (*http.Request, error) { + if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rflr.NextLink))) + autorest.WithBaseURL(to.String(lblbrlr.NextLink))) } -// RouteFilterListResultPage contains a page of RouteFilter values. -type RouteFilterListResultPage struct { - fn func(RouteFilterListResult) (RouteFilterListResult, error) - rflr RouteFilterListResult +// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. +type LoadBalancerLoadBalancingRuleListResultPage struct { + fn func(LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) + lblbrlr LoadBalancerLoadBalancingRuleListResult } // 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. -func (page *RouteFilterListResultPage) Next() error { - next, err := page.fn(page.rflr) +func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error { + next, err := page.fn(page.lblbrlr) if err != nil { return err } - page.rflr = next + page.lblbrlr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteFilterListResultPage) NotDone() bool { - return !page.rflr.IsEmpty() +func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { + return !page.lblbrlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page RouteFilterListResultPage) Response() RouteFilterListResult { - return page.rflr +func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { + return page.lblbrlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page RouteFilterListResultPage) Values() []RouteFilter { - if page.rflr.IsEmpty() { +func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { + if page.lblbrlr.IsEmpty() { return nil } - return *page.rflr.Value -} - -// RouteFilterPropertiesFormat route Filter Resource -type RouteFilterPropertiesFormat struct { - // Rules - Collection of RouteFilterRules contained within a route filter. - Rules *[]RouteFilterRule `json:"rules,omitempty"` - // Peerings - A collection of references to express route circuit peerings. - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// RouteFilterRule route Filter Rule Resource -type RouteFilterRule struct { - autorest.Response `json:"-"` - *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for RouteFilterRule. -func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rfr.RouteFilterRulePropertiesFormat != nil { - objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat - } - if rfr.Name != nil { - objectMap["name"] = rfr.Name - } - if rfr.Location != nil { - objectMap["location"] = rfr.Location - } - if rfr.Etag != nil { - objectMap["etag"] = rfr.Etag - } - if rfr.ID != nil { - objectMap["id"] = rfr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct. -func (rfr *RouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat - err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) - if err != nil { - return err - } - rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rfr.Name = &name - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rfr.Location = &location - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rfr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rfr.ID = &ID - } - } - } - - return nil + return *page.lblbrlr.Value } -// RouteFilterRuleListResult response for the ListRouteFilterRules API service call -type RouteFilterRuleListResult struct { +// LoadBalancerProbeListResult response for ListProbe API service call. +type LoadBalancerProbeListResult struct { autorest.Response `json:"-"` - // Value - Gets a list of RouteFilterRules in a resource group. - Value *[]RouteFilterRule `json:"value,omitempty"` + // Value - A list of probes in a load balancer. + Value *[]Probe `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values. -type RouteFilterRuleListResultIterator struct { +// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. +type LoadBalancerProbeListResultIterator struct { i int - page RouteFilterRuleListResultPage + page LoadBalancerProbeListResultPage } // Next 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 *RouteFilterRuleListResultIterator) Next() error { +func (iter *LoadBalancerProbeListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -12318,460 +11330,340 @@ func (iter *RouteFilterRuleListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteFilterRuleListResultIterator) NotDone() bool { +func (iter LoadBalancerProbeListResultIterator) 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 RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult { +func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { 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 RouteFilterRuleListResultIterator) Value() RouteFilterRule { +func (iter LoadBalancerProbeListResultIterator) Value() Probe { if !iter.page.NotDone() { - return RouteFilterRule{} + return Probe{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (rfrlr RouteFilterRuleListResult) IsEmpty() bool { - return rfrlr.Value == nil || len(*rfrlr.Value) == 0 +func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { + return lbplr.Value == nil || len(*lbplr.Value) == 0 } -// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer() (*http.Request, error) { - if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 { +func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer() (*http.Request, error) { + if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rfrlr.NextLink))) + autorest.WithBaseURL(to.String(lbplr.NextLink))) } -// RouteFilterRuleListResultPage contains a page of RouteFilterRule values. -type RouteFilterRuleListResultPage struct { - fn func(RouteFilterRuleListResult) (RouteFilterRuleListResult, error) - rfrlr RouteFilterRuleListResult +// LoadBalancerProbeListResultPage contains a page of Probe values. +type LoadBalancerProbeListResultPage struct { + fn func(LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) + lbplr LoadBalancerProbeListResult } // 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. -func (page *RouteFilterRuleListResultPage) Next() error { - next, err := page.fn(page.rfrlr) +func (page *LoadBalancerProbeListResultPage) Next() error { + next, err := page.fn(page.lbplr) if err != nil { return err } - page.rfrlr = next + page.lbplr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteFilterRuleListResultPage) NotDone() bool { - return !page.rfrlr.IsEmpty() +func (page LoadBalancerProbeListResultPage) NotDone() bool { + return !page.lbplr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult { - return page.rfrlr +func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { + return page.lbplr } // Values returns the slice of values for the current page or nil if there are no values. -func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { - if page.rfrlr.IsEmpty() { +func (page LoadBalancerProbeListResultPage) Values() []Probe { + if page.lbplr.IsEmpty() { return nil } - return *page.rfrlr.Value + return *page.lbplr.Value } -// RouteFilterRulePropertiesFormat route Filter Rule Resource -type RouteFilterRulePropertiesFormat struct { - // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' - Access Access `json:"access,omitempty"` - // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community' - RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` - // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] - Communities *[]string `json:"communities,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. +// LoadBalancerPropertiesFormat properties of the load balancer. +type LoadBalancerPropertiesFormat struct { + // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer + FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` + // BackendAddressPools - Collection of backend address pools used by a load balancer + BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` + // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning + LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` + // Probes - Collection of probe objects used in the load balancer + Probes *[]Probe `json:"probes,omitempty"` + // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. + InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` + // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. + InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` + // OutboundNatRules - The outbound NAT rules. + OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"` + // ResourceGUID - The resource GUID property of the load balancer resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type RouteFilterRulesCreateOrUpdateFuture struct { +type LoadBalancersCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { +func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { - rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response) + if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { + lb, err = client.CreateOrUpdateResponder(lb.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") } } return } -// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFilterRulesDeleteFuture struct { +// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type LoadBalancersDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) { +func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") return } ar.Response = future.Response() return } -// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// LoadBalancerSku SKU of a load balancer +type LoadBalancerSku struct { + // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' + Name LoadBalancerSkuName `json:"name,omitempty"` +} + +// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type RouteFilterRulesUpdateFuture struct { +type LoadBalancersUpdateTagsFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { +func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { - rfr, err = client.UpdateResponder(rfr.Response.Response) + if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { + lb, err = client.UpdateTagsResponder(lb.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") } } return } -// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFiltersCreateOrUpdateFuture struct { - azure.Future +// LoadBalancingRule a load balancing rule for a load balancer. +type LoadBalancingRule struct { + autorest.Response `json:"-"` + // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. + *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture") - return +// MarshalJSON is the custom marshaler for LoadBalancingRule. +func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbr.LoadBalancingRulePropertiesFormat != nil { + objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { - rf, err = client.CreateOrUpdateResponder(rf.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") - } + if lbr.Name != nil { + objectMap["name"] = lbr.Name } - return -} - -// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RouteFiltersDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure") - return + if lbr.Etag != nil { + objectMap["etag"] = lbr.Etag } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture") - return + if lbr.ID != nil { + objectMap["id"] = lbr.ID } - ar.Response = future.Response() - return -} - -// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RouteFiltersUpdateFuture struct { - azure.Future + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. +func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { - rf, err = client.UpdateResponder(rf.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat + err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) + if err != nil { + return err + } + lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lbr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lbr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lbr.ID = &ID + } } } - return -} - -// RouteListResult response for the ListRoute API service call -type RouteListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of routes in a resource group. - Value *[]Route `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RouteListResultIterator provides access to a complete listing of Route values. -type RouteListResultIterator struct { - i int - page RouteListResultPage -} -// Next 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 *RouteListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() - if err != nil { - iter.i-- - return err - } - iter.i = 0 return nil } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// LoadBalancingRulePropertiesFormat properties of the load balancer. +type LoadBalancingRulePropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // Probe - The reference of the load balancer probe used by the load balancing rule. + Probe *SubResource `json:"probe,omitempty"` + // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol' + LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` + // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port" + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port" + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. + DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// Response returns the raw server response from the last page request. -func (iter RouteListResultIterator) Response() RouteListResult { - return iter.page.Response() +// LocalNetworkGateway a common class for general resource information +type LocalNetworkGateway struct { + autorest.Response `json:"-"` + // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. + *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter RouteListResultIterator) Value() Route { - if !iter.page.NotDone() { - return Route{} +// MarshalJSON is the custom marshaler for LocalNetworkGateway. +func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lng.LocalNetworkGatewayPropertiesFormat != nil { + objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (rlr RouteListResult) IsEmpty() bool { - return rlr.Value == nil || len(*rlr.Value) == 0 -} - -// routeListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) { - if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { - return nil, nil + if lng.Etag != nil { + objectMap["etag"] = lng.Etag } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rlr.NextLink))) + if lng.ID != nil { + objectMap["id"] = lng.ID + } + if lng.Name != nil { + objectMap["name"] = lng.Name + } + if lng.Type != nil { + objectMap["type"] = lng.Type + } + if lng.Location != nil { + objectMap["location"] = lng.Location + } + if lng.Tags != nil { + objectMap["tags"] = lng.Tags + } + return json.Marshal(objectMap) } -// RouteListResultPage contains a page of Route values. -type RouteListResultPage struct { - fn func(RouteListResult) (RouteListResult, error) - rlr RouteListResult -} - -// 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. -func (page *RouteListResultPage) Next() error { - next, err := page.fn(page.rlr) - if err != nil { - return err - } - page.rlr = next - return nil -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteListResultPage) NotDone() bool { - return !page.rlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RouteListResultPage) Response() RouteListResult { - return page.rlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RouteListResultPage) Values() []Route { - if page.rlr.IsEmpty() { - return nil - } - return *page.rlr.Value -} - -// RoutePropertiesFormat route resource -type RoutePropertiesFormat struct { - // AddressPrefix - The destination CIDR to which the route applies. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' - NextHopType RouteNextHopType `json:"nextHopType,omitempty"` - // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RoutesCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.CreateOrUpdateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RoutesDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// RouteTable route table resource. -type RouteTable struct { - autorest.Response `json:"-"` - // RouteTablePropertiesFormat - Properties of the route table. - *RouteTablePropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for RouteTable. -func (rt RouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rt.RouteTablePropertiesFormat != nil { - objectMap["properties"] = rt.RouteTablePropertiesFormat - } - if rt.Etag != nil { - objectMap["etag"] = rt.Etag - } - if rt.ID != nil { - objectMap["id"] = rt.ID - } - if rt.Name != nil { - objectMap["name"] = rt.Name - } - if rt.Type != nil { - objectMap["type"] = rt.Type - } - if rt.Location != nil { - objectMap["location"] = rt.Location - } - if rt.Tags != nil { - objectMap["tags"] = rt.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RouteTable struct. -func (rt *RouteTable) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. +func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -12781,12 +11673,12 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var routeTablePropertiesFormat RouteTablePropertiesFormat - err = json.Unmarshal(*v, &routeTablePropertiesFormat) + var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat + err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) if err != nil { return err } - rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat + lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat } case "etag": if v != nil { @@ -12795,7 +11687,7 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { if err != nil { return err } - rt.Etag = &etag + lng.Etag = &etag } case "id": if v != nil { @@ -12804,7 +11696,7 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { if err != nil { return err } - rt.ID = &ID + lng.ID = &ID } case "name": if v != nil { @@ -12813,7 +11705,7 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { if err != nil { return err } - rt.Name = &name + lng.Name = &name } case "type": if v != nil { @@ -12822,7 +11714,7 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { if err != nil { return err } - rt.Type = &typeVar + lng.Type = &typeVar } case "location": if v != nil { @@ -12831,7 +11723,7 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { if err != nil { return err } - rt.Location = &location + lng.Location = &location } case "tags": if v != nil { @@ -12840,7 +11732,7 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { if err != nil { return err } - rt.Tags = tags + lng.Tags = tags } } } @@ -12848,24 +11740,24 @@ func (rt *RouteTable) UnmarshalJSON(body []byte) error { return nil } -// RouteTableListResult response for the ListRouteTable API service call. -type RouteTableListResult struct { +// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. +type LocalNetworkGatewayListResult struct { autorest.Response `json:"-"` - // Value - Gets a list of route tables in a resource group. - Value *[]RouteTable `json:"value,omitempty"` + // Value - A list of local network gateways that exists in a resource group. + Value *[]LocalNetworkGateway `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// RouteTableListResultIterator provides access to a complete listing of RouteTable values. -type RouteTableListResultIterator struct { +// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values. +type LocalNetworkGatewayListResultIterator struct { i int - page RouteTableListResultPage + page LocalNetworkGatewayListResultPage } // Next 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 *RouteTableListResultIterator) Next() error { +func (iter *LocalNetworkGatewayListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -12880,216 +11772,268 @@ func (iter *RouteTableListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteTableListResultIterator) NotDone() bool { +func (iter LocalNetworkGatewayListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult { +func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { 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 RouteTableListResultIterator) Value() RouteTable { +func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { if !iter.page.NotDone() { - return RouteTable{} + return LocalNetworkGateway{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (rtlr RouteTableListResult) IsEmpty() bool { - return rtlr.Value == nil || len(*rtlr.Value) == 0 +func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { + return lnglr.Value == nil || len(*lnglr.Value) == 0 } -// routeTableListResultPreparer prepares a request to retrieve the next set of results. +// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) { - if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { +func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) { + if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rtlr.NextLink))) + autorest.WithBaseURL(to.String(lnglr.NextLink))) } -// RouteTableListResultPage contains a page of RouteTable values. -type RouteTableListResultPage struct { - fn func(RouteTableListResult) (RouteTableListResult, error) - rtlr RouteTableListResult +// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. +type LocalNetworkGatewayListResultPage struct { + fn func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) + lnglr LocalNetworkGatewayListResult } // 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. -func (page *RouteTableListResultPage) Next() error { - next, err := page.fn(page.rtlr) +func (page *LocalNetworkGatewayListResultPage) Next() error { + next, err := page.fn(page.lnglr) if err != nil { return err } - page.rtlr = next + page.lnglr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteTableListResultPage) NotDone() bool { - return !page.rtlr.IsEmpty() +func (page LocalNetworkGatewayListResultPage) NotDone() bool { + return !page.lnglr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page RouteTableListResultPage) Response() RouteTableListResult { - return page.rtlr +func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { + return page.lnglr } // Values returns the slice of values for the current page or nil if there are no values. -func (page RouteTableListResultPage) Values() []RouteTable { - if page.rtlr.IsEmpty() { +func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { + if page.lnglr.IsEmpty() { return nil } - return *page.rtlr.Value + return *page.lnglr.Value } -// RouteTablePropertiesFormat route Table resource -type RouteTablePropertiesFormat struct { - // Routes - Collection of routes contained within a route table. - Routes *[]Route `json:"routes,omitempty"` - // Subnets - A collection of references to subnets. - Subnets *[]Subnet `json:"subnets,omitempty"` - // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable. - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties +type LocalNetworkGatewayPropertiesFormat struct { + // LocalNetworkAddressSpace - Local network site address space. + LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` + // GatewayIPAddress - IP address of local network gateway. + GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` + // BgpSettings - Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteTablesCreateOrUpdateFuture struct { +// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { +func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { - rt, err = client.CreateOrUpdateResponder(rt.Response.Response) + if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { + lng, err = client.CreateOrUpdateResponder(lng.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") } } return } -// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RouteTablesDeleteFuture struct { +// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type LocalNetworkGatewaysDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) { +func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") return } ar.Response = future.Response() return } -// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type RouteTablesUpdateTagsFuture struct { +type LocalNetworkGatewaysUpdateTagsFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { +func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { - rt, err = client.UpdateTagsResponder(rt.Response.Response) + if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { + lng, err = client.UpdateTagsResponder(lng.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") } } return } -// SecurityGroup networkSecurityGroup resource. -type SecurityGroup struct { +// LogSpecification description of logging specification. +type LogSpecification struct { + // Name - The name of the specification. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the specification. + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - Duration of the blob. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// MetricSpecification description of metrics specification. +type MetricSpecification struct { + // Name - The name of the metric. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the metric. + DisplayName *string `json:"displayName,omitempty"` + // DisplayDescription - The description of the metric. + DisplayDescription *string `json:"displayDescription,omitempty"` + // Unit - Units the metric to be displayed in. + Unit *string `json:"unit,omitempty"` + // AggregationType - The aggregation type. + AggregationType *string `json:"aggregationType,omitempty"` + // Availabilities - List of availability. + Availabilities *[]Availability `json:"availabilities,omitempty"` + // EnableRegionalMdmAccount - Whether regional MDM account enabled. + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + // FillGapWithZero - Whether gaps would be filled with zeros. + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + // MetricFilterPattern - Pattern for the filter of the metric. + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` + // Dimensions - List of dimensions. + Dimensions *[]Dimension `json:"dimensions,omitempty"` + // IsInternal - Whether the metric is internal. + IsInternal *bool `json:"isInternal,omitempty"` + // SourceMdmAccount - The source MDM account. + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + // SourceMdmNamespace - The source MDM namespace. + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + // ResourceIDDimensionNameOverride - The resource Id dimension name override. + ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` +} + +// NextHopParameters parameters that define the source and destination endpoint. +type NextHopParameters struct { + // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // SourceIPAddress - The source IP address. + SourceIPAddress *string `json:"sourceIPAddress,omitempty"` + // DestinationIPAddress - The destination IP address. + DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` + // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` +} + +// NextHopResult the information about next hop from the specified VM. +type NextHopResult struct { autorest.Response `json:"-"` - // SecurityGroupPropertiesFormat - Properties of the network security group - *SecurityGroupPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. + // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' + NextHopType NextHopType `json:"nextHopType,omitempty"` + // NextHopIPAddress - Next hop IP Address + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` + // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. + RouteTableID *string `json:"routeTableId,omitempty"` +} + +// Operation network REST API operation definition. +type Operation struct { + // Name - Operation name: {provider}/{resource}/{operation} Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` + // Display - Display metadata associated with the operation. + Display *OperationDisplay `json:"display,omitempty"` + // Origin - Origin of the operation. + Origin *string `json:"origin,omitempty"` + // OperationPropertiesFormat - Operation properties format. + *OperationPropertiesFormat `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for SecurityGroup. -func (sg SecurityGroup) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sg.SecurityGroupPropertiesFormat != nil { - objectMap["properties"] = sg.SecurityGroupPropertiesFormat - } - if sg.Etag != nil { - objectMap["etag"] = sg.Etag - } - if sg.ID != nil { - objectMap["id"] = sg.ID - } - if sg.Name != nil { - objectMap["name"] = sg.Name + if o.Name != nil { + objectMap["name"] = o.Name } - if sg.Type != nil { - objectMap["type"] = sg.Type + if o.Display != nil { + objectMap["display"] = o.Display } - if sg.Location != nil { - objectMap["location"] = sg.Location + if o.Origin != nil { + objectMap["origin"] = o.Origin } - if sg.Tags != nil { - objectMap["tags"] = sg.Tags + if o.OperationPropertiesFormat != nil { + objectMap["properties"] = o.OperationPropertiesFormat } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. -func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for Operation struct. +func (o *Operation) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -13097,33 +12041,6 @@ func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": - if v != nil { - var securityGroupPropertiesFormat SecurityGroupPropertiesFormat - err = json.Unmarshal(*v, &securityGroupPropertiesFormat) - if err != nil { - return err - } - sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sg.ID = &ID - } case "name": if v != nil { var name string @@ -13131,34 +12048,34 @@ func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { if err != nil { return err } - sg.Name = &name + o.Name = &name } - case "type": + case "display": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var display OperationDisplay + err = json.Unmarshal(*v, &display) if err != nil { return err } - sg.Type = &typeVar + o.Display = &display } - case "location": + case "origin": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var origin string + err = json.Unmarshal(*v, &origin) if err != nil { return err } - sg.Location = &location + o.Origin = &origin } - case "tags": + case "properties": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var operationPropertiesFormat OperationPropertiesFormat + err = json.Unmarshal(*v, &operationPropertiesFormat) if err != nil { return err } - sg.Tags = tags + o.OperationPropertiesFormat = &operationPropertiesFormat } } } @@ -13166,24 +12083,37 @@ func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { return nil } -// SecurityGroupListResult response for ListNetworkSecurityGroups API service call. -type SecurityGroupListResult struct { +// OperationDisplay display metadata associated with the operation. +type OperationDisplay struct { + // Provider - Service provider: Microsoft Network. + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed. + Resource *string `json:"resource,omitempty"` + // Operation - Type of the operation: get, read, delete, etc. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation. + Description *string `json:"description,omitempty"` +} + +// OperationListResult result of the request to list Network operations. It contains a list of operations and a URL +// link to get the next set of results. +type OperationListResult struct { autorest.Response `json:"-"` - // Value - A list of NetworkSecurityGroup resources. - Value *[]SecurityGroup `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // Value - List of Network operations supported by the Network resource provider. + Value *[]Operation `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. -type SecurityGroupListResultIterator struct { +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { i int - page SecurityGroupListResultPage + page OperationListResultPage } // Next 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 *SecurityGroupListResultIterator) Next() error { +func (iter *OperationListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -13198,197 +12128,94 @@ func (iter *SecurityGroupListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SecurityGroupListResultIterator) NotDone() bool { +func (iter OperationListResultIterator) 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 SecurityGroupListResultIterator) Response() SecurityGroupListResult { +func (iter OperationListResultIterator) Response() OperationListResult { 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 SecurityGroupListResultIterator) Value() SecurityGroup { +func (iter OperationListResultIterator) Value() Operation { if !iter.page.NotDone() { - return SecurityGroup{} + return Operation{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (sglr SecurityGroupListResult) IsEmpty() bool { - return sglr.Value == nil || len(*sglr.Value) == 0 +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 } -// securityGroupListResultPreparer prepares a request to retrieve the next set of results. +// operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) { - if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { - return nil, nil +func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(sglr.NextLink))) + autorest.WithBaseURL(to.String(olr.NextLink))) } -// SecurityGroupListResultPage contains a page of SecurityGroup values. -type SecurityGroupListResultPage struct { - fn func(SecurityGroupListResult) (SecurityGroupListResult, error) - sglr SecurityGroupListResult +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(OperationListResult) (OperationListResult, error) + olr OperationListResult } // 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. -func (page *SecurityGroupListResultPage) Next() error { - next, err := page.fn(page.sglr) +func (page *OperationListResultPage) Next() error { + next, err := page.fn(page.olr) if err != nil { return err } - page.sglr = next + page.olr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SecurityGroupListResultPage) NotDone() bool { - return !page.sglr.IsEmpty() +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { - return page.sglr +func (page OperationListResultPage) Response() OperationListResult { + return page.olr } // Values returns the slice of values for the current page or nil if there are no values. -func (page SecurityGroupListResultPage) Values() []SecurityGroup { - if page.sglr.IsEmpty() { +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { return nil } - return *page.sglr.Value -} - -// SecurityGroupNetworkInterface network interface and all its associated security rules. -type SecurityGroupNetworkInterface struct { - // ID - ID of the network interface. - ID *string `json:"id,omitempty"` - SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` -} - -// SecurityGroupPropertiesFormat network Security Group resource. -type SecurityGroupPropertiesFormat struct { - // SecurityRules - A collection of security rules of the network security group. - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - // DefaultSecurityRules - The default security rules of network security group. - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - // NetworkInterfaces - A collection of references to network interfaces. - NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // Subnets - A collection of references to subnets. - Subnets *[]Subnet `json:"subnets,omitempty"` - // ResourceGUID - The resource GUID property of the network security group resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SecurityGroupsCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.CreateOrUpdateResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return -} - -// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type SecurityGroupsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SecurityGroupsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.UpdateTagsResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return + return *page.olr.Value } -// SecurityGroupViewParameters parameters that define the VM to check security groups for. -type SecurityGroupViewParameters struct { - // TargetResourceID - ID of the target VM. - TargetResourceID *string `json:"targetResourceId,omitempty"` +// OperationPropertiesFormat description of operation properties format. +type OperationPropertiesFormat struct { + // ServiceSpecification - Specification of the service. + ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` } -// SecurityGroupViewResult the information about security rules applied to the specified VM. -type SecurityGroupViewResult struct { - autorest.Response `json:"-"` - // NetworkInterfaces - List of network interfaces on the specified VM. - NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` +// OperationPropertiesFormatServiceSpecification specification of the service. +type OperationPropertiesFormatServiceSpecification struct { + // MetricSpecifications - Operation service specification. + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` + // LogSpecifications - Operation log specification. + LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` } -// SecurityRule network security rule. -type SecurityRule struct { - autorest.Response `json:"-"` - // SecurityRulePropertiesFormat - Properties of the security rule - *SecurityRulePropertiesFormat `json:"properties,omitempty"` +// OutboundNatRule outbound NAT pool of the load balancer. +type OutboundNatRule struct { + // OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule. + *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. @@ -13397,26 +12224,26 @@ type SecurityRule struct { ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for SecurityRule. -func (sr SecurityRule) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for OutboundNatRule. +func (onr OutboundNatRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sr.SecurityRulePropertiesFormat != nil { - objectMap["properties"] = sr.SecurityRulePropertiesFormat + if onr.OutboundNatRulePropertiesFormat != nil { + objectMap["properties"] = onr.OutboundNatRulePropertiesFormat } - if sr.Name != nil { - objectMap["name"] = sr.Name + if onr.Name != nil { + objectMap["name"] = onr.Name } - if sr.Etag != nil { - objectMap["etag"] = sr.Etag + if onr.Etag != nil { + objectMap["etag"] = onr.Etag } - if sr.ID != nil { - objectMap["id"] = sr.ID + if onr.ID != nil { + objectMap["id"] = onr.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. -func (sr *SecurityRule) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct. +func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -13426,12 +12253,12 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var securityRulePropertiesFormat SecurityRulePropertiesFormat - err = json.Unmarshal(*v, &securityRulePropertiesFormat) + var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat + err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat) if err != nil { return err } - sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat + onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat } case "name": if v != nil { @@ -13440,7 +12267,7 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - sr.Name = &name + onr.Name = &name } case "etag": if v != nil { @@ -13449,7 +12276,7 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - sr.Etag = &etag + onr.Etag = &etag } case "id": if v != nil { @@ -13458,7 +12285,7 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - sr.ID = &ID + onr.ID = &ID } } } @@ -13466,255 +12293,356 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { return nil } -// SecurityRuleAssociations all security rules associated with the network interface. -type SecurityRuleAssociations struct { - NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` - SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` - // DefaultSecurityRules - Collection of default security rules of the network security group. - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - // EffectiveSecurityRules - Collection of effective security rules. - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` +// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer. +type OutboundNatRulePropertiesFormat struct { + // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. + AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` + // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. + FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` + // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs -// to a network security group. -type SecurityRuleListResult struct { - autorest.Response `json:"-"` - // Value - The security rules in a network security group. - Value *[]SecurityRule `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// PacketCapture parameters that define the create packet capture operation. +type PacketCapture struct { + *PacketCaptureParameters `json:"properties,omitempty"` } -// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. -type SecurityRuleListResultIterator struct { - i int - page SecurityRuleListResultPage +// MarshalJSON is the custom marshaler for PacketCapture. +func (pc PacketCapture) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pc.PacketCaptureParameters != nil { + objectMap["properties"] = pc.PacketCaptureParameters + } + return json.Marshal(objectMap) } -// Next 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 *SecurityRuleListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. +func (pc *PacketCapture) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 - return nil -} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var packetCaptureParameters PacketCaptureParameters + err = json.Unmarshal(*v, &packetCaptureParameters) + if err != nil { + return err + } + pc.PacketCaptureParameters = &packetCaptureParameters + } + } + } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SecurityRuleListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) + return nil } -// Response returns the raw server response from the last page request. -func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult { - return iter.page.Response() +// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. +type PacketCaptureFilter struct { + // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' + Protocol PcProtocol `json:"protocol,omitempty"` + // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalIPAddress *string `json:"localIPAddress,omitempty"` + // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` + // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalPort *string `json:"localPort,omitempty"` + // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemotePort *string `json:"remotePort,omitempty"` } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SecurityRuleListResultIterator) Value() SecurityRule { - if !iter.page.NotDone() { - return SecurityRule{} - } - return iter.page.Values()[iter.i] +// PacketCaptureListResult list of packet capture sessions. +type PacketCaptureListResult struct { + autorest.Response `json:"-"` + // Value - Information about packet capture sessions. + Value *[]PacketCaptureResult `json:"value,omitempty"` } -// IsEmpty returns true if the ListResult contains no values. -func (srlr SecurityRuleListResult) IsEmpty() bool { - return srlr.Value == nil || len(*srlr.Value) == 0 +// PacketCaptureParameters parameters that define the create packet capture operation. +type PacketCaptureParameters struct { + // Target - The ID of the targeted resource, only VM is currently supported. + Target *string `json:"target,omitempty"` + // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` + // TimeLimitInSeconds - Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` + StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` + Filters *[]PacketCaptureFilter `json:"filters,omitempty"` } -// securityRuleListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) { - if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(srlr.NextLink))) +// PacketCaptureQueryStatusResult status of packet capture session. +type PacketCaptureQueryStatusResult struct { + autorest.Response `json:"-"` + // Name - The name of the packet capture resource. + Name *string `json:"name,omitempty"` + // ID - The ID of the packet capture resource. + ID *string `json:"id,omitempty"` + // CaptureStartTime - The start time of the packet capture session. + CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` + // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' + PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` + // StopReason - The reason the current packet capture session was stopped. + StopReason *string `json:"stopReason,omitempty"` + // PacketCaptureError - List of errors of packet capture session. + PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` } -// SecurityRuleListResultPage contains a page of SecurityRule values. -type SecurityRuleListResultPage struct { - fn func(SecurityRuleListResult) (SecurityRuleListResult, error) - srlr SecurityRuleListResult +// PacketCaptureResult information about packet capture session. +type PacketCaptureResult struct { + autorest.Response `json:"-"` + // Name - Name of the packet capture session. + Name *string `json:"name,omitempty"` + // ID - ID of the packet capture operation. + ID *string `json:"id,omitempty"` + Etag *string `json:"etag,omitempty"` + *PacketCaptureResultProperties `json:"properties,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. -func (page *SecurityRuleListResultPage) Next() error { - next, err := page.fn(page.srlr) - if err != nil { - return err +// MarshalJSON is the custom marshaler for PacketCaptureResult. +func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcr.Name != nil { + objectMap["name"] = pcr.Name } - page.srlr = next - return nil -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SecurityRuleListResultPage) NotDone() bool { - return !page.srlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { - return page.srlr + if pcr.ID != nil { + objectMap["id"] = pcr.ID + } + if pcr.Etag != nil { + objectMap["etag"] = pcr.Etag + } + if pcr.PacketCaptureResultProperties != nil { + objectMap["properties"] = pcr.PacketCaptureResultProperties + } + return json.Marshal(objectMap) } -// Values returns the slice of values for the current page or nil if there are no values. -func (page SecurityRuleListResultPage) Values() []SecurityRule { - if page.srlr.IsEmpty() { - return nil +// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. +func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - return *page.srlr.Value + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcr.Name = &name + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pcr.Etag = &etag + } + case "properties": + if v != nil { + var packetCaptureResultProperties PacketCaptureResultProperties + err = json.Unmarshal(*v, &packetCaptureResultProperties) + if err != nil { + return err + } + pcr.PacketCaptureResultProperties = &packetCaptureResultProperties + } + } + } + + return nil } -// SecurityRulePropertiesFormat security rule resource. -type SecurityRulePropertiesFormat struct { - // Description - A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty"` - // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk' - Protocol SecurityRuleProtocol `json:"protocol,omitempty"` - // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - // SourceAddressPrefix - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - // SourceAddressPrefixes - The CIDR or source IP ranges. - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - // SourceApplicationSecurityGroups - The application security group specified as source. - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges. - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - // DestinationApplicationSecurityGroups - The application security group specified as destination. - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - // SourcePortRanges - The source port ranges. - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - // DestinationPortRanges - The destination port ranges. - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' - Access SecurityRuleAccess `json:"access,omitempty"` - // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' - Direction SecurityRuleDirection `json:"direction,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// PacketCaptureResultProperties describes the properties of a packet capture session. +type PacketCaptureResultProperties struct { + // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Target - The ID of the targeted resource, only VM is currently supported. + Target *string `json:"target,omitempty"` + // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` + // TimeLimitInSeconds - Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` + StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` + Filters *[]PacketCaptureFilter `json:"filters,omitempty"` } -// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SecurityRulesCreateOrUpdateFuture struct { +// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type PacketCapturesCreateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) { +func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { - sr, err = client.CreateOrUpdateResponder(sr.Response.Response) + if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { + pcr, err = client.CreateResponder(pcr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") } } return } -// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type SecurityRulesDeleteFuture struct { +// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type PacketCapturesDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) { +func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") return } ar.Response = future.Response() return } -// ServiceEndpointPropertiesFormat the service endpoint properties. -type ServiceEndpointPropertiesFormat struct { - // Service - The type of the endpoint service. - Service *string `json:"service,omitempty"` - // Locations - A list of locations. - Locations *[]string `json:"locations,omitempty"` - // ProvisioningState - The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` +// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesGetStatusFuture struct { + azure.Future } -// String ... -type String struct { - autorest.Response `json:"-"` - Value *string `json:"value,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { + pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") + } + } + return } -// Subnet subnet in a virtual network resource. -type Subnet struct { - autorest.Response `json:"-"` - // SubnetPropertiesFormat - Properties of the subnet. - *SubnetPropertiesFormat `json:"properties,omitempty"` +// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type PacketCapturesStopFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") + return + } + ar.Response = future.Response() + return +} + +// PacketCaptureStorageLocation describes the storage location for a packet capture session. +type PacketCaptureStorageLocation struct { + // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. + StorageID *string `json:"storageId,omitempty"` + // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. + StoragePath *string `json:"storagePath,omitempty"` + // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. + FilePath *string `json:"filePath,omitempty"` +} + +// PatchRouteFilter route Filter Resource. +type PatchRouteFilter struct { + *RouteFilterPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for Subnet. -func (s Subnet) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PatchRouteFilter. +func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if s.SubnetPropertiesFormat != nil { - objectMap["properties"] = s.SubnetPropertiesFormat + if prf.RouteFilterPropertiesFormat != nil { + objectMap["properties"] = prf.RouteFilterPropertiesFormat } - if s.Name != nil { - objectMap["name"] = s.Name + if prf.Name != nil { + objectMap["name"] = prf.Name } - if s.Etag != nil { - objectMap["etag"] = s.Etag + if prf.Etag != nil { + objectMap["etag"] = prf.Etag } - if s.ID != nil { - objectMap["id"] = s.ID + if prf.Type != nil { + objectMap["type"] = prf.Type + } + if prf.Tags != nil { + objectMap["tags"] = prf.Tags + } + if prf.ID != nil { + objectMap["id"] = prf.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Subnet struct. -func (s *Subnet) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. +func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -13724,12 +12652,12 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var subnetPropertiesFormat SubnetPropertiesFormat - err = json.Unmarshal(*v, &subnetPropertiesFormat) + var routeFilterPropertiesFormat RouteFilterPropertiesFormat + err = json.Unmarshal(*v, &routeFilterPropertiesFormat) if err != nil { return err } - s.SubnetPropertiesFormat = &subnetPropertiesFormat + prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat } case "name": if v != nil { @@ -13738,7 +12666,7 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Name = &name + prf.Name = &name } case "etag": if v != nil { @@ -13747,7 +12675,25 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Etag = &etag + prf.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + prf.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + prf.Tags = tags } case "id": if v != nil { @@ -13756,7 +12702,7 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.ID = &ID + prf.ID = &ID } } } @@ -13764,302 +12710,257 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { return nil } -// SubnetAssociation network interface and its custom security rules. -type SubnetAssociation struct { - // ID - Subnet ID. +// PatchRouteFilterRule route Filter Rule Resource +type PatchRouteFilterRule struct { + *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. ID *string `json:"id,omitempty"` - // SecurityRules - Collection of custom security rules. - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` -} - -// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network -type SubnetListResult struct { - autorest.Response `json:"-"` - // Value - The subnets in a virtual network. - Value *[]Subnet `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` } -// SubnetListResultIterator provides access to a complete listing of Subnet values. -type SubnetListResultIterator struct { - i int - page SubnetListResultPage +// MarshalJSON is the custom marshaler for PatchRouteFilterRule. +func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if prfr.RouteFilterRulePropertiesFormat != nil { + objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat + } + if prfr.Name != nil { + objectMap["name"] = prfr.Name + } + if prfr.Etag != nil { + objectMap["etag"] = prfr.Etag + } + if prfr.ID != nil { + objectMap["id"] = prfr.ID + } + return json.Marshal(objectMap) } -// Next 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 *SubnetListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. +func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 - return nil -} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat + err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) + if err != nil { + return err + } + prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + prfr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + prfr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + prfr.ID = &ID + } + } + } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SubnetListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) + return nil } -// Response returns the raw server response from the last page request. -func (iter SubnetListResultIterator) Response() SubnetListResult { - return iter.page.Response() +// Policies policies for vpn gateway. +type Policies struct { + // AllowBranchToBranchTraffic - True if branch to branch traffic is allowed. + AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` + // AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed. + AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter SubnetListResultIterator) Value() Subnet { - if !iter.page.NotDone() { - return Subnet{} - } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (slr SubnetListResult) IsEmpty() bool { - return slr.Value == nil || len(*slr.Value) == 0 +// Probe a load balancer probe. +type Probe struct { + autorest.Response `json:"-"` + // ProbePropertiesFormat - Properties of load balancer probe. + *ProbePropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// subnetListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) { - if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { - return nil, nil +// MarshalJSON is the custom marshaler for Probe. +func (p Probe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.ProbePropertiesFormat != nil { + objectMap["properties"] = p.ProbePropertiesFormat } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(slr.NextLink))) -} - -// SubnetListResultPage contains a page of Subnet values. -type SubnetListResultPage struct { - fn func(SubnetListResult) (SubnetListResult, error) - slr SubnetListResult -} - -// 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. -func (page *SubnetListResultPage) Next() error { - next, err := page.fn(page.slr) - if err != nil { - return err + if p.Name != nil { + objectMap["name"] = p.Name } - page.slr = next - return nil -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SubnetListResultPage) NotDone() bool { - return !page.slr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SubnetListResultPage) Response() SubnetListResult { - return page.slr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SubnetListResultPage) Values() []Subnet { - if page.slr.IsEmpty() { - return nil + if p.Etag != nil { + objectMap["etag"] = p.Etag } - return *page.slr.Value -} - -// SubnetPropertiesFormat properties of the subnet. -type SubnetPropertiesFormat struct { - // AddressPrefix - The address prefix for the subnet. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - // RouteTable - The reference of the RouteTable resource. - RouteTable *RouteTable `json:"routeTable,omitempty"` - // ServiceEndpoints - An array of service endpoints. - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` - // IPConfigurations - Gets an array of references to the network interface IP configurations using subnet. - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - // ResourceNavigationLinks - Gets an array of references to the external resources using subnet. - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - // ProvisioningState - The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SubnetsCreateOrUpdateFuture struct { - azure.Future + if p.ID != nil { + objectMap["id"] = p.ID + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for Probe struct. +func (p *Probe) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var probePropertiesFormat ProbePropertiesFormat + err = json.Unmarshal(*v, &probePropertiesFormat) + if err != nil { + return err + } + p.ProbePropertiesFormat = &probePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + p.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + p.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + p.ID = &ID + } } } - return + + return nil } -// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type SubnetsDeleteFuture struct { - azure.Future +// ProbePropertiesFormat load balancer probe resource. +type ProbePropertiesFormat struct { + // LoadBalancingRules - The load balancer rules that use this probe. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS' + Protocol ProbeProtocol `json:"protocol,omitempty"` + // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. + Port *int32 `json:"port,omitempty"` + // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` + // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. + NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` + // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. + RequestPath *string `json:"requestPath,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") - return - } - ar.Response = future.Response() - return +// ProtocolConfiguration configuration of the protocol. +type ProtocolConfiguration struct { + HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` } -// SubResource reference to another subresource. -type SubResource struct { +// PublicIPAddress public IP address resource. +type PublicIPAddress struct { + autorest.Response `json:"-"` + // Sku - The public IP address SKU. + Sku *PublicIPAddressSku `json:"sku,omitempty"` + // PublicIPAddressPropertiesFormat - Public IP address properties. + *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` -} - -// TagsObject tags object for patch operations. -type TagsObject struct { + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` // Tags - Resource tags. Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for TagsObject. -func (toVar TagsObject) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PublicIPAddress. +func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if toVar.Tags != nil { - objectMap["tags"] = toVar.Tags + if pia.Sku != nil { + objectMap["sku"] = pia.Sku + } + if pia.PublicIPAddressPropertiesFormat != nil { + objectMap["properties"] = pia.PublicIPAddressPropertiesFormat + } + if pia.Etag != nil { + objectMap["etag"] = pia.Etag + } + if pia.Zones != nil { + objectMap["zones"] = pia.Zones + } + if pia.ID != nil { + objectMap["id"] = pia.ID + } + if pia.Name != nil { + objectMap["name"] = pia.Name + } + if pia.Type != nil { + objectMap["type"] = pia.Type + } + if pia.Location != nil { + objectMap["location"] = pia.Location + } + if pia.Tags != nil { + objectMap["tags"] = pia.Tags } return json.Marshal(objectMap) } -// Topology topology of the specified resource group. -type Topology struct { - autorest.Response `json:"-"` - // ID - GUID representing the operation id. - ID *string `json:"id,omitempty"` - // CreatedDateTime - The datetime when the topology was initially created for the resource group. - CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` - // LastModified - The datetime when the topology was last modified. - LastModified *date.Time `json:"lastModified,omitempty"` - Resources *[]TopologyResource `json:"resources,omitempty"` -} - -// TopologyAssociation resources that have an association with the parent resource. -type TopologyAssociation struct { - // Name - The name of the resource that is associated with the parent resource. - Name *string `json:"name,omitempty"` - // ResourceID - The ID of the resource that is associated with the parent resource. - ResourceID *string `json:"resourceId,omitempty"` - // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains' - AssociationType AssociationType `json:"associationType,omitempty"` -} - -// TopologyParameters parameters that define the representation of topology. -type TopologyParameters struct { - // TargetResourceGroupName - The name of the target resource group to perform topology on. - TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` - // TargetVirtualNetwork - The reference of the Virtual Network resource. - TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` - // TargetSubnet - The reference of the Subnet resource. - TargetSubnet *SubResource `json:"targetSubnet,omitempty"` -} - -// TopologyResource the network resource topology information for the given resource group. -type TopologyResource struct { - // Name - Name of the resource. - Name *string `json:"name,omitempty"` - // ID - ID of the resource. - ID *string `json:"id,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Associations - Holds the associations the resource has with other resources in the resource group. - Associations *[]TopologyAssociation `json:"associations,omitempty"` -} - -// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics. -type TrafficAnalyticsConfigurationProperties struct { - // Enabled - Flag to enable/disable traffic analytics. - Enabled *bool `json:"enabled,omitempty"` - // WorkspaceID - The resource guid of the attached workspace - WorkspaceID *string `json:"workspaceId,omitempty"` - // WorkspaceRegion - The location of the attached workspace - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - // WorkspaceResourceID - Resource Id of the attached workspace - WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` -} - -// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics. -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} - -// TroubleshootingDetails information gained from troubleshooting of specified resource. -type TroubleshootingDetails struct { - // ID - The id of the get troubleshoot operation. - ID *string `json:"id,omitempty"` - // ReasonType - Reason type of failure. - ReasonType *string `json:"reasonType,omitempty"` - // Summary - A summary of troubleshooting. - Summary *string `json:"summary,omitempty"` - // Detail - Details on troubleshooting results. - Detail *string `json:"detail,omitempty"` - // RecommendedActions - List of recommended actions. - RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` -} - -// TroubleshootingParameters parameters that define the resource to troubleshoot. -type TroubleshootingParameters struct { - // TargetResourceID - The target resource to troubleshoot. - TargetResourceID *string `json:"targetResourceId,omitempty"` - *TroubleshootingProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for TroubleshootingParameters. -func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tp.TargetResourceID != nil { - objectMap["targetResourceId"] = tp.TargetResourceID - } - if tp.TroubleshootingProperties != nil { - objectMap["properties"] = tp.TroubleshootingProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct. -func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. +func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -14067,23 +12968,86 @@ func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "targetResourceId": + case "sku": if v != nil { - var targetResourceID string - err = json.Unmarshal(*v, &targetResourceID) + var sku PublicIPAddressSku + err = json.Unmarshal(*v, &sku) if err != nil { return err } - tp.TargetResourceID = &targetResourceID + pia.Sku = &sku } case "properties": if v != nil { - var troubleshootingProperties TroubleshootingProperties - err = json.Unmarshal(*v, &troubleshootingProperties) + var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat + err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) if err != nil { return err } - tp.TroubleshootingProperties = &troubleshootingProperties + pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pia.Etag = &etag + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + pia.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pia.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pia.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pia.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pia.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pia.Tags = tags } } } @@ -14091,93 +13055,115 @@ func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error { return nil } -// TroubleshootingProperties storage location provided for troubleshoot. -type TroubleshootingProperties struct { - // StorageID - The ID for the storage account to save the troubleshoot result. - StorageID *string `json:"storageId,omitempty"` - // StoragePath - The path to the blob to save the troubleshoot result in. - StoragePath *string `json:"storagePath,omitempty"` +// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address +type PublicIPAddressDNSSettings struct { + // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. + DomainNameLabel *string `json:"domainNameLabel,omitempty"` + // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. + Fqdn *string `json:"fqdn,omitempty"` + // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + ReverseFqdn *string `json:"reverseFqdn,omitempty"` } -// TroubleshootingRecommendedActions recommended actions based on discovered issues. -type TroubleshootingRecommendedActions struct { - // ActionID - ID of the recommended action. - ActionID *string `json:"actionId,omitempty"` - // ActionText - Description of recommended actions. - ActionText *string `json:"actionText,omitempty"` - // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions. - ActionURI *string `json:"actionUri,omitempty"` - // ActionURIText - The information from the URI for the recommended troubleshooting actions. - ActionURIText *string `json:"actionUriText,omitempty"` +// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PublicIPAddressesCreateOrUpdateFuture struct { + azure.Future } -// TroubleshootingResult troubleshooting information gained from specified resource. -type TroubleshootingResult struct { - autorest.Response `json:"-"` - // StartTime - The start time of the troubleshooting. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the troubleshooting. - EndTime *date.Time `json:"endTime,omitempty"` - // Code - The result code of the troubleshooting. - Code *string `json:"code,omitempty"` - // Results - Information from troubleshooting. - Results *[]TroubleshootingDetails `json:"results,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { + pia, err = client.CreateOrUpdateResponder(pia.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request") + } + } + return } -// TunnelConnectionHealth virtualNetworkGatewayConnection properties -type TunnelConnectionHealth struct { - // Tunnel - Tunnel name. - Tunnel *string `json:"tunnel,omitempty"` - // ConnectionStatus - Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' - ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // IngressBytesTransferred - The Ingress Bytes Transferred in this connection - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // EgressBytesTransferred - The Egress Bytes Transferred in this connection - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // LastConnectionEstablishedUtcTime - The time at which connection was established in Utc format. - LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` +// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PublicIPAddressesDeleteFuture struct { + azure.Future } -// Usage describes network resource usage. -type Usage struct { - // ID - Resource identifier. - ID *string `json:"id,omitempty"` - // Unit - An enum describing the unit of measurement. - Unit *string `json:"unit,omitempty"` - // CurrentValue - The current value of the usage. - CurrentValue *int64 `json:"currentValue,omitempty"` - // Limit - The limit of usage. - Limit *int64 `json:"limit,omitempty"` - // Name - The name of the type of usage. - Name *UsageName `json:"name,omitempty"` -} +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") + return + } + ar.Response = future.Response() + return +} -// UsageName the usage names. -type UsageName struct { - // Value - A string describing the resource name. - Value *string `json:"value,omitempty"` - // LocalizedValue - A localized string describing the resource name. - LocalizedValue *string `json:"localizedValue,omitempty"` +// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PublicIPAddressesUpdateTagsFuture struct { + azure.Future } -// UsagesListResult the list usages operation response. -type UsagesListResult struct { +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { + pia, err = client.UpdateTagsResponder(pia.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request") + } + } + return +} + +// PublicIPAddressListResult response for ListPublicIpAddresses API service call. +type PublicIPAddressListResult struct { autorest.Response `json:"-"` - // Value - The list network resource usages. - Value *[]Usage `json:"value,omitempty"` - // NextLink - URL to get the next set of results. + // Value - A list of public IP addresses that exists in a resource group. + Value *[]PublicIPAddress `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// UsagesListResultIterator provides access to a complete listing of Usage values. -type UsagesListResultIterator struct { +// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. +type PublicIPAddressListResultIterator struct { i int - page UsagesListResultPage + page PublicIPAddressListResultPage } // Next 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 *UsagesListResultIterator) Next() error { +func (iter *PublicIPAddressListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -14192,110 +13178,3258 @@ func (iter *UsagesListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter UsagesListResultIterator) NotDone() bool { +func (iter PublicIPAddressListResultIterator) 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 UsagesListResultIterator) Response() UsagesListResult { +func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { 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 UsagesListResultIterator) Value() Usage { +func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress { if !iter.page.NotDone() { - return Usage{} + return PublicIPAddress{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (ulr UsagesListResult) IsEmpty() bool { - return ulr.Value == nil || len(*ulr.Value) == 0 +func (pialr PublicIPAddressListResult) IsEmpty() bool { + return pialr.Value == nil || len(*pialr.Value) == 0 } -// usagesListResultPreparer prepares a request to retrieve the next set of results. +// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) { - if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { +func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) { + if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ulr.NextLink))) + autorest.WithBaseURL(to.String(pialr.NextLink))) } -// UsagesListResultPage contains a page of Usage values. -type UsagesListResultPage struct { - fn func(UsagesListResult) (UsagesListResult, error) - ulr UsagesListResult +// PublicIPAddressListResultPage contains a page of PublicIPAddress values. +type PublicIPAddressListResultPage struct { + fn func(PublicIPAddressListResult) (PublicIPAddressListResult, error) + pialr PublicIPAddressListResult } // 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. -func (page *UsagesListResultPage) Next() error { - next, err := page.fn(page.ulr) +func (page *PublicIPAddressListResultPage) Next() error { + next, err := page.fn(page.pialr) if err != nil { return err } - page.ulr = next + page.pialr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page UsagesListResultPage) NotDone() bool { - return !page.ulr.IsEmpty() +func (page PublicIPAddressListResultPage) NotDone() bool { + return !page.pialr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page UsagesListResultPage) Response() UsagesListResult { - return page.ulr +func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { + return page.pialr } // Values returns the slice of values for the current page or nil if there are no values. -func (page UsagesListResultPage) Values() []Usage { - if page.ulr.IsEmpty() { +func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { + if page.pialr.IsEmpty() { return nil } - return *page.ulr.Value + return *page.pialr.Value } -// VerificationIPFlowParameters parameters that define the IP flow to be verified. -type VerificationIPFlowParameters struct { - // TargetResourceID - The ID of the target resource to perform next-hop on. +// PublicIPAddressPropertiesFormat public IP address properties. +type PublicIPAddressPropertiesFormat struct { + // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` + // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' + PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` + // IPConfiguration - The IP configuration associated with the public IP address. + IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` + // DNSSettings - The FQDN of the DNS record associated with the public IP address. + DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` + // IPTags - The list of tags associated with the public IP address. + IPTags *[]IPTag `json:"ipTags,omitempty"` + // IPAddress - The IP address associated with the public IP address resource. + IPAddress *string `json:"ipAddress,omitempty"` + // IdleTimeoutInMinutes - The idle timeout of the public IP address. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // ResourceGUID - The resource GUID property of the public IP resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// PublicIPAddressSku SKU of a public IP address +type PublicIPAddressSku struct { + // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' + Name PublicIPAddressSkuName `json:"name,omitempty"` +} + +// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. +type QueryTroubleshootingParameters struct { + // TargetResourceID - The target resource ID to query the troubleshooting result. TargetResourceID *string `json:"targetResourceId,omitempty"` - // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound' - Direction Direction `json:"direction,omitempty"` - // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP' - Protocol IPFlowProtocol `json:"protocol,omitempty"` - // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. - LocalPort *string `json:"localPort,omitempty"` - // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. - RemotePort *string `json:"remotePort,omitempty"` - // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` } -// VerificationIPFlowResult results of IP flow verification on the target resource. -type VerificationIPFlowResult struct { - autorest.Response `json:"-"` - // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny' - Access Access `json:"access,omitempty"` - // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed. - RuleName *string `json:"ruleName,omitempty"` +// Resource common resource representation. +type Resource struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// VirtualNetwork virtual Network resource. -type VirtualNetwork struct { - autorest.Response `json:"-"` - // VirtualNetworkPropertiesFormat - Properties of the virtual network. - *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.ID != nil { + objectMap["id"] = r.ID + } + if r.Name != nil { + objectMap["name"] = r.Name + } + if r.Type != nil { + objectMap["type"] = r.Type + } + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + return json.Marshal(objectMap) +} + +// ResourceNavigationLink resourceNavigationLink resource. +type ResourceNavigationLink struct { + // ResourceNavigationLinkFormat - Resource navigation link properties format. + *ResourceNavigationLinkFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceNavigationLink. +func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rnl.ResourceNavigationLinkFormat != nil { + objectMap["properties"] = rnl.ResourceNavigationLinkFormat + } + if rnl.Name != nil { + objectMap["name"] = rnl.Name + } + if rnl.Etag != nil { + objectMap["etag"] = rnl.Etag + } + if rnl.ID != nil { + objectMap["id"] = rnl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct. +func (rnl *ResourceNavigationLink) 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 resourceNavigationLinkFormat ResourceNavigationLinkFormat + err = json.Unmarshal(*v, &resourceNavigationLinkFormat) + if err != nil { + return err + } + rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rnl.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rnl.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rnl.ID = &ID + } + } + } + + return nil +} + +// ResourceNavigationLinkFormat properties of ResourceNavigationLink. +type ResourceNavigationLinkFormat struct { + // LinkedResourceType - Resource type of the linked resource. + LinkedResourceType *string `json:"linkedResourceType,omitempty"` + // Link - Link to the external resource + Link *string `json:"link,omitempty"` + // ProvisioningState - Provisioning state of the ResourceNavigationLink resource. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// RetentionPolicyParameters parameters that define the retention policy for flow log. +type RetentionPolicyParameters struct { + // Days - Number of days to retain flow log records. + Days *int32 `json:"days,omitempty"` + // Enabled - Flag to enable/disable retention. + Enabled *bool `json:"enabled,omitempty"` +} + +// Route route resource +type Route struct { + autorest.Response `json:"-"` + // RoutePropertiesFormat - Properties of the route. + *RoutePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for Route. +func (r Route) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.RoutePropertiesFormat != nil { + objectMap["properties"] = r.RoutePropertiesFormat + } + if r.Name != nil { + objectMap["name"] = r.Name + } + if r.Etag != nil { + objectMap["etag"] = r.Etag + } + if r.ID != nil { + objectMap["id"] = r.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Route struct. +func (r *Route) 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 routePropertiesFormat RoutePropertiesFormat + err = json.Unmarshal(*v, &routePropertiesFormat) + if err != nil { + return err + } + r.RoutePropertiesFormat = &routePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + r.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + r.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + r.ID = &ID + } + } + } + + return nil +} + +// RouteFilter route Filter Resource. +type RouteFilter struct { + autorest.Response `json:"-"` + *RouteFilterPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for RouteFilter. +func (rf RouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rf.RouteFilterPropertiesFormat != nil { + objectMap["properties"] = rf.RouteFilterPropertiesFormat + } + if rf.Etag != nil { + objectMap["etag"] = rf.Etag + } + if rf.ID != nil { + objectMap["id"] = rf.ID + } + if rf.Name != nil { + objectMap["name"] = rf.Name + } + if rf.Type != nil { + objectMap["type"] = rf.Type + } + if rf.Location != nil { + objectMap["location"] = rf.Location + } + if rf.Tags != nil { + objectMap["tags"] = rf.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RouteFilter struct. +func (rf *RouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat + err = json.Unmarshal(*v, &routeFilterPropertiesFormat) + if err != nil { + return err + } + rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rf.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rf.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rf.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rf.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rf.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rf.Tags = tags + } + } + } + + return nil +} + +// RouteFilterListResult response for the ListRouteFilters API service call. +type RouteFilterListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of route filters in a resource group. + Value *[]RouteFilter `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values. +type RouteFilterListResultIterator struct { + i int + page RouteFilterListResultPage +} + +// Next 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 *RouteFilterListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteFilterListResultIterator) 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 RouteFilterListResultIterator) Response() RouteFilterListResult { + 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 RouteFilterListResultIterator) Value() RouteFilter { + if !iter.page.NotDone() { + return RouteFilter{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (rflr RouteFilterListResult) IsEmpty() bool { + return rflr.Value == nil || len(*rflr.Value) == 0 +} + +// routeFilterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rflr RouteFilterListResult) routeFilterListResultPreparer() (*http.Request, error) { + if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rflr.NextLink))) +} + +// RouteFilterListResultPage contains a page of RouteFilter values. +type RouteFilterListResultPage struct { + fn func(RouteFilterListResult) (RouteFilterListResult, error) + rflr RouteFilterListResult +} + +// 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. +func (page *RouteFilterListResultPage) Next() error { + next, err := page.fn(page.rflr) + if err != nil { + return err + } + page.rflr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteFilterListResultPage) NotDone() bool { + return !page.rflr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteFilterListResultPage) Response() RouteFilterListResult { + return page.rflr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteFilterListResultPage) Values() []RouteFilter { + if page.rflr.IsEmpty() { + return nil + } + return *page.rflr.Value +} + +// RouteFilterPropertiesFormat route Filter Resource +type RouteFilterPropertiesFormat struct { + // Rules - Collection of RouteFilterRules contained within a route filter. + Rules *[]RouteFilterRule `json:"rules,omitempty"` + // Peerings - A collection of references to express route circuit peerings. + Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// RouteFilterRule route Filter Rule Resource +type RouteFilterRule struct { + autorest.Response `json:"-"` + *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for RouteFilterRule. +func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rfr.RouteFilterRulePropertiesFormat != nil { + objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat + } + if rfr.Name != nil { + objectMap["name"] = rfr.Name + } + if rfr.Location != nil { + objectMap["location"] = rfr.Location + } + if rfr.Etag != nil { + objectMap["etag"] = rfr.Etag + } + if rfr.ID != nil { + objectMap["id"] = rfr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct. +func (rfr *RouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat + err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) + if err != nil { + return err + } + rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rfr.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rfr.Location = &location + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rfr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rfr.ID = &ID + } + } + } + + return nil +} + +// RouteFilterRuleListResult response for the ListRouteFilterRules API service call +type RouteFilterRuleListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of RouteFilterRules in a resource group. + Value *[]RouteFilterRule `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values. +type RouteFilterRuleListResultIterator struct { + i int + page RouteFilterRuleListResultPage +} + +// Next 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 *RouteFilterRuleListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteFilterRuleListResultIterator) 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 RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult { + 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 RouteFilterRuleListResultIterator) Value() RouteFilterRule { + if !iter.page.NotDone() { + return RouteFilterRule{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (rfrlr RouteFilterRuleListResult) IsEmpty() bool { + return rfrlr.Value == nil || len(*rfrlr.Value) == 0 +} + +// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer() (*http.Request, error) { + if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rfrlr.NextLink))) +} + +// RouteFilterRuleListResultPage contains a page of RouteFilterRule values. +type RouteFilterRuleListResultPage struct { + fn func(RouteFilterRuleListResult) (RouteFilterRuleListResult, error) + rfrlr RouteFilterRuleListResult +} + +// 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. +func (page *RouteFilterRuleListResultPage) Next() error { + next, err := page.fn(page.rfrlr) + if err != nil { + return err + } + page.rfrlr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteFilterRuleListResultPage) NotDone() bool { + return !page.rfrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult { + return page.rfrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { + if page.rfrlr.IsEmpty() { + return nil + } + return *page.rfrlr.Value +} + +// RouteFilterRulePropertiesFormat route Filter Rule Resource +type RouteFilterRulePropertiesFormat struct { + // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' + Access Access `json:"access,omitempty"` + // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community' + RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` + // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] + Communities *[]string `json:"communities,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteFilterRulesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { + rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteFilterRulesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteFilterRulesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { + rfr, err = client.UpdateResponder(rfr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteFiltersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { + rf, err = client.CreateOrUpdateResponder(rf.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type RouteFiltersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type RouteFiltersUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { + rf, err = client.UpdateResponder(rf.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteListResult response for the ListRoute API service call +type RouteListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of routes in a resource group. + Value *[]Route `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteListResultIterator provides access to a complete listing of Route values. +type RouteListResultIterator struct { + i int + page RouteListResultPage +} + +// Next 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 *RouteListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteListResultIterator) 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 RouteListResultIterator) Response() RouteListResult { + 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 RouteListResultIterator) Value() Route { + if !iter.page.NotDone() { + return Route{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (rlr RouteListResult) IsEmpty() bool { + return rlr.Value == nil || len(*rlr.Value) == 0 +} + +// routeListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) { + if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rlr.NextLink))) +} + +// RouteListResultPage contains a page of Route values. +type RouteListResultPage struct { + fn func(RouteListResult) (RouteListResult, error) + rlr RouteListResult +} + +// 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. +func (page *RouteListResultPage) Next() error { + next, err := page.fn(page.rlr) + if err != nil { + return err + } + page.rlr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteListResultPage) NotDone() bool { + return !page.rlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteListResultPage) Response() RouteListResult { + return page.rlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteListResultPage) Values() []Route { + if page.rlr.IsEmpty() { + return nil + } + return *page.rlr.Value +} + +// RoutePropertiesFormat route resource +type RoutePropertiesFormat struct { + // AddressPrefix - The destination CIDR to which the route applies. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' + NextHopType RouteNextHopType `json:"nextHopType,omitempty"` + // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type RoutesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { + r, err = client.CreateOrUpdateResponder(r.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request") + } + } + return +} + +// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type RoutesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteTable route table resource. +type RouteTable struct { + autorest.Response `json:"-"` + // RouteTablePropertiesFormat - Properties of the route table. + *RouteTablePropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for RouteTable. +func (rt RouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rt.RouteTablePropertiesFormat != nil { + objectMap["properties"] = rt.RouteTablePropertiesFormat + } + if rt.Etag != nil { + objectMap["etag"] = rt.Etag + } + if rt.ID != nil { + objectMap["id"] = rt.ID + } + if rt.Name != nil { + objectMap["name"] = rt.Name + } + if rt.Type != nil { + objectMap["type"] = rt.Type + } + if rt.Location != nil { + objectMap["location"] = rt.Location + } + if rt.Tags != nil { + objectMap["tags"] = rt.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RouteTable struct. +func (rt *RouteTable) 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 routeTablePropertiesFormat RouteTablePropertiesFormat + err = json.Unmarshal(*v, &routeTablePropertiesFormat) + if err != nil { + return err + } + rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + rt.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rt.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rt.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rt.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rt.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rt.Tags = tags + } + } + } + + return nil +} + +// RouteTableListResult response for the ListRouteTable API service call. +type RouteTableListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of route tables in a resource group. + Value *[]RouteTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RouteTableListResultIterator provides access to a complete listing of RouteTable values. +type RouteTableListResultIterator struct { + i int + page RouteTableListResultPage +} + +// Next 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 *RouteTableListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RouteTableListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult { + 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 RouteTableListResultIterator) Value() RouteTable { + if !iter.page.NotDone() { + return RouteTable{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (rtlr RouteTableListResult) IsEmpty() bool { + return rtlr.Value == nil || len(*rtlr.Value) == 0 +} + +// routeTableListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) { + if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rtlr.NextLink))) +} + +// RouteTableListResultPage contains a page of RouteTable values. +type RouteTableListResultPage struct { + fn func(RouteTableListResult) (RouteTableListResult, error) + rtlr RouteTableListResult +} + +// 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. +func (page *RouteTableListResultPage) Next() error { + next, err := page.fn(page.rtlr) + if err != nil { + return err + } + page.rtlr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RouteTableListResultPage) NotDone() bool { + return !page.rtlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RouteTableListResultPage) Response() RouteTableListResult { + return page.rtlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RouteTableListResultPage) Values() []RouteTable { + if page.rtlr.IsEmpty() { + return nil + } + return *page.rtlr.Value +} + +// RouteTablePropertiesFormat route Table resource +type RouteTablePropertiesFormat struct { + // Routes - Collection of routes contained within a route table. + Routes *[]Route `json:"routes,omitempty"` + // Subnets - A collection of references to subnets. + Subnets *[]Subnet `json:"subnets,omitempty"` + // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable. + DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteTablesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { + rt, err = client.CreateOrUpdateResponder(rt.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request") + } + } + return +} + +// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type RouteTablesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RouteTablesUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { + rt, err = client.UpdateTagsResponder(rt.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityGroup networkSecurityGroup resource. +type SecurityGroup struct { + autorest.Response `json:"-"` + // SecurityGroupPropertiesFormat - Properties of the network security group + *SecurityGroupPropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SecurityGroup. +func (sg SecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sg.SecurityGroupPropertiesFormat != nil { + objectMap["properties"] = sg.SecurityGroupPropertiesFormat + } + if sg.Etag != nil { + objectMap["etag"] = sg.Etag + } + if sg.ID != nil { + objectMap["id"] = sg.ID + } + if sg.Name != nil { + objectMap["name"] = sg.Name + } + if sg.Type != nil { + objectMap["type"] = sg.Type + } + if sg.Location != nil { + objectMap["location"] = sg.Location + } + if sg.Tags != nil { + objectMap["tags"] = sg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. +func (sg *SecurityGroup) 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 securityGroupPropertiesFormat SecurityGroupPropertiesFormat + err = json.Unmarshal(*v, &securityGroupPropertiesFormat) + if err != nil { + return err + } + sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sg.Tags = tags + } + } + } + + return nil +} + +// SecurityGroupListResult response for ListNetworkSecurityGroups API service call. +type SecurityGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of NetworkSecurityGroup resources. + Value *[]SecurityGroup `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. +type SecurityGroupListResultIterator struct { + i int + page SecurityGroupListResultPage +} + +// Next 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 *SecurityGroupListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SecurityGroupListResultIterator) 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 SecurityGroupListResultIterator) Response() SecurityGroupListResult { + 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 SecurityGroupListResultIterator) Value() SecurityGroup { + if !iter.page.NotDone() { + return SecurityGroup{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (sglr SecurityGroupListResult) IsEmpty() bool { + return sglr.Value == nil || len(*sglr.Value) == 0 +} + +// securityGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) { + if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sglr.NextLink))) +} + +// SecurityGroupListResultPage contains a page of SecurityGroup values. +type SecurityGroupListResultPage struct { + fn func(SecurityGroupListResult) (SecurityGroupListResult, error) + sglr SecurityGroupListResult +} + +// 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. +func (page *SecurityGroupListResultPage) Next() error { + next, err := page.fn(page.sglr) + if err != nil { + return err + } + page.sglr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SecurityGroupListResultPage) NotDone() bool { + return !page.sglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { + return page.sglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SecurityGroupListResultPage) Values() []SecurityGroup { + if page.sglr.IsEmpty() { + return nil + } + return *page.sglr.Value +} + +// SecurityGroupNetworkInterface network interface and all its associated security rules. +type SecurityGroupNetworkInterface struct { + // ID - ID of the network interface. + ID *string `json:"id,omitempty"` + SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` +} + +// SecurityGroupPropertiesFormat network Security Group resource. +type SecurityGroupPropertiesFormat struct { + // SecurityRules - A collection of security rules of the network security group. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` + // DefaultSecurityRules - The default security rules of network security group. + DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` + // NetworkInterfaces - A collection of references to network interfaces. + NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` + // Subnets - A collection of references to subnets. + Subnets *[]Subnet `json:"subnets,omitempty"` + // ResourceGUID - The resource GUID property of the network security group resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SecurityGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { + sg, err = client.CreateOrUpdateResponder(sg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type SecurityGroupsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SecurityGroupsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { + sg, err = client.UpdateTagsResponder(sg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityGroupViewParameters parameters that define the VM to check security groups for. +type SecurityGroupViewParameters struct { + // TargetResourceID - ID of the target VM. + TargetResourceID *string `json:"targetResourceId,omitempty"` +} + +// SecurityGroupViewResult the information about security rules applied to the specified VM. +type SecurityGroupViewResult struct { + autorest.Response `json:"-"` + // NetworkInterfaces - List of network interfaces on the specified VM. + NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` +} + +// SecurityRule network security rule. +type SecurityRule struct { + autorest.Response `json:"-"` + // SecurityRulePropertiesFormat - Properties of the security rule + *SecurityRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecurityRule. +func (sr SecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sr.SecurityRulePropertiesFormat != nil { + objectMap["properties"] = sr.SecurityRulePropertiesFormat + } + if sr.Name != nil { + objectMap["name"] = sr.Name + } + if sr.Etag != nil { + objectMap["etag"] = sr.Etag + } + if sr.ID != nil { + objectMap["id"] = sr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. +func (sr *SecurityRule) 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 securityRulePropertiesFormat SecurityRulePropertiesFormat + err = json.Unmarshal(*v, &securityRulePropertiesFormat) + if err != nil { + return err + } + sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + sr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sr.ID = &ID + } + } + } + + return nil +} + +// SecurityRuleAssociations all security rules associated with the network interface. +type SecurityRuleAssociations struct { + NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` + SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` + // DefaultSecurityRules - Collection of default security rules of the network security group. + DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` + // EffectiveSecurityRules - Collection of effective security rules. + EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` +} + +// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs +// to a network security group. +type SecurityRuleListResult struct { + autorest.Response `json:"-"` + // Value - The security rules in a network security group. + Value *[]SecurityRule `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. +type SecurityRuleListResultIterator struct { + i int + page SecurityRuleListResultPage +} + +// Next 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 *SecurityRuleListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SecurityRuleListResultIterator) 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 SecurityRuleListResultIterator) Response() SecurityRuleListResult { + 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 SecurityRuleListResultIterator) Value() SecurityRule { + if !iter.page.NotDone() { + return SecurityRule{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (srlr SecurityRuleListResult) IsEmpty() bool { + return srlr.Value == nil || len(*srlr.Value) == 0 +} + +// securityRuleListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) { + if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(srlr.NextLink))) +} + +// SecurityRuleListResultPage contains a page of SecurityRule values. +type SecurityRuleListResultPage struct { + fn func(SecurityRuleListResult) (SecurityRuleListResult, error) + srlr SecurityRuleListResult +} + +// 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. +func (page *SecurityRuleListResultPage) Next() error { + next, err := page.fn(page.srlr) + if err != nil { + return err + } + page.srlr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SecurityRuleListResultPage) NotDone() bool { + return !page.srlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { + return page.srlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SecurityRuleListResultPage) Values() []SecurityRule { + if page.srlr.IsEmpty() { + return nil + } + return *page.srlr.Value +} + +// SecurityRulePropertiesFormat security rule resource. +type SecurityRulePropertiesFormat struct { + // Description - A description for this rule. Restricted to 140 chars. + Description *string `json:"description,omitempty"` + // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk' + Protocol SecurityRuleProtocol `json:"protocol,omitempty"` + // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. + SourcePortRange *string `json:"sourcePortRange,omitempty"` + // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + // SourceAddressPrefix - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + // SourceAddressPrefixes - The CIDR or source IP ranges. + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + // SourceApplicationSecurityGroups - The application security group specified as source. + SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` + // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges. + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + // DestinationApplicationSecurityGroups - The application security group specified as destination. + DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` + // SourcePortRanges - The source port ranges. + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - The destination port ranges. + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + Access SecurityRuleAccess `json:"access,omitempty"` + // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + Priority *int32 `json:"priority,omitempty"` + // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' + Direction SecurityRuleDirection `json:"direction,omitempty"` + // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SecurityRulesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { + sr, err = client.CreateOrUpdateResponder(sr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") + } + } + return +} + +// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type SecurityRulesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ServiceEndpointPropertiesFormat the service endpoint properties. +type ServiceEndpointPropertiesFormat struct { + // Service - The type of the endpoint service. + Service *string `json:"service,omitempty"` + // Locations - A list of locations. + Locations *[]string `json:"locations,omitempty"` + // ProvisioningState - The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// String ... +type String struct { + autorest.Response `json:"-"` + Value *string `json:"value,omitempty"` +} + +// Subnet subnet in a virtual network resource. +type Subnet struct { + autorest.Response `json:"-"` + // SubnetPropertiesFormat - Properties of the subnet. + *SubnetPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for Subnet. +func (s Subnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.SubnetPropertiesFormat != nil { + objectMap["properties"] = s.SubnetPropertiesFormat + } + if s.Name != nil { + objectMap["name"] = s.Name + } + if s.Etag != nil { + objectMap["etag"] = s.Etag + } + if s.ID != nil { + objectMap["id"] = s.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Subnet struct. +func (s *Subnet) 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 subnetPropertiesFormat SubnetPropertiesFormat + err = json.Unmarshal(*v, &subnetPropertiesFormat) + if err != nil { + return err + } + s.SubnetPropertiesFormat = &subnetPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + s.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + } + } + + return nil +} + +// SubnetAssociation network interface and its custom security rules. +type SubnetAssociation struct { + // ID - Subnet ID. + ID *string `json:"id,omitempty"` + // SecurityRules - Collection of custom security rules. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` +} + +// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network +type SubnetListResult struct { + autorest.Response `json:"-"` + // Value - The subnets in a virtual network. + Value *[]Subnet `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SubnetListResultIterator provides access to a complete listing of Subnet values. +type SubnetListResultIterator struct { + i int + page SubnetListResultPage +} + +// Next 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 *SubnetListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SubnetListResultIterator) 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 SubnetListResultIterator) Response() SubnetListResult { + 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 SubnetListResultIterator) Value() Subnet { + if !iter.page.NotDone() { + return Subnet{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (slr SubnetListResult) IsEmpty() bool { + return slr.Value == nil || len(*slr.Value) == 0 +} + +// subnetListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) { + if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(slr.NextLink))) +} + +// SubnetListResultPage contains a page of Subnet values. +type SubnetListResultPage struct { + fn func(SubnetListResult) (SubnetListResult, error) + slr SubnetListResult +} + +// 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. +func (page *SubnetListResultPage) Next() error { + next, err := page.fn(page.slr) + if err != nil { + return err + } + page.slr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SubnetListResultPage) NotDone() bool { + return !page.slr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SubnetListResultPage) Response() SubnetListResult { + return page.slr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SubnetListResultPage) Values() []Subnet { + if page.slr.IsEmpty() { + return nil + } + return *page.slr.Value +} + +// SubnetPropertiesFormat properties of the subnet. +type SubnetPropertiesFormat struct { + // AddressPrefix - The address prefix for the subnet. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` + // RouteTable - The reference of the RouteTable resource. + RouteTable *RouteTable `json:"routeTable,omitempty"` + // ServiceEndpoints - An array of service endpoints. + ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` + // IPConfigurations - Gets an array of references to the network interface IP configurations using subnet. + IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` + // ResourceNavigationLinks - Gets an array of references to the external resources using subnet. + ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` + // ProvisioningState - The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SubnetsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type SubnetsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// SubResource reference to another subresource. +type SubResource struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// TagsObject tags object for patch operations. +type TagsObject struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TagsObject. +func (toVar TagsObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if toVar.Tags != nil { + objectMap["tags"] = toVar.Tags + } + return json.Marshal(objectMap) +} + +// Topology topology of the specified resource group. +type Topology struct { + autorest.Response `json:"-"` + // ID - GUID representing the operation id. + ID *string `json:"id,omitempty"` + // CreatedDateTime - The datetime when the topology was initially created for the resource group. + CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` + // LastModified - The datetime when the topology was last modified. + LastModified *date.Time `json:"lastModified,omitempty"` + Resources *[]TopologyResource `json:"resources,omitempty"` +} + +// TopologyAssociation resources that have an association with the parent resource. +type TopologyAssociation struct { + // Name - The name of the resource that is associated with the parent resource. + Name *string `json:"name,omitempty"` + // ResourceID - The ID of the resource that is associated with the parent resource. + ResourceID *string `json:"resourceId,omitempty"` + // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains' + AssociationType AssociationType `json:"associationType,omitempty"` +} + +// TopologyParameters parameters that define the representation of topology. +type TopologyParameters struct { + // TargetResourceGroupName - The name of the target resource group to perform topology on. + TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` + // TargetVirtualNetwork - The reference of the Virtual Network resource. + TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` + // TargetSubnet - The reference of the Subnet resource. + TargetSubnet *SubResource `json:"targetSubnet,omitempty"` +} + +// TopologyResource the network resource topology information for the given resource group. +type TopologyResource struct { + // Name - Name of the resource. + Name *string `json:"name,omitempty"` + // ID - ID of the resource. + ID *string `json:"id,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Associations - Holds the associations the resource has with other resources in the resource group. + Associations *[]TopologyAssociation `json:"associations,omitempty"` +} + +// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics. +type TrafficAnalyticsConfigurationProperties struct { + // Enabled - Flag to enable/disable traffic analytics. + Enabled *bool `json:"enabled,omitempty"` + // WorkspaceID - The resource guid of the attached workspace + WorkspaceID *string `json:"workspaceId,omitempty"` + // WorkspaceRegion - The location of the attached workspace + WorkspaceRegion *string `json:"workspaceRegion,omitempty"` + // WorkspaceResourceID - Resource Id of the attached workspace + WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` +} + +// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics. +type TrafficAnalyticsProperties struct { + NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` +} + +// TroubleshootingDetails information gained from troubleshooting of specified resource. +type TroubleshootingDetails struct { + // ID - The id of the get troubleshoot operation. + ID *string `json:"id,omitempty"` + // ReasonType - Reason type of failure. + ReasonType *string `json:"reasonType,omitempty"` + // Summary - A summary of troubleshooting. + Summary *string `json:"summary,omitempty"` + // Detail - Details on troubleshooting results. + Detail *string `json:"detail,omitempty"` + // RecommendedActions - List of recommended actions. + RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` +} + +// TroubleshootingParameters parameters that define the resource to troubleshoot. +type TroubleshootingParameters struct { + // TargetResourceID - The target resource to troubleshoot. + TargetResourceID *string `json:"targetResourceId,omitempty"` + *TroubleshootingProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for TroubleshootingParameters. +func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tp.TargetResourceID != nil { + objectMap["targetResourceId"] = tp.TargetResourceID + } + if tp.TroubleshootingProperties != nil { + objectMap["properties"] = tp.TroubleshootingProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct. +func (tp *TroubleshootingParameters) 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 "targetResourceId": + if v != nil { + var targetResourceID string + err = json.Unmarshal(*v, &targetResourceID) + if err != nil { + return err + } + tp.TargetResourceID = &targetResourceID + } + case "properties": + if v != nil { + var troubleshootingProperties TroubleshootingProperties + err = json.Unmarshal(*v, &troubleshootingProperties) + if err != nil { + return err + } + tp.TroubleshootingProperties = &troubleshootingProperties + } + } + } + + return nil +} + +// TroubleshootingProperties storage location provided for troubleshoot. +type TroubleshootingProperties struct { + // StorageID - The ID for the storage account to save the troubleshoot result. + StorageID *string `json:"storageId,omitempty"` + // StoragePath - The path to the blob to save the troubleshoot result in. + StoragePath *string `json:"storagePath,omitempty"` +} + +// TroubleshootingRecommendedActions recommended actions based on discovered issues. +type TroubleshootingRecommendedActions struct { + // ActionID - ID of the recommended action. + ActionID *string `json:"actionId,omitempty"` + // ActionText - Description of recommended actions. + ActionText *string `json:"actionText,omitempty"` + // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions. + ActionURI *string `json:"actionUri,omitempty"` + // ActionURIText - The information from the URI for the recommended troubleshooting actions. + ActionURIText *string `json:"actionUriText,omitempty"` +} + +// TroubleshootingResult troubleshooting information gained from specified resource. +type TroubleshootingResult struct { + autorest.Response `json:"-"` + // StartTime - The start time of the troubleshooting. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the troubleshooting. + EndTime *date.Time `json:"endTime,omitempty"` + // Code - The result code of the troubleshooting. + Code *string `json:"code,omitempty"` + // Results - Information from troubleshooting. + Results *[]TroubleshootingDetails `json:"results,omitempty"` +} + +// TunnelConnectionHealth virtualNetworkGatewayConnection properties +type TunnelConnectionHealth struct { + // Tunnel - Tunnel name. + Tunnel *string `json:"tunnel,omitempty"` + // ConnectionStatus - Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + // IngressBytesTransferred - The Ingress Bytes Transferred in this connection + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // EgressBytesTransferred - The Egress Bytes Transferred in this connection + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // LastConnectionEstablishedUtcTime - The time at which connection was established in Utc format. + LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` +} + +// Usage describes network resource usage. +type Usage struct { + // ID - Resource identifier. + ID *string `json:"id,omitempty"` + // Unit - An enum describing the unit of measurement. + Unit *string `json:"unit,omitempty"` + // CurrentValue - The current value of the usage. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - The limit of usage. + Limit *int64 `json:"limit,omitempty"` + // Name - The name of the type of usage. + Name *UsageName `json:"name,omitempty"` +} + +// UsageName the usage names. +type UsageName struct { + // Value - A string describing the resource name. + Value *string `json:"value,omitempty"` + // LocalizedValue - A localized string describing the resource name. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// UsagesListResult the list usages operation response. +type UsagesListResult struct { + autorest.Response `json:"-"` + // Value - The list network resource usages. + Value *[]Usage `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// UsagesListResultIterator provides access to a complete listing of Usage values. +type UsagesListResultIterator struct { + i int + page UsagesListResultPage +} + +// Next 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 *UsagesListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter UsagesListResultIterator) 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 UsagesListResultIterator) Response() UsagesListResult { + 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 UsagesListResultIterator) Value() Usage { + if !iter.page.NotDone() { + return Usage{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (ulr UsagesListResult) IsEmpty() bool { + return ulr.Value == nil || len(*ulr.Value) == 0 +} + +// usagesListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) { + if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ulr.NextLink))) +} + +// UsagesListResultPage contains a page of Usage values. +type UsagesListResultPage struct { + fn func(UsagesListResult) (UsagesListResult, error) + ulr UsagesListResult +} + +// 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. +func (page *UsagesListResultPage) Next() error { + next, err := page.fn(page.ulr) + if err != nil { + return err + } + page.ulr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page UsagesListResultPage) NotDone() bool { + return !page.ulr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page UsagesListResultPage) Response() UsagesListResult { + return page.ulr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page UsagesListResultPage) Values() []Usage { + if page.ulr.IsEmpty() { + return nil + } + return *page.ulr.Value +} + +// VerificationIPFlowParameters parameters that define the IP flow to be verified. +type VerificationIPFlowParameters struct { + // TargetResourceID - The ID of the target resource to perform next-hop on. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound' + Direction Direction `json:"direction,omitempty"` + // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP' + Protocol IPFlowProtocol `json:"protocol,omitempty"` + // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + LocalPort *string `json:"localPort,omitempty"` + // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. + RemotePort *string `json:"remotePort,omitempty"` + // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses. + LocalIPAddress *string `json:"localIPAddress,omitempty"` + // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses. + RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` + // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). + TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` +} + +// VerificationIPFlowResult results of IP flow verification on the target resource. +type VerificationIPFlowResult struct { + autorest.Response `json:"-"` + // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny' + Access Access `json:"access,omitempty"` + // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed. + RuleName *string `json:"ruleName,omitempty"` +} + +// VirtualHub virtualHub Resource. +type VirtualHub struct { + autorest.Response `json:"-"` + *VirtualHubProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualHub. +func (vh VirtualHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vh.VirtualHubProperties != nil { + objectMap["properties"] = vh.VirtualHubProperties + } + if vh.Etag != nil { + objectMap["etag"] = vh.Etag + } + if vh.ID != nil { + objectMap["id"] = vh.ID + } + if vh.Name != nil { + objectMap["name"] = vh.Name + } + if vh.Type != nil { + objectMap["type"] = vh.Type + } + if vh.Location != nil { + objectMap["location"] = vh.Location + } + if vh.Tags != nil { + objectMap["tags"] = vh.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualHub struct. +func (vh *VirtualHub) 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 virtualHubProperties VirtualHubProperties + err = json.Unmarshal(*v, &virtualHubProperties) + if err != nil { + return err + } + vh.VirtualHubProperties = &virtualHubProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vh.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vh.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vh.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vh.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vh.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vh.Tags = tags + } + } + } + + return nil +} + +// VirtualHubProperties parameters for VirtualHub +type VirtualHubProperties struct { + // VirtualWan - The VirtualWAN to which the VirtualHub belongs + VirtualWan *SubResource `json:"virtualWan,omitempty"` + // HubVirtualNetworkConnections - list of all vnet connections with this VirtualHub. + HubVirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"hubVirtualNetworkConnections,omitempty"` + // AddressPrefix - Address-prefix for this VirtualHub. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualHubsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { + vh, err = client.CreateOrUpdateResponder(vh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type VirtualHubsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualHubsDeleteFuture) Result(client VirtualHubsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualHubsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualHubsUpdateTagsFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { + vh, err = client.UpdateTagsResponder(vh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetwork virtual Network resource. +type VirtualNetwork struct { + autorest.Response `json:"-"` + // VirtualNetworkPropertiesFormat - Properties of the virtual network. + *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualNetwork. +func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vn.VirtualNetworkPropertiesFormat != nil { + objectMap["properties"] = vn.VirtualNetworkPropertiesFormat + } + if vn.Etag != nil { + objectMap["etag"] = vn.Etag + } + if vn.ID != nil { + objectMap["id"] = vn.ID + } + if vn.Name != nil { + objectMap["name"] = vn.Name + } + if vn.Type != nil { + objectMap["type"] = vn.Type + } + if vn.Location != nil { + objectMap["location"] = vn.Location + } + if vn.Tags != nil { + objectMap["tags"] = vn.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. +func (vn *VirtualNetwork) 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 virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) + if err != nil { + return err + } + vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vn.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vn.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vn.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vn.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vn.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vn.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway resource. +type VirtualNetworkConnectionGatewayReference struct { + // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + ID *string `json:"id,omitempty"` +} + +// VirtualNetworkGateway a common class for general resource information +type VirtualNetworkGateway struct { + autorest.Response `json:"-"` + // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. + *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGateway. +func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vng.VirtualNetworkGatewayPropertiesFormat != nil { + objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat + } + if vng.Etag != nil { + objectMap["etag"] = vng.Etag + } + if vng.ID != nil { + objectMap["id"] = vng.ID + } + if vng.Name != nil { + objectMap["name"] = vng.Name + } + if vng.Type != nil { + objectMap["type"] = vng.Type + } + if vng.Location != nil { + objectMap["location"] = vng.Location + } + if vng.Tags != nil { + objectMap["tags"] = vng.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. +func (vng *VirtualNetworkGateway) 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 virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) + if err != nil { + return err + } + vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vng.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vng.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vng.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vng.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vng.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vng.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkGatewayConnection a common class for general resource information +type VirtualNetworkGatewayConnection struct { + autorest.Response `json:"-"` + // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. + *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection. +func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { + objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat + } + if vngc.Etag != nil { + objectMap["etag"] = vngc.Etag + } + if vngc.ID != nil { + objectMap["id"] = vngc.ID + } + if vngc.Name != nil { + objectMap["name"] = vngc.Name + } + if vngc.Type != nil { + objectMap["type"] = vngc.Type + } + if vngc.Location != nil { + objectMap["location"] = vngc.Location + } + if vngc.Tags != nil { + objectMap["tags"] = vngc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. +func (vngc *VirtualNetworkGatewayConnection) 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 virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) + if err != nil { + return err + } + vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vngc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vngc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vngc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vngc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vngc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vngc.Tags = tags + } + } + } + + return nil +} + +// VirtualNetworkGatewayConnectionListEntity a common class for general resource information +type VirtualNetworkGatewayConnectionListEntity struct { + // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. + *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` // Etag - Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. @@ -14310,35 +16444,35 @@ type VirtualNetwork struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for VirtualNetwork. -func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity. +func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vn.VirtualNetworkPropertiesFormat != nil { - objectMap["properties"] = vn.VirtualNetworkPropertiesFormat + if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { + objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat } - if vn.Etag != nil { - objectMap["etag"] = vn.Etag + if vngcle.Etag != nil { + objectMap["etag"] = vngcle.Etag } - if vn.ID != nil { - objectMap["id"] = vn.ID + if vngcle.ID != nil { + objectMap["id"] = vngcle.ID } - if vn.Name != nil { - objectMap["name"] = vn.Name + if vngcle.Name != nil { + objectMap["name"] = vngcle.Name } - if vn.Type != nil { - objectMap["type"] = vn.Type + if vngcle.Type != nil { + objectMap["type"] = vngcle.Type } - if vn.Location != nil { - objectMap["location"] = vn.Location + if vngcle.Location != nil { + objectMap["location"] = vngcle.Location } - if vn.Tags != nil { - objectMap["tags"] = vn.Tags + if vngcle.Tags != nil { + objectMap["tags"] = vngcle.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. -func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct. +func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -14348,12 +16482,12 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) + var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat) if err != nil { return err } - vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat + vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat } case "etag": if v != nil { @@ -14362,7 +16496,7 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - vn.Etag = &etag + vngcle.Etag = &etag } case "id": if v != nil { @@ -14371,7 +16505,7 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - vn.ID = &ID + vngcle.ID = &ID } case "name": if v != nil { @@ -14380,7 +16514,7 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - vn.Name = &name + vngcle.Name = &name } case "type": if v != nil { @@ -14389,7 +16523,7 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - vn.Type = &typeVar + vngcle.Type = &typeVar } case "location": if v != nil { @@ -14398,7 +16532,7 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - vn.Location = &location + vngcle.Location = &location } case "tags": if v != nil { @@ -14407,192 +16541,364 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { if err != nil { return err } - vn.Tags = tags + vngcle.Tags = tags } } } - return nil + return nil +} + +// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties +type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { + // AuthorizationKey - The authorizationKey. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // VirtualNetworkGateway1 - The reference to virtual network gateway resource. + VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` + // VirtualNetworkGateway2 - The reference to virtual network gateway resource. + VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` + // LocalNetworkGateway2 - The reference to local network gateway resource. + LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` + // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + // RoutingWeight - The routing weight. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // SharedKey - The IPSec shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + // TunnelConnectionStatus - Collection of all tunnels' connection health status. + TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` + // EgressBytesTransferred - The egress bytes transferred in this connection. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // IngressBytesTransferred - The ingress bytes transferred in this connection. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // Peer - The reference to peerings resource. + Peer *SubResource `json:"peer,omitempty"` + // EnableBgp - EnableBgp flag + EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call +type VirtualNetworkGatewayConnectionListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. + Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of +// VirtualNetworkGatewayConnection values. +type VirtualNetworkGatewayConnectionListResultIterator struct { + i int + page VirtualNetworkGatewayConnectionListResultPage +} + +// Next 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 *VirtualNetworkGatewayConnectionListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err := iter.page.Next() + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkGatewayConnectionListResultIterator) 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 VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { + 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 VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { + if !iter.page.NotDone() { + return VirtualNetworkGatewayConnection{} + } + return iter.page.Values()[iter.i] +} + +// IsEmpty returns true if the ListResult contains no values. +func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { + return vngclr.Value == nil || len(*vngclr.Value) == 0 +} + +// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) { + if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vngclr.NextLink))) +} + +// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. +type VirtualNetworkGatewayConnectionListResultPage struct { + fn func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) + vngclr VirtualNetworkGatewayConnectionListResult +} + +// 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. +func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { + next, err := page.fn(page.vngclr) + if err != nil { + return err + } + page.vngclr = next + return nil +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { + return !page.vngclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { + return page.vngclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { + if page.vngclr.IsEmpty() { + return nil + } + return *page.vngclr.Value +} + +// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties +type VirtualNetworkGatewayConnectionPropertiesFormat struct { + // AuthorizationKey - The authorizationKey. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // VirtualNetworkGateway1 - The reference to virtual network gateway resource. + VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` + // VirtualNetworkGateway2 - The reference to virtual network gateway resource. + VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` + // LocalNetworkGateway2 - The reference to local network gateway resource. + LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` + // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + // RoutingWeight - The routing weight. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // SharedKey - The IPSec shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + // TunnelConnectionStatus - Collection of all tunnels' connection health status. + TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` + // EgressBytesTransferred - The egress bytes transferred in this connection. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // IngressBytesTransferred - The ingress bytes transferred in this connection. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // Peer - The reference to peerings resource. + Peer *SubResource `json:"peer,omitempty"` + // EnableBgp - EnableBgp flag + EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { + vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewayConnectionsDeleteFuture struct { + azure.Future } -// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway resource. -type VirtualNetworkConnectionGatewayReference struct { - // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - ID *string `json:"id,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return } -// VirtualNetworkGateway a common class for general resource information -type VirtualNetworkGateway struct { - autorest.Response `json:"-"` - // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. - *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` +// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for VirtualNetworkGateway. -func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vng.VirtualNetworkGatewayPropertiesFormat != nil { - objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat - } - if vng.Etag != nil { - objectMap["etag"] = vng.Etag +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") + return } - if vng.ID != nil { - objectMap["id"] = vng.ID + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") + return } - if vng.Name != nil { - objectMap["name"] = vng.Name + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent { + crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request") + } } - if vng.Type != nil { - objectMap["type"] = vng.Type + return +} + +// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") + return } - if vng.Location != nil { - objectMap["location"] = vng.Location + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") + return } - if vng.Tags != nil { - objectMap["tags"] = vng.Tags + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent { + csk, err = client.SetSharedKeyResponder(csk.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. -func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { + var done bool + done, err = future.Done(client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) - if err != nil { - return err - } - vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vng.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vng.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vng.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vng.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vng.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vng.Tags = tags - } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { + vngc, err = client.UpdateTagsResponder(vngc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request") } } - - return nil + return } -// VirtualNetworkGatewayConnection a common class for general resource information -type VirtualNetworkGatewayConnection struct { - autorest.Response `json:"-"` - // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. - *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. +// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway +type VirtualNetworkGatewayIPConfiguration struct { + // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. + *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection. -func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. +func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { - objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat - } - if vngc.Etag != nil { - objectMap["etag"] = vngc.Etag - } - if vngc.ID != nil { - objectMap["id"] = vngc.ID - } - if vngc.Name != nil { - objectMap["name"] = vngc.Name + if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat } - if vngc.Type != nil { - objectMap["type"] = vngc.Type + if vngic.Name != nil { + objectMap["name"] = vngic.Name } - if vngc.Location != nil { - objectMap["location"] = vngc.Location + if vngic.Etag != nil { + objectMap["etag"] = vngic.Etag } - if vngc.Tags != nil { - objectMap["tags"] = vngc.Tags + if vngic.ID != nil { + objectMap["id"] = vngic.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. -func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. +func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -14602,30 +16908,12 @@ func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) - if err != nil { - return err - } - vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vngc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) if err != nil { return err } - vngc.ID = &ID + vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat } case "name": if v != nil { @@ -14634,34 +16922,25 @@ func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - vngc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vngc.Type = &typeVar + vngic.Name = &name } - case "location": + case "etag": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - vngc.Location = &location + vngic.Etag = &etag } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - vngc.Tags = tags + vngic.ID = &ID } } } @@ -14669,187 +16948,141 @@ func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { return nil } -// VirtualNetworkGatewayConnectionListEntity a common class for general resource information -type VirtualNetworkGatewayConnectionListEntity struct { +// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration +type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { + // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference of the subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // PublicIPAddress - The reference of the public IP resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API service +// call +type VirtualNetworkGatewayListConnectionsResult struct { autorest.Response `json:"-"` - // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. - *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` + // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. + Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity. -func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { - objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat - } - if vngcle.Etag != nil { - objectMap["etag"] = vngcle.Etag - } - if vngcle.ID != nil { - objectMap["id"] = vngcle.ID - } - if vngcle.Name != nil { - objectMap["name"] = vngcle.Name - } - if vngcle.Type != nil { - objectMap["type"] = vngcle.Type +// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of +// VirtualNetworkGatewayConnectionListEntity values. +type VirtualNetworkGatewayListConnectionsResultIterator struct { + i int + page VirtualNetworkGatewayListConnectionsResultPage +} + +// Next 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 *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if vngcle.Location != nil { - objectMap["location"] = vngcle.Location + err := iter.page.Next() + if err != nil { + iter.i-- + return err } - if vngcle.Tags != nil { - objectMap["tags"] = vngcle.Tags + iter.i = 0 + return nil +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkGatewayListConnectionsResultIterator) 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 VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult { + 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 VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity { + if !iter.page.NotDone() { + return VirtualNetworkGatewayConnectionListEntity{} } - return json.Marshal(objectMap) + return iter.page.Values()[iter.i] } -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct. -func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err +// IsEmpty returns true if the ListResult contains no values. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool { + return vnglcr.Value == nil || len(*vnglcr.Value) == 0 +} + +// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer() (*http.Request, error) { + if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 { + return nil, nil } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat) - if err != nil { - return err - } - vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vngcle.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vngcle.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vngcle.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vngcle.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vngcle.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vngcle.Tags = tags - } - } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnglcr.NextLink))) +} + +// VirtualNetworkGatewayListConnectionsResultPage contains a page of VirtualNetworkGatewayConnectionListEntity +// values. +type VirtualNetworkGatewayListConnectionsResultPage struct { + fn func(VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error) + vnglcr VirtualNetworkGatewayListConnectionsResult +} + +// 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. +func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error { + next, err := page.fn(page.vnglcr) + if err != nil { + return err } - + page.vnglcr = next return nil } -// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties -type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { - // AuthorizationKey - The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // VirtualNetworkGateway1 - The reference to virtual network gateway resource. - VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` - // VirtualNetworkGateway2 - The reference to virtual network gateway resource. - VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` - // LocalNetworkGateway2 - The reference to local network gateway resource. - LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` - // RoutingWeight - The routing weight. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - // SharedKey - The IPSec shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' - ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // TunnelConnectionStatus - Collection of all tunnels' connection health status. - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - // EgressBytesTransferred - The egress bytes transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // IngressBytesTransferred - The ingress bytes transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // Peer - The reference to peerings resource. - Peer *SubResource `json:"peer,omitempty"` - // EnableBgp - EnableBgp flag - EnableBgp *bool `json:"enableBgp,omitempty"` - // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - // IpsecPolicies - The IPSec Policies to be considered by this connection. - IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool { + return !page.vnglcr.IsEmpty() } -// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call -type VirtualNetworkGatewayConnectionListResult struct { +// Response returns the raw server response from the last page request. +func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult { + return page.vnglcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity { + if page.vnglcr.IsEmpty() { + return nil + } + return *page.vnglcr.Value +} + +// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call. +type VirtualNetworkGatewayListResult struct { autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. - Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` + // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group. + Value *[]VirtualNetworkGateway `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of -// VirtualNetworkGatewayConnection values. -type VirtualNetworkGatewayConnectionListResultIterator struct { +// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values. +type VirtualNetworkGatewayListResultIterator struct { i int - page VirtualNetworkGatewayConnectionListResultPage + page VirtualNetworkGatewayListResultPage } // Next 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 *VirtualNetworkGatewayConnectionListResultIterator) Next() error { +func (iter *VirtualNetworkGatewayListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -14864,366 +17097,472 @@ func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool { +func (iter VirtualNetworkGatewayListResultIterator) 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 VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { +func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { 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 VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { +func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { if !iter.page.NotDone() { - return VirtualNetworkGatewayConnection{} + return VirtualNetworkGateway{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { - return vngclr.Value == nil || len(*vngclr.Value) == 0 +func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { + return vnglr.Value == nil || len(*vnglr.Value) == 0 } -// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. +// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) { - if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { +func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) { + if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(vngclr.NextLink))) + autorest.WithBaseURL(to.String(vnglr.NextLink))) } -// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. -type VirtualNetworkGatewayConnectionListResultPage struct { - fn func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) - vngclr VirtualNetworkGatewayConnectionListResult +// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. +type VirtualNetworkGatewayListResultPage struct { + fn func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) + vnglr VirtualNetworkGatewayListResult } // 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. -func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { - next, err := page.fn(page.vngclr) +func (page *VirtualNetworkGatewayListResultPage) Next() error { + next, err := page.fn(page.vnglr) if err != nil { return err } - page.vngclr = next + page.vnglr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { - return !page.vngclr.IsEmpty() +func (page VirtualNetworkGatewayListResultPage) NotDone() bool { + return !page.vnglr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { - return page.vngclr +func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { + return page.vnglr } // Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { - if page.vngclr.IsEmpty() { +func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { + if page.vnglr.IsEmpty() { return nil } - return *page.vngclr.Value + return *page.vnglr.Value } -// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties -type VirtualNetworkGatewayConnectionPropertiesFormat struct { - // AuthorizationKey - The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // VirtualNetworkGateway1 - The reference to virtual network gateway resource. - VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` - // VirtualNetworkGateway2 - The reference to virtual network gateway resource. - VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` - // LocalNetworkGateway2 - The reference to local network gateway resource. - LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` - // RoutingWeight - The routing weight. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - // SharedKey - The IPSec shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' - ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // TunnelConnectionStatus - Collection of all tunnels' connection health status. - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - // EgressBytesTransferred - The egress bytes transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // IngressBytesTransferred - The ingress bytes transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // Peer - The reference to peerings resource. - Peer *SubResource `json:"peer,omitempty"` - // EnableBgp - EnableBgp flag +// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties +type VirtualNetworkGatewayPropertiesFormat struct { + // IPConfigurations - IP configurations for virtual network gateway. + IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` + // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' + GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` + // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased' + VpnType VpnType `json:"vpnType,omitempty"` + // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. EnableBgp *bool `json:"enableBgp,omitempty"` - // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - // IpsecPolicies - The IPSec Policies to be considered by this connection. - IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. + // ActiveActive - ActiveActive flag + ActiveActive *bool `json:"activeActive,omitempty"` + // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. + GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` + // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. + Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` + // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. + VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` + // BgpSettings - Virtual network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + // ProvisioningState - The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { +// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.CreateOrUpdateResponder(vng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualNetworkGatewaysDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GeneratevpnclientpackageResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysGenerateVpnProfileFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { +func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { - vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GenerateVpnProfileResponder(s.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type VirtualNetworkGatewayConnectionsDeleteFuture struct { +type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { +func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture") return } - ar.Response = future.Response() + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { + grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") + } + } return } -// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { +// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { +func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent { - crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response) + if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent { + bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a +// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { +type VirtualNetworkGatewaysGetLearnedRoutesFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { +func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent { - csk, err = client.SetSharedKeyResponder(csk.Response.Response) + if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { + grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct { +// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) { +func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent { - vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response) + if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { + vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway -type VirtualNetworkGatewayIPConfiguration struct { - // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. - *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. -func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure") + return } - if vngic.Name != nil { - objectMap["name"] = vngic.Name + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture") + return } - if vngic.Etag != nil { - objectMap["etag"] = vngic.Etag + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request") + } } - if vngic.ID != nil { - objectMap["id"] = vngic.ID + return +} + +// VirtualNetworkGatewaySku virtualNetworkGatewaySku details +type VirtualNetworkGatewaySku struct { + // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ' + Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` + // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ' + Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` + // Capacity - The capacity. + Capacity *int32 `json:"capacity,omitempty"` +} + +// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualNetworkGatewaysResetFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") + return } - return json.Marshal(objectMap) + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.ResetResponder(vng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request") + } + } + return } -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. -func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { + var done bool + done, err = future.Done(client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) - if err != nil { - return err - } - vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vngic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vngic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vngic.ID = &ID - } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { + vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { + vng, err = client.UpdateTagsResponder(vng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request") } } - - return nil -} - -// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the public IP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` + return } -// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API service -// call -type VirtualNetworkGatewayListConnectionsResult struct { +// VirtualNetworkListResult response for the ListVirtualNetworks API service call. +type VirtualNetworkListResult struct { autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. - Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` + // Value - Gets a list of VirtualNetwork resources in a resource group. + Value *[]VirtualNetwork `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of -// VirtualNetworkGatewayConnectionListEntity values. -type VirtualNetworkGatewayListConnectionsResultIterator struct { +// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. +type VirtualNetworkListResultIterator struct { i int - page VirtualNetworkGatewayListConnectionsResultPage + page VirtualNetworkListResultPage } // Next 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 *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { +func (iter *VirtualNetworkListResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -15238,95 +17577,94 @@ func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool { +func (iter VirtualNetworkListResultIterator) 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 VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult { +func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { 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 VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity { +func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork { if !iter.page.NotDone() { - return VirtualNetworkGatewayConnectionListEntity{} + return VirtualNetwork{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool { - return vnglcr.Value == nil || len(*vnglcr.Value) == 0 +func (vnlr VirtualNetworkListResult) IsEmpty() bool { + return vnlr.Value == nil || len(*vnlr.Value) == 0 } -// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. +// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer() (*http.Request, error) { - if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 { +func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) { + if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(vnglcr.NextLink))) + autorest.WithBaseURL(to.String(vnlr.NextLink))) } -// VirtualNetworkGatewayListConnectionsResultPage contains a page of VirtualNetworkGatewayConnectionListEntity -// values. -type VirtualNetworkGatewayListConnectionsResultPage struct { - fn func(VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error) - vnglcr VirtualNetworkGatewayListConnectionsResult +// VirtualNetworkListResultPage contains a page of VirtualNetwork values. +type VirtualNetworkListResultPage struct { + fn func(VirtualNetworkListResult) (VirtualNetworkListResult, error) + vnlr VirtualNetworkListResult } // 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. -func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error { - next, err := page.fn(page.vnglcr) +func (page *VirtualNetworkListResultPage) Next() error { + next, err := page.fn(page.vnlr) if err != nil { return err } - page.vnglcr = next + page.vnlr = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool { - return !page.vnglcr.IsEmpty() +func (page VirtualNetworkListResultPage) NotDone() bool { + return !page.vnlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult { - return page.vnglcr +func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { + return page.vnlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity { - if page.vnglcr.IsEmpty() { +func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { + if page.vnlr.IsEmpty() { return nil } - return *page.vnglcr.Value + return *page.vnlr.Value } -// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call. -type VirtualNetworkGatewayListResult struct { +// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call. +type VirtualNetworkListUsageResult struct { autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group. - Value *[]VirtualNetworkGateway `json:"value,omitempty"` + // Value - VirtualNetwork usage stats. + Value *[]VirtualNetworkUsage `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values. -type VirtualNetworkGatewayListResultIterator struct { +// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage values. +type VirtualNetworkListUsageResultIterator struct { i int - page VirtualNetworkGatewayListResultPage + page VirtualNetworkListUsageResultPage } // Next 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 *VirtualNetworkGatewayListResultIterator) Next() error { +func (iter *VirtualNetworkListUsageResultIterator) Next() error { iter.i++ if iter.i < len(iter.page.Values()) { return nil @@ -15341,663 +17679,817 @@ func (iter *VirtualNetworkGatewayListResultIterator) Next() error { } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool { +func (iter VirtualNetworkListUsageResultIterator) 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 VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { +func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult { 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 VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { +func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage { if !iter.page.NotDone() { - return VirtualNetworkGateway{} + return VirtualNetworkUsage{} } return iter.page.Values()[iter.i] } // IsEmpty returns true if the ListResult contains no values. -func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { - return vnglr.Value == nil || len(*vnglr.Value) == 0 +func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool { + return vnlur.Value == nil || len(*vnlur.Value) == 0 } -// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. +// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) { - if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { +func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer() (*http.Request, error) { + if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(vnglr.NextLink))) + autorest.WithBaseURL(to.String(vnlur.NextLink))) } -// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. -type VirtualNetworkGatewayListResultPage struct { - fn func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) - vnglr VirtualNetworkGatewayListResult +// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values. +type VirtualNetworkListUsageResultPage struct { + fn func(VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error) + vnlur VirtualNetworkListUsageResult } // 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. -func (page *VirtualNetworkGatewayListResultPage) Next() error { - next, err := page.fn(page.vnglr) +func (page *VirtualNetworkListUsageResultPage) Next() error { + next, err := page.fn(page.vnlur) if err != nil { return err } - page.vnglr = next + page.vnlur = next return nil } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkGatewayListResultPage) NotDone() bool { - return !page.vnglr.IsEmpty() +func (page VirtualNetworkListUsageResultPage) NotDone() bool { + return !page.vnlur.IsEmpty() } // Response returns the raw server response from the last page request. -func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { - return page.vnglr +func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult { + return page.vnlur } // Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { - if page.vnglr.IsEmpty() { +func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { + if page.vnlur.IsEmpty() { return nil } - return *page.vnglr.Value + return *page.vnlur.Value } -// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties -type VirtualNetworkGatewayPropertiesFormat struct { - // IPConfigurations - IP configurations for virtual network gateway. - IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' - GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased' - VpnType VpnType `json:"vpnType,omitempty"` - // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. - EnableBgp *bool `json:"enableBgp,omitempty"` - // ActiveActive - ActiveActive flag - ActiveActive *bool `json:"activeActive,omitempty"` - // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. - Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` - // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. - VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` - // BgpSettings - Virtual network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// VirtualNetworkPeering peerings in a virtual network resource. +type VirtualNetworkPeering struct { + autorest.Response `json:"-"` + // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. + *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysCreateOrUpdateFuture struct { - azure.Future +// MarshalJSON is the custom marshaler for VirtualNetworkPeering. +func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vnp.VirtualNetworkPeeringPropertiesFormat != nil { + objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat + } + if vnp.Name != nil { + objectMap["name"] = vnp.Name + } + if vnp.Etag != nil { + objectMap["etag"] = vnp.Etag + } + if vnp.ID != nil { + objectMap["id"] = vnp.ID + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct. +func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { - vng, err = client.CreateOrUpdateResponder(vng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat) + if err != nil { + return err + } + vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vnp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vnp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vnp.ID = &ID + } } } - return -} -// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualNetworkGatewaysDeleteFuture struct { - azure.Future + return nil } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return +// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that belong to +// a virtual network. +type VirtualNetworkPeeringListResult struct { + autorest.Response `json:"-"` + // Value - The peerings in a virtual network. + Value *[]VirtualNetworkPeering `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { - azure.Future +// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering values. +type VirtualNetworkPeeringListResultIterator struct { + i int + page VirtualNetworkPeeringListResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") - return +// Next 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 *VirtualNetworkPeeringListResultIterator) Next() error { + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.GeneratevpnclientpackageResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request") - } + err := iter.page.Next() + if err != nil { + iter.i-- + return err } - return + iter.i = 0 + return nil } -// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysGenerateVpnProfileFuture struct { - azure.Future +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.GenerateVpnProfileResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request") - } +// Response returns the raw server response from the last page request. +func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult { + 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 VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering { + if !iter.page.NotDone() { + return VirtualNetworkPeering{} } - return + return iter.page.Values()[iter.i] } -// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct { - azure.Future +// IsEmpty returns true if the ListResult contains no values. +func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool { + return vnplr.Value == nil || len(*vnplr.Value) == 0 } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { - grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") - } +// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer() (*http.Request, error) { + if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vnplr.NextLink))) } -// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct { - azure.Future +// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values. +type VirtualNetworkPeeringListResultPage struct { + fn func(VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error) + vnplr VirtualNetworkPeeringListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) { - var done bool - done, err = future.Done(client) +// 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. +func (page *VirtualNetworkPeeringListResultPage) Next() error { + next, err := page.fn(page.vnplr) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent { - bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request") - } + return err } - return + page.vnplr = next + return nil } -// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysGetLearnedRoutesFuture struct { - azure.Future +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VirtualNetworkPeeringListResultPage) NotDone() bool { + return !page.vnplr.IsEmpty() } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { - grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") - } +// Response returns the raw server response from the last page request. +func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult { + return page.vnplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering { + if page.vnplr.IsEmpty() { + return nil } - return + return *page.vnplr.Value } -// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct { +// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. +type VirtualNetworkPeeringPropertiesFormat struct { + // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space. + AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` + // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed. + AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` + // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. + AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` + // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. + UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` + // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` + // RemoteAddressSpace - The reference of the remote virtual network address space. + RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` + // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' + PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` + // ProvisioningState - The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkPeeringsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { +func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { - vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response) + if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent { + vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct { +// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualNetworkPeeringsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { +func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } -// VirtualNetworkGatewaySku virtualNetworkGatewaySku details -type VirtualNetworkGatewaySku struct { - // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ' - Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` - // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ' - Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` - // Capacity - The capacity. - Capacity *int32 `json:"capacity,omitempty"` +// VirtualNetworkPropertiesFormat properties of the virtual network. +type VirtualNetworkPropertiesFormat struct { + // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. + AddressSpace *AddressSpace `json:"addressSpace,omitempty"` + // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. + DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` + // Subnets - A list of subnets in a Virtual Network. + Subnets *[]Subnet `json:"subnets,omitempty"` + // VirtualNetworkPeerings - A list of peerings in a Virtual Network. + VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` + // ResourceGUID - The resourceGuid property of the Virtual Network resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. + EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` + // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network. + EnableVMProtection *bool `json:"enableVmProtection,omitempty"` + // DdosProtectionPlan - The DDoS protection plan associated with the virtual network. + DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` } -// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running +// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type VirtualNetworkGatewaysResetFuture struct { +type VirtualNetworksCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { +func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { - vng, err = client.ResetResponder(vng.Response.Response) + if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { + vn, err = client.CreateOrUpdateResponder(vn.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct { +// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualNetworksDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { +func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { - vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } -// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysUpdateTagsFuture struct { +// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualNetworksUpdateTagsFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { +func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { - vng, err = client.UpdateTagsResponder(vng.Response.Response) + if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { + vn, err = client.UpdateTagsResponder(vn.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request") } } return } -// VirtualNetworkListResult response for the ListVirtualNetworks API service call. -type VirtualNetworkListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetwork resources in a resource group. - Value *[]VirtualNetwork `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. -type VirtualNetworkListResultIterator struct { - i int - page VirtualNetworkListResultPage -} - -// Next 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 *VirtualNetworkListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil +// VirtualNetworkUsage usage details for subnet. +type VirtualNetworkUsage struct { + // CurrentValue - Indicates number of IPs used from the Subnet. + CurrentValue *float64 `json:"currentValue,omitempty"` + // ID - Subnet identifier. + ID *string `json:"id,omitempty"` + // Limit - Indicates the size of the subnet. + Limit *float64 `json:"limit,omitempty"` + // Name - The name containing common and localized value for usage. + Name *VirtualNetworkUsageName `json:"name,omitempty"` + // Unit - Usage units. Returns 'Count' + Unit *string `json:"unit,omitempty"` } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// VirtualNetworkUsageName usage strings container. +type VirtualNetworkUsageName struct { + // LocalizedValue - Localized subnet size and usage string. + LocalizedValue *string `json:"localizedValue,omitempty"` + // Value - Subnet size and usage string. + Value *string `json:"value,omitempty"` } -// Response returns the raw server response from the last page request. -func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { - return iter.page.Response() +// VirtualWAN virtualWAN Resource. +type VirtualWAN struct { + autorest.Response `json:"-"` + *VirtualWanProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork { - if !iter.page.NotDone() { - return VirtualNetwork{} +// MarshalJSON is the custom marshaler for VirtualWAN. +func (vw VirtualWAN) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vw.VirtualWanProperties != nil { + objectMap["properties"] = vw.VirtualWanProperties } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (vnlr VirtualNetworkListResult) IsEmpty() bool { - return vnlr.Value == nil || len(*vnlr.Value) == 0 + if vw.Etag != nil { + objectMap["etag"] = vw.Etag + } + if vw.ID != nil { + objectMap["id"] = vw.ID + } + if vw.Name != nil { + objectMap["name"] = vw.Name + } + if vw.Type != nil { + objectMap["type"] = vw.Type + } + if vw.Location != nil { + objectMap["location"] = vw.Location + } + if vw.Tags != nil { + objectMap["tags"] = vw.Tags + } + return json.Marshal(objectMap) } -// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) { - if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { - return nil, nil +// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct. +func (vw *VirtualWAN) 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 virtualWanProperties VirtualWanProperties + err = json.Unmarshal(*v, &virtualWanProperties) + if err != nil { + return err + } + vw.VirtualWanProperties = &virtualWanProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vw.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vw.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vw.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vw.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vw.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vw.Tags = tags + } + } } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnlr.NextLink))) -} - -// VirtualNetworkListResultPage contains a page of VirtualNetwork values. -type VirtualNetworkListResultPage struct { - fn func(VirtualNetworkListResult) (VirtualNetworkListResult, error) - vnlr VirtualNetworkListResult -} -// 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. -func (page *VirtualNetworkListResultPage) Next() error { - next, err := page.fn(page.vnlr) - if err != nil { - return err - } - page.vnlr = next return nil } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkListResultPage) NotDone() bool { - return !page.vnlr.IsEmpty() +// VirtualWanProperties parameters for VirtualWAN +type VirtualWanProperties struct { + // DisableVpnEncryption - Vpn encryption to be disabled or not. + DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"` + // VirtualHubs - List of VirtualHubs in the VirtualWAN. + VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` + VpnSites *[]SubResource `json:"vpnSites,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// Response returns the raw server response from the last page request. -func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { - return page.vnlr +// VirtualWANsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualWANsCreateOrUpdateFuture struct { + azure.Future } -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { - if page.vnlr.IsEmpty() { - return nil +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualWANsCreateOrUpdateFuture) Result(client VirtualWANsClient) (vw VirtualWAN, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - return *page.vnlr.Value + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualWANsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent { + vw, err = client.CreateOrUpdateResponder(vw.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request") + } + } + return } -// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call. -type VirtualNetworkListUsageResult struct { - autorest.Response `json:"-"` - // Value - VirtualNetwork usage stats. - Value *[]VirtualNetworkUsage `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// VirtualWANsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type VirtualWANsDeleteFuture struct { + azure.Future } -// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage values. -type VirtualNetworkListUsageResultIterator struct { - i int - page VirtualNetworkListUsageResultPage +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualWANsDeleteFuture) Result(client VirtualWANsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualWANsDeleteFuture") + return + } + ar.Response = future.Response() + return } -// Next 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 *VirtualNetworkListUsageResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err := iter.page.Next() +// VirtualWANsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualWANsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualWANsUpdateTagsFuture) Result(client VirtualWANsClient) (vw VirtualWAN, err error) { + var done bool + done, err = future.Done(client) if err != nil { - iter.i-- - return err + err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return } - iter.i = 0 - return nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualWANsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent { + vw, err = client.UpdateTagsResponder(vw.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request") + } + } + return } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkListUsageResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// VpnClientConfiguration vpnClientConfiguration for P2S client. +type VpnClientConfiguration struct { + // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. + VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` + // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway. + VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` + // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. + VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` + // VpnClientProtocols - VpnClientProtocols for Virtual network gateway. + VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` + // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client. + VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` + // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection. + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` } -// Response returns the raw server response from the last page request. -func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult { - return iter.page.Response() +// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection. +type VpnClientIPsecParameters struct { + autorest.Response `json:"-"` + // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` + // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` + // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' + IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` + // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' + IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` + // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` + // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' + IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` + // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + DhGroup DhGroup `json:"dhGroup,omitempty"` + // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + PfsGroup PfsGroup `json:"pfsGroup,omitempty"` } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage { - if !iter.page.NotDone() { - return VirtualNetworkUsage{} - } - return iter.page.Values()[iter.i] +// VpnClientParameters vpn Client Parameters for package generation +type VpnClientParameters struct { + // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86' + ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` + // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` + // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. + RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` + // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. + ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` } -// IsEmpty returns true if the ListResult contains no values. -func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool { - return vnlur.Value == nil || len(*vnlur.Value) == 0 +// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway. +type VpnClientRevokedCertificate struct { + // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. + *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer() (*http.Request, error) { - if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 { - return nil, nil +// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. +func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { + objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnlur.NextLink))) -} - -// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values. -type VirtualNetworkListUsageResultPage struct { - fn func(VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error) - vnlur VirtualNetworkListUsageResult + if vcrc.Name != nil { + objectMap["name"] = vcrc.Name + } + if vcrc.Etag != nil { + objectMap["etag"] = vcrc.Etag + } + if vcrc.ID != nil { + objectMap["id"] = vcrc.ID + } + return json.Marshal(objectMap) } -// 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. -func (page *VirtualNetworkListUsageResultPage) Next() error { - next, err := page.fn(page.vnlur) +// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. +func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { return err } - page.vnlur = next - return nil -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkListUsageResultPage) NotDone() bool { - return !page.vnlur.IsEmpty() -} + for k, v := range m { + switch k { + case "properties": + if v != nil { + var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat + err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) + if err != nil { + return err + } + vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vcrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vcrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vcrc.ID = &ID + } + } + } -// Response returns the raw server response from the last page request. -func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult { - return page.vnlur + return nil } -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { - if page.vnlur.IsEmpty() { - return nil - } - return *page.vnlur.Value +// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network +// gateway. +type VpnClientRevokedCertificatePropertiesFormat struct { + // Thumbprint - The revoked VPN client certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ProvisioningState - The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkPeering peerings in a virtual network resource. -type VirtualNetworkPeering struct { - autorest.Response `json:"-"` - // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. - *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` +// VpnClientRootCertificate VPN client root certificate of virtual network gateway +type VpnClientRootCertificate struct { + // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. + *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. @@ -16006,26 +18498,26 @@ type VirtualNetworkPeering struct { ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for VirtualNetworkPeering. -func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VpnClientRootCertificate. +func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vnp.VirtualNetworkPeeringPropertiesFormat != nil { - objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat + if vcrc.VpnClientRootCertificatePropertiesFormat != nil { + objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat } - if vnp.Name != nil { - objectMap["name"] = vnp.Name + if vcrc.Name != nil { + objectMap["name"] = vcrc.Name } - if vnp.Etag != nil { - objectMap["etag"] = vnp.Etag + if vcrc.Etag != nil { + objectMap["etag"] = vcrc.Etag } - if vnp.ID != nil { - objectMap["id"] = vnp.ID + if vcrc.ID != nil { + objectMap["id"] = vcrc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct. -func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. +func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16035,12 +18527,12 @@ func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat) + var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat + err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) if err != nil { return err } - vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat + vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat } case "name": if v != nil { @@ -16049,7 +18541,7 @@ func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { if err != nil { return err } - vnp.Name = &name + vcrc.Name = &name } case "etag": if v != nil { @@ -16058,7 +18550,7 @@ func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { if err != nil { return err } - vnp.Etag = &etag + vcrc.Etag = &etag } case "id": if v != nil { @@ -16067,7 +18559,7 @@ func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { if err != nil { return err } - vnp.ID = &ID + vcrc.ID = &ID } } } @@ -16075,389 +18567,269 @@ func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { return nil } -// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that belong to -// a virtual network. -type VirtualNetworkPeeringListResult struct { - autorest.Response `json:"-"` - // Value - The peerings in a virtual network. - Value *[]VirtualNetworkPeering `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway +type VpnClientRootCertificatePropertiesFormat struct { + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` + // ProvisioningState - The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering values. -type VirtualNetworkPeeringListResultIterator struct { - i int - page VirtualNetworkPeeringListResultPage +// VpnConnection vpnConnection Resource. +type VpnConnection struct { + autorest.Response `json:"-"` + *VpnConnectionProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// Next 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 *VirtualNetworkPeeringListResultIterator) Next() error { - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil +// MarshalJSON is the custom marshaler for VpnConnection. +func (vc VpnConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vc.VpnConnectionProperties != nil { + objectMap["properties"] = vc.VpnConnectionProperties } - err := iter.page.Next() - if err != nil { - iter.i-- - return err + if vc.Etag != nil { + objectMap["etag"] = vc.Etag } - iter.i = 0 - return nil -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkPeeringListResultIterator) 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 VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult { - 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 VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering { - if !iter.page.NotDone() { - return VirtualNetworkPeering{} + if vc.ID != nil { + objectMap["id"] = vc.ID } - return iter.page.Values()[iter.i] -} - -// IsEmpty returns true if the ListResult contains no values. -func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool { - return vnplr.Value == nil || len(*vnplr.Value) == 0 -} - -// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer() (*http.Request, error) { - if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 { - return nil, nil + if vc.Name != nil { + objectMap["name"] = vc.Name } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnplr.NextLink))) -} - -// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values. -type VirtualNetworkPeeringListResultPage struct { - fn func(VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error) - vnplr VirtualNetworkPeeringListResult -} - -// 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. -func (page *VirtualNetworkPeeringListResultPage) Next() error { - next, err := page.fn(page.vnplr) - if err != nil { - return err + if vc.Type != nil { + objectMap["type"] = vc.Type } - page.vnplr = next - return nil -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkPeeringListResultPage) NotDone() bool { - return !page.vnplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult { - return page.vnplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering { - if page.vnplr.IsEmpty() { - return nil + if vc.Location != nil { + objectMap["location"] = vc.Location } - return *page.vnplr.Value -} - -// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. -type VirtualNetworkPeeringPropertiesFormat struct { - // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space. - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed. - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` - // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - // RemoteAddressSpace - The reference of the remote virtual network address space. - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' - PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` - // ProvisioningState - The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkPeeringsCreateOrUpdateFuture struct { - azure.Future + if vc.Tags != nil { + objectMap["tags"] = vc.Tags + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for VpnConnection struct. +func (vc *VpnConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent { - vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var vpnConnectionProperties VpnConnectionProperties + err = json.Unmarshal(*v, &vpnConnectionProperties) + if err != nil { + return err + } + vc.VpnConnectionProperties = &vpnConnectionProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vc.Tags = tags + } } } - return -} -// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualNetworkPeeringsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture") - return - } - ar.Response = future.Response() - return + return nil } -// VirtualNetworkPropertiesFormat properties of the virtual network. -type VirtualNetworkPropertiesFormat struct { - // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. - DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` - // Subnets - A list of subnets in a Virtual Network. - Subnets *[]Subnet `json:"subnets,omitempty"` - // VirtualNetworkPeerings - A list of peerings in a Virtual Network. - VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` - // ResourceGUID - The resourceGuid property of the Virtual Network resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. - EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` - // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network. - EnableVMProtection *bool `json:"enableVmProtection,omitempty"` - // DdosProtectionPlan - The DDoS protection plan associated with the virtual network. - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` +// VpnConnectionProperties parameters for VpnConnection +type VpnConnectionProperties struct { + // RemoteVpnSite - Id of the connected vpn site. + RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` + // RoutingWeight - routing weight for vpn connection. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' + ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` + // IngressBytesTransferred - Ingress bytes transferred. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // EgressBytesTransferred - Egress bytes transferred. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // ConnectionBandwidthInMbps - Expected bandwidth in MBPS. + ConnectionBandwidthInMbps *int32 `json:"connectionBandwidthInMbps,omitempty"` + // SharedKey - SharedKey for the vpn connection. + SharedKey *string `json:"sharedKey,omitempty"` + // EnableBgp - EnableBgp flag + EnableBgp *bool `json:"enableBgp,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type VirtualNetworksCreateOrUpdateFuture struct { +type VpnConnectionsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { +func (future *VpnConnectionsCreateOrUpdateFuture) Result(client VpnConnectionsClient) (vc VpnConnection, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { - vn, err = client.CreateOrUpdateResponder(vn.Response.Response) + if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { + vc, err = client.CreateOrUpdateResponder(vc.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") } } return } -// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualNetworksDeleteFuture struct { +// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type VpnConnectionsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) { +func (future *VpnConnectionsDeleteFuture) Result(client VpnConnectionsClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture") return } ar.Response = future.Response() return } -// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualNetworksUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { - vn, err = client.UpdateTagsResponder(vn.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkUsage usage details for subnet. -type VirtualNetworkUsage struct { - // CurrentValue - Indicates number of IPs used from the Subnet. - CurrentValue *float64 `json:"currentValue,omitempty"` - // ID - Subnet identifier. - ID *string `json:"id,omitempty"` - // Limit - Indicates the size of the subnet. - Limit *float64 `json:"limit,omitempty"` - // Name - The name containing common and localized value for usage. - Name *VirtualNetworkUsageName `json:"name,omitempty"` - // Unit - Usage units. Returns 'Count' - Unit *string `json:"unit,omitempty"` -} - -// VirtualNetworkUsageName usage strings container. -type VirtualNetworkUsageName struct { - // LocalizedValue - Localized subnet size and usage string. - LocalizedValue *string `json:"localizedValue,omitempty"` - // Value - Subnet size and usage string. - Value *string `json:"value,omitempty"` -} - -// VpnClientConfiguration vpnClientConfiguration for P2S client. -type VpnClientConfiguration struct { - // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway. - VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. - VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - // VpnClientProtocols - VpnClientProtocols for Virtual network gateway. - VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` - // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client. - VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} - -// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection. -type VpnClientIPsecParameters struct { - autorest.Response `json:"-"` - // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` - // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' - IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` - // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' - IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' - IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' - IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' - PfsGroup PfsGroup `json:"pfsGroup,omitempty"` -} - -// VpnClientParameters vpn Client Parameters for package generation -type VpnClientParameters struct { - // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86' - ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` - // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' - AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` - // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. - RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` - // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. - ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` +// VpnDeviceScriptParameters vpn device configuration script generation parameters +type VpnDeviceScriptParameters struct { + // Vendor - The vendor for the vpn device. + Vendor *string `json:"vendor,omitempty"` + // DeviceFamily - The device family for the vpn device. + DeviceFamily *string `json:"deviceFamily,omitempty"` + // FirmwareVersion - The firmware version for the vpn device. + FirmwareVersion *string `json:"firmwareVersion,omitempty"` } -// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway. -type VpnClientRevokedCertificate struct { - // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. - *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. +// VpnGateway vpnGateway Resource. +type VpnGateway struct { + autorest.Response `json:"-"` + *VpnGatewayProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. -func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VpnGateway. +func (vg VpnGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { - objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat + if vg.VpnGatewayProperties != nil { + objectMap["properties"] = vg.VpnGatewayProperties } - if vcrc.Name != nil { - objectMap["name"] = vcrc.Name + if vg.Etag != nil { + objectMap["etag"] = vg.Etag } - if vcrc.Etag != nil { - objectMap["etag"] = vcrc.Etag + if vg.ID != nil { + objectMap["id"] = vg.ID } - if vcrc.ID != nil { - objectMap["id"] = vcrc.ID + if vg.Name != nil { + objectMap["name"] = vg.Name + } + if vg.Type != nil { + objectMap["type"] = vg.Type + } + if vg.Location != nil { + objectMap["location"] = vg.Location + } + if vg.Tags != nil { + objectMap["tags"] = vg.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. -func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VpnGateway struct. +func (vg *VpnGateway) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16467,39 +18839,66 @@ func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat - err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) + var vpnGatewayProperties VpnGatewayProperties + err = json.Unmarshal(*v, &vpnGatewayProperties) if err != nil { return err } - vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat + vg.VpnGatewayProperties = &vpnGatewayProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vg.ID = &ID } case "name": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - vcrc.Name = &name + vg.Type = &typeVar } - case "etag": + case "location": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - vcrc.Etag = &etag + vg.Location = &location } - case "id": + case "tags": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var tags map[string]*string + err = json.Unmarshal(*v, &tags) if err != nil { return err } - vcrc.ID = &ID + vg.Tags = tags } } } @@ -16507,47 +18906,147 @@ func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { return nil } -// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network -// gateway. -type VpnClientRevokedCertificatePropertiesFormat struct { - // Thumbprint - The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// VpnGatewayProperties parameters for VpnGateway +type VpnGatewayProperties struct { + // VirtualHub - The VirtualHub to which the gateway belongs + VirtualHub *SubResource `json:"virtualHub,omitempty"` + // Connections - list of all vpn connections to the gateway. + Connections *[]VpnConnection `json:"connections,omitempty"` + // BgpSettings - Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Policies - The policies applied to this vpn gateway. + Policies *Policies `json:"policies,omitempty"` } -// VpnClientRootCertificate VPN client root certificate of virtual network gateway -type VpnClientRootCertificate struct { - // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. - *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. +// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnGatewaysCreateOrUpdateFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { + vg, err = client.CreateOrUpdateResponder(vg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type VpnGatewaysDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnGatewaysDeleteFuture) Result(client VpnGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnGatewaysUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnGatewaysUpdateTagsFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { + vg, err = client.UpdateTagsResponder(vg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnSite vpnSite Resource. +type VpnSite struct { + autorest.Response `json:"-"` + *VpnSiteProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for VpnClientRootCertificate. -func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for VpnSite. +func (vs VpnSite) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vcrc.VpnClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat + if vs.VpnSiteProperties != nil { + objectMap["properties"] = vs.VpnSiteProperties } - if vcrc.Name != nil { - objectMap["name"] = vcrc.Name + if vs.Etag != nil { + objectMap["etag"] = vs.Etag } - if vcrc.Etag != nil { - objectMap["etag"] = vcrc.Etag + if vs.ID != nil { + objectMap["id"] = vs.ID } - if vcrc.ID != nil { - objectMap["id"] = vcrc.ID + if vs.Name != nil { + objectMap["name"] = vs.Name + } + if vs.Type != nil { + objectMap["type"] = vs.Type + } + if vs.Location != nil { + objectMap["location"] = vs.Location + } + if vs.Tags != nil { + objectMap["tags"] = vs.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. -func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for VpnSite struct. +func (vs *VpnSite) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16557,12 +19056,30 @@ func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) + var vpnSiteProperties VpnSiteProperties + err = json.Unmarshal(*v, &vpnSiteProperties) if err != nil { return err } - vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat + vs.VpnSiteProperties = &vpnSiteProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vs.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vs.ID = &ID } case "name": if v != nil { @@ -16571,25 +19088,34 @@ func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { if err != nil { return err } - vcrc.Name = &name + vs.Name = &name } - case "etag": + case "type": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - vcrc.Etag = &etag + vs.Type = &typeVar } - case "id": + case "location": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - vcrc.ID = &ID + vs.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vs.Tags = tags } } } @@ -16597,22 +19123,130 @@ func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { return nil } -// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway -type VpnClientRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// VpnSiteID vpnSite Resource. +type VpnSiteID struct { + // VpnSite - The resource-uri of the vpn-site for which config is to be fetched. + VpnSite *string `json:"vpnSite,omitempty"` } -// VpnDeviceScriptParameters vpn device configuration script generation parameters -type VpnDeviceScriptParameters struct { - // Vendor - The vendor for the vpn device. - Vendor *string `json:"vendor,omitempty"` - // DeviceFamily - The device family for the vpn device. - DeviceFamily *string `json:"deviceFamily,omitempty"` - // FirmwareVersion - The firmware version for the vpn device. - FirmwareVersion *string `json:"firmwareVersion,omitempty"` +// VpnSiteProperties parameters for VpnSite +type VpnSiteProperties struct { + // VirtualWAN - The VirtualWAN to which the vpnSite belongs + VirtualWAN *SubResource `json:"virtualWAN,omitempty"` + // DeviceProperties - The device properties + DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` + // IPAddress - The ip-address for the vpn-site. + IPAddress *string `json:"ipAddress,omitempty"` + // SiteKey - The key for vpn-site that can be used for connections. + SiteKey *string `json:"siteKey,omitempty"` + // AddressSpace - The AddressSpace that contains an array of IP address ranges. + AddressSpace *AddressSpace `json:"addressSpace,omitempty"` + // BgpProperties - The set of bgp properties. + BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnSitesConfigurationDownloadFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnSitesConfigurationDownloadFuture) Result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnSitesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnSitesCreateOrUpdateFuture) Result(client VpnSitesClient) (vs VpnSite, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent { + vs, err = client.CreateOrUpdateResponder(vs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type VpnSitesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnSitesDeleteFuture) Result(client VpnSitesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type VpnSitesUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnSitesUpdateTagsFuture) Result(client VpnSitesClient) (vs VpnSite, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent { + vs, err = client.UpdateTagsResponder(vs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request") + } + } + return } // Watcher network watcher in a resource group. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualhubs.go new file mode 100644 index 000000000000..af9b21e1f65c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualhubs.go @@ -0,0 +1,508 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// VirtualHubsClient is the network Client +type VirtualHubsClient struct { + BaseClient +} + +// NewVirtualHubsClient creates an instance of the VirtualHubsClient client. +func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { + return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +func NewVirtualHubsClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubsClient { + return VirtualHubsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// virtualHubParameters - parameters supplied to create or update VirtualHub. +func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (result VirtualHubsCreateOrUpdateFuture, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", pathParameters), + autorest.WithJSON(virtualHubParameters), + 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 VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHubsDeleteFuture, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHub, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) GetResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VirtualHubs in a subscription. +func (client VirtualHubsClient) List(ctx context.Context) (result ListVirtualHubsResultPage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvhr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure sending request") + return + } + + result.lvhr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs", 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 VirtualHubsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) ListResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 VirtualHubsClient) listNextResults(lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) { + req, err := lastResults.listVirtualHubsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "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, "network.VirtualHubsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubsClient) ListComplete(ctx context.Context) (result ListVirtualHubsResultIterator, err error) { + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists all the VirtualHubs in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +func (client VirtualHubsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultPage, err error) { + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvhr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvhr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client VirtualHubsClient) listByResourceGroupNextResults(lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) { + req, err := lastResults.listVirtualHubsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultIterator, err error) { + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateTags updates VirtualHub tags. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// virtualHubParameters - parameters supplied to update VirtualHub tags. +func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHubsUpdateTagsFuture, err error) { + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", pathParameters), + autorest.WithJSON(virtualHubParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (future VirtualHubsUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) UpdateTagsResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go index 047ad12328b9..1cee6c00135f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go @@ -439,7 +439,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: 128, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) @@ -659,7 +659,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http. // UpdateTagsResponder handles the response to the UpdateTags request. The method always // closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListEntity, err error) { +func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualwans.go new file mode 100644 index 000000000000..0f06b612185a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/virtualwans.go @@ -0,0 +1,508 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// VirtualWANsClient is the network Client +type VirtualWANsClient struct { + BaseClient +} + +// NewVirtualWANsClient creates an instance of the VirtualWANsClient client. +func NewVirtualWANsClient(subscriptionID string) VirtualWANsClient { + return NewVirtualWANsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualWANsClientWithBaseURI creates an instance of the VirtualWANsClient client. +func NewVirtualWANsClientWithBaseURI(baseURI string, subscriptionID string) VirtualWANsClient { + return VirtualWANsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being created or updated. +// wANParameters - parameters supplied to create or update VirtualWAN. +func (client VirtualWANsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (result VirtualWANsCreateOrUpdateFuture, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWANName, wANParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualWANsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), + autorest.WithJSON(wANParameters), + 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 VirtualWANsClient) CreateOrUpdateSender(req *http.Request) (future VirtualWANsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualWANsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualWAN. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being deleted. +func (client VirtualWANsClient) Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWANsDeleteFuture, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualWANsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", 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 VirtualWANsClient) DeleteSender(req *http.Request) (future VirtualWANsDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualWANsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VirtualWAN. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being retrieved. +func (client VirtualWANsClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWAN, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualWANsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", 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 VirtualWANsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualWANsClient) GetResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VirtualWANs in a subscription. +func (client VirtualWANsClient) List(ctx context.Context) (result ListVirtualWANsResultPage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvwnr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "List", resp, "Failure sending request") + return + } + + result.lvwnr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualWANsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans", 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 VirtualWANsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualWANsClient) ListResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 VirtualWANsClient) listNextResults(lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { + req, err := lastResults.listVirtualWANsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "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, "network.VirtualWANsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualWANsClient) ListComplete(ctx context.Context) (result ListVirtualWANsResultIterator, err error) { + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists all the VirtualWANs in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +func (client VirtualWANsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultPage, err error) { + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvwnr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvwnr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VirtualWANsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualWANsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualWANsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client VirtualWANsClient) listByResourceGroupNextResults(lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { + req, err := lastResults.listVirtualWANsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualWANsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultIterator, err error) { + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateTags updates a VirtualWAN tags. +// Parameters: +// resourceGroupName - the resource group name of the VirtualWan. +// virtualWANName - the name of the VirtualWAN being updated. +// wANParameters - parameters supplied to Update VirtualWAN tags. +func (client VirtualWANsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWANsUpdateTagsFuture, err error) { + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualWANName, wANParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWANsClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VirtualWANsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "VirtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), + autorest.WithJSON(wANParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualWANsClient) UpdateTagsSender(req *http.Request) (future VirtualWANsUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VirtualWANsClient) UpdateTagsResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnconnections.go new file mode 100644 index 000000000000..d63d33a82d27 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnconnections.go @@ -0,0 +1,351 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// VpnConnectionsClient is the network Client +type VpnConnectionsClient struct { + BaseClient +} + +// NewVpnConnectionsClient creates an instance of the VpnConnectionsClient client. +func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { + return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +func NewVpnConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnConnectionsClient { + return VpnConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing +// connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the connection. +// vpnConnectionParameters - parameters supplied to create or Update a VPN Connection. +func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (result VpnConnectionsCreateOrUpdateFuture, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", pathParameters), + autorest.WithJSON(vpnConnectionParameters), + 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 VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a vpn connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the connection. +func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnectionsDeleteFuture, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a vpn connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +func (client VpnConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnection, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, gatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) GetResponder(resp *http.Response) (result VpnConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnGateway retrieves all vpn connections for a particular virtual wan vpn gateway. +// Parameters: +// gatewayName - the name of the gateway. +func (client VpnConnectionsClient) ListByVpnGateway(ctx context.Context, gatewayName string) (result ListVpnConnectionsResultPage, err error) { + result.fn = client.listByVpnGatewayNextResults + req, err := client.ListByVpnGatewayPreparer(ctx, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnGatewaySender(req) + if err != nil { + result.lvcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure sending request") + return + } + + result.lvcr, err = client.ListByVpnGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure responding to request") + } + + return +} + +// ListByVpnGatewayPreparer prepares the ListByVpnGateway request. +func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVpnGatewaySender sends the ListByVpnGateway request. The method will close the +// http.Response Body if it receives an error. +func (client VpnConnectionsClient) ListByVpnGatewaySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) ListByVpnGatewayResponder(resp *http.Response) (result ListVpnConnectionsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnGatewayNextResults retrieves the next set of results, if any. +func (client VpnConnectionsClient) listByVpnGatewayNextResults(lastResults ListVpnConnectionsResult) (result ListVpnConnectionsResult, err error) { + req, err := lastResults.listVpnConnectionsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnGatewaySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnGatewayComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnConnectionsClient) ListByVpnGatewayComplete(ctx context.Context, gatewayName string) (result ListVpnConnectionsResultIterator, err error) { + result.page, err = client.ListByVpnGateway(ctx, gatewayName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpngateways.go new file mode 100644 index 000000000000..516cec4a1b29 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpngateways.go @@ -0,0 +1,508 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// VpnGatewaysClient is the network Client +type VpnGatewaysClient struct { + BaseClient +} + +// NewVpnGatewaysClient creates an instance of the VpnGatewaysClient client. +func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { + return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +func NewVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VpnGatewaysClient { + return VpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// vpnGatewayParameters - parameters supplied to create or Update a virtual wan vpn gateway. +func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (result VpnGatewaysCreateOrUpdateFuture, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", pathParameters), + autorest.WithJSON(vpnGatewayParameters), + 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 VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a virtual wan vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysDeleteFuture, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a virtual wan vpn gateway. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGateway, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) GetResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VpnGateways in a subscription. +func (client VpnGatewaysClient) List(ctx context.Context) (result ListVpnGatewaysResultPage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.lvgr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways", 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 VpnGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ListResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 VpnGatewaysClient) listNextResults(lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) { + req, err := lastResults.listVpnGatewaysResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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, "network.VpnGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnGatewaysClient) ListComplete(ctx context.Context) (result ListVpnGatewaysResultIterator, err error) { + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists all the VpnGateways in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +func (client VpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultPage, err error) { + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvgr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client VpnGatewaysClient) listByResourceGroupNextResults(lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) { + req, err := lastResults.listVpnGatewaysResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultIterator, err error) { + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateTags updates virtual wan vpn gateway tags. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// vpnGatewayParameters - parameters supplied to update a virtual wan vpn gateway tags. +func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGatewaysUpdateTagsFuture, err error) { + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", pathParameters), + autorest.WithJSON(vpnGatewayParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsites.go new file mode 100644 index 000000000000..825232b5a81a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsites.go @@ -0,0 +1,508 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// VpnSitesClient is the network Client +type VpnSitesClient struct { + BaseClient +} + +// NewVpnSitesClient creates an instance of the VpnSitesClient client. +func NewVpnSitesClient(subscriptionID string) VpnSitesClient { + return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +func NewVpnSitesClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesClient { + return VpnSitesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being created or updated. +// vpnSiteParameters - parameters supplied to create or update VpnSite. +func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (result VpnSitesCreateOrUpdateFuture, err error) { + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", pathParameters), + autorest.WithJSON(vpnSiteParameters), + 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 VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) CreateOrUpdateResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VpnSite. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being deleted. +func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSitesDeleteFuture, err error) { + req, err := client.DeletePreparer(ctx, resourceGroupName, vpnSiteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VPNsite. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being retrieved. +func (client VpnSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSite, err error) { + req, err := client.GetPreparer(ctx, resourceGroupName, vpnSiteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) GetResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VpnSites in a subscription. +func (client VpnSitesClient) List(ctx context.Context) (result ListVpnSitesResultPage, err error) { + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure sending request") + return + } + + result.lvsr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites", 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 VpnSitesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) ListResponder(resp *http.Response) (result ListVpnSitesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 VpnSitesClient) listNextResults(lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) { + req, err := lastResults.listVpnSitesResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "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, "network.VpnSitesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnSitesClient) ListComplete(ctx context.Context) (result ListVpnSitesResultIterator, err error) { + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists all the vpnSites in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +func (client VpnSitesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultPage, err error) { + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvsr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VpnSitesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnSitesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client VpnSitesClient) listByResourceGroupNextResults(lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) { + req, err := lastResults.listVpnSitesResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultIterator, err error) { + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateTags updates VpnSite tags. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite being updated. +// vpnSiteParameters - parameters supplied to update VpnSite tags. +func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSitesUpdateTagsFuture, err error) { + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", pathParameters), + autorest.WithJSON(vpnSiteParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (future VpnSitesUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) UpdateTagsResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go new file mode 100644 index 000000000000..05a9355709ed --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go @@ -0,0 +1,113 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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" + "net/http" +) + +// VpnSitesConfigurationClient is the network Client +type VpnSitesConfigurationClient struct { + BaseClient +} + +// NewVpnSitesConfigurationClient creates an instance of the VpnSitesConfigurationClient client. +func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfigurationClient { + return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +func NewVpnSitesConfigurationClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesConfigurationClient { + return VpnSitesConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Download gives the sas-url to download the configurations for vpn-sites in a resource group. +// Parameters: +// resourceGroupName - the resource group name. +// virtualWANName - the name of the VirtualWAN for which configuration of all vpn-sites is needed. +// request - parameters supplied to download vpn-sites configuration. +func (client VpnSitesConfigurationClient) Download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadFuture, err error) { + req, err := client.DownloadPreparer(ctx, resourceGroupName, virtualWANName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure preparing request") + return + } + + result, err = client.DownloadSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", result.Response(), "Failure sending request") + return + } + + return +} + +// DownloadPreparer prepares the Download request. +func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2018-04-01" + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DownloadSender sends the Download request. The method will close the +// http.Response Body if it receives an error. +func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DownloadResponder handles the response to the Download request. The method always +// closes the http.Response Body. +func (client VpnSitesConfigurationClient) DownloadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go index b032a20f1888..c592f55910e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go @@ -738,12 +738,11 @@ type ZoneProperties struct { // ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type ZonesDeleteFuture struct { azure.Future - req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) { +func (future *ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -751,35 +750,10 @@ func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response return } if !done { - return ar, azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture") - } - if future.PollingMethod() == azure.PollingLocation { - ar, err = client.DeleteResponder(future.Response()) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Failure responding to request") - } + err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture") return } - var req *http.Request - var resp *http.Response - if future.PollingURL() != "" { - req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) - if err != nil { - return - } - } else { - req = autorest.ChangeToGet(future.req) - } - resp, err = autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure sending request") - return - } - ar, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", resp, "Failure responding to request") - } + ar.Response = future.Response() return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go index 0f8233dbc696..d27b31ee5ad7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -41,7 +42,7 @@ func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) Recor // CreateOrUpdate creates or updates a record set within a DNS zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // relativeRecordSetName - the name of the record set, relative to the name of the zone. // recordType - the type of DNS record in this record set. Record sets of type SOA can be updated but not @@ -52,6 +53,14 @@ func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) Recor // ifNoneMatch - set to '*' to allow a new record set to be created, but to prevent updating an existing record // set. Other values will be ignored. func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (result RecordSet, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch, ifNoneMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -128,7 +137,7 @@ func (client RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete deletes a record set from a DNS zone. This operation cannot be undone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // relativeRecordSetName - the name of the record set, relative to the name of the zone. // recordType - the type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are @@ -136,6 +145,14 @@ func (client RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (res // ifMatch - the etag of the record set. Omit this value to always delete the current record set. Specify the // last-seen etag value to prevent accidentally deleting any concurrent changes. func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "Delete", err.Error()) + } + req, err := client.DeletePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", nil, "Failure preparing request") @@ -205,11 +222,19 @@ func (client RecordSetsClient) DeleteResponder(resp *http.Response) (result auto // Get gets a record set. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // relativeRecordSetName - the name of the record set, relative to the name of the zone. // recordType - the type of DNS record in this record set. func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (result RecordSet, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType) if err != nil { err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", nil, "Failure preparing request") @@ -276,13 +301,21 @@ func (client RecordSetsClient) GetResponder(resp *http.Response) (result RecordS // ListAllByDNSZone lists all record sets in a DNS zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. // recordSetNameSuffix - the suffix label of the record set name that has to be used to filter the record set // enumerations. If this parameter is specified, Enumeration will return only records that end with // . func (client RecordSetsClient) ListAllByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result RecordSetListResultPage, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "ListAllByDNSZone", err.Error()) + } + result.fn = client.listAllByDNSZoneNextResults req, err := client.ListAllByDNSZonePreparer(ctx, resourceGroupName, zoneName, top, recordSetNameSuffix) if err != nil { @@ -381,13 +414,21 @@ func (client RecordSetsClient) ListAllByDNSZoneComplete(ctx context.Context, res // ListByDNSZone lists all record sets in a DNS zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. // recordsetnamesuffix - the suffix label of the record set name that has to be used to filter the record set // enumerations. If this parameter is specified, Enumeration will return only records that end with // . func (client RecordSetsClient) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "ListByDNSZone", err.Error()) + } + result.fn = client.listByDNSZoneNextResults req, err := client.ListByDNSZonePreparer(ctx, resourceGroupName, zoneName, top, recordsetnamesuffix) if err != nil { @@ -486,7 +527,7 @@ func (client RecordSetsClient) ListByDNSZoneComplete(ctx context.Context, resour // ListByType lists the record sets of a specified type in a DNS zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // recordType - the type of record sets to enumerate. // top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. @@ -494,6 +535,14 @@ func (client RecordSetsClient) ListByDNSZoneComplete(ctx context.Context, resour // enumerations. If this parameter is specified, Enumeration will return only records that end with // . func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "ListByType", err.Error()) + } + result.fn = client.listByTypeNextResults req, err := client.ListByTypePreparer(ctx, resourceGroupName, zoneName, recordType, top, recordsetnamesuffix) if err != nil { @@ -593,7 +642,7 @@ func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceG // Update updates a record set within a DNS zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // relativeRecordSetName - the name of the record set, relative to the name of the zone. // recordType - the type of DNS record in this record set. @@ -601,6 +650,14 @@ func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceG // ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify // the last-seen etag value to prevent accidentally overwritting concurrent changes. func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (result RecordSet, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.RecordSetsClient", "Update", err.Error()) + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", nil, "Failure preparing request") diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go index 5e728426c451..1772b6eff437 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -41,7 +42,7 @@ func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClien // CreateOrUpdate creates or updates a DNS zone. Does not modify DNS records within the zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // parameters - parameters supplied to the CreateOrUpdate operation. // ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the @@ -49,6 +50,14 @@ func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClien // ifNoneMatch - set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. // Other values will be ignored. func (client ZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (result Zone, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.ZonesClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, zoneName, parameters, ifMatch, ifNoneMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -124,11 +133,19 @@ func (client ZonesClient) CreateOrUpdateResponder(resp *http.Response) (result Z // Delete deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be // undone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // ifMatch - the etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen // etag value to prevent accidentally deleting any concurrent changes. func (client ZonesClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result ZonesDeleteFuture, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.ZonesClient", "Delete", err.Error()) + } + req, err := client.DeletePreparer(ctx, resourceGroupName, zoneName, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", nil, "Failure preparing request") @@ -172,15 +189,17 @@ func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) { - sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) - future.Future = azure.NewFuture(req) - future.req = req - _, err = future.Done(sender) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) if err != nil { return } - err = autorest.Respond(future.Response(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent)) + future.Future, err = azure.NewFutureFromResponse(resp) return } @@ -198,9 +217,17 @@ func (client ZonesClient) DeleteResponder(resp *http.Response) (result autorest. // Get gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). func (client ZonesClient) Get(ctx context.Context, resourceGroupName string, zoneName string) (result Zone, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.ZonesClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, zoneName) if err != nil { err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", nil, "Failure preparing request") @@ -360,9 +387,17 @@ func (client ZonesClient) ListComplete(ctx context.Context, top *int32) (result // ListByResourceGroup lists the DNS zones within a resource group. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. func (client ZonesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultPage, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.ZonesClient", "ListByResourceGroup", err.Error()) + } + result.fn = client.listByResourceGroupNextResults req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top) if err != nil { @@ -457,12 +492,20 @@ func (client ZonesClient) ListByResourceGroupComplete(ctx context.Context, resou // Update updates a DNS zone. Does not modify DNS records within the zone. // Parameters: -// resourceGroupName - the name of the resource group. +// resourceGroupName - the name of the resource group. The name is case insensitive. // zoneName - the name of the DNS zone (without a terminating dot). // parameters - parameters supplied to the Update operation. // ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the // last-seen etag value to prevent accidentally overwritting any concurrent changes. func (client ZonesClient) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters ZoneUpdate, ifMatch string) (result Zone, err error) { + if err := validation.Validate([]validation.Validation{ + {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("dns.ZonesClient", "Update", err.Error()) + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, zoneName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", nil, "Failure preparing request") diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go index f047c6afc6f2..9883b790ed94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go @@ -54,7 +54,7 @@ func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroup {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.WorkspaceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.InclusiveMaximum, Rule: 730, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.InclusiveMaximum, Rule: int64(730), Chain: nil}, {Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.InclusiveMinimum, Rule: -1, Chain: nil}, }}, }}}}}); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go index 34fc539c9135..c97eaef96ab8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go @@ -19,6 +19,8 @@ package operationsmanagement import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" ) // ArmTemplateParameter parameter to pass to ARM template @@ -181,3 +183,54 @@ type SolutionPropertiesList struct { // Value - List of solution properites within the subscription. Value *[]Solution `json:"value,omitempty"` } + +// SolutionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SolutionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SolutionsCreateOrUpdateFuture) Result(client SolutionsClient) (s Solution, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("operationsmanagement.SolutionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SolutionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type SolutionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SolutionsDeleteFuture) Result(client SolutionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("operationsmanagement.SolutionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go index 91c0b6a4c3ff..5f62153c67f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go @@ -45,7 +45,7 @@ func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, provid // resourceGroupName - the name of the resource group to get. The name is case insensitive. // solutionName - user Solution Name. // parameters - the parameters required to create OMS Solution. -func (client SolutionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, solutionName string, parameters Solution) (result Solution, err error) { +func (client SolutionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, solutionName string, parameters Solution) (result SolutionsCreateOrUpdateFuture, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -63,18 +63,12 @@ func (client SolutionsClient) CreateOrUpdate(ctx context.Context, resourceGroupN return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -103,9 +97,19 @@ func (client SolutionsClient) CreateOrUpdatePreparer(ctx context.Context, resour // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client SolutionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, +func (client SolutionsClient) CreateOrUpdateSender(req *http.Request) (future SolutionsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -114,7 +118,7 @@ func (client SolutionsClient) CreateOrUpdateResponder(resp *http.Response) (resu err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -125,7 +129,7 @@ func (client SolutionsClient) CreateOrUpdateResponder(resp *http.Response) (resu // Parameters: // resourceGroupName - the name of the resource group to get. The name is case insensitive. // solutionName - user Solution Name. -func (client SolutionsClient) Delete(ctx context.Context, resourceGroupName string, solutionName string) (result autorest.Response, err error) { +func (client SolutionsClient) Delete(ctx context.Context, resourceGroupName string, solutionName string) (result SolutionsDeleteFuture, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -140,18 +144,12 @@ func (client SolutionsClient) Delete(ctx context.Context, resourceGroupName stri return } - resp, err := client.DeleteSender(req) + result, err = client.DeleteSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Delete", result.Response(), "Failure sending request") return } - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Delete", resp, "Failure responding to request") - } - return } @@ -178,9 +176,19 @@ func (client SolutionsClient) DeletePreparer(ctx context.Context, resourceGroupN // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client SolutionsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, +func (client SolutionsClient) DeleteSender(req *http.Request) (future SolutionsDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // DeleteResponder handles the response to the Delete request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/hybridconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/hybridconnections.go index 9310fa033510..976ff84811db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/hybridconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/hybridconnections.go @@ -59,7 +59,7 @@ func (client HybridConnectionsClient) CreateOrUpdate(ctx context.Context, resour {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.HybridConnectionProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}}}}); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/wcfrelays.go b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/wcfrelays.go index 37b5a7a20a68..d6f8282094e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/wcfrelays.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay/wcfrelays.go @@ -59,7 +59,7 @@ func (client WCFRelaysClient) CreateOrUpdate(ctx context.Context, resourceGroupN {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.WcfRelayProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, {Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}}}}); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go index 047ea31ca27c..08bd112afa1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go @@ -260,7 +260,7 @@ func (client JobsClient) List(ctx context.Context, resourceGroupName string, job if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("scheduler.JobsClient", "List", err.Error()) @@ -377,7 +377,7 @@ func (client JobsClient) ListJobHistory(ctx context.Context, resourceGroupName s if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("scheduler.JobsClient", "ListJobHistory", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go b/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go index 56ddc928d300..7a3240c47b14 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search/services.go @@ -139,11 +139,11 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa {TargetValue: service, Constraints: []validation.Constraint{{Target: "service.ServiceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "service.ServiceProperties.ReplicaCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "service.ServiceProperties.ReplicaCount", Name: validation.InclusiveMaximum, Rule: 12, Chain: nil}, + Chain: []validation.Constraint{{Target: "service.ServiceProperties.ReplicaCount", Name: validation.InclusiveMaximum, Rule: int64(12), Chain: nil}, {Target: "service.ServiceProperties.ReplicaCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, {Target: "service.ServiceProperties.PartitionCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "service.ServiceProperties.PartitionCount", Name: validation.InclusiveMaximum, Rule: 12, Chain: nil}, + Chain: []validation.Constraint{{Target: "service.ServiceProperties.PartitionCount", Name: validation.InclusiveMaximum, Rule: int64(12), Chain: nil}, {Target: "service.ServiceProperties.PartitionCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, }}}}}); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go index b65c94052a4d..be823f3af344 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go @@ -427,6 +427,8 @@ func (page ArmDisasterRecoveryListResultPage) Values() []ArmDisasterRecovery { type ArmDisasterRecoveryProperties struct { // ProvisioningState - Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' ProvisioningState ProvisioningStateDR `json:"provisioningState,omitempty"` + // PendingReplicationOperationsCount - Number of entities pending to be replicated. + PendingReplicationOperationsCount *int64 `json:"pendingReplicationOperationsCount,omitempty"` // PartnerNamespace - ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairning PartnerNamespace *string `json:"partnerNamespace,omitempty"` // AlternateName - Primary/Secondary eventhub namespace name, which is part of GEO DR pairning @@ -1008,6 +1010,8 @@ func (mcp *MigrationConfigProperties) UnmarshalJSON(body []byte) error { type MigrationConfigPropertiesProperties struct { // ProvisioningState - Provisioning state of Migration Configuration ProvisioningState *string `json:"provisioningState,omitempty"` + // PendingReplicationOperationsCount - Number of entities pending to be replicated. + PendingReplicationOperationsCount *int64 `json:"pendingReplicationOperationsCount,omitempty"` // TargetNamespace - Existing premium Namespace ARM Id name which has no entities, will be used for migration TargetNamespace *string `json:"targetNamespace,omitempty"` // PostMigrationName - Name to access Standard Namespace after migration diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/queues.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/queues.go index 63588cc1144b..78843ee98e1a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/queues.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/queues.go @@ -675,12 +675,12 @@ func (client QueuesClient) ListByNamespace(ctx context.Context, resourceGroupNam {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.QueuesClient", "ListByNamespace", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go index ecd6ca245c25..4cbe705fada4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go @@ -340,12 +340,12 @@ func (client RulesClient) ListBySubscriptions(ctx context.Context, resourceGroup {Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.RulesClient", "ListBySubscriptions", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go index c0b63ff12988..1a087cb81e4e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go @@ -321,12 +321,12 @@ func (client SubscriptionsClient) ListByTopic(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.SubscriptionsClient", "ListByTopic", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go index 85b93c8219f1..ce8b0c1a9240 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go @@ -675,12 +675,12 @@ func (client TopicsClient) ListByNamespace(ctx context.Context, resourceGroupNam {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.TopicsClient", "ListByNamespace", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go index 414b7700fd44..4db43838e3cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/apps.go @@ -24719,7 +24719,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourc {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, }}, }}, @@ -24815,7 +24815,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, res {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, }}, }}, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go index ba9c790ce435..40d00aabbb3d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go @@ -54,7 +54,7 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdate(ctx context.Conte {TargetValue: certificateDistinguishedName, Constraints: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: 3, Chain: nil}, + Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, }}}}}); err != nil { @@ -1508,7 +1508,7 @@ func (client AppServiceCertificateOrdersClient) ValidatePurchaseInformation(ctx {TargetValue: appServiceCertificateOrder, Constraints: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: 3, Chain: nil}, + Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, }}, }}}}}); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go index f6a9da282253..02fa5929cc1b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go @@ -69,7 +69,11 @@ func GetContainerReferenceFromSASURI(sasuri url.URL) (*Container, error) { if len(path) <= 1 { return nil, fmt.Errorf("could not find a container in URI: %s", sasuri.String()) } - cli := newSASClient().GetBlobService() + c, err := newSASClientFromURL(&sasuri) + if err != nil { + return nil, err + } + cli := c.GetBlobService() return &Container{ bsc: &cli, Name: path[1], diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go index 2930824b26f0..427558b5d675 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go @@ -336,15 +336,7 @@ func IsValidStorageAccount(account string) bool { // NewAccountSASClient contructs a client that uses accountSAS authorization // for its operations. func NewAccountSASClient(account string, token url.Values, env azure.Environment) Client { - c := newSASClient() - c.accountSASToken = token - c.accountName = account - c.baseURL = env.StorageEndpointSuffix - - // Get API version and protocol from token - c.apiVersion = token.Get("sv") - c.useHTTPS = token.Get("spr") == "https" - return c + return newSASClient(account, env.StorageEndpointSuffix, token) } // NewAccountSASClientFromEndpointToken constructs a client that uses accountSAS authorization @@ -354,12 +346,36 @@ func NewAccountSASClientFromEndpointToken(endpoint string, sasToken string) (Cli if err != nil { return Client{}, err } - - token, err := url.ParseQuery(sasToken) + _, err = url.ParseQuery(sasToken) if err != nil { return Client{}, err } + u.RawQuery = sasToken + return newSASClientFromURL(u) +} +func newSASClient(accountName, baseURL string, sasToken url.Values) Client { + c := Client{ + HTTPClient: http.DefaultClient, + apiVersion: DefaultAPIVersion, + sasClient: true, + Sender: &DefaultSender{ + RetryAttempts: defaultRetryAttempts, + ValidStatusCodes: defaultValidStatusCodes, + RetryDuration: defaultRetryDuration, + }, + accountName: accountName, + baseURL: baseURL, + accountSASToken: sasToken, + } + c.userAgent = c.getDefaultUserAgent() + // Get API version and protocol from token + c.apiVersion = sasToken.Get("sv") + c.useHTTPS = sasToken.Get("spr") == "https" + return c +} + +func newSASClientFromURL(u *url.URL) (Client, error) { // the host name will look something like this // - foo.blob.core.windows.net // "foo" is the account name @@ -377,30 +393,13 @@ func NewAccountSASClientFromEndpointToken(endpoint string, sasToken string) (Cli return Client{}, fmt.Errorf("failed to find '.' in %s", u.Host[i1+1:]) } - c := newSASClient() - c.accountSASToken = token - c.accountName = u.Host[:i1] - c.baseURL = u.Host[i1+i2+2:] - - // Get API version and protocol from token - c.apiVersion = token.Get("sv") - c.useHTTPS = token.Get("spr") == "https" - return c, nil -} - -func newSASClient() Client { - c := Client{ - HTTPClient: http.DefaultClient, - apiVersion: DefaultAPIVersion, - sasClient: true, - Sender: &DefaultSender{ - RetryAttempts: defaultRetryAttempts, - ValidStatusCodes: defaultValidStatusCodes, - RetryDuration: defaultRetryDuration, - }, + sasToken := u.Query() + c := newSASClient(u.Host[:i1], u.Host[i1+i2+2:], sasToken) + if spr := sasToken.Get("spr"); spr == "" { + // infer from URL if not in the query params set + c.useHTTPS = u.Scheme == "https" } - c.userAgent = c.getDefaultUserAgent() - return c + return c, nil } func (c Client) isServiceSASClient() bool { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go index ce33dcb7270d..ffc183be6192 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go @@ -114,7 +114,8 @@ func (m *Message) Update(options *UpdateMessageOptions) error { return err } headers["Content-Length"] = strconv.Itoa(nn) - + // visibilitytimeout is required for Update (zero or greater) so set the default here + query.Set("visibilitytimeout", "0") if options != nil { if options.VisibilityTimeout != 0 { query.Set("visibilitytimeout", strconv.Itoa(options.VisibilityTimeout)) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index fe6c1f7b48f6..fe7724a033ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v17.4.0" +const Number = "v18.0.0" diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index c17ad2474616..eec4dced7e56 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -61,6 +61,9 @@ const ( // msiEndpoint is the well known endpoint for getting MSI authentications tokens msiEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token" + + // the default number of attempts to refresh an MSI authentication token + defaultMaxMSIRefreshAttempts = 5 ) // OAuthTokenProvider is an interface which should be implemented by an access token retriever @@ -323,6 +326,8 @@ type ServicePrincipalToken struct { refreshLock *sync.RWMutex sender Sender refreshCallbacks []TokenRefreshCallback + // MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token. + MaxMSIRefreshAttempts int } // MarshalTokenJSON returns the marshalled inner token. @@ -655,9 +660,10 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI AutoRefresh: true, RefreshWithin: defaultRefresh, }, - refreshLock: &sync.RWMutex{}, - sender: &http.Client{}, - refreshCallbacks: callbacks, + refreshLock: &sync.RWMutex{}, + sender: &http.Client{}, + refreshCallbacks: callbacks, + MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts, } if userAssignedID != nil { @@ -811,7 +817,7 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource var resp *http.Response if isIMDS(spt.inner.OauthConfig.TokenEndpoint) { - resp, err = retryForIMDS(spt.sender, req) + resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts) } else { resp, err = spt.sender.Do(req) } @@ -851,7 +857,7 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource } // retry logic specific to retrieving a token from the IMDS endpoint -func retryForIMDS(sender Sender, req *http.Request) (resp *http.Response, err error) { +func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http.Response, err error) { // copied from client.go due to circular dependency retries := []int{ http.StatusRequestTimeout, // 408 @@ -876,7 +882,6 @@ func retryForIMDS(sender Sender, req *http.Request) (resp *http.Response, err er // see https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/how-to-use-vm-token#retry-guidance - const maxAttempts int = 5 const maxDelay time.Duration = 60 * time.Second attempt := 0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go index 200bc0beb002..e32cd68fecac 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/version.go +++ b/vendor/github.com/Azure/go-autorest/autorest/version.go @@ -16,5 +16,5 @@ package autorest // Version returns the semantic version (see http://semver.org). func Version() string { - return "v10.11.4" + return "v10.12.0" } diff --git a/vendor/vendor.json b/vendor/vendor.json index 9aefe3c695c2..2e804744851e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -3,380 +3,380 @@ "ignore": "test", "package": [ { - "checksumSHA1": "v4/I1q4GGrkPUIcI0EDJgZp22bE=", + "checksumSHA1": "xeK+ux8fKSSJJVW04/TE9yQFfGs=", "path": "github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "cL5VuAorqkBbkDvfOpB8Mh8Mm48=", + "checksumSHA1": "j10oMaF3ShS83b71sfCW9dub5k4=", "path": "github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "qVMpxe1n/pINpOpjfaZDDtKpOO0=", "path": "github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "kM2PZfGUZRmE9wFeHAFjHFPepzk=", "path": "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-12-01/compute", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "a/mbRxz450lwbacAUuG77DpKKJU=", "path": "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-04-01/containerinstance", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "A4GmPiUDP7xdTUYkvmO/Y3LPCZU=", "path": "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "YeeOckwfu556W2qPAIiulzeyelg=", "path": "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "BwC5MjJVKWsuReAvdMR4Fk1JNh0=", + "checksumSHA1": "yo6kXIxuGav2rSQln4c4YArpCW4=", "path": "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "koKSQ4PgeyIgykEPNEeE2tzRm18=", "path": "github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "mdwBbEgubHb6UnwDspop+43Sx8k=", "path": "github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "5wH3Co0j2XLF+Tnml7Ky++Ves+s=", + "checksumSHA1": "FF+JJRL14lbAx8c2s4pixvIulCA=", "path": "github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "x9ceW8JE2/FgODRSywClj0fRlh8=", "path": "github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "D8B7LqvFSvImhWlkuv6tKbGrWPk=", + "checksumSHA1": "UllFPDJZazs7Vy9wdcfKPe0r1u0=", "path": "github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "usYk7dQDADCaSYFlrjXtczH0/tA=", + "checksumSHA1": "3Dn5zSdAcOuPVXEy5egbIsfFeC4=", "path": "github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "V8yVJJDoKLdBxvAHshfWc0N6oeA=", "path": "github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2016-10-01/keyvault", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "E+QgVQ3X1EvmDta96Xa2aPHrkt4=", "path": "github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2018-03-01/insights", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "Juw5Pl5qUEN8CTEgDf+wgRfoYdc=", "path": "github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "Yw5zUEwDCvSlsnX4CQ36l6CjzPA=", + "checksumSHA1": "FmSD121uiCzfR8QJpQKkKYuLmBw=", "path": "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "8LqtzWEGPooyQjmmalXjJvdRGvE=", "path": "github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "e4hCajXDSuWNkUvwA35jMHGm20E=", "path": "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "P+LV8DmKhBG0/ABMx1zrcRasYy4=", + "checksumSHA1": "3wqT8RCanN6aSM1HM2HWZp+MNAw=", "path": "github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns", - "revision": "4650843026a7fdec254a8d9cf893693a254edd0b", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "QT7LrDyti+qDCjhxerYb8PwLfew=", "path": "github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "igbi1podNhH6Q6u4fiSG35bWVbg=", + "checksumSHA1": "Ea3OpuYtxSgAyBgOwgQb2zKoYxY=", "path": "github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "ZKp5VA/YRkH75e8KjQ90X7mKJMs=", + "checksumSHA1": "oAlXK4qZSqvLCrJwyLZLVvUqQhc=", "path": "github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "jLzkSZFf/yBGECyJHTVOHN2oI2k=", "path": "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "UWSnIzZywuEpEevbPfbPNLk1dFk=", "path": "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/recoveryservices", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "i/Nusgj1Ol8GAQKU3yCcVXQiBlg=", "path": "github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "hqDu8DOWFgIe/CHCGPdslDaOZu0=", + "checksumSHA1": "U2P3yBkAXv5gePqS1FbScQWsSNc=", "path": "github.com/Azure/azure-sdk-for-go/services/relay/mgmt/2017-04-01/relay", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "DJY5zDEcGa82/Hbfud8lgHCuvU4=", "path": "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "DQuP9Nzul8I8SN5fBg0NqWn124Q=", "path": "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/locks", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "pn550P6giSwxXck8lRRaNOPwxaQ=", "path": "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-12-01/policy", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "q28aA1gZhbOTuhsePT1I39mnh2Y=", "path": "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "kjEY8W+KrvGpfj5940Rbo2e4qwY=", + "checksumSHA1": "jcNWITcwH9aJCUM2WhLioZT2yvg=", "path": "github.com/Azure/azure-sdk-for-go/services/scheduler/mgmt/2016-03-01/scheduler", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "tEyc+LldSLEcCtr4nekzlLu6Mu0=", + "checksumSHA1": "BL8vCCfSg/3vaHZr2BSL+wNYzJc=", "path": "github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "p9OIjwfjc8GARnzRcEoKbnXL//g=", + "checksumSHA1": "/zjoJNfxpxVj22QUxBdBjQcsbHY=", "path": "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "ySkjHczHi2zN8B1TuWfvKVLGetw=", "path": "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { "checksumSHA1": "HhbwyLbz+/pbGSWb2cp+fAp6YsI=", "path": "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "oG1Gtnb9nwoV/kOaZQQqxogbR2I=", + "checksumSHA1": "5pBl4zi0xNzebxzIn2dLrZm+D10=", "path": "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "m3K3q/zhkmRtlIGWqMWgqzWR6C4=", + "checksumSHA1": "pbHi9xc373inHdf5me73LGIFV1w=", "path": "github.com/Azure/azure-sdk-for-go/storage", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "Qm+SkjiiVK374BDnrC+CO2B08no=", + "checksumSHA1": "i9j2DVhEl/QdhuYhiq59MGkUAvs=", "path": "github.com/Azure/azure-sdk-for-go/version", - "revision": "7971189ecf5a584b9211f2527737f94bb979644e", - "revisionTime": "2018-06-19T23:05:49Z", - "version": "=v17.4.0", - "versionExact": "v17.4.0" + "revision": "fbe7db0e3f9793ba3e5704efbab84f51436c136e", + "revisionTime": "2018-07-03T19:15:42Z", + "version": "=v18.0.0", + "versionExact": "v18.0.0" }, { - "checksumSHA1": "sSq0Y8TfUeQfTb9Xcah5cZWKxlY=", + "checksumSHA1": "4Ba4uKXCFYkXa54FD7NyI8EsXG4=", "path": "github.com/Azure/go-autorest/autorest", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { - "checksumSHA1": "8Le1cIKIwLl6AIB7IxHZsm70HYI=", + "checksumSHA1": "dMSqbz496pHMUGW8ID67vpafGto=", "path": "github.com/Azure/go-autorest/autorest/adal", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { "checksumSHA1": "NT4tlDNlszWmb7gCXnYCkcvQxhs=", "path": "github.com/Azure/go-autorest/autorest/azure", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { "checksumSHA1": "Fkezj7ch01wYNvXzQZdhmeSf/mk=", "path": "github.com/Azure/go-autorest/autorest/azure/cli", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { "checksumSHA1": "9nXCi9qQsYjxCeajJKWttxgEt0I=", "path": "github.com/Azure/go-autorest/autorest/date", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { "checksumSHA1": "SbBb2GcJNm5GjuPKGL2777QywR4=", "path": "github.com/Azure/go-autorest/autorest/to", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { "checksumSHA1": "HjdLfAF3oA2In8F3FKh/Y+BPyXk=", "path": "github.com/Azure/go-autorest/autorest/validation", - "revision": "e6d2a85bbb5cd2a3162e4942594e1e520e442b0b", - "revisionTime": "2018-06-21T21:09:28Z", - "version": "=v10.11.4", - "versionExact": "v10.11.4" + "revision": "1f7cd6cfe0adea687ad44a512dfe76140f804318", + "revisionTime": "2018-06-28T21:22:21Z", + "version": "=v10.12.0", + "versionExact": "v10.12.0" }, { "checksumSHA1": "jQh1fnoKPKMURvKkpdRjN695nAQ=",