diff --git a/services/kusto/mgmt/2020-09-18/kusto/CHANGELOG.md b/services/kusto/mgmt/2020-09-18/kusto/CHANGELOG.md new file mode 100644 index 000000000000..e9d929dc75bf --- /dev/null +++ b/services/kusto/mgmt/2020-09-18/kusto/CHANGELOG.md @@ -0,0 +1,10 @@ +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))` +- Function `EventHubConnectionProperties.MarshalJSON` has been removed +- Function `EventGridConnectionProperties.MarshalJSON` has been removed +- Function `IotHubConnectionProperties.MarshalJSON` has been removed diff --git a/services/kusto/mgmt/2020-09-18/kusto/attacheddatabaseconfigurations.go b/services/kusto/mgmt/2020-09-18/kusto/attacheddatabaseconfigurations.go index 11320dce086b..e8ef27d88384 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/attacheddatabaseconfigurations.go +++ b/services/kusto/mgmt/2020-09-18/kusto/attacheddatabaseconfigurations.go @@ -242,6 +242,7 @@ func (client AttachedDatabaseConfigurationsClient) Get(ctx context.Context, reso result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "Get", resp, "Failure responding to request") + return } return @@ -318,6 +319,7 @@ func (client AttachedDatabaseConfigurationsClient) ListByCluster(ctx context.Con result, err = client.ListByClusterResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "ListByCluster", resp, "Failure responding to request") + return } return diff --git a/services/kusto/mgmt/2020-09-18/kusto/clusterprincipalassignments.go b/services/kusto/mgmt/2020-09-18/kusto/clusterprincipalassignments.go index 55dbece96a75..de8fdcb1e51a 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/clusterprincipalassignments.go +++ b/services/kusto/mgmt/2020-09-18/kusto/clusterprincipalassignments.go @@ -84,6 +84,7 @@ func (client ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx contex result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "CheckNameAvailability", resp, "Failure responding to request") + return } return @@ -325,6 +326,7 @@ func (client ClusterPrincipalAssignmentsClient) Get(ctx context.Context, resourc result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "Get", resp, "Failure responding to request") + return } return @@ -401,6 +403,7 @@ func (client ClusterPrincipalAssignmentsClient) List(ctx context.Context, resour result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "List", resp, "Failure responding to request") + return } return diff --git a/services/kusto/mgmt/2020-09-18/kusto/clusters.go b/services/kusto/mgmt/2020-09-18/kusto/clusters.go index 5fb56a0572b3..130194ceb437 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/clusters.go +++ b/services/kusto/mgmt/2020-09-18/kusto/clusters.go @@ -159,6 +159,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 @@ -571,6 +572,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 @@ -643,6 +645,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 @@ -715,6 +718,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 @@ -790,6 +794,7 @@ func (client ClustersClient) ListFollowerDatabases(ctx context.Context, resource result, err = client.ListFollowerDatabasesResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListFollowerDatabases", resp, "Failure responding to request") + return } return @@ -865,6 +870,7 @@ func (client ClustersClient) ListLanguageExtensions(ctx context.Context, resourc result, err = client.ListLanguageExtensionsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListLanguageExtensions", resp, "Failure responding to request") + return } return @@ -937,6 +943,7 @@ func (client ClustersClient) ListSkus(ctx context.Context) (result SkuDescriptio result, err = client.ListSkusResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkus", resp, "Failure responding to request") + return } return @@ -1010,6 +1017,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/2020-09-18/kusto/databaseprincipalassignments.go b/services/kusto/mgmt/2020-09-18/kusto/databaseprincipalassignments.go index 0e54cb1fe4a9..20a6db062613 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/databaseprincipalassignments.go +++ b/services/kusto/mgmt/2020-09-18/kusto/databaseprincipalassignments.go @@ -85,6 +85,7 @@ func (client DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx conte result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "CheckNameAvailability", resp, "Failure responding to request") + return } return @@ -332,6 +333,7 @@ func (client DatabasePrincipalAssignmentsClient) Get(ctx context.Context, resour result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "Get", resp, "Failure responding to request") + return } return @@ -410,6 +412,7 @@ func (client DatabasePrincipalAssignmentsClient) List(ctx context.Context, resou result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "List", resp, "Failure responding to request") + return } return diff --git a/services/kusto/mgmt/2020-09-18/kusto/databases.go b/services/kusto/mgmt/2020-09-18/kusto/databases.go index 58b1676c2de3..719500f9e745 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/databases.go +++ b/services/kusto/mgmt/2020-09-18/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 @@ -162,6 +163,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 @@ -396,6 +398,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 @@ -472,6 +475,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 @@ -548,6 +552,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 @@ -626,6 +631,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/2020-09-18/kusto/dataconnections.go b/services/kusto/mgmt/2020-09-18/kusto/dataconnections.go index 5e054b2f3057..5038a59db82d 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/dataconnections.go +++ b/services/kusto/mgmt/2020-09-18/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 @@ -404,6 +405,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 +484,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/2020-09-18/kusto/models.go b/services/kusto/mgmt/2020-09-18/kusto/models.go index 5c0fda849e3d..649ac54b31e9 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/models.go +++ b/services/kusto/mgmt/2020-09-18/kusto/models.go @@ -37,11 +37,11 @@ type AttachedDatabaseConfiguration struct { Location *string `json:"location,omitempty"` // AttachedDatabaseConfigurationProperties - The properties of the attached database configuration. *AttachedDatabaseConfigurationProperties `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"` } @@ -124,10 +124,10 @@ type AttachedDatabaseConfigurationListResult struct { Value *[]AttachedDatabaseConfiguration `json:"value,omitempty"` } -// AttachedDatabaseConfigurationProperties class representing the an attached database configuration properties -// of kind specific. +// AttachedDatabaseConfigurationProperties class representing the an attached database configuration +// properties of kind specific. type AttachedDatabaseConfigurationProperties struct { - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // DatabaseName - The name of the database which you would like to attach, use * if you want to follow all current and future databases. DatabaseName *string `json:"databaseName,omitempty"` @@ -142,6 +142,9 @@ type AttachedDatabaseConfigurationProperties struct { // MarshalJSON is the custom marshaler for AttachedDatabaseConfigurationProperties. func (adcp AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if adcp.ProvisioningState != "" { + objectMap["provisioningState"] = adcp.ProvisioningState + } if adcp.DatabaseName != nil { objectMap["databaseName"] = adcp.DatabaseName } @@ -154,8 +157,8 @@ func (adcp AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error return json.Marshal(objectMap) } -// AttachedDatabaseConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// AttachedDatabaseConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type AttachedDatabaseConfigurationsCreateOrUpdateFuture struct { azure.Future } @@ -218,15 +221,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"` } @@ -304,11 +307,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"` } @@ -452,11 +455,11 @@ type ClusterPrincipalAssignment struct { autorest.Response `json:"-"` // ClusterPrincipalProperties - The cluster principal. *ClusterPrincipalProperties `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"` } @@ -535,8 +538,8 @@ type ClusterPrincipalAssignmentListResult struct { Value *[]ClusterPrincipalAssignment `json:"value,omitempty"` } -// ClusterPrincipalAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// ClusterPrincipalAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type ClusterPrincipalAssignmentsCreateOrUpdateFuture struct { azure.Future } @@ -601,7 +604,7 @@ type ClusterPrincipalProperties struct { TenantName *string `json:"tenantName,omitempty"` // PrincipalName - READ-ONLY; The principal name PrincipalName *string `json:"principalName,omitempty"` - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -620,6 +623,9 @@ func (cpp ClusterPrincipalProperties) MarshalJSON() ([]byte, error) { if cpp.PrincipalType != "" { objectMap["principalType"] = cpp.PrincipalType } + if cpp.ProvisioningState != "" { + objectMap["provisioningState"] = cpp.ProvisioningState + } return json.Marshal(objectMap) } @@ -627,7 +633,7 @@ func (cpp ClusterPrincipalProperties) MarshalJSON() ([]byte, error) { type ClusterProperties struct { // State - READ-ONLY; The state of the resource. Possible values include: 'StateCreating', 'StateUnavailable', 'StateRunning', 'StateDeleting', 'StateDeleted', 'StateStopping', 'StateStopped', 'StateStarting', 'StateUpdating' State State `json:"state,omitempty"` - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // URI - READ-ONLY; The cluster URI. URI *string `json:"uri,omitempty"` @@ -660,6 +666,9 @@ type ClusterProperties struct { // MarshalJSON is the custom marshaler for ClusterProperties. func (cp ClusterProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cp.ProvisioningState != "" { + objectMap["provisioningState"] = cp.ProvisioningState + } if cp.TrustedExternalTenants != nil { objectMap["trustedExternalTenants"] = cp.TrustedExternalTenants } @@ -742,7 +751,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 } @@ -839,7 +849,8 @@ func (future *ClustersRemoveLanguageExtensionsFuture) Result(client ClustersClie 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 } @@ -883,7 +894,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 } @@ -923,11 +935,11 @@ type ClusterUpdate struct { Identity *Identity `json:"identity,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"` } @@ -1053,11 +1065,11 @@ type Database struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDatabase', 'KindReadWrite', 'KindReadOnlyFollowing' 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"` } @@ -1229,11 +1241,11 @@ type DatabasePrincipalAssignment struct { autorest.Response `json:"-"` // DatabasePrincipalProperties - The database principal. *DatabasePrincipalProperties `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"` } @@ -1312,8 +1324,8 @@ type DatabasePrincipalAssignmentListResult struct { Value *[]DatabasePrincipalAssignment `json:"value,omitempty"` } -// DatabasePrincipalAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DatabasePrincipalAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type DatabasePrincipalAssignmentsCreateOrUpdateFuture struct { azure.Future } @@ -1391,7 +1403,7 @@ type DatabasePrincipalProperties struct { TenantName *string `json:"tenantName,omitempty"` // PrincipalName - READ-ONLY; The principal name PrincipalName *string `json:"principalName,omitempty"` - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -1410,6 +1422,9 @@ func (dpp DatabasePrincipalProperties) MarshalJSON() ([]byte, error) { if dpp.PrincipalType != "" { objectMap["principalType"] = dpp.PrincipalType } + if dpp.ProvisioningState != "" { + objectMap["provisioningState"] = dpp.ProvisioningState + } return json.Marshal(objectMap) } @@ -1442,7 +1457,8 @@ func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (dm 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 } @@ -1470,7 +1486,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 } @@ -1513,11 +1530,11 @@ type DataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' Kind KindBasicDataConnection `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"` } @@ -1688,8 +1705,8 @@ func (future *DataConnectionsCreateOrUpdateFuture) Result(client DataConnections return } -// DataConnectionsDataConnectionValidationMethodFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DataConnectionsDataConnectionValidationMethodFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type DataConnectionsDataConnectionValidationMethodFuture struct { azure.Future } @@ -1847,40 +1864,10 @@ type EventGridConnectionProperties struct { IgnoreFirstRecord *bool `json:"ignoreFirstRecord,omitempty"` // BlobStorageEventType - The name of blob storage event type to process. Possible values include: 'MicrosoftStorageBlobCreated', 'MicrosoftStorageBlobRenamed' BlobStorageEventType BlobStorageEventType `json:"blobStorageEventType,omitempty"` - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// MarshalJSON is the custom marshaler for EventGridConnectionProperties. -func (egcp EventGridConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if egcp.StorageAccountResourceID != nil { - objectMap["storageAccountResourceId"] = egcp.StorageAccountResourceID - } - if egcp.EventHubResourceID != nil { - objectMap["eventHubResourceId"] = egcp.EventHubResourceID - } - if egcp.ConsumerGroup != nil { - objectMap["consumerGroup"] = egcp.ConsumerGroup - } - if egcp.TableName != nil { - objectMap["tableName"] = egcp.TableName - } - if egcp.MappingRuleName != nil { - objectMap["mappingRuleName"] = egcp.MappingRuleName - } - if egcp.DataFormat != "" { - objectMap["dataFormat"] = egcp.DataFormat - } - if egcp.IgnoreFirstRecord != nil { - objectMap["ignoreFirstRecord"] = egcp.IgnoreFirstRecord - } - if egcp.BlobStorageEventType != "" { - objectMap["blobStorageEventType"] = egcp.BlobStorageEventType - } - return json.Marshal(objectMap) -} - // EventGridDataConnection class representing an Event Grid data connection. type EventGridDataConnection struct { // EventGridConnectionProperties - The properties of the Event Grid data connection. @@ -1889,11 +1876,11 @@ type EventGridDataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' Kind KindBasicDataConnection `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"` } @@ -2023,37 +2010,10 @@ type EventHubConnectionProperties struct { EventSystemProperties *[]string `json:"eventSystemProperties,omitempty"` // Compression - The event hub messages compression type. Possible values include: 'CompressionNone', 'CompressionGZip' Compression Compression `json:"compression,omitempty"` - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// MarshalJSON is the custom marshaler for EventHubConnectionProperties. -func (ehcp EventHubConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ehcp.EventHubResourceID != nil { - objectMap["eventHubResourceId"] = ehcp.EventHubResourceID - } - if ehcp.ConsumerGroup != nil { - objectMap["consumerGroup"] = ehcp.ConsumerGroup - } - if ehcp.TableName != nil { - objectMap["tableName"] = ehcp.TableName - } - if ehcp.MappingRuleName != nil { - objectMap["mappingRuleName"] = ehcp.MappingRuleName - } - if ehcp.DataFormat != "" { - objectMap["dataFormat"] = ehcp.DataFormat - } - if ehcp.EventSystemProperties != nil { - objectMap["eventSystemProperties"] = ehcp.EventSystemProperties - } - if ehcp.Compression != "" { - objectMap["compression"] = ehcp.Compression - } - return json.Marshal(objectMap) -} - // EventHubDataConnection class representing an event hub data connection. type EventHubDataConnection struct { // EventHubConnectionProperties - The Event Hub data connection properties to validate. @@ -2062,11 +2022,11 @@ type EventHubDataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' Kind KindBasicDataConnection `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"` } @@ -2257,37 +2217,10 @@ type IotHubConnectionProperties struct { EventSystemProperties *[]string `json:"eventSystemProperties,omitempty"` // SharedAccessPolicyName - The name of the share access policy SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// MarshalJSON is the custom marshaler for IotHubConnectionProperties. -func (ihcp IotHubConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ihcp.IotHubResourceID != nil { - objectMap["iotHubResourceId"] = ihcp.IotHubResourceID - } - if ihcp.ConsumerGroup != nil { - objectMap["consumerGroup"] = ihcp.ConsumerGroup - } - if ihcp.TableName != nil { - objectMap["tableName"] = ihcp.TableName - } - if ihcp.MappingRuleName != nil { - objectMap["mappingRuleName"] = ihcp.MappingRuleName - } - if ihcp.DataFormat != "" { - objectMap["dataFormat"] = ihcp.DataFormat - } - if ihcp.EventSystemProperties != nil { - objectMap["eventSystemProperties"] = ihcp.EventSystemProperties - } - if ihcp.SharedAccessPolicyName != nil { - objectMap["sharedAccessPolicyName"] = ihcp.SharedAccessPolicyName - } - return json.Marshal(objectMap) -} - // IotHubDataConnection class representing an iot hub data connection. type IotHubDataConnection struct { // IotHubConnectionProperties - The Iot Hub data connection properties. @@ -2296,11 +2229,11 @@ type IotHubDataConnection struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' Kind KindBasicDataConnection `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"` } @@ -2614,8 +2547,11 @@ 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, + } } // OptimizedAutoscale a class that contains the optimized auto scale definition. @@ -2630,14 +2566,14 @@ type OptimizedAutoscale struct { Maximum *int32 `json:"maximum,omitempty"` } -// 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"` } @@ -2649,11 +2585,11 @@ type ReadOnlyFollowingDatabase struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDatabase', 'KindReadWrite', 'KindReadOnlyFollowing' 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"` } @@ -2764,7 +2700,7 @@ func (rofd *ReadOnlyFollowingDatabase) UnmarshalJSON(body []byte) error { // ReadOnlyFollowingDatabaseProperties class representing the Kusto database properties. type ReadOnlyFollowingDatabaseProperties struct { - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // SoftDeletePeriod - READ-ONLY; The time the data should be kept before it stops being accessible to queries in TimeSpan. SoftDeletePeriod *string `json:"softDeletePeriod,omitempty"` @@ -2783,6 +2719,9 @@ type ReadOnlyFollowingDatabaseProperties struct { // MarshalJSON is the custom marshaler for ReadOnlyFollowingDatabaseProperties. func (rofdp ReadOnlyFollowingDatabaseProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if rofdp.ProvisioningState != "" { + objectMap["provisioningState"] = rofdp.ProvisioningState + } if rofdp.HotCachePeriod != nil { objectMap["hotCachePeriod"] = rofdp.HotCachePeriod } @@ -2800,11 +2739,11 @@ type ReadWriteDatabase struct { Location *string `json:"location,omitempty"` // Kind - Possible values include: 'KindDatabase', 'KindReadWrite', 'KindReadOnlyFollowing' 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"` } @@ -2915,7 +2854,7 @@ func (rwd *ReadWriteDatabase) UnmarshalJSON(body []byte) error { // ReadWriteDatabaseProperties class representing the Kusto database properties. type ReadWriteDatabaseProperties struct { - // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + // ProvisioningState - The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // SoftDeletePeriod - The time the data should be kept before it stops being accessible to queries in TimeSpan. SoftDeletePeriod *string `json:"softDeletePeriod,omitempty"` @@ -2930,6 +2869,9 @@ type ReadWriteDatabaseProperties struct { // MarshalJSON is the custom marshaler for ReadWriteDatabaseProperties. func (rwdp ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if rwdp.ProvisioningState != "" { + objectMap["provisioningState"] = rwdp.ProvisioningState + } if rwdp.SoftDeletePeriod != nil { objectMap["softDeletePeriod"] = rwdp.SoftDeletePeriod } @@ -2942,13 +2884,13 @@ func (rwdp ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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"` } @@ -2983,17 +2925,18 @@ type SkuLocationInfoItem struct { Zones *[]string `json:"zones,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/2020-09-18/kusto/operations.go b/services/kusto/mgmt/2020-09-18/kusto/operations.go index 383e2a09e7fd..bafba7cf7714 100644 --- a/services/kusto/mgmt/2020-09-18/kusto/operations.go +++ b/services/kusto/mgmt/2020-09-18/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