From de4555a3b9e87e1e46114d940e1a60768b807ca2 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 17 Dec 2020 05:50:22 +0000 Subject: [PATCH] CodeGen from PR 11847 in Azure/azure-rest-api-specs add kusto track2 config (#11847) --- .../kusto/mgmt/2019-01-21/kusto/CHANGELOG.md | 7 ++ .../kusto/mgmt/2019-01-21/kusto/clusters.go | 6 ++ .../kusto/mgmt/2019-01-21/kusto/databases.go | 6 ++ .../mgmt/2019-01-21/kusto/dataconnections.go | 4 + .../kusto/mgmt/2019-01-21/kusto/models.go | 80 +++++++++++-------- .../kusto/mgmt/2019-01-21/kusto/operations.go | 2 + 6 files changed, 70 insertions(+), 35 deletions(-) create mode 100644 services/kusto/mgmt/2019-01-21/kusto/CHANGELOG.md diff --git a/services/kusto/mgmt/2019-01-21/kusto/CHANGELOG.md b/services/kusto/mgmt/2019-01-21/kusto/CHANGELOG.md new file mode 100644 index 000000000000..3430499dd2dd --- /dev/null +++ b/services/kusto/mgmt/2019-01-21/kusto/CHANGELOG.md @@ -0,0 +1,7 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` diff --git a/services/kusto/mgmt/2019-01-21/kusto/clusters.go b/services/kusto/mgmt/2019-01-21/kusto/clusters.go index cdbc06f37756..fd94053c8561 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/clusters.go +++ b/services/kusto/mgmt/2019-01-21/kusto/clusters.go @@ -82,6 +82,7 @@ func (client ClustersClient) CheckNameAvailability(ctx context.Context, location result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "CheckNameAvailability", resp, "Failure responding to request") + return } return @@ -316,6 +317,7 @@ func (client ClustersClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Get", resp, "Failure responding to request") + return } return @@ -388,6 +390,7 @@ func (client ClustersClient) List(ctx context.Context) (result ClusterListResult result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "List", resp, "Failure responding to request") + return } return @@ -460,6 +463,7 @@ func (client ClustersClient) ListByResourceGroup(ctx context.Context, resourceGr result, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + return } return @@ -531,6 +535,7 @@ func (client ClustersClient) ListSkus(ctx context.Context) (result ListSkusResul result, err = client.ListSkusResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkus", resp, "Failure responding to request") + return } return @@ -604,6 +609,7 @@ func (client ClustersClient) ListSkusByResource(ctx context.Context, resourceGro result, err = client.ListSkusByResourceResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkusByResource", resp, "Failure responding to request") + return } return diff --git a/services/kusto/mgmt/2019-01-21/kusto/databases.go b/services/kusto/mgmt/2019-01-21/kusto/databases.go index 22268527d570..da5f0fc6f8d0 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/databases.go +++ b/services/kusto/mgmt/2019-01-21/kusto/databases.go @@ -77,6 +77,7 @@ func (client DatabasesClient) AddPrincipals(ctx context.Context, resourceGroupNa result, err = client.AddPrincipalsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "AddPrincipals", resp, "Failure responding to request") + return } return @@ -163,6 +164,7 @@ func (client DatabasesClient) CheckNameAvailability(ctx context.Context, resourc result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "CheckNameAvailability", resp, "Failure responding to request") + return } return @@ -397,6 +399,7 @@ func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Get", resp, "Failure responding to request") + return } return @@ -473,6 +476,7 @@ func (client DatabasesClient) ListByCluster(ctx context.Context, resourceGroupNa result, err = client.ListByClusterResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListByCluster", resp, "Failure responding to request") + return } return @@ -549,6 +553,7 @@ func (client DatabasesClient) ListPrincipals(ctx context.Context, resourceGroupN result, err = client.ListPrincipalsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListPrincipals", resp, "Failure responding to request") + return } return @@ -627,6 +632,7 @@ func (client DatabasesClient) RemovePrincipals(ctx context.Context, resourceGrou result, err = client.RemovePrincipalsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "RemovePrincipals", resp, "Failure responding to request") + return } return diff --git a/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go b/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go index b740f0211e0c..4d665d41da01 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go +++ b/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go @@ -84,6 +84,7 @@ func (client DataConnectionsClient) CheckNameAvailability(ctx context.Context, r result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "CheckNameAvailability", resp, "Failure responding to request") + return } return @@ -246,6 +247,7 @@ func (client DataConnectionsClient) DataConnectionValidationMethod(ctx context.C result, err = client.DataConnectionValidationMethodResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "DataConnectionValidationMethod", resp, "Failure responding to request") + return } return @@ -404,6 +406,7 @@ func (client DataConnectionsClient) Get(ctx context.Context, resourceGroupName s result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Get", resp, "Failure responding to request") + return } return @@ -482,6 +485,7 @@ func (client DataConnectionsClient) ListByDatabase(ctx context.Context, resource result, err = client.ListByDatabaseResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "ListByDatabase", resp, "Failure responding to request") + return } return diff --git a/services/kusto/mgmt/2019-01-21/kusto/models.go b/services/kusto/mgmt/2019-01-21/kusto/models.go index 156c1c97d2c1..f5a5226ef9a2 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/models.go +++ b/services/kusto/mgmt/2019-01-21/kusto/models.go @@ -42,15 +42,15 @@ type AzureCapacity struct { Default *int32 `json:"default,omitempty"` } -// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. +// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. type AzureEntityResource struct { // Etag - READ-ONLY; Resource Etag. Etag *string `json:"etag,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -116,11 +116,11 @@ type Cluster struct { Tags map[string]*string `json:"tags"` // Location - The geo-location where the resource lives Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -287,7 +287,8 @@ func (future *ClustersCreateOrUpdateFuture) Result(client ClustersClient) (c Clu return } -// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersDeleteFuture struct { azure.Future } @@ -309,7 +310,8 @@ func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.R return } -// ClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersStartFuture struct { azure.Future } @@ -353,7 +355,8 @@ func (future *ClustersStopFuture) Result(client ClustersClient) (ar autorest.Res return } -// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersUpdateFuture struct { azure.Future } @@ -391,11 +394,11 @@ type ClusterUpdate struct { Sku *AzureSku `json:"sku,omitempty"` // ClusterProperties - The cluster properties. *ClusterProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -502,11 +505,11 @@ type Database struct { Location *string `json:"location,omitempty"` // DatabaseProperties - The database properties. *DatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -682,7 +685,8 @@ func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d D return } -// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type DatabasesDeleteFuture struct { azure.Future } @@ -710,7 +714,8 @@ type DatabaseStatistics struct { Size *float64 `json:"size,omitempty"` } -// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type DatabasesUpdateFuture struct { azure.Future } @@ -744,11 +749,11 @@ type DatabaseUpdate struct { Location *string `json:"location,omitempty"` // DatabaseProperties - The properties of the updated database. *DatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -838,11 +843,11 @@ type DataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindEventGrid' Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -920,7 +925,8 @@ func (dc DataConnection) AsBasicDataConnection() (BasicDataConnection, bool) { return &dc, true } -// DataConnectionCheckNameRequest the result returned from a data connections check name availability request. +// DataConnectionCheckNameRequest the result returned from a data connections check name availability +// request. type DataConnectionCheckNameRequest struct { // Name - Data Connection name. Name *string `json:"name,omitempty"` @@ -1133,11 +1139,11 @@ type EventGridDataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindEventGrid' Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1268,11 +1274,11 @@ type EventHubDataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindEventGrid' Kind Kind `json:"kind,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } @@ -1563,42 +1569,46 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } -// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than -// required location and tags +// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not +// have tags and a location type ProxyResource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } -// Resource ... +// Resource common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } -// TrackedResource the resource model definition for a ARM tracked top level resource +// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource +// which has 'tags' and a 'location' type TrackedResource struct { // Tags - Resource tags. Tags map[string]*string `json:"tags"` // Location - The geo-location where the resource lives Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty"` } diff --git a/services/kusto/mgmt/2019-01-21/kusto/operations.go b/services/kusto/mgmt/2019-01-21/kusto/operations.go index 661a25d6e631..d3eb5193380f 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/operations.go +++ b/services/kusto/mgmt/2019-01-21/kusto/operations.go @@ -72,9 +72,11 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result.olr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.OperationsClient", "List", resp, "Failure responding to request") + return } if result.olr.hasNextLink() && result.olr.IsEmpty() { err = result.NextWithContext(ctx) + return } return