diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/CHANGELOG.md b/services/datalake/analytics/mgmt/2016-11-01/account/CHANGELOG.md index e72d9ec3a1ff..cedc8e773e7c 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/CHANGELOG.md +++ b/services/datalake/analytics/mgmt/2016-11-01/account/CHANGELOG.md @@ -1,27 +1,60 @@ -# Change History +# Unreleased ## Additive Changes +### New Constants + +1. DebugDataAccessLevel.All +1. DebugDataAccessLevel.Customer +1. DebugDataAccessLevel.None +1. NestedResourceProvisioningState.NestedResourceProvisioningStateCanceled +1. NestedResourceProvisioningState.NestedResourceProvisioningStateFailed +1. NestedResourceProvisioningState.NestedResourceProvisioningStateSucceeded +1. VirtualNetworkRuleState.VirtualNetworkRuleStateActive +1. VirtualNetworkRuleState.VirtualNetworkRuleStateFailed +1. VirtualNetworkRuleState.VirtualNetworkRuleStateNetworkSourceDeleted + ### New Funcs -1. CapabilityInformation.MarshalJSON() ([]byte, error) -1. ComputePolicyListResult.MarshalJSON() ([]byte, error) -1. ComputePolicyProperties.MarshalJSON() ([]byte, error) -1. DataLakeAnalyticsAccountListResult.MarshalJSON() ([]byte, error) -1. DataLakeAnalyticsAccountProperties.MarshalJSON() ([]byte, error) -1. DataLakeAnalyticsAccountPropertiesBasic.MarshalJSON() ([]byte, error) -1. DataLakeStoreAccountInformationListResult.MarshalJSON() ([]byte, error) -1. DataLakeStoreAccountInformationProperties.MarshalJSON() ([]byte, error) -1. FirewallRuleListResult.MarshalJSON() ([]byte, error) -1. FirewallRuleProperties.MarshalJSON() ([]byte, error) -1. NameAvailabilityInformation.MarshalJSON() ([]byte, error) -1. Operation.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. OperationListResult.MarshalJSON() ([]byte, error) -1. SasTokenInformation.MarshalJSON() ([]byte, error) -1. SasTokenInformationListResult.MarshalJSON() ([]byte, error) -1. StorageAccountInformationListResult.MarshalJSON() ([]byte, error) -1. StorageAccountInformationProperties.MarshalJSON() ([]byte, error) -1. StorageContainerListResult.MarshalJSON() ([]byte, error) -1. StorageContainerProperties.MarshalJSON() ([]byte, error) -1. SubResource.MarshalJSON() ([]byte, error) +1. *HiveMetastore.UnmarshalJSON([]byte) error +1. *VirtualNetworkRule.UnmarshalJSON([]byte) error +1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) +1. ErrorDetail.MarshalJSON() ([]byte, error) +1. HiveMetastore.MarshalJSON() ([]byte, error) +1. HiveMetastoreListResult.MarshalJSON() ([]byte, error) +1. HiveMetastoreProperties.MarshalJSON() ([]byte, error) +1. PossibleDebugDataAccessLevelValues() []DebugDataAccessLevel +1. PossibleNestedResourceProvisioningStateValues() []NestedResourceProvisioningState +1. PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState +1. VirtualNetworkRule.MarshalJSON() ([]byte, error) +1. VirtualNetworkRuleListResult.MarshalJSON() ([]byte, error) +1. VirtualNetworkRuleProperties.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### New Structs + +1. ErrorAdditionalInfo +1. ErrorDetail +1. ErrorResponse +1. HiveMetastore +1. HiveMetastoreListResult +1. HiveMetastoreProperties +1. OperationMetaLogSpecification +1. OperationMetaMetricAvailabilitiesSpecification +1. OperationMetaMetricSpecification +1. OperationMetaPropertyInfo +1. OperationMetaServiceSpecification +1. VirtualNetworkRule +1. VirtualNetworkRuleListResult +1. VirtualNetworkRuleProperties + +#### New Struct Fields + +1. DataLakeAnalyticsAccountProperties.DebugDataAccessLevel +1. DataLakeAnalyticsAccountProperties.HierarchicalQueueState +1. DataLakeAnalyticsAccountProperties.HiveMetastores +1. DataLakeAnalyticsAccountProperties.MaxQueuedJobCountPerUser +1. DataLakeAnalyticsAccountProperties.PublicDataLakeStoreAccounts +1. DataLakeAnalyticsAccountProperties.VirtualNetworkRules +1. Operation.Properties diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/_meta.json b/services/datalake/analytics/mgmt/2016-11-01/account/_meta.json index 212fe40a2b95..001c543bff13 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/_meta.json +++ b/services/datalake/analytics/mgmt/2016-11-01/account/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1e9da9204648be4b90aed1f4589abfd515ceff20", "readme": "/_/azure-rest-api-specs/specification/datalake-analytics/resource-manager/readme.md", "tag": "package-2016-11", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/enums.go b/services/datalake/analytics/mgmt/2016-11-01/account/enums.go index a3b84b0253a4..234b354a7a84 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/enums.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/enums.go @@ -71,6 +71,23 @@ func PossibleDataLakeAnalyticsAccountStatusValues() []DataLakeAnalyticsAccountSt return []DataLakeAnalyticsAccountStatus{Canceled, Creating, Deleted, Deleting, Failed, Patching, Resuming, Running, Succeeded, Suspending, Undeleting} } +// DebugDataAccessLevel enumerates the values for debug data access level. +type DebugDataAccessLevel string + +const ( + // All ... + All DebugDataAccessLevel = "All" + // Customer ... + Customer DebugDataAccessLevel = "Customer" + // None ... + None DebugDataAccessLevel = "None" +) + +// PossibleDebugDataAccessLevelValues returns an array of possible values for the DebugDataAccessLevel const type. +func PossibleDebugDataAccessLevelValues() []DebugDataAccessLevel { + return []DebugDataAccessLevel{All, Customer, None} +} + // FirewallAllowAzureIpsState enumerates the values for firewall allow azure ips state. type FirewallAllowAzureIpsState string @@ -101,6 +118,23 @@ func PossibleFirewallStateValues() []FirewallState { return []FirewallState{FirewallStateDisabled, FirewallStateEnabled} } +// NestedResourceProvisioningState enumerates the values for nested resource provisioning state. +type NestedResourceProvisioningState string + +const ( + // NestedResourceProvisioningStateCanceled ... + NestedResourceProvisioningStateCanceled NestedResourceProvisioningState = "Canceled" + // NestedResourceProvisioningStateFailed ... + NestedResourceProvisioningStateFailed NestedResourceProvisioningState = "Failed" + // NestedResourceProvisioningStateSucceeded ... + NestedResourceProvisioningStateSucceeded NestedResourceProvisioningState = "Succeeded" +) + +// PossibleNestedResourceProvisioningStateValues returns an array of possible values for the NestedResourceProvisioningState const type. +func PossibleNestedResourceProvisioningStateValues() []NestedResourceProvisioningState { + return []NestedResourceProvisioningState{NestedResourceProvisioningStateCanceled, NestedResourceProvisioningStateFailed, NestedResourceProvisioningStateSucceeded} +} + // OperationOrigin enumerates the values for operation origin. type OperationOrigin string @@ -167,3 +201,20 @@ const ( func PossibleTierTypeValues() []TierType { return []TierType{Commitment100000AUHours, Commitment10000AUHours, Commitment1000AUHours, Commitment100AUHours, Commitment500000AUHours, Commitment50000AUHours, Commitment5000AUHours, Commitment500AUHours, Consumption} } + +// VirtualNetworkRuleState enumerates the values for virtual network rule state. +type VirtualNetworkRuleState string + +const ( + // VirtualNetworkRuleStateActive ... + VirtualNetworkRuleStateActive VirtualNetworkRuleState = "Active" + // VirtualNetworkRuleStateFailed ... + VirtualNetworkRuleStateFailed VirtualNetworkRuleState = "Failed" + // VirtualNetworkRuleStateNetworkSourceDeleted ... + VirtualNetworkRuleStateNetworkSourceDeleted VirtualNetworkRuleState = "NetworkSourceDeleted" +) + +// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type. +func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { + return []VirtualNetworkRuleState{VirtualNetworkRuleStateActive, VirtualNetworkRuleStateFailed, VirtualNetworkRuleStateNetworkSourceDeleted} +} diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/models.go b/services/datalake/analytics/mgmt/2016-11-01/account/models.go index c29533732b91..10a33e3ca751 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/models.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/models.go @@ -940,7 +940,7 @@ type DataLakeAnalyticsAccount struct { autorest.Response `json:"-"` // DataLakeAnalyticsAccountProperties - READ-ONLY; The properties defined by Data Lake Analytics all properties are specific to each resource provider. *DataLakeAnalyticsAccountProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource identifer. + // ID - READ-ONLY; The resource identifier. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The resource name. Name *string `json:"name,omitempty"` @@ -1032,7 +1032,7 @@ func (dlaa *DataLakeAnalyticsAccount) UnmarshalJSON(body []byte) error { type DataLakeAnalyticsAccountBasic struct { // DataLakeAnalyticsAccountPropertiesBasic - READ-ONLY; The properties defined by Data Lake Analytics all properties are specific to each resource provider. *DataLakeAnalyticsAccountPropertiesBasic `json:"properties,omitempty"` - // ID - READ-ONLY; The resource identifer. + // ID - READ-ONLY; The resource identifier. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The resource name. Name *string `json:"name,omitempty"` @@ -1292,34 +1292,46 @@ type DataLakeAnalyticsAccountProperties struct { DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"` // DataLakeStoreAccounts - READ-ONLY; The list of Data Lake Store accounts associated with this account. DataLakeStoreAccounts *[]DataLakeStoreAccountInformation `json:"dataLakeStoreAccounts,omitempty"` + // PublicDataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account. + PublicDataLakeStoreAccounts *[]DataLakeStoreAccountInformation `json:"publicDataLakeStoreAccounts,omitempty"` // StorageAccounts - READ-ONLY; The list of Azure Blob Storage accounts associated with this account. StorageAccounts *[]StorageAccountInformation `json:"storageAccounts,omitempty"` // ComputePolicies - READ-ONLY; The list of compute policies associated with this account. ComputePolicies *[]ComputePolicy `json:"computePolicies,omitempty"` + // HiveMetastores - READ-ONLY; The list of hiveMetastores associated with this account. + HiveMetastores *[]HiveMetastore `json:"hiveMetastores,omitempty"` + // HierarchicalQueueState - READ-ONLY; The hierarchical queue state associated with this account. + HierarchicalQueueState *string `json:"hierarchicalQueueState,omitempty"` + // VirtualNetworkRules - READ-ONLY; The list of virtualNetwork rules associated with this account. + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` // FirewallRules - READ-ONLY; The list of firewall rules associated with this account. FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` - // FirewallState - READ-ONLY; The current state of the IP address firewall for this account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' + // FirewallState - The current state of the IP address firewall for this account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' FirewallState FirewallState `json:"firewallState,omitempty"` - // FirewallAllowAzureIps - READ-ONLY; The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + // FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` - // NewTier - READ-ONLY; The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' + // NewTier - The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' NewTier TierType `json:"newTier,omitempty"` // CurrentTier - READ-ONLY; The commitment tier in use for the current month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' CurrentTier TierType `json:"currentTier,omitempty"` - // MaxJobCount - READ-ONLY; The maximum supported jobs running under the account at the same time. + // MaxJobCount - The maximum supported jobs running under the account at the same time. MaxJobCount *int32 `json:"maxJobCount,omitempty"` + // MaxQueuedJobCountPerUser - READ-ONLY; The maximum supported jobs queued under the account at the same time. + MaxQueuedJobCountPerUser *int32 `json:"maxQueuedJobCountPerUser,omitempty"` // SystemMaxJobCount - READ-ONLY; The system defined maximum supported jobs running under the account at the same time, which restricts the maximum number of running jobs the user can set for the account. SystemMaxJobCount *int32 `json:"systemMaxJobCount,omitempty"` - // MaxDegreeOfParallelism - READ-ONLY; The maximum supported degree of parallelism for this account. + // MaxDegreeOfParallelism - The maximum supported degree of parallelism for this account. MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` // SystemMaxDegreeOfParallelism - READ-ONLY; The system defined maximum supported degree of parallelism for this account, which restricts the maximum value of parallelism the user can set for the account. SystemMaxDegreeOfParallelism *int32 `json:"systemMaxDegreeOfParallelism,omitempty"` - // MaxDegreeOfParallelismPerJob - READ-ONLY; The maximum supported degree of parallelism per job for this account. + // MaxDegreeOfParallelismPerJob - The maximum supported degree of parallelism per job for this account. MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` // MinPriorityPerJob - READ-ONLY; The minimum supported priority per job for this account. MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` - // QueryStoreRetention - READ-ONLY; The number of days that job metadata is retained. + // QueryStoreRetention - The number of days that job metadata is retained. QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` + // DebugDataAccessLevel - READ-ONLY; The current state of the DebugDataAccessLevel for this account. Possible values include: 'All', 'Customer', 'None' + DebugDataAccessLevel DebugDataAccessLevel `json:"debugDataAccessLevel,omitempty"` // AccountID - READ-ONLY; The unique identifier associated with this Data Lake Analytics account. AccountID *uuid.UUID `json:"accountId,omitempty"` // ProvisioningState - READ-ONLY; The provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' @@ -1337,6 +1349,30 @@ type DataLakeAnalyticsAccountProperties struct { // MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountProperties. func (dlaap DataLakeAnalyticsAccountProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if dlaap.PublicDataLakeStoreAccounts != nil { + objectMap["publicDataLakeStoreAccounts"] = dlaap.PublicDataLakeStoreAccounts + } + if dlaap.FirewallState != "" { + objectMap["firewallState"] = dlaap.FirewallState + } + if dlaap.FirewallAllowAzureIps != "" { + objectMap["firewallAllowAzureIps"] = dlaap.FirewallAllowAzureIps + } + if dlaap.NewTier != "" { + objectMap["newTier"] = dlaap.NewTier + } + if dlaap.MaxJobCount != nil { + objectMap["maxJobCount"] = dlaap.MaxJobCount + } + if dlaap.MaxDegreeOfParallelism != nil { + objectMap["maxDegreeOfParallelism"] = dlaap.MaxDegreeOfParallelism + } + if dlaap.MaxDegreeOfParallelismPerJob != nil { + objectMap["maxDegreeOfParallelismPerJob"] = dlaap.MaxDegreeOfParallelismPerJob + } + if dlaap.QueryStoreRetention != nil { + objectMap["queryStoreRetention"] = dlaap.QueryStoreRetention + } return json.Marshal(objectMap) } @@ -1366,7 +1402,7 @@ func (dlaapb DataLakeAnalyticsAccountPropertiesBasic) MarshalJSON() ([]byte, err // DataLakeStoreAccountInformation data Lake Store account information. type DataLakeStoreAccountInformation struct { autorest.Response `json:"-"` - // DataLakeStoreAccountInformationProperties - READ-ONLY; The Data Lake Store account properties. + // DataLakeStoreAccountInformationProperties - The Data Lake Store account properties. *DataLakeStoreAccountInformationProperties `json:"properties,omitempty"` // ID - READ-ONLY; The resource identifier. ID *string `json:"id,omitempty"` @@ -1379,6 +1415,9 @@ type DataLakeStoreAccountInformation struct { // MarshalJSON is the custom marshaler for DataLakeStoreAccountInformation. func (dlsai DataLakeStoreAccountInformation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if dlsai.DataLakeStoreAccountInformationProperties != nil { + objectMap["properties"] = dlsai.DataLakeStoreAccountInformationProperties + } return json.Marshal(objectMap) } @@ -1611,6 +1650,47 @@ func (dlsaip DataLakeStoreAccountInformationProperties) MarshalJSON() ([]byte, e return json.Marshal(objectMap) } +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorDetail the error detail. +type ErrorDetail struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]ErrorDetail `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorDetail. +func (ed ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.). +type ErrorResponse struct { + // Error - The error object. + Error *ErrorDetail `json:"error,omitempty"` +} + // FirewallRule data Lake Analytics firewall rule information. type FirewallRule struct { autorest.Response `json:"-"` @@ -1860,6 +1940,111 @@ func (frp FirewallRuleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// HiveMetastore ... +type HiveMetastore struct { + // HiveMetastoreProperties - READ-ONLY; The HiveMetastoreProperties rule properties. + *HiveMetastoreProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for HiveMetastore. +func (hm HiveMetastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HiveMetastore struct. +func (hm *HiveMetastore) 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 hiveMetastoreProperties HiveMetastoreProperties + err = json.Unmarshal(*v, &hiveMetastoreProperties) + if err != nil { + return err + } + hm.HiveMetastoreProperties = &hiveMetastoreProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hm.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hm.Type = &typeVar + } + } + } + + return nil +} + +// HiveMetastoreListResult data Lake Analytics HiveMetastore list information. +type HiveMetastoreListResult struct { + // Value - READ-ONLY; The results of the list operation. + Value *[]HiveMetastore `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for HiveMetastoreListResult. +func (hmlr HiveMetastoreListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// HiveMetastoreProperties the HiveMetastore properties. +type HiveMetastoreProperties struct { + // ServerURI - READ-ONLY; The serverUri for the Hive MetaStore + ServerURI *string `json:"serverUri,omitempty"` + // DatabaseName - READ-ONLY; The databaseName for the Hive MetaStore + DatabaseName *string `json:"databaseName,omitempty"` + // RuntimeVersion - READ-ONLY; The runtimeVersion for the Hive MetaStore + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // UserName - READ-ONLY; The userName for the Hive MetaStore + UserName *string `json:"userName,omitempty"` + // Password - READ-ONLY; The password for the Hive MetaStore + Password *string `json:"password,omitempty"` + // NestedResourceProvisioningState - READ-ONLY; The current state of the NestedResource. Possible values include: 'NestedResourceProvisioningStateSucceeded', 'NestedResourceProvisioningStateCanceled', 'NestedResourceProvisioningStateFailed' + NestedResourceProvisioningState NestedResourceProvisioningState `json:"nestedResourceProvisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for HiveMetastoreProperties. +func (hmp HiveMetastoreProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // NameAvailabilityInformation data Lake Analytics account name availability result information. type NameAvailabilityInformation struct { autorest.Response `json:"-"` @@ -1883,6 +2068,8 @@ type Operation struct { Name *string `json:"name,omitempty"` // Display - READ-ONLY; The display information for the operation. Display *OperationDisplay `json:"display,omitempty"` + // Properties - READ-ONLY; The OperationMetaPropertyInfo for the operation. + Properties *OperationMetaPropertyInfo `json:"properties,omitempty"` // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'OperationOriginUser', 'OperationOriginSystem', 'OperationOriginUsersystem' Origin OperationOrigin `json:"origin,omitempty"` } @@ -1926,9 +2113,57 @@ func (olr OperationListResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// OperationMetaLogSpecification ... +type OperationMetaLogSpecification struct { + // Name - The name for OperationMetaLogSpecification. + Name *string `json:"name,omitempty"` + // DisplayName - The displayName for OperationMetaLogSpecification. + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - The blobDuration for OperationMetaLogSpecification. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// OperationMetaMetricAvailabilitiesSpecification ... +type OperationMetaMetricAvailabilitiesSpecification struct { + // TimeGrain - The timegrain for OperationMetaMetricAvailabilitiesSpecification. + TimeGrain *string `json:"timeGrain,omitempty"` + // BlobDuration - The blobDuration for OperationMetaMetricAvailabilitiesSpecification. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// OperationMetaMetricSpecification ... +type OperationMetaMetricSpecification struct { + // Name - The name for OperationMetaMetricSpecification. + Name *string `json:"name,omitempty"` + // DisplayDescription - The displayName for OperationMetaMetricSpecification. + DisplayDescription *string `json:"displayDescription,omitempty"` + // DisplayName - The displayName for OperationMetaMetricSpecification. + DisplayName *string `json:"displayName,omitempty"` + // Unit - The unit for OperationMetaMetricSpecification. + Unit *string `json:"unit,omitempty"` + // AggregationType - The aggregationType for OperationMetaMetricSpecification. + AggregationType *string `json:"aggregationType,omitempty"` + // Availabilities - The availabilities for OperationMetaMetricSpecification. + Availabilities *[]OperationMetaMetricAvailabilitiesSpecification `json:"availabilities,omitempty"` +} + +// OperationMetaPropertyInfo ... +type OperationMetaPropertyInfo struct { + // ServiceSpecification - The operations OperationMetaServiceSpecification. + ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// OperationMetaServiceSpecification ... +type OperationMetaServiceSpecification struct { + // MetricSpecifications - The metricSpecifications for OperationMetaServiceSpecification. + MetricSpecifications *[]OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"` + // LogSpecifications - The logSpecifications for OperationMetaServiceSpecification. + LogSpecifications *[]OperationMetaLogSpecification `json:"logSpecifications,omitempty"` +} + // Resource the resource model definition. type Resource struct { - // ID - READ-ONLY; The resource identifer. + // ID - READ-ONLY; The resource identifier. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The resource name. Name *string `json:"name,omitempty"` @@ -3088,3 +3323,100 @@ func (usawap *UpdateStorageAccountWithAccountParameters) UnmarshalJSON(body []by return nil } + +// VirtualNetworkRule data Lake Analytics VirtualNetwork Rule information. +type VirtualNetworkRule struct { + // VirtualNetworkRuleProperties - READ-ONLY; The VirtualNetwork rule properties. + *VirtualNetworkRuleProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkRule. +func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct. +func (vnr *VirtualNetworkRule) 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 virtualNetworkRuleProperties VirtualNetworkRuleProperties + err = json.Unmarshal(*v, &virtualNetworkRuleProperties) + if err != nil { + return err + } + vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vnr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vnr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vnr.Type = &typeVar + } + } + } + + return nil +} + +// VirtualNetworkRuleListResult data Lake Analytics VirtualNetwork rule list information. +type VirtualNetworkRuleListResult struct { + // Value - READ-ONLY; The results of the list operation. + Value *[]VirtualNetworkRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkRuleListResult. +func (vnrlr VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualNetworkRuleProperties the VirtualNetwork Rule properties. +type VirtualNetworkRuleProperties struct { + // SubnetID - READ-ONLY; The resource identifier for the subnet + SubnetID *string `json:"subnetId,omitempty"` + // VirtualNetworkRuleState - READ-ONLY; The current state of the VirtualNetwork Rule. Possible values include: 'VirtualNetworkRuleStateActive', 'VirtualNetworkRuleStateNetworkSourceDeleted', 'VirtualNetworkRuleStateFailed' + VirtualNetworkRuleState VirtualNetworkRuleState `json:"virtualNetworkRuleState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkRuleProperties. +func (vnrp VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/CHANGELOG.md b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/CHANGELOG.md index d9717a6e40af..c7072f639282 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/CHANGELOG.md +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/CHANGELOG.md @@ -1,18 +1,644 @@ -# Change History +# Unreleased -## Additive Changes +## Breaking Changes -### New Funcs +### Removed Constants + +1. OperationStatus.OperationStatusFailed +1. OperationStatus.OperationStatusInProgress +1. OperationStatus.OperationStatusSucceeded + +### Removed Funcs +1. *DataLakeAnalyticsAccountListDataLakeStoreResultIterator.Next() error +1. *DataLakeAnalyticsAccountListDataLakeStoreResultIterator.NextWithContext(context.Context) error +1. *DataLakeAnalyticsAccountListDataLakeStoreResultPage.Next() error +1. *DataLakeAnalyticsAccountListDataLakeStoreResultPage.NextWithContext(context.Context) error +1. *DataLakeAnalyticsAccountListStorageAccountsResultIterator.Next() error +1. *DataLakeAnalyticsAccountListStorageAccountsResultIterator.NextWithContext(context.Context) error +1. *DataLakeAnalyticsAccountListStorageAccountsResultPage.Next() error +1. *DataLakeAnalyticsAccountListStorageAccountsResultPage.NextWithContext(context.Context) error +1. *ListBlobContainersResultIterator.Next() error +1. *ListBlobContainersResultIterator.NextWithContext(context.Context) error +1. *ListBlobContainersResultPage.Next() error +1. *ListBlobContainersResultPage.NextWithContext(context.Context) error +1. *ListSasTokensResultIterator.Next() error +1. *ListSasTokensResultIterator.NextWithContext(context.Context) error +1. *ListSasTokensResultPage.Next() error +1. *ListSasTokensResultPage.NextWithContext(context.Context) error 1. AzureAsyncOperationResult.MarshalJSON() ([]byte, error) 1. BlobContainer.MarshalJSON() ([]byte, error) 1. BlobContainerProperties.MarshalJSON() ([]byte, error) +1. DataLakeAnalyticsAccountListDataLakeStoreResult.IsEmpty() bool 1. DataLakeAnalyticsAccountListDataLakeStoreResult.MarshalJSON() ([]byte, error) -1. DataLakeAnalyticsAccountListResult.MarshalJSON() ([]byte, error) +1. DataLakeAnalyticsAccountListDataLakeStoreResultIterator.NotDone() bool +1. DataLakeAnalyticsAccountListDataLakeStoreResultIterator.Response() DataLakeAnalyticsAccountListDataLakeStoreResult +1. DataLakeAnalyticsAccountListDataLakeStoreResultIterator.Value() DataLakeStoreAccountInfo +1. DataLakeAnalyticsAccountListDataLakeStoreResultPage.NotDone() bool +1. DataLakeAnalyticsAccountListDataLakeStoreResultPage.Response() DataLakeAnalyticsAccountListDataLakeStoreResult +1. DataLakeAnalyticsAccountListDataLakeStoreResultPage.Values() []DataLakeStoreAccountInfo +1. DataLakeAnalyticsAccountListStorageAccountsResult.IsEmpty() bool 1. DataLakeAnalyticsAccountListStorageAccountsResult.MarshalJSON() ([]byte, error) +1. DataLakeAnalyticsAccountListStorageAccountsResultIterator.NotDone() bool +1. DataLakeAnalyticsAccountListStorageAccountsResultIterator.Response() DataLakeAnalyticsAccountListStorageAccountsResult +1. DataLakeAnalyticsAccountListStorageAccountsResultIterator.Value() StorageAccountInfo +1. DataLakeAnalyticsAccountListStorageAccountsResultPage.NotDone() bool +1. DataLakeAnalyticsAccountListStorageAccountsResultPage.Response() DataLakeAnalyticsAccountListStorageAccountsResult +1. DataLakeAnalyticsAccountListStorageAccountsResultPage.Values() []StorageAccountInfo 1. Error.MarshalJSON() ([]byte, error) 1. ErrorDetails.MarshalJSON() ([]byte, error) 1. InnerError.MarshalJSON() ([]byte, error) +1. ListBlobContainersResult.IsEmpty() bool 1. ListBlobContainersResult.MarshalJSON() ([]byte, error) +1. ListBlobContainersResultIterator.NotDone() bool +1. ListBlobContainersResultIterator.Response() ListBlobContainersResult +1. ListBlobContainersResultIterator.Value() BlobContainer +1. ListBlobContainersResultPage.NotDone() bool +1. ListBlobContainersResultPage.Response() ListBlobContainersResult +1. ListBlobContainersResultPage.Values() []BlobContainer +1. ListSasTokensResult.IsEmpty() bool 1. ListSasTokensResult.MarshalJSON() ([]byte, error) +1. ListSasTokensResultIterator.NotDone() bool +1. ListSasTokensResultIterator.Response() ListSasTokensResult +1. ListSasTokensResultIterator.Value() SasTokenInfo +1. ListSasTokensResultPage.NotDone() bool +1. ListSasTokensResultPage.Response() ListSasTokensResult +1. ListSasTokensResultPage.Values() []SasTokenInfo +1. NewDataLakeAnalyticsAccountListDataLakeStoreResultIterator(DataLakeAnalyticsAccountListDataLakeStoreResultPage) DataLakeAnalyticsAccountListDataLakeStoreResultIterator +1. NewDataLakeAnalyticsAccountListDataLakeStoreResultPage(DataLakeAnalyticsAccountListDataLakeStoreResult, func(context.Context, DataLakeAnalyticsAccountListDataLakeStoreResult) (DataLakeAnalyticsAccountListDataLakeStoreResult, error)) DataLakeAnalyticsAccountListDataLakeStoreResultPage +1. NewDataLakeAnalyticsAccountListStorageAccountsResultIterator(DataLakeAnalyticsAccountListStorageAccountsResultPage) DataLakeAnalyticsAccountListStorageAccountsResultIterator +1. NewDataLakeAnalyticsAccountListStorageAccountsResultPage(DataLakeAnalyticsAccountListStorageAccountsResult, func(context.Context, DataLakeAnalyticsAccountListStorageAccountsResult) (DataLakeAnalyticsAccountListStorageAccountsResult, error)) DataLakeAnalyticsAccountListStorageAccountsResultPage +1. NewListBlobContainersResultIterator(ListBlobContainersResultPage) ListBlobContainersResultIterator +1. NewListBlobContainersResultPage(ListBlobContainersResult, func(context.Context, ListBlobContainersResult) (ListBlobContainersResult, error)) ListBlobContainersResultPage +1. NewListSasTokensResultIterator(ListSasTokensResultPage) ListSasTokensResultIterator +1. NewListSasTokensResultPage(ListSasTokensResult, func(context.Context, ListSasTokensResult) (ListSasTokensResult, error)) ListSasTokensResultPage +1. PossibleOperationStatusValues() []OperationStatus 1. SasTokenInfo.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### Removed Structs + +1. AzureAsyncOperationResult +1. BlobContainer +1. BlobContainerProperties +1. DataLakeAnalyticsAccountListDataLakeStoreResult +1. DataLakeAnalyticsAccountListDataLakeStoreResultIterator +1. DataLakeAnalyticsAccountListDataLakeStoreResultPage +1. DataLakeAnalyticsAccountListStorageAccountsResult +1. DataLakeAnalyticsAccountListStorageAccountsResultIterator +1. DataLakeAnalyticsAccountListStorageAccountsResultPage +1. DataLakeStoreAccountInfo +1. Error +1. ErrorDetails +1. InnerError +1. ListBlobContainersResult +1. ListBlobContainersResultIterator +1. ListBlobContainersResultPage +1. ListSasTokensResult +1. ListSasTokensResultIterator +1. ListSasTokensResultPage +1. SasTokenInfo +1. StorageAccountInfo + +#### Removed Struct Fields + +1. AddDataLakeStoreParameters.Properties +1. AddStorageAccountParameters.Properties +1. DataLakeAnalyticsAccount.Properties + +### Signature Changes + +#### Funcs + +1. Client.AddDataLakeStoreAccount + - Params + - From: context.Context, string, string, string, AddDataLakeStoreParameters + - To: context.Context, string, string, string, *AddDataLakeStoreParameters +1. Client.AddDataLakeStoreAccountPreparer + - Params + - From: context.Context, string, string, string, AddDataLakeStoreParameters + - To: context.Context, string, string, string, *AddDataLakeStoreParameters +1. Client.Create + - Params + - From: context.Context, string, string, DataLakeAnalyticsAccount + - To: context.Context, string, string, CreateDataLakeAnalyticsAccountParameters +1. Client.CreatePreparer + - Params + - From: context.Context, string, string, DataLakeAnalyticsAccount + - To: context.Context, string, string, CreateDataLakeAnalyticsAccountParameters +1. Client.GetDataLakeStoreAccount + - Returns + - From: DataLakeStoreAccountInfo, error + - To: DataLakeStoreAccountInformation, error +1. Client.GetDataLakeStoreAccountResponder + - Returns + - From: DataLakeStoreAccountInfo, error + - To: DataLakeStoreAccountInformation, error +1. Client.GetStorageAccount + - Returns + - From: StorageAccountInfo, error + - To: StorageAccountInformation, error +1. Client.GetStorageAccountResponder + - Returns + - From: StorageAccountInfo, error + - To: StorageAccountInformation, error +1. Client.GetStorageContainer + - Returns + - From: BlobContainer, error + - To: StorageContainer, error +1. Client.GetStorageContainerResponder + - Returns + - From: BlobContainer, error + - To: StorageContainer, error +1. Client.List + - Params + - From: context.Context, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, *int32, *int32, string, string, *bool +1. Client.ListByResourceGroup + - Params + - From: context.Context, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, *int32, *int32, string, string, *bool +1. Client.ListByResourceGroupComplete + - Params + - From: context.Context, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, *int32, *int32, string, string, *bool +1. Client.ListByResourceGroupPreparer + - Params + - From: context.Context, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, *int32, *int32, string, string, *bool +1. Client.ListComplete + - Params + - From: context.Context, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, *int32, *int32, string, string, *bool +1. Client.ListDataLakeStoreAccounts + - Params + - From: context.Context, string, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, string, *int32, *int32, string, string, *bool + - Returns + - From: DataLakeAnalyticsAccountListDataLakeStoreResultPage, error + - To: DataLakeStoreAccountInformationListResultPage, error +1. Client.ListDataLakeStoreAccountsComplete + - Params + - From: context.Context, string, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, string, *int32, *int32, string, string, *bool + - Returns + - From: DataLakeAnalyticsAccountListDataLakeStoreResultIterator, error + - To: DataLakeStoreAccountInformationListResultIterator, error +1. Client.ListDataLakeStoreAccountsPreparer + - Params + - From: context.Context, string, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, string, *int32, *int32, string, string, *bool +1. Client.ListDataLakeStoreAccountsResponder + - Returns + - From: DataLakeAnalyticsAccountListDataLakeStoreResult, error + - To: DataLakeStoreAccountInformationListResult, error +1. Client.ListPreparer + - Params + - From: context.Context, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, *int32, *int32, string, string, *bool +1. Client.ListSasTokens + - Returns + - From: ListSasTokensResultPage, error + - To: SasTokenInformationListResultPage, error +1. Client.ListSasTokensComplete + - Returns + - From: ListSasTokensResultIterator, error + - To: SasTokenInformationListResultIterator, error +1. Client.ListSasTokensResponder + - Returns + - From: ListSasTokensResult, error + - To: SasTokenInformationListResult, error +1. Client.ListStorageAccounts + - Params + - From: context.Context, string, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, string, *int32, *int32, string, string, *bool + - Returns + - From: DataLakeAnalyticsAccountListStorageAccountsResultPage, error + - To: StorageAccountInformationListResultPage, error +1. Client.ListStorageAccountsComplete + - Params + - From: context.Context, string, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, string, *int32, *int32, string, string, *bool + - Returns + - From: DataLakeAnalyticsAccountListStorageAccountsResultIterator, error + - To: StorageAccountInformationListResultIterator, error +1. Client.ListStorageAccountsPreparer + - Params + - From: context.Context, string, string, string, *int32, *int32, string, string, string, *bool, string, string + - To: context.Context, string, string, string, *int32, *int32, string, string, *bool +1. Client.ListStorageAccountsResponder + - Returns + - From: DataLakeAnalyticsAccountListStorageAccountsResult, error + - To: StorageAccountInformationListResult, error +1. Client.ListStorageContainers + - Returns + - From: ListBlobContainersResultPage, error + - To: StorageContainerListResultPage, error +1. Client.ListStorageContainersComplete + - Returns + - From: ListBlobContainersResultIterator, error + - To: StorageContainerListResultIterator, error +1. Client.ListStorageContainersResponder + - Returns + - From: ListBlobContainersResult, error + - To: StorageContainerListResult, error +1. Client.Update + - Params + - From: context.Context, string, string, DataLakeAnalyticsAccount + - To: context.Context, string, string, *UpdateDataLakeAnalyticsAccountParameters +1. Client.UpdatePreparer + - Params + - From: context.Context, string, string, DataLakeAnalyticsAccount + - To: context.Context, string, string, *UpdateDataLakeAnalyticsAccountParameters +1. Client.UpdateStorageAccount + - Params + - From: context.Context, string, string, string, AddStorageAccountParameters + - To: context.Context, string, string, string, *UpdateStorageAccountParameters +1. Client.UpdateStorageAccountPreparer + - Params + - From: context.Context, string, string, string, AddStorageAccountParameters + - To: context.Context, string, string, string, *UpdateStorageAccountParameters + +#### Struct Fields + +1. DataLakeAnalyticsAccountProperties.DataLakeStoreAccounts changed type from *[]DataLakeStoreAccountInfo to *[]DataLakeStoreAccountInformation +1. DataLakeAnalyticsAccountProperties.StorageAccounts changed type from *[]StorageAccountInfo to *[]StorageAccountInformation + +## Additive Changes + +### New Constants + +1. AADObjectType.Group +1. AADObjectType.ServicePrincipal +1. AADObjectType.User +1. DebugDataAccessLevel.All +1. DebugDataAccessLevel.Customer +1. DebugDataAccessLevel.None +1. FirewallAllowAzureIpsState.Disabled +1. FirewallAllowAzureIpsState.Enabled +1. FirewallState.FirewallStateDisabled +1. FirewallState.FirewallStateEnabled +1. NestedResourceProvisioningState.NestedResourceProvisioningStateCanceled +1. NestedResourceProvisioningState.NestedResourceProvisioningStateFailed +1. NestedResourceProvisioningState.NestedResourceProvisioningStateSucceeded +1. OperationOrigin.OperationOriginSystem +1. OperationOrigin.OperationOriginUser +1. OperationOrigin.OperationOriginUsersystem +1. SubscriptionState.SubscriptionStateDeleted +1. SubscriptionState.SubscriptionStateRegistered +1. SubscriptionState.SubscriptionStateSuspended +1. SubscriptionState.SubscriptionStateUnregistered +1. SubscriptionState.SubscriptionStateWarned +1. TierType.Commitment100000AUHours +1. TierType.Commitment10000AUHours +1. TierType.Commitment1000AUHours +1. TierType.Commitment100AUHours +1. TierType.Commitment500000AUHours +1. TierType.Commitment50000AUHours +1. TierType.Commitment5000AUHours +1. TierType.Commitment500AUHours +1. TierType.Consumption +1. VirtualNetworkRuleState.VirtualNetworkRuleStateActive +1. VirtualNetworkRuleState.VirtualNetworkRuleStateFailed +1. VirtualNetworkRuleState.VirtualNetworkRuleStateNetworkSourceDeleted + +### New Funcs + +1. *AddDataLakeStoreParameters.UnmarshalJSON([]byte) error +1. *AddDataLakeStoreWithAccountParameters.UnmarshalJSON([]byte) error +1. *AddStorageAccountParameters.UnmarshalJSON([]byte) error +1. *AddStorageAccountWithAccountParameters.UnmarshalJSON([]byte) error +1. *ComputePolicy.UnmarshalJSON([]byte) error +1. *ComputePolicyListResultIterator.Next() error +1. *ComputePolicyListResultIterator.NextWithContext(context.Context) error +1. *ComputePolicyListResultPage.Next() error +1. *ComputePolicyListResultPage.NextWithContext(context.Context) error +1. *CreateComputePolicyWithAccountParameters.UnmarshalJSON([]byte) error +1. *CreateDataLakeAnalyticsAccountParameters.UnmarshalJSON([]byte) error +1. *CreateFirewallRuleWithAccountParameters.UnmarshalJSON([]byte) error +1. *CreateOrUpdateComputePolicyParameters.UnmarshalJSON([]byte) error +1. *CreateOrUpdateFirewallRuleParameters.UnmarshalJSON([]byte) error +1. *DataLakeAnalyticsAccount.UnmarshalJSON([]byte) error +1. *DataLakeAnalyticsAccountBasic.UnmarshalJSON([]byte) error +1. *DataLakeStoreAccountInformation.UnmarshalJSON([]byte) error +1. *DataLakeStoreAccountInformationListResultIterator.Next() error +1. *DataLakeStoreAccountInformationListResultIterator.NextWithContext(context.Context) error +1. *DataLakeStoreAccountInformationListResultPage.Next() error +1. *DataLakeStoreAccountInformationListResultPage.NextWithContext(context.Context) error +1. *FirewallRule.UnmarshalJSON([]byte) error +1. *FirewallRuleListResultIterator.Next() error +1. *FirewallRuleListResultIterator.NextWithContext(context.Context) error +1. *FirewallRuleListResultPage.Next() error +1. *FirewallRuleListResultPage.NextWithContext(context.Context) error +1. *HiveMetastore.UnmarshalJSON([]byte) error +1. *SasTokenInformationListResultIterator.Next() error +1. *SasTokenInformationListResultIterator.NextWithContext(context.Context) error +1. *SasTokenInformationListResultPage.Next() error +1. *SasTokenInformationListResultPage.NextWithContext(context.Context) error +1. *StorageAccountInformation.UnmarshalJSON([]byte) error +1. *StorageAccountInformationListResultIterator.Next() error +1. *StorageAccountInformationListResultIterator.NextWithContext(context.Context) error +1. *StorageAccountInformationListResultPage.Next() error +1. *StorageAccountInformationListResultPage.NextWithContext(context.Context) error +1. *StorageContainer.UnmarshalJSON([]byte) error +1. *StorageContainerListResultIterator.Next() error +1. *StorageContainerListResultIterator.NextWithContext(context.Context) error +1. *StorageContainerListResultPage.Next() error +1. *StorageContainerListResultPage.NextWithContext(context.Context) error +1. *UpdateComputePolicyParameters.UnmarshalJSON([]byte) error +1. *UpdateComputePolicyWithAccountParameters.UnmarshalJSON([]byte) error +1. *UpdateDataLakeAnalyticsAccountParameters.UnmarshalJSON([]byte) error +1. *UpdateDataLakeStoreWithAccountParameters.UnmarshalJSON([]byte) error +1. *UpdateFirewallRuleParameters.UnmarshalJSON([]byte) error +1. *UpdateFirewallRuleWithAccountParameters.UnmarshalJSON([]byte) error +1. *UpdateStorageAccountParameters.UnmarshalJSON([]byte) error +1. *UpdateStorageAccountWithAccountParameters.UnmarshalJSON([]byte) error +1. *VirtualNetworkRule.UnmarshalJSON([]byte) error +1. AccountsClient.CheckNameAvailability(context.Context, string, CheckNameAvailabilityParameters) (NameAvailabilityInformation, error) +1. AccountsClient.CheckNameAvailabilityPreparer(context.Context, string, CheckNameAvailabilityParameters) (*http.Request, error) +1. AccountsClient.CheckNameAvailabilityResponder(*http.Response) (NameAvailabilityInformation, error) +1. AccountsClient.CheckNameAvailabilitySender(*http.Request) (*http.Response, error) +1. AddDataLakeStoreParameters.MarshalJSON() ([]byte, error) +1. AddDataLakeStoreWithAccountParameters.MarshalJSON() ([]byte, error) +1. AddStorageAccountParameters.MarshalJSON() ([]byte, error) +1. AddStorageAccountWithAccountParameters.MarshalJSON() ([]byte, error) +1. CapabilityInformation.MarshalJSON() ([]byte, error) +1. ComputePoliciesClient.CreateOrUpdate(context.Context, string, string, string, CreateOrUpdateComputePolicyParameters) (ComputePolicy, error) +1. ComputePoliciesClient.CreateOrUpdatePreparer(context.Context, string, string, string, CreateOrUpdateComputePolicyParameters) (*http.Request, error) +1. ComputePoliciesClient.CreateOrUpdateResponder(*http.Response) (ComputePolicy, error) +1. ComputePoliciesClient.CreateOrUpdateSender(*http.Request) (*http.Response, error) +1. ComputePoliciesClient.Delete(context.Context, string, string, string) (autorest.Response, error) +1. ComputePoliciesClient.DeletePreparer(context.Context, string, string, string) (*http.Request, error) +1. ComputePoliciesClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. ComputePoliciesClient.DeleteSender(*http.Request) (*http.Response, error) +1. ComputePoliciesClient.Get(context.Context, string, string, string) (ComputePolicy, error) +1. ComputePoliciesClient.GetPreparer(context.Context, string, string, string) (*http.Request, error) +1. ComputePoliciesClient.GetResponder(*http.Response) (ComputePolicy, error) +1. ComputePoliciesClient.GetSender(*http.Request) (*http.Response, error) +1. ComputePoliciesClient.ListByAccount(context.Context, string, string) (ComputePolicyListResultPage, error) +1. ComputePoliciesClient.ListByAccountComplete(context.Context, string, string) (ComputePolicyListResultIterator, error) +1. ComputePoliciesClient.ListByAccountPreparer(context.Context, string, string) (*http.Request, error) +1. ComputePoliciesClient.ListByAccountResponder(*http.Response) (ComputePolicyListResult, error) +1. ComputePoliciesClient.ListByAccountSender(*http.Request) (*http.Response, error) +1. ComputePoliciesClient.Update(context.Context, string, string, string, *UpdateComputePolicyParameters) (ComputePolicy, error) +1. ComputePoliciesClient.UpdatePreparer(context.Context, string, string, string, *UpdateComputePolicyParameters) (*http.Request, error) +1. ComputePoliciesClient.UpdateResponder(*http.Response) (ComputePolicy, error) +1. ComputePoliciesClient.UpdateSender(*http.Request) (*http.Response, error) +1. ComputePolicy.MarshalJSON() ([]byte, error) +1. ComputePolicyListResult.IsEmpty() bool +1. ComputePolicyListResult.MarshalJSON() ([]byte, error) +1. ComputePolicyListResultIterator.NotDone() bool +1. ComputePolicyListResultIterator.Response() ComputePolicyListResult +1. ComputePolicyListResultIterator.Value() ComputePolicy +1. ComputePolicyListResultPage.NotDone() bool +1. ComputePolicyListResultPage.Response() ComputePolicyListResult +1. ComputePolicyListResultPage.Values() []ComputePolicy +1. ComputePolicyProperties.MarshalJSON() ([]byte, error) +1. CreateComputePolicyWithAccountParameters.MarshalJSON() ([]byte, error) +1. CreateDataLakeAnalyticsAccountParameters.MarshalJSON() ([]byte, error) +1. CreateFirewallRuleWithAccountParameters.MarshalJSON() ([]byte, error) +1. CreateOrUpdateComputePolicyParameters.MarshalJSON() ([]byte, error) +1. CreateOrUpdateFirewallRuleParameters.MarshalJSON() ([]byte, error) +1. DataLakeAnalyticsAccountBasic.MarshalJSON() ([]byte, error) +1. DataLakeAnalyticsAccountPropertiesBasic.MarshalJSON() ([]byte, error) +1. DataLakeStoreAccountInfoProperties.MarshalJSON() ([]byte, error) +1. DataLakeStoreAccountInformation.MarshalJSON() ([]byte, error) +1. DataLakeStoreAccountInformationListResult.IsEmpty() bool +1. DataLakeStoreAccountInformationListResult.MarshalJSON() ([]byte, error) +1. DataLakeStoreAccountInformationListResultIterator.NotDone() bool +1. DataLakeStoreAccountInformationListResultIterator.Response() DataLakeStoreAccountInformationListResult +1. DataLakeStoreAccountInformationListResultIterator.Value() DataLakeStoreAccountInformation +1. DataLakeStoreAccountInformationListResultPage.NotDone() bool +1. DataLakeStoreAccountInformationListResultPage.Response() DataLakeStoreAccountInformationListResult +1. DataLakeStoreAccountInformationListResultPage.Values() []DataLakeStoreAccountInformation +1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) +1. ErrorDetail.MarshalJSON() ([]byte, error) +1. FirewallRule.MarshalJSON() ([]byte, error) +1. FirewallRuleListResult.IsEmpty() bool +1. FirewallRuleListResult.MarshalJSON() ([]byte, error) +1. FirewallRuleListResultIterator.NotDone() bool +1. FirewallRuleListResultIterator.Response() FirewallRuleListResult +1. FirewallRuleListResultIterator.Value() FirewallRule +1. FirewallRuleListResultPage.NotDone() bool +1. FirewallRuleListResultPage.Response() FirewallRuleListResult +1. FirewallRuleListResultPage.Values() []FirewallRule +1. FirewallRuleProperties.MarshalJSON() ([]byte, error) +1. FirewallRulesClient.CreateOrUpdate(context.Context, string, string, string, CreateOrUpdateFirewallRuleParameters) (FirewallRule, error) +1. FirewallRulesClient.CreateOrUpdatePreparer(context.Context, string, string, string, CreateOrUpdateFirewallRuleParameters) (*http.Request, error) +1. FirewallRulesClient.CreateOrUpdateResponder(*http.Response) (FirewallRule, error) +1. FirewallRulesClient.CreateOrUpdateSender(*http.Request) (*http.Response, error) +1. FirewallRulesClient.Delete(context.Context, string, string, string) (autorest.Response, error) +1. FirewallRulesClient.DeletePreparer(context.Context, string, string, string) (*http.Request, error) +1. FirewallRulesClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. FirewallRulesClient.DeleteSender(*http.Request) (*http.Response, error) +1. FirewallRulesClient.Get(context.Context, string, string, string) (FirewallRule, error) +1. FirewallRulesClient.GetPreparer(context.Context, string, string, string) (*http.Request, error) +1. FirewallRulesClient.GetResponder(*http.Response) (FirewallRule, error) +1. FirewallRulesClient.GetSender(*http.Request) (*http.Response, error) +1. FirewallRulesClient.ListByAccount(context.Context, string, string) (FirewallRuleListResultPage, error) +1. FirewallRulesClient.ListByAccountComplete(context.Context, string, string) (FirewallRuleListResultIterator, error) +1. FirewallRulesClient.ListByAccountPreparer(context.Context, string, string) (*http.Request, error) +1. FirewallRulesClient.ListByAccountResponder(*http.Response) (FirewallRuleListResult, error) +1. FirewallRulesClient.ListByAccountSender(*http.Request) (*http.Response, error) +1. FirewallRulesClient.Update(context.Context, string, string, string, *UpdateFirewallRuleParameters) (FirewallRule, error) +1. FirewallRulesClient.UpdatePreparer(context.Context, string, string, string, *UpdateFirewallRuleParameters) (*http.Request, error) +1. FirewallRulesClient.UpdateResponder(*http.Response) (FirewallRule, error) +1. FirewallRulesClient.UpdateSender(*http.Request) (*http.Response, error) +1. HiveMetastore.MarshalJSON() ([]byte, error) +1. HiveMetastoreListResult.MarshalJSON() ([]byte, error) +1. HiveMetastoreProperties.MarshalJSON() ([]byte, error) +1. LocationsClient.GetCapability(context.Context, string) (CapabilityInformation, error) +1. LocationsClient.GetCapabilityPreparer(context.Context, string) (*http.Request, error) +1. LocationsClient.GetCapabilityResponder(*http.Response) (CapabilityInformation, error) +1. LocationsClient.GetCapabilitySender(*http.Request) (*http.Response, error) +1. NameAvailabilityInformation.MarshalJSON() ([]byte, error) +1. NewAccountsClient(string) AccountsClient +1. NewAccountsClientWithBaseURI(string, string) AccountsClient +1. NewComputePoliciesClient(string) ComputePoliciesClient +1. NewComputePoliciesClientWithBaseURI(string, string) ComputePoliciesClient +1. NewComputePolicyListResultIterator(ComputePolicyListResultPage) ComputePolicyListResultIterator +1. NewComputePolicyListResultPage(ComputePolicyListResult, func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)) ComputePolicyListResultPage +1. NewDataLakeStoreAccountInformationListResultIterator(DataLakeStoreAccountInformationListResultPage) DataLakeStoreAccountInformationListResultIterator +1. NewDataLakeStoreAccountInformationListResultPage(DataLakeStoreAccountInformationListResult, func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)) DataLakeStoreAccountInformationListResultPage +1. NewFirewallRuleListResultIterator(FirewallRuleListResultPage) FirewallRuleListResultIterator +1. NewFirewallRuleListResultPage(FirewallRuleListResult, func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage +1. NewFirewallRulesClient(string) FirewallRulesClient +1. NewFirewallRulesClientWithBaseURI(string, string) FirewallRulesClient +1. NewLocationsClient(string) LocationsClient +1. NewLocationsClientWithBaseURI(string, string) LocationsClient +1. NewOperationsClient(string) OperationsClient +1. NewOperationsClientWithBaseURI(string, string) OperationsClient +1. NewSasTokenInformationListResultIterator(SasTokenInformationListResultPage) SasTokenInformationListResultIterator +1. NewSasTokenInformationListResultPage(SasTokenInformationListResult, func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)) SasTokenInformationListResultPage +1. NewStorageAccountInformationListResultIterator(StorageAccountInformationListResultPage) StorageAccountInformationListResultIterator +1. NewStorageAccountInformationListResultPage(StorageAccountInformationListResult, func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)) StorageAccountInformationListResultPage +1. NewStorageContainerListResultIterator(StorageContainerListResultPage) StorageContainerListResultIterator +1. NewStorageContainerListResultPage(StorageContainerListResult, func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)) StorageContainerListResultPage +1. Operation.MarshalJSON() ([]byte, error) +1. OperationDisplay.MarshalJSON() ([]byte, error) +1. OperationListResult.MarshalJSON() ([]byte, error) +1. OperationsClient.List(context.Context) (OperationListResult, error) +1. OperationsClient.ListPreparer(context.Context) (*http.Request, error) +1. OperationsClient.ListResponder(*http.Response) (OperationListResult, error) +1. OperationsClient.ListSender(*http.Request) (*http.Response, error) +1. PossibleAADObjectTypeValues() []AADObjectType +1. PossibleDebugDataAccessLevelValues() []DebugDataAccessLevel +1. PossibleFirewallAllowAzureIpsStateValues() []FirewallAllowAzureIpsState +1. PossibleFirewallStateValues() []FirewallState +1. PossibleNestedResourceProvisioningStateValues() []NestedResourceProvisioningState +1. PossibleOperationOriginValues() []OperationOrigin +1. PossibleSubscriptionStateValues() []SubscriptionState +1. PossibleTierTypeValues() []TierType +1. PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState +1. Resource.MarshalJSON() ([]byte, error) +1. SasTokenInformation.MarshalJSON() ([]byte, error) +1. SasTokenInformationListResult.IsEmpty() bool +1. SasTokenInformationListResult.MarshalJSON() ([]byte, error) +1. SasTokenInformationListResultIterator.NotDone() bool +1. SasTokenInformationListResultIterator.Response() SasTokenInformationListResult +1. SasTokenInformationListResultIterator.Value() SasTokenInformation +1. SasTokenInformationListResultPage.NotDone() bool +1. SasTokenInformationListResultPage.Response() SasTokenInformationListResult +1. SasTokenInformationListResultPage.Values() []SasTokenInformation +1. StorageAccountInformation.MarshalJSON() ([]byte, error) +1. StorageAccountInformationListResult.IsEmpty() bool +1. StorageAccountInformationListResult.MarshalJSON() ([]byte, error) +1. StorageAccountInformationListResultIterator.NotDone() bool +1. StorageAccountInformationListResultIterator.Response() StorageAccountInformationListResult +1. StorageAccountInformationListResultIterator.Value() StorageAccountInformation +1. StorageAccountInformationListResultPage.NotDone() bool +1. StorageAccountInformationListResultPage.Response() StorageAccountInformationListResult +1. StorageAccountInformationListResultPage.Values() []StorageAccountInformation +1. StorageAccountInformationProperties.MarshalJSON() ([]byte, error) +1. StorageContainer.MarshalJSON() ([]byte, error) +1. StorageContainerListResult.IsEmpty() bool +1. StorageContainerListResult.MarshalJSON() ([]byte, error) +1. StorageContainerListResultIterator.NotDone() bool +1. StorageContainerListResultIterator.Response() StorageContainerListResult +1. StorageContainerListResultIterator.Value() StorageContainer +1. StorageContainerListResultPage.NotDone() bool +1. StorageContainerListResultPage.Response() StorageContainerListResult +1. StorageContainerListResultPage.Values() []StorageContainer +1. StorageContainerProperties.MarshalJSON() ([]byte, error) +1. SubResource.MarshalJSON() ([]byte, error) +1. UpdateComputePolicyParameters.MarshalJSON() ([]byte, error) +1. UpdateComputePolicyWithAccountParameters.MarshalJSON() ([]byte, error) +1. UpdateDataLakeAnalyticsAccountParameters.MarshalJSON() ([]byte, error) +1. UpdateDataLakeStoreWithAccountParameters.MarshalJSON() ([]byte, error) +1. UpdateFirewallRuleParameters.MarshalJSON() ([]byte, error) +1. UpdateFirewallRuleWithAccountParameters.MarshalJSON() ([]byte, error) +1. UpdateStorageAccountParameters.MarshalJSON() ([]byte, error) +1. UpdateStorageAccountWithAccountParameters.MarshalJSON() ([]byte, error) +1. VirtualNetworkRule.MarshalJSON() ([]byte, error) +1. VirtualNetworkRuleListResult.MarshalJSON() ([]byte, error) +1. VirtualNetworkRuleProperties.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### New Structs + +1. AccountsClient +1. AddDataLakeStoreProperties +1. AddDataLakeStoreWithAccountParameters +1. AddStorageAccountWithAccountParameters +1. CapabilityInformation +1. CheckNameAvailabilityParameters +1. ComputePoliciesClient +1. ComputePolicy +1. ComputePolicyListResult +1. ComputePolicyListResultIterator +1. ComputePolicyListResultPage +1. ComputePolicyProperties +1. CreateComputePolicyWithAccountParameters +1. CreateDataLakeAnalyticsAccountParameters +1. CreateDataLakeAnalyticsAccountProperties +1. CreateFirewallRuleWithAccountParameters +1. CreateOrUpdateComputePolicyParameters +1. CreateOrUpdateComputePolicyProperties +1. CreateOrUpdateFirewallRuleParameters +1. CreateOrUpdateFirewallRuleProperties +1. DataLakeAnalyticsAccountBasic +1. DataLakeAnalyticsAccountPropertiesBasic +1. DataLakeStoreAccountInformation +1. DataLakeStoreAccountInformationListResult +1. DataLakeStoreAccountInformationListResultIterator +1. DataLakeStoreAccountInformationListResultPage +1. ErrorAdditionalInfo +1. ErrorDetail +1. ErrorResponse +1. FirewallRule +1. FirewallRuleListResult +1. FirewallRuleListResultIterator +1. FirewallRuleListResultPage +1. FirewallRuleProperties +1. FirewallRulesClient +1. HiveMetastore +1. HiveMetastoreListResult +1. HiveMetastoreProperties +1. LocationsClient +1. NameAvailabilityInformation +1. Operation +1. OperationDisplay +1. OperationListResult +1. OperationMetaLogSpecification +1. OperationMetaMetricAvailabilitiesSpecification +1. OperationMetaMetricSpecification +1. OperationMetaPropertyInfo +1. OperationMetaServiceSpecification +1. OperationsClient +1. Resource +1. SasTokenInformation +1. SasTokenInformationListResult +1. SasTokenInformationListResultIterator +1. SasTokenInformationListResultPage +1. StorageAccountInformation +1. StorageAccountInformationListResult +1. StorageAccountInformationListResultIterator +1. StorageAccountInformationListResultPage +1. StorageAccountInformationProperties +1. StorageContainer +1. StorageContainerListResult +1. StorageContainerListResultIterator +1. StorageContainerListResultPage +1. StorageContainerProperties +1. SubResource +1. UpdateComputePolicyParameters +1. UpdateComputePolicyProperties +1. UpdateComputePolicyWithAccountParameters +1. UpdateDataLakeAnalyticsAccountParameters +1. UpdateDataLakeAnalyticsAccountProperties +1. UpdateDataLakeStoreProperties +1. UpdateDataLakeStoreWithAccountParameters +1. UpdateFirewallRuleParameters +1. UpdateFirewallRuleProperties +1. UpdateFirewallRuleWithAccountParameters +1. UpdateStorageAccountParameters +1. UpdateStorageAccountProperties +1. UpdateStorageAccountWithAccountParameters +1. VirtualNetworkRule +1. VirtualNetworkRuleListResult +1. VirtualNetworkRuleProperties + +#### New Struct Fields + +1. AddDataLakeStoreParameters.*AddDataLakeStoreProperties +1. AddStorageAccountParameters.*StorageAccountProperties +1. DataLakeAnalyticsAccount.*DataLakeAnalyticsAccountProperties +1. DataLakeAnalyticsAccountProperties.AccountID +1. DataLakeAnalyticsAccountProperties.ComputePolicies +1. DataLakeAnalyticsAccountProperties.CurrentTier +1. DataLakeAnalyticsAccountProperties.DebugDataAccessLevel +1. DataLakeAnalyticsAccountProperties.FirewallAllowAzureIps +1. DataLakeAnalyticsAccountProperties.FirewallRules +1. DataLakeAnalyticsAccountProperties.FirewallState +1. DataLakeAnalyticsAccountProperties.HierarchicalQueueState +1. DataLakeAnalyticsAccountProperties.HiveMetastores +1. DataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob +1. DataLakeAnalyticsAccountProperties.MinPriorityPerJob +1. DataLakeAnalyticsAccountProperties.NewTier +1. DataLakeAnalyticsAccountProperties.PublicDataLakeStoreAccounts +1. DataLakeAnalyticsAccountProperties.QueryStoreRetention +1. DataLakeAnalyticsAccountProperties.SystemMaxDegreeOfParallelism +1. DataLakeAnalyticsAccountProperties.SystemMaxJobCount +1. DataLakeAnalyticsAccountProperties.VirtualNetworkRules diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/_meta.json b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/_meta.json index 78ced1260c28..13d356b4b2cf 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/_meta.json +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1e9da9204648be4b90aed1f4589abfd515ceff20", "readme": "/_/azure-rest-api-specs/specification/datalake-analytics/resource-manager/readme.md", "tag": "package-2015-10-preview", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go index fd304af5c105..a7a5d08d3e7a 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go @@ -34,11 +34,11 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { // AddDataLakeStoreAccount updates the specified Data Lake Analytics account to include the additional Data Lake Store // account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account to which to add the Data Lake Store account. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // dataLakeStoreAccountName - the name of the Data Lake Store account to add. // parameters - the details of the Data Lake Store account. -func (client Client) AddDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters AddDataLakeStoreParameters) (result autorest.Response, err error) { +func (client Client) AddDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters *AddDataLakeStoreParameters) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.AddDataLakeStoreAccount") defer func() { @@ -49,12 +49,6 @@ func (client Client) AddDataLakeStoreAccount(ctx context.Context, resourceGroupN tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("account.Client", "AddDataLakeStoreAccount", err.Error()) - } - req, err := client.AddDataLakeStoreAccountPreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "AddDataLakeStoreAccount", nil, "Failure preparing request") @@ -78,7 +72,7 @@ func (client Client) AddDataLakeStoreAccount(ctx context.Context, resourceGroupN } // AddDataLakeStoreAccountPreparer prepares the AddDataLakeStoreAccount request. -func (client Client) AddDataLakeStoreAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters AddDataLakeStoreParameters) (*http.Request, error) { +func (client Client) AddDataLakeStoreAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters *AddDataLakeStoreParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "dataLakeStoreAccountName": autorest.Encode("path", dataLakeStoreAccountName), @@ -96,8 +90,11 @@ func (client Client) AddDataLakeStoreAccountPreparer(ctx context.Context, resour autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}", pathParameters), - autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -120,8 +117,8 @@ func (client Client) AddDataLakeStoreAccountResponder(resp *http.Response) (resu // AddStorageAccount updates the specified Data Lake Analytics account to add an Azure Storage account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account to which to add the Azure Storage account. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the name of the Azure Storage account to add // parameters - the parameters containing the access key and optional suffix for the Azure Storage Account. func (client Client) AddStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (result autorest.Response, err error) { @@ -137,8 +134,8 @@ func (client Client) AddStorageAccount(ctx context.Context, resourceGroupName st } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.AccessKey", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.StorageAccountProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.StorageAccountProperties.AccessKey", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.Client", "AddStorageAccount", err.Error()) } @@ -206,13 +203,12 @@ func (client Client) AddStorageAccountResponder(resp *http.Response) (result aut } // Create creates the specified Data Lake Analytics account. This supplies the user with computation services for Data -// Lake Analytics workloads +// Lake Analytics workloads. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account.the -// account will be associated with. -// name - the name of the Data Lake Analytics account to create. -// parameters - parameters supplied to the create Data Lake Analytics account operation. -func (client Client) Create(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (result CreateFuture, err error) { +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account to retrieve. +// parameters - parameters supplied to create a new Data Lake Analytics account. +func (client Client) Create(ctx context.Context, resourceGroupName string, accountName string, parameters CreateDataLakeAnalyticsAccountParameters) (result CreateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Create") defer func() { @@ -223,7 +219,25 @@ func (client Client) Create(ctx context.Context, resourceGroupName string, name tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreatePreparer(ctx, resourceGroupName, name, parameters) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.DefaultDataLakeStoreAccount", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.DataLakeStoreAccounts", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.InclusiveMaximum, Rule: int64(180), Chain: nil}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("account.Client", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "Create", nil, "Failure preparing request") return @@ -239,9 +253,9 @@ func (client Client) Create(ctx context.Context, resourceGroupName string, name } // CreatePreparer prepares the Create request. -func (client Client) CreatePreparer(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (*http.Request, error) { +func (client Client) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters CreateDataLakeAnalyticsAccountParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), + "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -251,13 +265,11 @@ func (client Client) CreatePreparer(ctx context.Context, resourceGroupName strin "api-version": APIVersion, } - parameters.Type = nil - parameters.ID = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -292,8 +304,8 @@ func (client Client) CreateResponder(resp *http.Response) (result DataLakeAnalyt // Delete begins the delete process for the Data Lake Analytics account object specified by the account name. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account to delete +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account to retrieve. func (client Client) Delete(ctx context.Context, resourceGroupName string, accountName string) (result DeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete") @@ -361,7 +373,7 @@ func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err e func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -370,8 +382,8 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo // DeleteDataLakeStoreAccount updates the Data Lake Analytics account specified to remove the specified Data Lake Store // account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account from which to remove the Data Lake Store account. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // dataLakeStoreAccountName - the name of the Data Lake Store account to remove func (client Client) DeleteDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result autorest.Response, err error) { if tracing.IsEnabled() { @@ -439,7 +451,7 @@ func (client Client) DeleteDataLakeStoreAccountSender(req *http.Request) (*http. func (client Client) DeleteDataLakeStoreAccountResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -447,8 +459,8 @@ func (client Client) DeleteDataLakeStoreAccountResponder(resp *http.Response) (r // DeleteStorageAccount updates the specified Data Lake Analytics account to remove an Azure Storage account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account from which to remove the Azure Storage account. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the name of the Azure Storage account to remove func (client Client) DeleteStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result autorest.Response, err error) { if tracing.IsEnabled() { @@ -516,7 +528,7 @@ func (client Client) DeleteStorageAccountSender(req *http.Request) (*http.Respon func (client Client) DeleteStorageAccountResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -524,7 +536,7 @@ func (client Client) DeleteStorageAccountResponder(resp *http.Response) (result // Get gets details of the specified Data Lake Analytics account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. +// resourceGroupName - the name of the Azure resource group. // accountName - the name of the Data Lake Analytics account to retrieve. func (client Client) Get(ctx context.Context, resourceGroupName string, accountName string) (result DataLakeAnalyticsAccount, err error) { if tracing.IsEnabled() { @@ -601,11 +613,10 @@ func (client Client) GetResponder(resp *http.Response) (result DataLakeAnalytics // GetDataLakeStoreAccount gets the specified Data Lake Store account details in the specified Data Lake Analytics // account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account from which to retrieve the Data Lake Store account -// details. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // dataLakeStoreAccountName - the name of the Data Lake Store account to retrieve -func (client Client) GetDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result DataLakeStoreAccountInfo, err error) { +func (client Client) GetDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result DataLakeStoreAccountInformation, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetDataLakeStoreAccount") defer func() { @@ -668,7 +679,7 @@ func (client Client) GetDataLakeStoreAccountSender(req *http.Request) (*http.Res // GetDataLakeStoreAccountResponder handles the response to the GetDataLakeStoreAccount request. The method always // closes the http.Response Body. -func (client Client) GetDataLakeStoreAccountResponder(resp *http.Response) (result DataLakeStoreAccountInfo, err error) { +func (client Client) GetDataLakeStoreAccountResponder(resp *http.Response) (result DataLakeStoreAccountInformation, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -680,11 +691,10 @@ func (client Client) GetDataLakeStoreAccountResponder(resp *http.Response) (resu // GetStorageAccount gets the specified Azure Storage account linked to the given Data Lake Analytics account. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account from which to retrieve Azure storage account -// details. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the name of the Azure Storage account for which to retrieve the details. -func (client Client) GetStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageAccountInfo, err error) { +func (client Client) GetStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageAccountInformation, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetStorageAccount") defer func() { @@ -747,7 +757,7 @@ func (client Client) GetStorageAccountSender(req *http.Request) (*http.Response, // GetStorageAccountResponder handles the response to the GetStorageAccount request. The method always // closes the http.Response Body. -func (client Client) GetStorageAccountResponder(resp *http.Response) (result StorageAccountInfo, err error) { +func (client Client) GetStorageAccountResponder(resp *http.Response) (result StorageAccountInformation, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -760,11 +770,11 @@ func (client Client) GetStorageAccountResponder(resp *http.Response) (result Sto // GetStorageContainer gets the specified Azure Storage container associated with the given Data Lake Analytics and // Azure Storage accounts. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account for which to retrieve blob container. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the name of the Azure storage account from which to retrieve the blob container. // containerName - the name of the Azure storage container to retrieve -func (client Client) GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result BlobContainer, err error) { +func (client Client) GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result StorageContainer, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetStorageContainer") defer func() { @@ -815,7 +825,7 @@ func (client Client) GetStorageContainerPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -828,7 +838,7 @@ func (client Client) GetStorageContainerSender(req *http.Request) (*http.Respons // GetStorageContainerResponder handles the response to the GetStorageContainer request. The method always // closes the http.Response Body. -func (client Client) GetStorageContainerResponder(resp *http.Response) (result BlobContainer, err error) { +func (client Client) GetStorageContainerResponder(resp *http.Response) (result StorageContainer, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -844,8 +854,6 @@ func (client Client) GetStorageContainerResponder(resp *http.Response) (result B // filter - oData filter. Optional. // top - the number of items to return. Optional. // skip - the number of items to skip over before returning elements. Optional. -// expand - oData expansion. Expand related resources in line with the retrieved resources, e.g. -// Categories/$expand=Products would expand Product data in line with each Category entry. Optional. // selectParameter - oData Select statement. Limits the properties on each entry to just those requested, e.g. // Categories?$select=CategoryName,Description. Optional. // orderby - orderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or @@ -853,11 +861,7 @@ func (client Client) GetStorageContainerResponder(resp *http.Response) (result B // Optional. // count - the Boolean value of true or false to request a count of the matching resources included with the // resources in the response, e.g. Categories?$count=true. Optional. -// search - a free form search. A free-text search expression to match for whether a particular entry should be -// included in the feed, e.g. Categories?$search=blue OR green. Optional. -// formatParameter - the desired return format. Return the response in particular format without access to -// request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. -func (client Client) List(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultPage, err error) { +func (client Client) List(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") defer func() { @@ -868,8 +872,18 @@ func (client Client) List(ctx context.Context, filter string, top *int32, skip * tracing.EndSpan(ctx, sc, err) }() } + 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.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("account.Client", "List", err.Error()) + } + result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + req, err := client.ListPreparer(ctx, filter, top, skip, selectParameter, orderby, count) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "List", nil, "Failure preparing request") return @@ -896,7 +910,7 @@ func (client Client) List(ctx context.Context, filter string, top *int32, skip * } // ListPreparer prepares the List request. -func (client Client) ListPreparer(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { +func (client Client) ListPreparer(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -914,9 +928,6 @@ func (client Client) ListPreparer(ctx context.Context, filter string, top *int32 if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } if len(selectParameter) > 0 { queryParameters["$select"] = autorest.Encode("query", selectParameter) } @@ -926,12 +937,6 @@ func (client Client) ListPreparer(ctx context.Context, filter string, top *int32 if count != nil { queryParameters["$count"] = autorest.Encode("query", *count) } - if len(search) > 0 { - queryParameters["$search"] = autorest.Encode("query", search) - } - if len(formatParameter) > 0 { - queryParameters["$format"] = autorest.Encode("query", formatParameter) - } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -981,7 +986,7 @@ func (client Client) listNextResults(ctx context.Context, lastResults DataLakeAn } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListComplete(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultIterator, err error) { +func (client Client) ListComplete(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") defer func() { @@ -992,19 +997,17 @@ func (client Client) ListComplete(ctx context.Context, filter string, top *int32 tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + result.page, err = client.List(ctx, filter, top, skip, selectParameter, orderby, count) return } // ListByResourceGroup gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. // This includes a link to the next page, if any. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. +// resourceGroupName - the name of the Azure resource group. // filter - oData filter. Optional. // top - the number of items to return. Optional. // skip - the number of items to skip over before returning elements. Optional. -// expand - oData expansion. Expand related resources in line with the retrieved resources, e.g. -// Categories/$expand=Products would expand Product data in line with each Category entry. Optional. // selectParameter - oData Select statement. Limits the properties on each entry to just those requested, e.g. // Categories?$select=CategoryName,Description. Optional. // orderby - orderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or @@ -1012,11 +1015,7 @@ func (client Client) ListComplete(ctx context.Context, filter string, top *int32 // Optional. // count - the Boolean value of true or false to request a count of the matching resources included with the // resources in the response, e.g. Categories?$count=true. Optional. -// search - a free form search. A free-text search expression to match for whether a particular entry should be -// included in the feed, e.g. Categories?$search=blue OR green. Optional. -// formatParameter - the return format. Return the response in particular format without access to request -// headers for standard content-type negotiation (e.g Orders?$format=json). Optional. -func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultPage, err error) { +func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup") defer func() { @@ -1027,8 +1026,18 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName tracing.EndSpan(ctx, sc, err) }() } + 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.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("account.Client", "ListByResourceGroup", err.Error()) + } + result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top, skip, selectParameter, orderby, count) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListByResourceGroup", nil, "Failure preparing request") return @@ -1055,7 +1064,7 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName } // ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { +func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -1074,9 +1083,6 @@ func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGr if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } if len(selectParameter) > 0 { queryParameters["$select"] = autorest.Encode("query", selectParameter) } @@ -1086,12 +1092,6 @@ func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGr if count != nil { queryParameters["$count"] = autorest.Encode("query", *count) } - if len(search) > 0 { - queryParameters["$search"] = autorest.Encode("query", search) - } - if len(formatParameter) > 0 { - queryParameters["$format"] = autorest.Encode("query", formatParameter) - } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -1141,7 +1141,7 @@ func (client Client) listByResourceGroupNextResults(ctx context.Context, lastRes } // ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultIterator, err error) { +func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup") defer func() { @@ -1152,20 +1152,18 @@ func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, top, skip, selectParameter, orderby, count) return } // ListDataLakeStoreAccounts gets the first page of Data Lake Store accounts linked to the specified Data Lake // Analytics account. The response includes a link to the next page, if any. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account for which to list Data Lake Store accounts. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // filter - oData filter. Optional. // top - the number of items to return. Optional. // skip - the number of items to skip over before returning elements. Optional. -// expand - oData expansion. Expand related resources in line with the retrieved resources, e.g. -// Categories/$expand=Products would expand Product data in line with each Category entry. Optional. // selectParameter - oData Select statement. Limits the properties on each entry to just those requested, e.g. // Categories?$select=CategoryName,Description. Optional. // orderby - orderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or @@ -1173,23 +1171,29 @@ func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGr // Optional. // count - the Boolean value of true or false to request a count of the matching resources included with the // resources in the response, e.g. Categories?$count=true. Optional. -// search - a free form search. A free-text search expression to match for whether a particular entry should be -// included in the feed, e.g. Categories?$search=blue OR green. Optional. -// formatParameter - the desired return format. Return the response in particular format without access to -// request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. -func (client Client) ListDataLakeStoreAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListDataLakeStoreResultPage, err error) { +func (client Client) ListDataLakeStoreAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountInformationListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListDataLakeStoreAccounts") defer func() { sc := -1 - if result.dlaaldlsr.Response.Response != nil { - sc = result.dlaaldlsr.Response.Response.StatusCode + if result.dlsailr.Response.Response != nil { + sc = result.dlsailr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } + 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.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("account.Client", "ListDataLakeStoreAccounts", err.Error()) + } + result.fn = client.listDataLakeStoreAccountsNextResults - req, err := client.ListDataLakeStoreAccountsPreparer(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + req, err := client.ListDataLakeStoreAccountsPreparer(ctx, resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListDataLakeStoreAccounts", nil, "Failure preparing request") return @@ -1197,17 +1201,17 @@ func (client Client) ListDataLakeStoreAccounts(ctx context.Context, resourceGrou resp, err := client.ListDataLakeStoreAccountsSender(req) if err != nil { - result.dlaaldlsr.Response = autorest.Response{Response: resp} + result.dlsailr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "account.Client", "ListDataLakeStoreAccounts", resp, "Failure sending request") return } - result.dlaaldlsr, err = client.ListDataLakeStoreAccountsResponder(resp) + result.dlsailr, err = client.ListDataLakeStoreAccountsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListDataLakeStoreAccounts", resp, "Failure responding to request") return } - if result.dlaaldlsr.hasNextLink() && result.dlaaldlsr.IsEmpty() { + if result.dlsailr.hasNextLink() && result.dlsailr.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -1216,7 +1220,7 @@ func (client Client) ListDataLakeStoreAccounts(ctx context.Context, resourceGrou } // ListDataLakeStoreAccountsPreparer prepares the ListDataLakeStoreAccounts request. -func (client Client) ListDataLakeStoreAccountsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { +func (client Client) ListDataLakeStoreAccountsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1236,9 +1240,6 @@ func (client Client) ListDataLakeStoreAccountsPreparer(ctx context.Context, reso if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } if len(selectParameter) > 0 { queryParameters["$select"] = autorest.Encode("query", selectParameter) } @@ -1248,12 +1249,6 @@ func (client Client) ListDataLakeStoreAccountsPreparer(ctx context.Context, reso if count != nil { queryParameters["$count"] = autorest.Encode("query", *count) } - if len(search) > 0 { - queryParameters["$search"] = autorest.Encode("query", search) - } - if len(formatParameter) > 0 { - queryParameters["$format"] = autorest.Encode("query", formatParameter) - } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -1271,7 +1266,7 @@ func (client Client) ListDataLakeStoreAccountsSender(req *http.Request) (*http.R // ListDataLakeStoreAccountsResponder handles the response to the ListDataLakeStoreAccounts request. The method always // closes the http.Response Body. -func (client Client) ListDataLakeStoreAccountsResponder(resp *http.Response) (result DataLakeAnalyticsAccountListDataLakeStoreResult, err error) { +func (client Client) ListDataLakeStoreAccountsResponder(resp *http.Response) (result DataLakeStoreAccountInformationListResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1282,8 +1277,8 @@ func (client Client) ListDataLakeStoreAccountsResponder(resp *http.Response) (re } // listDataLakeStoreAccountsNextResults retrieves the next set of results, if any. -func (client Client) listDataLakeStoreAccountsNextResults(ctx context.Context, lastResults DataLakeAnalyticsAccountListDataLakeStoreResult) (result DataLakeAnalyticsAccountListDataLakeStoreResult, err error) { - req, err := lastResults.dataLakeAnalyticsAccountListDataLakeStoreResultPreparer(ctx) +func (client Client) listDataLakeStoreAccountsNextResults(ctx context.Context, lastResults DataLakeStoreAccountInformationListResult) (result DataLakeStoreAccountInformationListResult, err error) { + req, err := lastResults.dataLakeStoreAccountInformationListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "account.Client", "listDataLakeStoreAccountsNextResults", nil, "Failure preparing next results request") } @@ -1303,7 +1298,7 @@ func (client Client) listDataLakeStoreAccountsNextResults(ctx context.Context, l } // ListDataLakeStoreAccountsComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListDataLakeStoreAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListDataLakeStoreResultIterator, err error) { +func (client Client) ListDataLakeStoreAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountInformationListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListDataLakeStoreAccounts") defer func() { @@ -1314,25 +1309,24 @@ func (client Client) ListDataLakeStoreAccountsComplete(ctx context.Context, reso tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListDataLakeStoreAccounts(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + result.page, err = client.ListDataLakeStoreAccounts(ctx, resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count) return } // ListSasTokens gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and // container combination. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account from which an Azure Storage account's SAS token is -// being requested. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the name of the Azure storage account for which the SAS token is being requested. // containerName - the name of the Azure storage container for which the SAS token is being requested. -func (client Client) ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result ListSasTokensResultPage, err error) { +func (client Client) ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result SasTokenInformationListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListSasTokens") defer func() { sc := -1 - if result.lstr.Response.Response != nil { - sc = result.lstr.Response.Response.StatusCode + if result.stilr.Response.Response != nil { + sc = result.stilr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -1346,17 +1340,17 @@ func (client Client) ListSasTokens(ctx context.Context, resourceGroupName string resp, err := client.ListSasTokensSender(req) if err != nil { - result.lstr.Response = autorest.Response{Response: resp} + result.stilr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "account.Client", "ListSasTokens", resp, "Failure sending request") return } - result.lstr, err = client.ListSasTokensResponder(resp) + result.stilr, err = client.ListSasTokensResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListSasTokens", resp, "Failure responding to request") return } - if result.lstr.hasNextLink() && result.lstr.IsEmpty() { + if result.stilr.hasNextLink() && result.stilr.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -1382,7 +1376,7 @@ func (client Client) ListSasTokensPreparer(ctx context.Context, resourceGroupNam preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}/listSasTokens", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1395,7 +1389,7 @@ func (client Client) ListSasTokensSender(req *http.Request) (*http.Response, err // ListSasTokensResponder handles the response to the ListSasTokens request. The method always // closes the http.Response Body. -func (client Client) ListSasTokensResponder(resp *http.Response) (result ListSasTokensResult, err error) { +func (client Client) ListSasTokensResponder(resp *http.Response) (result SasTokenInformationListResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1406,8 +1400,8 @@ func (client Client) ListSasTokensResponder(resp *http.Response) (result ListSas } // listSasTokensNextResults retrieves the next set of results, if any. -func (client Client) listSasTokensNextResults(ctx context.Context, lastResults ListSasTokensResult) (result ListSasTokensResult, err error) { - req, err := lastResults.listSasTokensResultPreparer(ctx) +func (client Client) listSasTokensNextResults(ctx context.Context, lastResults SasTokenInformationListResult) (result SasTokenInformationListResult, err error) { + req, err := lastResults.sasTokenInformationListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "account.Client", "listSasTokensNextResults", nil, "Failure preparing next results request") } @@ -1427,7 +1421,7 @@ func (client Client) listSasTokensNextResults(ctx context.Context, lastResults L } // ListSasTokensComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result ListSasTokensResultIterator, err error) { +func (client Client) ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result SasTokenInformationListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListSasTokens") defer func() { @@ -1445,13 +1439,11 @@ func (client Client) ListSasTokensComplete(ctx context.Context, resourceGroupNam // ListStorageAccounts gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake // Analytics account. The response includes a link to the next page, if any. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account for which to list Azure Storage accounts. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // filter - the OData filter. Optional. // top - the number of items to return. Optional. // skip - the number of items to skip over before returning elements. Optional. -// expand - oData expansion. Expand related resources in line with the retrieved resources, e.g. -// Categories/$expand=Products would expand Product data in line with each Category entry. Optional. // selectParameter - oData Select statement. Limits the properties on each entry to just those requested, e.g. // Categories?$select=CategoryName,Description. Optional. // orderby - orderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or @@ -1459,23 +1451,29 @@ func (client Client) ListSasTokensComplete(ctx context.Context, resourceGroupNam // Optional. // count - the Boolean value of true or false to request a count of the matching resources included with the // resources in the response, e.g. Categories?$count=true. Optional. -// search - a free form search. A free-text search expression to match for whether a particular entry should be -// included in the feed, e.g. Categories?$search=blue OR green. Optional. -// formatParameter - the desired return format. Return the response in particular format without access to -// request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. -func (client Client) ListStorageAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListStorageAccountsResultPage, err error) { +func (client Client) ListStorageAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result StorageAccountInformationListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListStorageAccounts") defer func() { sc := -1 - if result.dlaalsar.Response.Response != nil { - sc = result.dlaalsar.Response.Response.StatusCode + if result.sailr.Response.Response != nil { + sc = result.sailr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } + 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.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("account.Client", "ListStorageAccounts", err.Error()) + } + result.fn = client.listStorageAccountsNextResults - req, err := client.ListStorageAccountsPreparer(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + req, err := client.ListStorageAccountsPreparer(ctx, resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListStorageAccounts", nil, "Failure preparing request") return @@ -1483,17 +1481,17 @@ func (client Client) ListStorageAccounts(ctx context.Context, resourceGroupName resp, err := client.ListStorageAccountsSender(req) if err != nil { - result.dlaalsar.Response = autorest.Response{Response: resp} + result.sailr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "account.Client", "ListStorageAccounts", resp, "Failure sending request") return } - result.dlaalsar, err = client.ListStorageAccountsResponder(resp) + result.sailr, err = client.ListStorageAccountsResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListStorageAccounts", resp, "Failure responding to request") return } - if result.dlaalsar.hasNextLink() && result.dlaalsar.IsEmpty() { + if result.sailr.hasNextLink() && result.sailr.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -1502,7 +1500,7 @@ func (client Client) ListStorageAccounts(ctx context.Context, resourceGroupName } // ListStorageAccountsPreparer prepares the ListStorageAccounts request. -func (client Client) ListStorageAccountsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { +func (client Client) ListStorageAccountsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1522,9 +1520,6 @@ func (client Client) ListStorageAccountsPreparer(ctx context.Context, resourceGr if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } if len(selectParameter) > 0 { queryParameters["$select"] = autorest.Encode("query", selectParameter) } @@ -1534,12 +1529,6 @@ func (client Client) ListStorageAccountsPreparer(ctx context.Context, resourceGr if count != nil { queryParameters["$count"] = autorest.Encode("query", *count) } - if len(search) > 0 { - queryParameters["$search"] = autorest.Encode("query", search) - } - if len(formatParameter) > 0 { - queryParameters["$format"] = autorest.Encode("query", formatParameter) - } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -1557,7 +1546,7 @@ func (client Client) ListStorageAccountsSender(req *http.Request) (*http.Respons // ListStorageAccountsResponder handles the response to the ListStorageAccounts request. The method always // closes the http.Response Body. -func (client Client) ListStorageAccountsResponder(resp *http.Response) (result DataLakeAnalyticsAccountListStorageAccountsResult, err error) { +func (client Client) ListStorageAccountsResponder(resp *http.Response) (result StorageAccountInformationListResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1568,8 +1557,8 @@ func (client Client) ListStorageAccountsResponder(resp *http.Response) (result D } // listStorageAccountsNextResults retrieves the next set of results, if any. -func (client Client) listStorageAccountsNextResults(ctx context.Context, lastResults DataLakeAnalyticsAccountListStorageAccountsResult) (result DataLakeAnalyticsAccountListStorageAccountsResult, err error) { - req, err := lastResults.dataLakeAnalyticsAccountListStorageAccountsResultPreparer(ctx) +func (client Client) listStorageAccountsNextResults(ctx context.Context, lastResults StorageAccountInformationListResult) (result StorageAccountInformationListResult, err error) { + req, err := lastResults.storageAccountInformationListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "account.Client", "listStorageAccountsNextResults", nil, "Failure preparing next results request") } @@ -1589,7 +1578,7 @@ func (client Client) listStorageAccountsNextResults(ctx context.Context, lastRes } // ListStorageAccountsComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListStorageAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListStorageAccountsResultIterator, err error) { +func (client Client) ListStorageAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result StorageAccountInformationListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListStorageAccounts") defer func() { @@ -1600,23 +1589,23 @@ func (client Client) ListStorageAccountsComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListStorageAccounts(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) + result.page, err = client.ListStorageAccounts(ctx, resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count) return } // ListStorageContainers lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics // and Azure Storage account combination. The response includes a link to the next page of results, if any. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account for which to list Azure Storage blob containers. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the name of the Azure storage account from which to list blob containers. -func (client Client) ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result ListBlobContainersResultPage, err error) { +func (client Client) ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageContainerListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListStorageContainers") defer func() { sc := -1 - if result.lbcr.Response.Response != nil { - sc = result.lbcr.Response.Response.StatusCode + if result.sclr.Response.Response != nil { + sc = result.sclr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -1630,17 +1619,17 @@ func (client Client) ListStorageContainers(ctx context.Context, resourceGroupNam resp, err := client.ListStorageContainersSender(req) if err != nil { - result.lbcr.Response = autorest.Response{Response: resp} + result.sclr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "account.Client", "ListStorageContainers", resp, "Failure sending request") return } - result.lbcr, err = client.ListStorageContainersResponder(resp) + result.sclr, err = client.ListStorageContainersResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "ListStorageContainers", resp, "Failure responding to request") return } - if result.lbcr.hasNextLink() && result.lbcr.IsEmpty() { + if result.sclr.hasNextLink() && result.sclr.IsEmpty() { err = result.NextWithContext(ctx) return } @@ -1665,7 +1654,7 @@ func (client Client) ListStorageContainersPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1678,7 +1667,7 @@ func (client Client) ListStorageContainersSender(req *http.Request) (*http.Respo // ListStorageContainersResponder handles the response to the ListStorageContainers request. The method always // closes the http.Response Body. -func (client Client) ListStorageContainersResponder(resp *http.Response) (result ListBlobContainersResult, err error) { +func (client Client) ListStorageContainersResponder(resp *http.Response) (result StorageContainerListResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -1689,8 +1678,8 @@ func (client Client) ListStorageContainersResponder(resp *http.Response) (result } // listStorageContainersNextResults retrieves the next set of results, if any. -func (client Client) listStorageContainersNextResults(ctx context.Context, lastResults ListBlobContainersResult) (result ListBlobContainersResult, err error) { - req, err := lastResults.listBlobContainersResultPreparer(ctx) +func (client Client) listStorageContainersNextResults(ctx context.Context, lastResults StorageContainerListResult) (result StorageContainerListResult, err error) { + req, err := lastResults.storageContainerListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "account.Client", "listStorageContainersNextResults", nil, "Failure preparing next results request") } @@ -1710,7 +1699,7 @@ func (client Client) listStorageContainersNextResults(ctx context.Context, lastR } // ListStorageContainersComplete enumerates all values, automatically crossing page boundaries as required. -func (client Client) ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result ListBlobContainersResultIterator, err error) { +func (client Client) ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageContainerListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListStorageContainers") defer func() { @@ -1728,10 +1717,10 @@ func (client Client) ListStorageContainersComplete(ctx context.Context, resource // Update updates the Data Lake Analytics account object specified by the accountName with the contents of the account // object. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// name - the name of the Data Lake Analytics account to update. +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account to update. // parameters - parameters supplied to the update Data Lake Analytics account operation. -func (client Client) Update(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (result UpdateFuture, err error) { +func (client Client) Update(ctx context.Context, resourceGroupName string, accountName string, parameters *UpdateDataLakeAnalyticsAccountParameters) (result UpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update") defer func() { @@ -1742,7 +1731,7 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, name tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, resourceGroupName, name, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "account.Client", "Update", nil, "Failure preparing request") return @@ -1758,9 +1747,9 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, name } // UpdatePreparer prepares the Update request. -func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (*http.Request, error) { +func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters *UpdateDataLakeAnalyticsAccountParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), + "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -1770,15 +1759,16 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin "api-version": APIVersion, } - parameters.Type = nil - parameters.ID = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}", pathParameters), - autorest.WithJSON(parameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", pathParameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1802,7 +1792,7 @@ func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err e func (client Client) UpdateResponder(resp *http.Response) (result DataLakeAnalyticsAccount, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -1812,11 +1802,12 @@ func (client Client) UpdateResponder(resp *http.Response) (result DataLakeAnalyt // UpdateStorageAccount updates the Data Lake Analytics account to replace Azure Storage blob account details, such as // the access key and/or suffix. // Parameters: -// resourceGroupName - the name of the Azure resource group that contains the Data Lake Analytics account. -// accountName - the name of the Data Lake Analytics account to modify storage accounts in +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. // storageAccountName - the Azure Storage account to modify -// parameters - the parameters containing the access key and suffix to update the storage account with. -func (client Client) UpdateStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (result autorest.Response, err error) { +// parameters - the parameters containing the access key and suffix to update the storage account with, if any. +// Passing nothing results in no change. +func (client Client) UpdateStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters *UpdateStorageAccountParameters) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.UpdateStorageAccount") defer func() { @@ -1850,7 +1841,7 @@ func (client Client) UpdateStorageAccount(ctx context.Context, resourceGroupName } // UpdateStorageAccountPreparer prepares the UpdateStorageAccount request. -func (client Client) UpdateStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (*http.Request, error) { +func (client Client) UpdateStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters *UpdateStorageAccountParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1868,8 +1859,11 @@ func (client Client) UpdateStorageAccountPreparer(ctx context.Context, resourceG autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}", pathParameters), - autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go index 56d777eee7a5..c5ae7a058187 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go @@ -14,30 +14,75 @@ import ( // ClientAPI contains the set of methods on the Client type. type ClientAPI interface { - AddDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters account.AddDataLakeStoreParameters) (result autorest.Response, err error) + AddDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters *account.AddDataLakeStoreParameters) (result autorest.Response, err error) AddStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters account.AddStorageAccountParameters) (result autorest.Response, err error) - Create(ctx context.Context, resourceGroupName string, name string, parameters account.DataLakeAnalyticsAccount) (result account.CreateFuture, err error) + Create(ctx context.Context, resourceGroupName string, accountName string, parameters account.CreateDataLakeAnalyticsAccountParameters) (result account.CreateFuture, err error) Delete(ctx context.Context, resourceGroupName string, accountName string) (result account.DeleteFuture, err error) DeleteDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result autorest.Response, err error) DeleteStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string) (result account.DataLakeAnalyticsAccount, err error) - GetDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result account.DataLakeStoreAccountInfo, err error) - GetStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageAccountInfo, err error) - GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.BlobContainer, err error) - List(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultPage, err error) - ListComplete(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultIterator, err error) - ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultPage, err error) - ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultIterator, err error) - ListDataLakeStoreAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListDataLakeStoreResultPage, err error) - ListDataLakeStoreAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListDataLakeStoreResultIterator, err error) - ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.ListSasTokensResultPage, err error) - ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.ListSasTokensResultIterator, err error) - ListStorageAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListStorageAccountsResultPage, err error) - ListStorageAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListStorageAccountsResultIterator, err error) - ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.ListBlobContainersResultPage, err error) - ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.ListBlobContainersResultIterator, err error) - Update(ctx context.Context, resourceGroupName string, name string, parameters account.DataLakeAnalyticsAccount) (result account.UpdateFuture, err error) - UpdateStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters account.AddStorageAccountParameters) (result autorest.Response, err error) + GetDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result account.DataLakeStoreAccountInformation, err error) + GetStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageAccountInformation, err error) + GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.StorageContainer, err error) + List(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultIterator, err error) + ListDataLakeStoreAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountInformationListResultPage, err error) + ListDataLakeStoreAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountInformationListResultIterator, err error) + ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.SasTokenInformationListResultPage, err error) + ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.SasTokenInformationListResultIterator, err error) + ListStorageAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.StorageAccountInformationListResultPage, err error) + ListStorageAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.StorageAccountInformationListResultIterator, err error) + ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageContainerListResultPage, err error) + ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageContainerListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, accountName string, parameters *account.UpdateDataLakeAnalyticsAccountParameters) (result account.UpdateFuture, err error) + UpdateStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters *account.UpdateStorageAccountParameters) (result autorest.Response, err error) } var _ ClientAPI = (*account.Client)(nil) + +// ComputePoliciesClientAPI contains the set of methods on the ComputePoliciesClient type. +type ComputePoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters account.CreateOrUpdateComputePolicyParameters) (result account.ComputePolicy, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result account.ComputePolicy, err error) + ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.ComputePolicyListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.ComputePolicyListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters *account.UpdateComputePolicyParameters) (result account.ComputePolicy, err error) +} + +var _ ComputePoliciesClientAPI = (*account.ComputePoliciesClient)(nil) + +// FirewallRulesClientAPI contains the set of methods on the FirewallRulesClient type. +type FirewallRulesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters account.CreateOrUpdateFirewallRuleParameters) (result account.FirewallRule, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result account.FirewallRule, err error) + ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.FirewallRuleListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.FirewallRuleListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *account.UpdateFirewallRuleParameters) (result account.FirewallRule, err error) +} + +var _ FirewallRulesClientAPI = (*account.FirewallRulesClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result account.OperationListResult, err error) +} + +var _ OperationsClientAPI = (*account.OperationsClient)(nil) + +// LocationsClientAPI contains the set of methods on the LocationsClient type. +type LocationsClientAPI interface { + GetCapability(ctx context.Context, location string) (result account.CapabilityInformation, err error) +} + +var _ LocationsClientAPI = (*account.LocationsClient)(nil) + +// AccountsClientAPI contains the set of methods on the AccountsClient type. +type AccountsClientAPI interface { + CheckNameAvailability(ctx context.Context, location string, parameters account.CheckNameAvailabilityParameters) (result account.NameAvailabilityInformation, err error) +} + +var _ AccountsClientAPI = (*account.AccountsClient)(nil) diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accounts.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accounts.go new file mode 100644 index 000000000000..695d5e413392 --- /dev/null +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accounts.go @@ -0,0 +1,116 @@ +package account + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AccountsClient is the creates an Azure Data Lake Analytics account management client. +type AccountsClient struct { + BaseClient +} + +// NewAccountsClient creates an instance of the AccountsClient client. +func NewAccountsClient(subscriptionID string) AccountsClient { + return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { + return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability checks whether the specified account name is available or taken. +// Parameters: +// location - the resource location without whitespace. +// parameters - parameters supplied to check the Data Lake Analytics account name availability. +func (client AccountsClient) CheckNameAvailability(ctx context.Context, location string, parameters CheckNameAvailabilityParameters) (result NameAvailabilityInformation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.CheckNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("account.AccountsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.AccountsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.AccountsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.AccountsClient", "CheckNameAvailability", resp, "Failure responding to request") + return + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, location string, parameters CheckNameAvailabilityParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/checkNameAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response) (result NameAvailabilityInformation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/computepolicies.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/computepolicies.go new file mode 100644 index 000000000000..e703d93f0f75 --- /dev/null +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/computepolicies.go @@ -0,0 +1,485 @@ +package account + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ComputePoliciesClient is the creates an Azure Data Lake Analytics account management client. +type ComputePoliciesClient struct { + BaseClient +} + +// NewComputePoliciesClient creates an instance of the ComputePoliciesClient client. +func NewComputePoliciesClient(subscriptionID string) ComputePoliciesClient { + return NewComputePoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewComputePoliciesClientWithBaseURI creates an instance of the ComputePoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewComputePoliciesClientWithBaseURI(baseURI string, subscriptionID string) ComputePoliciesClient { + return ComputePoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified compute policy. During update, the compute policy with the specified +// name will be replaced with this new compute policy. An account supports, at most, 50 policies +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// computePolicyName - the name of the compute policy to create or update. +// parameters - parameters supplied to create or update the compute policy. The max degree of parallelism per +// job property, min priority per job property, or both must be present. +func (client ComputePoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters CreateOrUpdateComputePolicyParameters) (result ComputePolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.ObjectID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.CreateOrUpdateComputePolicyProperties.MaxDegreeOfParallelismPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, + {Target: "parameters.CreateOrUpdateComputePolicyProperties.MinPriorityPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("account.ComputePoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, computePolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ComputePoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters CreateOrUpdateComputePolicyParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", 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 ComputePoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ComputePolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified compute policy from the specified Data Lake Analytics account +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// computePolicyName - the name of the compute policy to delete. +func (client ComputePoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, computePolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ComputePoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", 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 ComputePoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Data Lake Analytics compute policy. +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// computePolicyName - the name of the compute policy to retrieve. +func (client ComputePoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result ComputePolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, computePolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ComputePoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", 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 ComputePoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) GetResponder(resp *http.Response) (result ComputePolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByAccount lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An +// account supports, at most, 50 policies +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +func (client ComputePoliciesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result ComputePolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.ListByAccount") + defer func() { + sc := -1 + if result.cplr.Response.Response != nil { + sc = result.cplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByAccountNextResults + req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByAccountSender(req) + if err != nil { + result.cplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", resp, "Failure sending request") + return + } + + result.cplr, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", resp, "Failure responding to request") + return + } + if result.cplr.hasNextLink() && result.cplr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByAccountPreparer prepares the ListByAccount request. +func (client ComputePoliciesClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByAccountSender sends the ListByAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ComputePoliciesClient) ListByAccountSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByAccountResponder handles the response to the ListByAccount request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) ListByAccountResponder(resp *http.Response) (result ComputePolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByAccountNextResults retrieves the next set of results, if any. +func (client ComputePoliciesClient) listByAccountNextResults(ctx context.Context, lastResults ComputePolicyListResult) (result ComputePolicyListResult, err error) { + req, err := lastResults.computePolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "listByAccountNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "listByAccountNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "listByAccountNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required. +func (client ComputePoliciesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result ComputePolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.ListByAccount") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName) + return +} + +// Update updates the specified compute policy. +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// computePolicyName - the name of the compute policy to update. +// parameters - parameters supplied to update the compute policy. +func (client ComputePoliciesClient) Update(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters *UpdateComputePolicyParameters) (result ComputePolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, computePolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ComputePoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters *UpdateComputePolicyParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + 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.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + 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 ComputePoliciesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) UpdateResponder(resp *http.Response) (result ComputePolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/enums.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/enums.go index c453233ce9e3..52cd913f4117 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/enums.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/enums.go @@ -6,6 +6,23 @@ package account // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// AADObjectType enumerates the values for aad object type. +type AADObjectType string + +const ( + // Group ... + Group AADObjectType = "Group" + // ServicePrincipal ... + ServicePrincipal AADObjectType = "ServicePrincipal" + // User ... + User AADObjectType = "User" +) + +// PossibleAADObjectTypeValues returns an array of possible values for the AADObjectType const type. +func PossibleAADObjectTypeValues() []AADObjectType { + return []AADObjectType{Group, ServicePrincipal, User} +} + // DataLakeAnalyticsAccountState enumerates the values for data lake analytics account state. type DataLakeAnalyticsAccountState string @@ -50,19 +67,150 @@ func PossibleDataLakeAnalyticsAccountStatusValues() []DataLakeAnalyticsAccountSt return []DataLakeAnalyticsAccountStatus{Creating, Deleted, Deleting, Failed, Patching, Resuming, Running, Succeeded, Suspending} } -// OperationStatus enumerates the values for operation status. -type OperationStatus string +// DebugDataAccessLevel enumerates the values for debug data access level. +type DebugDataAccessLevel string + +const ( + // All ... + All DebugDataAccessLevel = "All" + // Customer ... + Customer DebugDataAccessLevel = "Customer" + // None ... + None DebugDataAccessLevel = "None" +) + +// PossibleDebugDataAccessLevelValues returns an array of possible values for the DebugDataAccessLevel const type. +func PossibleDebugDataAccessLevelValues() []DebugDataAccessLevel { + return []DebugDataAccessLevel{All, Customer, None} +} + +// FirewallAllowAzureIpsState enumerates the values for firewall allow azure ips state. +type FirewallAllowAzureIpsState string + +const ( + // Disabled ... + Disabled FirewallAllowAzureIpsState = "Disabled" + // Enabled ... + Enabled FirewallAllowAzureIpsState = "Enabled" +) + +// PossibleFirewallAllowAzureIpsStateValues returns an array of possible values for the FirewallAllowAzureIpsState const type. +func PossibleFirewallAllowAzureIpsStateValues() []FirewallAllowAzureIpsState { + return []FirewallAllowAzureIpsState{Disabled, Enabled} +} + +// FirewallState enumerates the values for firewall state. +type FirewallState string + +const ( + // FirewallStateDisabled ... + FirewallStateDisabled FirewallState = "Disabled" + // FirewallStateEnabled ... + FirewallStateEnabled FirewallState = "Enabled" +) + +// PossibleFirewallStateValues returns an array of possible values for the FirewallState const type. +func PossibleFirewallStateValues() []FirewallState { + return []FirewallState{FirewallStateDisabled, FirewallStateEnabled} +} + +// NestedResourceProvisioningState enumerates the values for nested resource provisioning state. +type NestedResourceProvisioningState string + +const ( + // NestedResourceProvisioningStateCanceled ... + NestedResourceProvisioningStateCanceled NestedResourceProvisioningState = "Canceled" + // NestedResourceProvisioningStateFailed ... + NestedResourceProvisioningStateFailed NestedResourceProvisioningState = "Failed" + // NestedResourceProvisioningStateSucceeded ... + NestedResourceProvisioningStateSucceeded NestedResourceProvisioningState = "Succeeded" +) + +// PossibleNestedResourceProvisioningStateValues returns an array of possible values for the NestedResourceProvisioningState const type. +func PossibleNestedResourceProvisioningStateValues() []NestedResourceProvisioningState { + return []NestedResourceProvisioningState{NestedResourceProvisioningStateCanceled, NestedResourceProvisioningStateFailed, NestedResourceProvisioningStateSucceeded} +} + +// OperationOrigin enumerates the values for operation origin. +type OperationOrigin string + +const ( + // OperationOriginSystem ... + OperationOriginSystem OperationOrigin = "system" + // OperationOriginUser ... + OperationOriginUser OperationOrigin = "user" + // OperationOriginUsersystem ... + OperationOriginUsersystem OperationOrigin = "user,system" +) + +// PossibleOperationOriginValues returns an array of possible values for the OperationOrigin const type. +func PossibleOperationOriginValues() []OperationOrigin { + return []OperationOrigin{OperationOriginSystem, OperationOriginUser, OperationOriginUsersystem} +} + +// SubscriptionState enumerates the values for subscription state. +type SubscriptionState string + +const ( + // SubscriptionStateDeleted ... + SubscriptionStateDeleted SubscriptionState = "Deleted" + // SubscriptionStateRegistered ... + SubscriptionStateRegistered SubscriptionState = "Registered" + // SubscriptionStateSuspended ... + SubscriptionStateSuspended SubscriptionState = "Suspended" + // SubscriptionStateUnregistered ... + SubscriptionStateUnregistered SubscriptionState = "Unregistered" + // SubscriptionStateWarned ... + SubscriptionStateWarned SubscriptionState = "Warned" +) + +// PossibleSubscriptionStateValues returns an array of possible values for the SubscriptionState const type. +func PossibleSubscriptionStateValues() []SubscriptionState { + return []SubscriptionState{SubscriptionStateDeleted, SubscriptionStateRegistered, SubscriptionStateSuspended, SubscriptionStateUnregistered, SubscriptionStateWarned} +} + +// TierType enumerates the values for tier type. +type TierType string + +const ( + // Commitment100000AUHours ... + Commitment100000AUHours TierType = "Commitment_100000AUHours" + // Commitment10000AUHours ... + Commitment10000AUHours TierType = "Commitment_10000AUHours" + // Commitment1000AUHours ... + Commitment1000AUHours TierType = "Commitment_1000AUHours" + // Commitment100AUHours ... + Commitment100AUHours TierType = "Commitment_100AUHours" + // Commitment500000AUHours ... + Commitment500000AUHours TierType = "Commitment_500000AUHours" + // Commitment50000AUHours ... + Commitment50000AUHours TierType = "Commitment_50000AUHours" + // Commitment5000AUHours ... + Commitment5000AUHours TierType = "Commitment_5000AUHours" + // Commitment500AUHours ... + Commitment500AUHours TierType = "Commitment_500AUHours" + // Consumption ... + Consumption TierType = "Consumption" +) + +// PossibleTierTypeValues returns an array of possible values for the TierType const type. +func PossibleTierTypeValues() []TierType { + return []TierType{Commitment100000AUHours, Commitment10000AUHours, Commitment1000AUHours, Commitment100AUHours, Commitment500000AUHours, Commitment50000AUHours, Commitment5000AUHours, Commitment500AUHours, Consumption} +} + +// VirtualNetworkRuleState enumerates the values for virtual network rule state. +type VirtualNetworkRuleState string const ( - // OperationStatusFailed ... - OperationStatusFailed OperationStatus = "Failed" - // OperationStatusInProgress ... - OperationStatusInProgress OperationStatus = "InProgress" - // OperationStatusSucceeded ... - OperationStatusSucceeded OperationStatus = "Succeeded" + // VirtualNetworkRuleStateActive ... + VirtualNetworkRuleStateActive VirtualNetworkRuleState = "Active" + // VirtualNetworkRuleStateFailed ... + VirtualNetworkRuleStateFailed VirtualNetworkRuleState = "Failed" + // VirtualNetworkRuleStateNetworkSourceDeleted ... + VirtualNetworkRuleStateNetworkSourceDeleted VirtualNetworkRuleState = "NetworkSourceDeleted" ) -// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. -func PossibleOperationStatusValues() []OperationStatus { - return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} +// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type. +func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { + return []VirtualNetworkRuleState{VirtualNetworkRuleStateActive, VirtualNetworkRuleStateFailed, VirtualNetworkRuleStateNetworkSourceDeleted} } diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/firewallrules.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/firewallrules.go new file mode 100644 index 000000000000..1c0092bd1858 --- /dev/null +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/firewallrules.go @@ -0,0 +1,480 @@ +package account + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FirewallRulesClient is the creates an Azure Data Lake Analytics account management client. +type FirewallRulesClient struct { + BaseClient +} + +// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. +func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { + return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { + return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified firewall rule. During update, the firewall rule with the specified +// name will be replaced with this new firewall rule. +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// firewallRuleName - the name of the firewall rule to create or update. +// parameters - parameters supplied to create or update the firewall rule. +func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters CreateOrUpdateFirewallRuleParameters) (result FirewallRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateFirewallRuleProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateFirewallRuleProperties.StartIPAddress", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.CreateOrUpdateFirewallRuleProperties.EndIPAddress", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("account.FirewallRulesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, firewallRuleName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FirewallRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters CreateOrUpdateFirewallRuleParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "firewallRuleName": autorest.Encode("path", firewallRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}", 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 FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified firewall rule from the specified Data Lake Analytics account +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// firewallRuleName - the name of the firewall rule to delete. +func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, firewallRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FirewallRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "firewallRuleName": autorest.Encode("path", firewallRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}", 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 FirewallRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Data Lake Analytics firewall rule. +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// firewallRuleName - the name of the firewall rule to retrieve. +func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result FirewallRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, firewallRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client FirewallRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "firewallRuleName": autorest.Encode("path", firewallRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}", 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 FirewallRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FirewallRulesClient) GetResponder(resp *http.Response) (result FirewallRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByAccount lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +func (client FirewallRulesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result FirewallRuleListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByAccount") + defer func() { + sc := -1 + if result.frlr.Response.Response != nil { + sc = result.frlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByAccountNextResults + req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "ListByAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByAccountSender(req) + if err != nil { + result.frlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "ListByAccount", resp, "Failure sending request") + return + } + + result.frlr, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "ListByAccount", resp, "Failure responding to request") + return + } + if result.frlr.hasNextLink() && result.frlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByAccountPreparer prepares the ListByAccount request. +func (client FirewallRulesClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByAccountSender sends the ListByAccount request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallRulesClient) ListByAccountSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByAccountResponder handles the response to the ListByAccount request. The method always +// closes the http.Response Body. +func (client FirewallRulesClient) ListByAccountResponder(resp *http.Response) (result FirewallRuleListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByAccountNextResults retrieves the next set of results, if any. +func (client FirewallRulesClient) listByAccountNextResults(ctx context.Context, lastResults FirewallRuleListResult) (result FirewallRuleListResult, err error) { + req, err := lastResults.firewallRuleListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "account.FirewallRulesClient", "listByAccountNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "account.FirewallRulesClient", "listByAccountNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "listByAccountNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required. +func (client FirewallRulesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result FirewallRuleListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByAccount") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName) + return +} + +// Update updates the specified firewall rule. +// Parameters: +// resourceGroupName - the name of the Azure resource group. +// accountName - the name of the Data Lake Analytics account. +// firewallRuleName - the name of the firewall rule to update. +// parameters - parameters supplied to update the firewall rule. +func (client FirewallRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *UpdateFirewallRuleParameters) (result FirewallRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, firewallRuleName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client FirewallRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *UpdateFirewallRuleParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "firewallRuleName": autorest.Encode("path", firewallRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + 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.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + 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 FirewallRulesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client FirewallRulesClient) UpdateResponder(resp *http.Response) (result FirewallRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/locations.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/locations.go new file mode 100644 index 000000000000..5aa61b651cf1 --- /dev/null +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/locations.go @@ -0,0 +1,105 @@ +package account + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// LocationsClient is the creates an Azure Data Lake Analytics account management client. +type LocationsClient struct { + BaseClient +} + +// NewLocationsClient creates an instance of the LocationsClient client. +func NewLocationsClient(subscriptionID string) LocationsClient { + return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { + return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetCapability gets subscription-level properties and limits for Data Lake Analytics specified by resource location. +// Parameters: +// location - the resource location without whitespace. +func (client LocationsClient) GetCapability(ctx context.Context, location string) (result CapabilityInformation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocationsClient.GetCapability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetCapabilityPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "account.LocationsClient", "GetCapability", nil, "Failure preparing request") + return + } + + resp, err := client.GetCapabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.LocationsClient", "GetCapability", resp, "Failure sending request") + return + } + + result, err = client.GetCapabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.LocationsClient", "GetCapability", resp, "Failure responding to request") + return + } + + return +} + +// GetCapabilityPreparer prepares the GetCapability request. +func (client LocationsClient) GetCapabilityPreparer(ctx context.Context, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/locations/{location}/capability", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCapabilitySender sends the GetCapability request. The method will close the +// http.Response Body if it receives an error. +func (client LocationsClient) GetCapabilitySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetCapabilityResponder handles the response to the GetCapability request. The method always +// closes the http.Response Body. +func (client LocationsClient) GetCapabilityResponder(resp *http.Response) (result CapabilityInformation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go index e66cb7e049d2..c282292ed3c1 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/models.go @@ -14,181 +14,331 @@ import ( "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/tracing" + "github.com/gofrs/uuid" "net/http" ) // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account" -// AddDataLakeStoreParameters additional Data Lake Store parameters. +// AddDataLakeStoreParameters the parameters used to add a new Data Lake Store account. type AddDataLakeStoreParameters struct { - // Properties - the properties for the Data Lake Store account being added. - Properties *DataLakeStoreAccountInfoProperties `json:"properties,omitempty"` + // AddDataLakeStoreProperties - The Data Lake Store account properties to use when adding a new Data Lake Store account. + *AddDataLakeStoreProperties `json:"properties,omitempty"` } -// AddStorageAccountParameters additional Azure Storage account parameters. -type AddStorageAccountParameters struct { - // Properties - the properties for the Azure Storage account being added. - Properties *StorageAccountProperties `json:"properties,omitempty"` +// MarshalJSON is the custom marshaler for AddDataLakeStoreParameters. +func (adlsp AddDataLakeStoreParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if adlsp.AddDataLakeStoreProperties != nil { + objectMap["properties"] = adlsp.AddDataLakeStoreProperties + } + return json.Marshal(objectMap) } -// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, -// indicating whether it has succeeded, is inprogress, or has failed. Note that this status is distinct -// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous -// operation succeeded, the response body includes the HTTP status code for the successful request. If the -// asynchronous operation failed, the response body includes the HTTP status code for the failed request -// and error information regarding the failure. -type AzureAsyncOperationResult struct { - // Status - READ-ONLY; the status of the AzureAsyncOperation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' - Status OperationStatus `json:"status,omitempty"` - // Error - READ-ONLY - Error *Error `json:"error,omitempty"` +// UnmarshalJSON is the custom unmarshaler for AddDataLakeStoreParameters struct. +func (adlsp *AddDataLakeStoreParameters) 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 addDataLakeStoreProperties AddDataLakeStoreProperties + err = json.Unmarshal(*v, &addDataLakeStoreProperties) + if err != nil { + return err + } + adlsp.AddDataLakeStoreProperties = &addDataLakeStoreProperties + } + } + } + + return nil } -// MarshalJSON is the custom marshaler for AzureAsyncOperationResult. -func (aaor AzureAsyncOperationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// AddDataLakeStoreProperties the Data Lake Store account properties to use when adding a new Data Lake +// Store account. +type AddDataLakeStoreProperties struct { + // Suffix - The optional suffix for the Data Lake Store account. + Suffix *string `json:"suffix,omitempty"` } -// BlobContainer azure Storage blob container information. -type BlobContainer struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; the name of the blob container. +// AddDataLakeStoreWithAccountParameters the parameters used to add a new Data Lake Store account while +// creating a new Data Lake Analytics account. +type AddDataLakeStoreWithAccountParameters struct { + // Name - The unique name of the Data Lake Store account to add. Name *string `json:"name,omitempty"` - // ID - READ-ONLY; the unique identifier of the blob container. - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; the type of the blob container. - Type *string `json:"type,omitempty"` - // Properties - READ-ONLY; the properties of the blob container. - Properties *BlobContainerProperties `json:"properties,omitempty"` + // AddDataLakeStoreProperties - The Data Lake Store account properties to use when adding a new Data Lake Store account. + *AddDataLakeStoreProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for BlobContainer. -func (bc BlobContainer) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AddDataLakeStoreWithAccountParameters. +func (adlswap AddDataLakeStoreWithAccountParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if adlswap.Name != nil { + objectMap["name"] = adlswap.Name + } + if adlswap.AddDataLakeStoreProperties != nil { + objectMap["properties"] = adlswap.AddDataLakeStoreProperties + } return json.Marshal(objectMap) } -// BlobContainerProperties azure Storage blob container properties information. -type BlobContainerProperties struct { - // LastModifiedTime - READ-ONLY; the last modified time of the blob container. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` +// UnmarshalJSON is the custom unmarshaler for AddDataLakeStoreWithAccountParameters struct. +func (adlswap *AddDataLakeStoreWithAccountParameters) 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 + } + adlswap.Name = &name + } + case "properties": + if v != nil { + var addDataLakeStoreProperties AddDataLakeStoreProperties + err = json.Unmarshal(*v, &addDataLakeStoreProperties) + if err != nil { + return err + } + adlswap.AddDataLakeStoreProperties = &addDataLakeStoreProperties + } + } + } + + return nil } -// MarshalJSON is the custom marshaler for BlobContainerProperties. -func (bcp BlobContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) +// AddStorageAccountParameters the parameters used to add a new Azure Storage account. +type AddStorageAccountParameters struct { + // StorageAccountProperties - The Azure Storage account properties to use when adding a new Azure Storage account. + *StorageAccountProperties `json:"properties,omitempty"` } -// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type CreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(Client) (DataLakeAnalyticsAccount, error) +// MarshalJSON is the custom marshaler for AddStorageAccountParameters. +func (asap AddStorageAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asap.StorageAccountProperties != nil { + objectMap["properties"] = asap.StorageAccountProperties + } + return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *CreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { +// UnmarshalJSON is the custom unmarshaler for AddStorageAccountParameters struct. +func (asap *AddStorageAccountParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { return err } - future.FutureAPI = &azFuture - future.Result = future.result + for k, v := range m { + switch k { + case "properties": + if v != nil { + var storageAccountProperties StorageAccountProperties + err = json.Unmarshal(*v, &storageAccountProperties) + if err != nil { + return err + } + asap.StorageAccountProperties = &storageAccountProperties + } + } + } + return nil } -// result is the default implementation for CreateFuture.Result. -func (future *CreateFuture) result(client Client) (dlaa DataLakeAnalyticsAccount, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", future.Response(), "Polling failure") - return +// AddStorageAccountWithAccountParameters the parameters used to add a new Azure Storage account while +// creating a new Data Lake Analytics account. +type AddStorageAccountWithAccountParameters struct { + // Name - The unique name of the Azure Storage account to add. + Name *string `json:"name,omitempty"` + // StorageAccountProperties - The Azure Storage account properties to use when adding a new Azure Storage account. + *StorageAccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AddStorageAccountWithAccountParameters. +func (asawap AddStorageAccountWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asawap.Name != nil { + objectMap["name"] = asawap.Name } - if !done { - dlaa.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("account.CreateFuture") - return + if asawap.StorageAccountProperties != nil { + objectMap["properties"] = asawap.StorageAccountProperties } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent { - dlaa, err = client.CreateResponder(dlaa.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", dlaa.Response.Response, "Failure responding to request") + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AddStorageAccountWithAccountParameters struct. +func (asawap *AddStorageAccountWithAccountParameters) 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 + } + asawap.Name = &name + } + case "properties": + if v != nil { + var storageAccountProperties StorageAccountProperties + err = json.Unmarshal(*v, &storageAccountProperties) + if err != nil { + return err + } + asawap.StorageAccountProperties = &storageAccountProperties + } } } - return + + return nil } -// DataLakeAnalyticsAccount a Data Lake Analytics account object, containing all information associated -// with the named Data Lake Analytics account. -type DataLakeAnalyticsAccount struct { +// CapabilityInformation subscription-level properties and limits for Data Lake Analytics. +type CapabilityInformation struct { autorest.Response `json:"-"` - // Location - the account regional location. - Location *string `json:"location,omitempty"` - // Name - the account name. + // SubscriptionID - READ-ONLY; The subscription credentials that uniquely identifies the subscription. + SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"` + // State - READ-ONLY; The subscription state. Possible values include: 'SubscriptionStateRegistered', 'SubscriptionStateSuspended', 'SubscriptionStateDeleted', 'SubscriptionStateUnregistered', 'SubscriptionStateWarned' + State SubscriptionState `json:"state,omitempty"` + // MaxAccountCount - READ-ONLY; The maximum supported number of accounts under this subscription. + MaxAccountCount *int32 `json:"maxAccountCount,omitempty"` + // AccountCount - READ-ONLY; The current number of accounts under this subscription. + AccountCount *int32 `json:"accountCount,omitempty"` + // MigrationState - READ-ONLY; The Boolean value of true or false to indicate the maintenance state. + MigrationState *bool `json:"migrationState,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapabilityInformation. +func (ci CapabilityInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CheckNameAvailabilityParameters data Lake Analytics account name availability check parameters. +type CheckNameAvailabilityParameters struct { + // Name - The Data Lake Analytics name to check availability for. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; the namespace and type of the account. + // Type - The resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeAnalytics/accounts Type *string `json:"type,omitempty"` - // ID - READ-ONLY; the account subscription ID. +} + +// ComputePolicy data Lake Analytics compute policy information. +type ComputePolicy struct { + autorest.Response `json:"-"` + // ComputePolicyProperties - READ-ONLY; The compute policy properties. + *ComputePolicyProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. ID *string `json:"id,omitempty"` - // Tags - the value of custom properties. - Tags map[string]*string `json:"tags"` - // Properties - the properties defined by Data Lake Analytics all properties are specific to each resource provider. - Properties *DataLakeAnalyticsAccountProperties `json:"properties,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccount. -func (dlaa DataLakeAnalyticsAccount) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ComputePolicy. +func (cp ComputePolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if dlaa.Location != nil { - objectMap["location"] = dlaa.Location - } - if dlaa.Name != nil { - objectMap["name"] = dlaa.Name - } - if dlaa.Tags != nil { - objectMap["tags"] = dlaa.Tags + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ComputePolicy struct. +func (cp *ComputePolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - if dlaa.Properties != nil { - objectMap["properties"] = dlaa.Properties + for k, v := range m { + switch k { + case "properties": + if v != nil { + var computePolicyProperties ComputePolicyProperties + err = json.Unmarshal(*v, &computePolicyProperties) + if err != nil { + return err + } + cp.ComputePolicyProperties = &computePolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cp.Type = &typeVar + } + } } - return json.Marshal(objectMap) + + return nil } -// DataLakeAnalyticsAccountListDataLakeStoreResult data Lake Account list information. -type DataLakeAnalyticsAccountListDataLakeStoreResult struct { +// ComputePolicyListResult the list of compute policies in the account. +type ComputePolicyListResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY; the results of the list operation - Value *[]DataLakeStoreAccountInfo `json:"value,omitempty"` - // Count - READ-ONLY; total number of results. - Count *int32 `json:"count,omitempty"` - // NextLink - READ-ONLY; the link (url) to the next page of results. + // Value - READ-ONLY; The results of the list operation. + Value *[]ComputePolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountListDataLakeStoreResult. -func (dlaaldlsr DataLakeAnalyticsAccountListDataLakeStoreResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ComputePolicyListResult. +func (cplr ComputePolicyListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// DataLakeAnalyticsAccountListDataLakeStoreResultIterator provides access to a complete listing of -// DataLakeStoreAccountInfo values. -type DataLakeAnalyticsAccountListDataLakeStoreResultIterator struct { +// ComputePolicyListResultIterator provides access to a complete listing of ComputePolicy values. +type ComputePolicyListResultIterator struct { i int - page DataLakeAnalyticsAccountListDataLakeStoreResultPage + page ComputePolicyListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *DataLakeAnalyticsAccountListDataLakeStoreResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ComputePolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListDataLakeStoreResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -213,67 +363,67 @@ func (iter *DataLakeAnalyticsAccountListDataLakeStoreResultIterator) NextWithCon // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *DataLakeAnalyticsAccountListDataLakeStoreResultIterator) Next() error { +func (iter *ComputePolicyListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DataLakeAnalyticsAccountListDataLakeStoreResultIterator) NotDone() bool { +func (iter ComputePolicyListResultIterator) 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 DataLakeAnalyticsAccountListDataLakeStoreResultIterator) Response() DataLakeAnalyticsAccountListDataLakeStoreResult { +func (iter ComputePolicyListResultIterator) Response() ComputePolicyListResult { 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 DataLakeAnalyticsAccountListDataLakeStoreResultIterator) Value() DataLakeStoreAccountInfo { +func (iter ComputePolicyListResultIterator) Value() ComputePolicy { if !iter.page.NotDone() { - return DataLakeStoreAccountInfo{} + return ComputePolicy{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the DataLakeAnalyticsAccountListDataLakeStoreResultIterator type. -func NewDataLakeAnalyticsAccountListDataLakeStoreResultIterator(page DataLakeAnalyticsAccountListDataLakeStoreResultPage) DataLakeAnalyticsAccountListDataLakeStoreResultIterator { - return DataLakeAnalyticsAccountListDataLakeStoreResultIterator{page: page} +// Creates a new instance of the ComputePolicyListResultIterator type. +func NewComputePolicyListResultIterator(page ComputePolicyListResultPage) ComputePolicyListResultIterator { + return ComputePolicyListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (dlaaldlsr DataLakeAnalyticsAccountListDataLakeStoreResult) IsEmpty() bool { - return dlaaldlsr.Value == nil || len(*dlaaldlsr.Value) == 0 +func (cplr ComputePolicyListResult) IsEmpty() bool { + return cplr.Value == nil || len(*cplr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (dlaaldlsr DataLakeAnalyticsAccountListDataLakeStoreResult) hasNextLink() bool { - return dlaaldlsr.NextLink != nil && len(*dlaaldlsr.NextLink) != 0 +func (cplr ComputePolicyListResult) hasNextLink() bool { + return cplr.NextLink != nil && len(*cplr.NextLink) != 0 } -// dataLakeAnalyticsAccountListDataLakeStoreResultPreparer prepares a request to retrieve the next set of results. +// computePolicyListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (dlaaldlsr DataLakeAnalyticsAccountListDataLakeStoreResult) dataLakeAnalyticsAccountListDataLakeStoreResultPreparer(ctx context.Context) (*http.Request, error) { - if !dlaaldlsr.hasNextLink() { +func (cplr ComputePolicyListResult) computePolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if !cplr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(dlaaldlsr.NextLink))) + autorest.WithBaseURL(to.String(cplr.NextLink))) } -// DataLakeAnalyticsAccountListDataLakeStoreResultPage contains a page of DataLakeStoreAccountInfo values. -type DataLakeAnalyticsAccountListDataLakeStoreResultPage struct { - fn func(context.Context, DataLakeAnalyticsAccountListDataLakeStoreResult) (DataLakeAnalyticsAccountListDataLakeStoreResult, error) - dlaaldlsr DataLakeAnalyticsAccountListDataLakeStoreResult +// ComputePolicyListResultPage contains a page of ComputePolicy values. +type ComputePolicyListResultPage struct { + fn func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error) + cplr ComputePolicyListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *DataLakeAnalyticsAccountListDataLakeStoreResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ComputePolicyListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListDataLakeStoreResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -283,11 +433,11 @@ func (page *DataLakeAnalyticsAccountListDataLakeStoreResultPage) NextWithContext }() } for { - next, err := page.fn(ctx, page.dlaaldlsr) + next, err := page.fn(ctx, page.cplr) if err != nil { return err } - page.dlaaldlsr = next + page.cplr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -295,66 +445,1292 @@ func (page *DataLakeAnalyticsAccountListDataLakeStoreResultPage) NextWithContext return nil } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *DataLakeAnalyticsAccountListDataLakeStoreResultPage) Next() error { - return page.NextWithContext(context.Background()) +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ComputePolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ComputePolicyListResultPage) NotDone() bool { + return !page.cplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ComputePolicyListResultPage) Response() ComputePolicyListResult { + return page.cplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ComputePolicyListResultPage) Values() []ComputePolicy { + if page.cplr.IsEmpty() { + return nil + } + return *page.cplr.Value +} + +// Creates a new instance of the ComputePolicyListResultPage type. +func NewComputePolicyListResultPage(cur ComputePolicyListResult, getNextPage func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)) ComputePolicyListResultPage { + return ComputePolicyListResultPage{ + fn: getNextPage, + cplr: cur, + } +} + +// ComputePolicyProperties the compute policy properties. +type ComputePolicyProperties struct { + // ObjectID - READ-ONLY; The AAD object identifier for the entity to create a policy for. + ObjectID *uuid.UUID `json:"objectId,omitempty"` + // ObjectType - READ-ONLY; The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + ObjectType AADObjectType `json:"objectType,omitempty"` + // MaxDegreeOfParallelismPerJob - READ-ONLY; The maximum degree of parallelism per job this user can use to submit jobs. + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + // MinPriorityPerJob - READ-ONLY; The minimum priority per job this user can use to submit jobs. + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` +} + +// MarshalJSON is the custom marshaler for ComputePolicyProperties. +func (cpp ComputePolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CreateComputePolicyWithAccountParameters the parameters used to create a new compute policy while +// creating a new Data Lake Analytics account. +type CreateComputePolicyWithAccountParameters struct { + // Name - The unique name of the compute policy to create. + Name *string `json:"name,omitempty"` + // CreateOrUpdateComputePolicyProperties - The compute policy properties to use when creating a new compute policy. + *CreateOrUpdateComputePolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreateComputePolicyWithAccountParameters. +func (ccpwap CreateComputePolicyWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ccpwap.Name != nil { + objectMap["name"] = ccpwap.Name + } + if ccpwap.CreateOrUpdateComputePolicyProperties != nil { + objectMap["properties"] = ccpwap.CreateOrUpdateComputePolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CreateComputePolicyWithAccountParameters struct. +func (ccpwap *CreateComputePolicyWithAccountParameters) 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 + } + ccpwap.Name = &name + } + case "properties": + if v != nil { + var createOrUpdateComputePolicyProperties CreateOrUpdateComputePolicyProperties + err = json.Unmarshal(*v, &createOrUpdateComputePolicyProperties) + if err != nil { + return err + } + ccpwap.CreateOrUpdateComputePolicyProperties = &createOrUpdateComputePolicyProperties + } + } + } + + return nil +} + +// CreateDataLakeAnalyticsAccountParameters the parameters to use for creating a Data Lake Analytics +// account. +type CreateDataLakeAnalyticsAccountParameters struct { + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // CreateDataLakeAnalyticsAccountProperties - The Data Lake Analytics account properties to use for creating. + *CreateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreateDataLakeAnalyticsAccountParameters. +func (cdlaap CreateDataLakeAnalyticsAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cdlaap.Location != nil { + objectMap["location"] = cdlaap.Location + } + if cdlaap.Tags != nil { + objectMap["tags"] = cdlaap.Tags + } + if cdlaap.CreateDataLakeAnalyticsAccountProperties != nil { + objectMap["properties"] = cdlaap.CreateDataLakeAnalyticsAccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CreateDataLakeAnalyticsAccountParameters struct. +func (cdlaap *CreateDataLakeAnalyticsAccountParameters) 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 "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cdlaap.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cdlaap.Tags = tags + } + case "properties": + if v != nil { + var createDataLakeAnalyticsAccountProperties CreateDataLakeAnalyticsAccountProperties + err = json.Unmarshal(*v, &createDataLakeAnalyticsAccountProperties) + if err != nil { + return err + } + cdlaap.CreateDataLakeAnalyticsAccountProperties = &createDataLakeAnalyticsAccountProperties + } + } + } + + return nil +} + +// CreateDataLakeAnalyticsAccountProperties ... +type CreateDataLakeAnalyticsAccountProperties struct { + // DefaultDataLakeStoreAccount - The default Data Lake Store account associated with this account. + DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"` + // DataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account. + DataLakeStoreAccounts *[]AddDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"` + // StorageAccounts - The list of Azure Blob Storage accounts associated with this account. + StorageAccounts *[]AddStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"` + // ComputePolicies - The list of compute policies associated with this account. + ComputePolicies *[]CreateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"` + // FirewallRules - The list of firewall rules associated with this account. + FirewallRules *[]CreateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"` + // FirewallState - The current state of the IP address firewall for this account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' + FirewallState FirewallState `json:"firewallState,omitempty"` + // FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` + // NewTier - The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' + NewTier TierType `json:"newTier,omitempty"` + // MaxJobCount - The maximum supported jobs running under the account at the same time. + MaxJobCount *int32 `json:"maxJobCount,omitempty"` + // MaxDegreeOfParallelism - The maximum supported degree of parallelism for this account. + MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` + // MaxDegreeOfParallelismPerJob - The maximum supported degree of parallelism per job for this account. + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + // MinPriorityPerJob - The minimum supported priority per job for this account. + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` + // QueryStoreRetention - The number of days that job metadata is retained. + QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` +} + +// CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating +// a new Data Lake Analytics account. +type CreateFirewallRuleWithAccountParameters struct { + // Name - The unique name of the firewall rule to create. + Name *string `json:"name,omitempty"` + // CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule. + *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreateFirewallRuleWithAccountParameters. +func (cfrwap CreateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cfrwap.Name != nil { + objectMap["name"] = cfrwap.Name + } + if cfrwap.CreateOrUpdateFirewallRuleProperties != nil { + objectMap["properties"] = cfrwap.CreateOrUpdateFirewallRuleProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CreateFirewallRuleWithAccountParameters struct. +func (cfrwap *CreateFirewallRuleWithAccountParameters) 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 + } + cfrwap.Name = &name + } + case "properties": + if v != nil { + var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties + err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties) + if err != nil { + return err + } + cfrwap.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties + } + } + } + + return nil +} + +// CreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type CreateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(Client) (DataLakeAnalyticsAccount, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CreateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CreateFuture.Result. +func (future *CreateFuture) result(client Client) (dlaa DataLakeAnalyticsAccount, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + dlaa.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("account.CreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent { + dlaa, err = client.CreateResponder(dlaa.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "account.CreateFuture", "Result", dlaa.Response.Response, "Failure responding to request") + } + } + return +} + +// CreateOrUpdateComputePolicyParameters the parameters used to create a new compute policy. +type CreateOrUpdateComputePolicyParameters struct { + // CreateOrUpdateComputePolicyProperties - The compute policy properties to use when creating a new compute policy. + *CreateOrUpdateComputePolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreateOrUpdateComputePolicyParameters. +func (coucpp CreateOrUpdateComputePolicyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if coucpp.CreateOrUpdateComputePolicyProperties != nil { + objectMap["properties"] = coucpp.CreateOrUpdateComputePolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateComputePolicyParameters struct. +func (coucpp *CreateOrUpdateComputePolicyParameters) 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 createOrUpdateComputePolicyProperties CreateOrUpdateComputePolicyProperties + err = json.Unmarshal(*v, &createOrUpdateComputePolicyProperties) + if err != nil { + return err + } + coucpp.CreateOrUpdateComputePolicyProperties = &createOrUpdateComputePolicyProperties + } + } + } + + return nil +} + +// CreateOrUpdateComputePolicyProperties the compute policy properties to use when creating a new compute +// policy. +type CreateOrUpdateComputePolicyProperties struct { + // ObjectID - The AAD object identifier for the entity to create a policy for. + ObjectID *uuid.UUID `json:"objectId,omitempty"` + // ObjectType - The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + ObjectType AADObjectType `json:"objectType,omitempty"` + // MaxDegreeOfParallelismPerJob - The maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + // MinPriorityPerJob - The minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` +} + +// CreateOrUpdateFirewallRuleParameters the parameters used to create a new firewall rule. +type CreateOrUpdateFirewallRuleParameters struct { + // CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule. + *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CreateOrUpdateFirewallRuleParameters. +func (coufrp CreateOrUpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if coufrp.CreateOrUpdateFirewallRuleProperties != nil { + objectMap["properties"] = coufrp.CreateOrUpdateFirewallRuleProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateFirewallRuleParameters struct. +func (coufrp *CreateOrUpdateFirewallRuleParameters) 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 createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties + err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties) + if err != nil { + return err + } + coufrp.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties + } + } + } + + return nil +} + +// CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall +// rule. +type CreateOrUpdateFirewallRuleProperties struct { + // StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + StartIPAddress *string `json:"startIpAddress,omitempty"` + // EndIPAddress - The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + EndIPAddress *string `json:"endIpAddress,omitempty"` +} + +// DataLakeAnalyticsAccount a Data Lake Analytics account object, containing all information associated +// with the named Data Lake Analytics account. +type DataLakeAnalyticsAccount struct { + autorest.Response `json:"-"` + // DataLakeAnalyticsAccountProperties - READ-ONLY; The properties defined by Data Lake Analytics all properties are specific to each resource provider. + *DataLakeAnalyticsAccountProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; The resource location. + Location *string `json:"location,omitempty"` + // Tags - READ-ONLY; The resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccount. +func (dlaa DataLakeAnalyticsAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DataLakeAnalyticsAccount struct. +func (dlaa *DataLakeAnalyticsAccount) 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 dataLakeAnalyticsAccountProperties DataLakeAnalyticsAccountProperties + err = json.Unmarshal(*v, &dataLakeAnalyticsAccountProperties) + if err != nil { + return err + } + dlaa.DataLakeAnalyticsAccountProperties = &dataLakeAnalyticsAccountProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dlaa.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dlaa.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dlaa.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dlaa.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dlaa.Tags = tags + } + } + } + + return nil +} + +// DataLakeAnalyticsAccountBasic a Data Lake Analytics account object, containing all information +// associated with the named Data Lake Analytics account. +type DataLakeAnalyticsAccountBasic struct { + // DataLakeAnalyticsAccountPropertiesBasic - READ-ONLY; The properties defined by Data Lake Analytics all properties are specific to each resource provider. + *DataLakeAnalyticsAccountPropertiesBasic `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; The resource location. + Location *string `json:"location,omitempty"` + // Tags - READ-ONLY; The resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountBasic. +func (dlaab DataLakeAnalyticsAccountBasic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DataLakeAnalyticsAccountBasic struct. +func (dlaab *DataLakeAnalyticsAccountBasic) 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 dataLakeAnalyticsAccountPropertiesBasic DataLakeAnalyticsAccountPropertiesBasic + err = json.Unmarshal(*v, &dataLakeAnalyticsAccountPropertiesBasic) + if err != nil { + return err + } + dlaab.DataLakeAnalyticsAccountPropertiesBasic = &dataLakeAnalyticsAccountPropertiesBasic + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dlaab.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dlaab.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dlaab.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dlaab.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dlaab.Tags = tags + } + } + } + + return nil +} + +// DataLakeAnalyticsAccountListResult data Lake Analytics account list information. +type DataLakeAnalyticsAccountListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The results of the list operation. + Value *[]DataLakeAnalyticsAccount `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountListResult. +func (dlaalr DataLakeAnalyticsAccountListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DataLakeAnalyticsAccountListResultIterator provides access to a complete listing of +// DataLakeAnalyticsAccount values. +type DataLakeAnalyticsAccountListResultIterator struct { + i int + page DataLakeAnalyticsAccountListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *DataLakeAnalyticsAccountListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DataLakeAnalyticsAccountListResultIterator) 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 DataLakeAnalyticsAccountListResultIterator) Response() DataLakeAnalyticsAccountListResult { + 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 DataLakeAnalyticsAccountListResultIterator) Value() DataLakeAnalyticsAccount { + if !iter.page.NotDone() { + return DataLakeAnalyticsAccount{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DataLakeAnalyticsAccountListResultIterator type. +func NewDataLakeAnalyticsAccountListResultIterator(page DataLakeAnalyticsAccountListResultPage) DataLakeAnalyticsAccountListResultIterator { + return DataLakeAnalyticsAccountListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dlaalr DataLakeAnalyticsAccountListResult) IsEmpty() bool { + return dlaalr.Value == nil || len(*dlaalr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dlaalr DataLakeAnalyticsAccountListResult) hasNextLink() bool { + return dlaalr.NextLink != nil && len(*dlaalr.NextLink) != 0 +} + +// dataLakeAnalyticsAccountListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dlaalr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dlaalr.NextLink))) +} + +// DataLakeAnalyticsAccountListResultPage contains a page of DataLakeAnalyticsAccount values. +type DataLakeAnalyticsAccountListResultPage struct { + fn func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error) + dlaalr DataLakeAnalyticsAccountListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dlaalr) + if err != nil { + return err + } + page.dlaalr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DataLakeAnalyticsAccountListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DataLakeAnalyticsAccountListResultPage) NotDone() bool { + return !page.dlaalr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DataLakeAnalyticsAccountListResultPage) Response() DataLakeAnalyticsAccountListResult { + return page.dlaalr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DataLakeAnalyticsAccountListResultPage) Values() []DataLakeAnalyticsAccount { + if page.dlaalr.IsEmpty() { + return nil + } + return *page.dlaalr.Value +} + +// Creates a new instance of the DataLakeAnalyticsAccountListResultPage type. +func NewDataLakeAnalyticsAccountListResultPage(cur DataLakeAnalyticsAccountListResult, getNextPage func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)) DataLakeAnalyticsAccountListResultPage { + return DataLakeAnalyticsAccountListResultPage{ + fn: getNextPage, + dlaalr: cur, + } +} + +// DataLakeAnalyticsAccountProperties the account specific properties that are associated with an +// underlying Data Lake Analytics account. Returned only when retrieving a specific account. +type DataLakeAnalyticsAccountProperties struct { + // DefaultDataLakeStoreAccount - READ-ONLY; The default Data Lake Store account associated with this account. + DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"` + // DataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account. + DataLakeStoreAccounts *[]DataLakeStoreAccountInformation `json:"dataLakeStoreAccounts,omitempty"` + // PublicDataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account. + PublicDataLakeStoreAccounts *[]DataLakeStoreAccountInformation `json:"publicDataLakeStoreAccounts,omitempty"` + // StorageAccounts - READ-ONLY; The list of Azure Blob Storage accounts associated with this account. + StorageAccounts *[]StorageAccountInformation `json:"storageAccounts,omitempty"` + // ComputePolicies - READ-ONLY; The list of compute policies associated with this account. + ComputePolicies *[]ComputePolicy `json:"computePolicies,omitempty"` + // HiveMetastores - READ-ONLY; The list of hiveMetastores associated with this account. + HiveMetastores *[]HiveMetastore `json:"hiveMetastores,omitempty"` + // HierarchicalQueueState - READ-ONLY; The hierarchical queue state associated with this account. + HierarchicalQueueState *string `json:"hierarchicalQueueState,omitempty"` + // VirtualNetworkRules - READ-ONLY; The list of virtualNetwork rules associated with this account. + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + // FirewallRules - READ-ONLY; The list of firewall rules associated with this account. + FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` + // FirewallState - The current state of the IP address firewall for this account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' + FirewallState FirewallState `json:"firewallState,omitempty"` + // FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` + // NewTier - The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' + NewTier TierType `json:"newTier,omitempty"` + // CurrentTier - READ-ONLY; The commitment tier in use for the current month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' + CurrentTier TierType `json:"currentTier,omitempty"` + // MaxJobCount - The maximum supported jobs running under the account at the same time. + MaxJobCount *int32 `json:"maxJobCount,omitempty"` + // SystemMaxJobCount - READ-ONLY; The system defined maximum supported jobs running under the account at the same time, which restricts the maximum number of running jobs the user can set for the account. + SystemMaxJobCount *int32 `json:"systemMaxJobCount,omitempty"` + // MaxDegreeOfParallelism - The maximum supported degree of parallelism for this account. + MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` + // SystemMaxDegreeOfParallelism - READ-ONLY; The system defined maximum supported degree of parallelism for this account, which restricts the maximum value of parallelism the user can set for the account. + SystemMaxDegreeOfParallelism *int32 `json:"systemMaxDegreeOfParallelism,omitempty"` + // MaxDegreeOfParallelismPerJob - The maximum supported degree of parallelism per job for this account. + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + // MinPriorityPerJob - READ-ONLY; The minimum supported priority per job for this account. + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` + // QueryStoreRetention - The number of days that job metadata is retained. + QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` + // DebugDataAccessLevel - READ-ONLY; The current state of the DebugDataAccessLevel for this account. Possible values include: 'All', 'Customer', 'None' + DebugDataAccessLevel DebugDataAccessLevel `json:"debugDataAccessLevel,omitempty"` + // AccountID - READ-ONLY; The unique identifier associated with this Data Lake Analytics account. + AccountID *uuid.UUID `json:"accountId,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted' + ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"` + // State - READ-ONLY; The state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended' + State DataLakeAnalyticsAccountState `json:"state,omitempty"` + // CreationTime - READ-ONLY; The account creation time. + CreationTime *date.Time `json:"creationTime,omitempty"` + // LastModifiedTime - READ-ONLY; The account last modified time. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Endpoint - READ-ONLY; The full CName endpoint for this account. + Endpoint *string `json:"endpoint,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountProperties. +func (dlaap DataLakeAnalyticsAccountProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dlaap.DataLakeStoreAccounts != nil { + objectMap["dataLakeStoreAccounts"] = dlaap.DataLakeStoreAccounts + } + if dlaap.PublicDataLakeStoreAccounts != nil { + objectMap["publicDataLakeStoreAccounts"] = dlaap.PublicDataLakeStoreAccounts + } + if dlaap.FirewallState != "" { + objectMap["firewallState"] = dlaap.FirewallState + } + if dlaap.FirewallAllowAzureIps != "" { + objectMap["firewallAllowAzureIps"] = dlaap.FirewallAllowAzureIps + } + if dlaap.NewTier != "" { + objectMap["newTier"] = dlaap.NewTier + } + if dlaap.MaxJobCount != nil { + objectMap["maxJobCount"] = dlaap.MaxJobCount + } + if dlaap.MaxDegreeOfParallelism != nil { + objectMap["maxDegreeOfParallelism"] = dlaap.MaxDegreeOfParallelism + } + if dlaap.MaxDegreeOfParallelismPerJob != nil { + objectMap["maxDegreeOfParallelismPerJob"] = dlaap.MaxDegreeOfParallelismPerJob + } + if dlaap.QueryStoreRetention != nil { + objectMap["queryStoreRetention"] = dlaap.QueryStoreRetention + } + return json.Marshal(objectMap) +} + +// DataLakeAnalyticsAccountPropertiesBasic the basic account specific properties that are associated with +// an underlying Data Lake Analytics account. +type DataLakeAnalyticsAccountPropertiesBasic struct { + // AccountID - READ-ONLY; The unique identifier associated with this Data Lake Analytics account. + AccountID *uuid.UUID `json:"accountId,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted' + ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"` + // State - READ-ONLY; The state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended' + State DataLakeAnalyticsAccountState `json:"state,omitempty"` + // CreationTime - READ-ONLY; The account creation time. + CreationTime *date.Time `json:"creationTime,omitempty"` + // LastModifiedTime - READ-ONLY; The account last modified time. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Endpoint - READ-ONLY; The full CName endpoint for this account. + Endpoint *string `json:"endpoint,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountPropertiesBasic. +func (dlaapb DataLakeAnalyticsAccountPropertiesBasic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DataLakeStoreAccountInfoProperties the Data Lake Store account properties. +type DataLakeStoreAccountInfoProperties struct { + // Suffix - READ-ONLY; The optional suffix for the Data Lake Store account. + Suffix *string `json:"suffix,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataLakeStoreAccountInfoProperties. +func (dlsaip DataLakeStoreAccountInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DataLakeStoreAccountInformation data Lake Store account information. +type DataLakeStoreAccountInformation struct { + autorest.Response `json:"-"` + // DataLakeStoreAccountInfoProperties - READ-ONLY; The Data Lake Store account properties. + *DataLakeStoreAccountInfoProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataLakeStoreAccountInformation. +func (dlsai DataLakeStoreAccountInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DataLakeStoreAccountInformation struct. +func (dlsai *DataLakeStoreAccountInformation) 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 dataLakeStoreAccountInfoProperties DataLakeStoreAccountInfoProperties + err = json.Unmarshal(*v, &dataLakeStoreAccountInfoProperties) + if err != nil { + return err + } + dlsai.DataLakeStoreAccountInfoProperties = &dataLakeStoreAccountInfoProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dlsai.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dlsai.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dlsai.Type = &typeVar + } + } + } + + return nil +} + +// DataLakeStoreAccountInformationListResult data Lake Store account list information. +type DataLakeStoreAccountInformationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The results of the list operation. + Value *[]DataLakeStoreAccountInformation `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataLakeStoreAccountInformationListResult. +func (dlsailr DataLakeStoreAccountInformationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// DataLakeStoreAccountInformationListResultIterator provides access to a complete listing of +// DataLakeStoreAccountInformation values. +type DataLakeStoreAccountInformationListResultIterator struct { + i int + page DataLakeStoreAccountInformationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *DataLakeStoreAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *DataLakeStoreAccountInformationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DataLakeStoreAccountInformationListResultIterator) 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 DataLakeStoreAccountInformationListResultIterator) Response() DataLakeStoreAccountInformationListResult { + 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 DataLakeStoreAccountInformationListResultIterator) Value() DataLakeStoreAccountInformation { + if !iter.page.NotDone() { + return DataLakeStoreAccountInformation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DataLakeStoreAccountInformationListResultIterator type. +func NewDataLakeStoreAccountInformationListResultIterator(page DataLakeStoreAccountInformationListResultPage) DataLakeStoreAccountInformationListResultIterator { + return DataLakeStoreAccountInformationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dlsailr DataLakeStoreAccountInformationListResult) IsEmpty() bool { + return dlsailr.Value == nil || len(*dlsailr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dlsailr DataLakeStoreAccountInformationListResult) hasNextLink() bool { + return dlsailr.NextLink != nil && len(*dlsailr.NextLink) != 0 +} + +// dataLakeStoreAccountInformationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dlsailr DataLakeStoreAccountInformationListResult) dataLakeStoreAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !dlsailr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dlsailr.NextLink))) +} + +// DataLakeStoreAccountInformationListResultPage contains a page of DataLakeStoreAccountInformation values. +type DataLakeStoreAccountInformationListResultPage struct { + fn func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error) + dlsailr DataLakeStoreAccountInformationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DataLakeStoreAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dlsailr) + if err != nil { + return err + } + page.dlsailr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DataLakeStoreAccountInformationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DataLakeStoreAccountInformationListResultPage) NotDone() bool { + return !page.dlsailr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DataLakeStoreAccountInformationListResultPage) Response() DataLakeStoreAccountInformationListResult { + return page.dlsailr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DataLakeStoreAccountInformationListResultPage) Values() []DataLakeStoreAccountInformation { + if page.dlsailr.IsEmpty() { + return nil + } + return *page.dlsailr.Value +} + +// Creates a new instance of the DataLakeStoreAccountInformationListResultPage type. +func NewDataLakeStoreAccountInformationListResultPage(cur DataLakeStoreAccountInformationListResult, getNextPage func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)) DataLakeStoreAccountInformationListResultPage { + return DataLakeStoreAccountInformationListResultPage{ + fn: getNextPage, + dlsailr: cur, + } +} + +// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type DeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(Client) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DeleteFuture.Result. +func (future *DeleteFuture) result(client Client) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("account.DeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorDetail the error detail. +type ErrorDetail struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]ErrorDetail `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorDetail. +func (ed ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DataLakeAnalyticsAccountListDataLakeStoreResultPage) NotDone() bool { - return !page.dlaaldlsr.IsEmpty() +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.). +type ErrorResponse struct { + // Error - The error object. + Error *ErrorDetail `json:"error,omitempty"` } -// Response returns the raw server response from the last page request. -func (page DataLakeAnalyticsAccountListDataLakeStoreResultPage) Response() DataLakeAnalyticsAccountListDataLakeStoreResult { - return page.dlaaldlsr +// FirewallRule data Lake Analytics firewall rule information. +type FirewallRule struct { + autorest.Response `json:"-"` + // FirewallRuleProperties - READ-ONLY; The firewall rule properties. + *FirewallRuleProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page DataLakeAnalyticsAccountListDataLakeStoreResultPage) Values() []DataLakeStoreAccountInfo { - if page.dlaaldlsr.IsEmpty() { - return nil - } - return *page.dlaaldlsr.Value +// MarshalJSON is the custom marshaler for FirewallRule. +func (fr FirewallRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) } -// Creates a new instance of the DataLakeAnalyticsAccountListDataLakeStoreResultPage type. -func NewDataLakeAnalyticsAccountListDataLakeStoreResultPage(cur DataLakeAnalyticsAccountListDataLakeStoreResult, getNextPage func(context.Context, DataLakeAnalyticsAccountListDataLakeStoreResult) (DataLakeAnalyticsAccountListDataLakeStoreResult, error)) DataLakeAnalyticsAccountListDataLakeStoreResultPage { - return DataLakeAnalyticsAccountListDataLakeStoreResultPage{ - fn: getNextPage, - dlaaldlsr: cur, +// UnmarshalJSON is the custom unmarshaler for FirewallRule struct. +func (fr *FirewallRule) 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 firewallRuleProperties FirewallRuleProperties + err = json.Unmarshal(*v, &firewallRuleProperties) + if err != nil { + return err + } + fr.FirewallRuleProperties = &firewallRuleProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fr.Type = &typeVar + } + } } + + return nil } -// DataLakeAnalyticsAccountListResult dataLakeAnalytics Account list information. -type DataLakeAnalyticsAccountListResult struct { +// FirewallRuleListResult data Lake Analytics firewall rule list information. +type FirewallRuleListResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY; the results of the list operation - Value *[]DataLakeAnalyticsAccount `json:"value,omitempty"` - // NextLink - READ-ONLY; the link (url) to the next page of results. + // Value - READ-ONLY; The results of the list operation. + Value *[]FirewallRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountListResult. -func (dlaalr DataLakeAnalyticsAccountListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for FirewallRuleListResult. +func (frlr FirewallRuleListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// DataLakeAnalyticsAccountListResultIterator provides access to a complete listing of -// DataLakeAnalyticsAccount values. -type DataLakeAnalyticsAccountListResultIterator struct { +// FirewallRuleListResultIterator provides access to a complete listing of FirewallRule values. +type FirewallRuleListResultIterator struct { i int - page DataLakeAnalyticsAccountListResultPage + page FirewallRuleListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *DataLakeAnalyticsAccountListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *FirewallRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -379,67 +1755,67 @@ func (iter *DataLakeAnalyticsAccountListResultIterator) NextWithContext(ctx cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error { +func (iter *FirewallRuleListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DataLakeAnalyticsAccountListResultIterator) NotDone() bool { +func (iter FirewallRuleListResultIterator) 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 DataLakeAnalyticsAccountListResultIterator) Response() DataLakeAnalyticsAccountListResult { +func (iter FirewallRuleListResultIterator) Response() FirewallRuleListResult { 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 DataLakeAnalyticsAccountListResultIterator) Value() DataLakeAnalyticsAccount { +func (iter FirewallRuleListResultIterator) Value() FirewallRule { if !iter.page.NotDone() { - return DataLakeAnalyticsAccount{} + return FirewallRule{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the DataLakeAnalyticsAccountListResultIterator type. -func NewDataLakeAnalyticsAccountListResultIterator(page DataLakeAnalyticsAccountListResultPage) DataLakeAnalyticsAccountListResultIterator { - return DataLakeAnalyticsAccountListResultIterator{page: page} +// Creates a new instance of the FirewallRuleListResultIterator type. +func NewFirewallRuleListResultIterator(page FirewallRuleListResultPage) FirewallRuleListResultIterator { + return FirewallRuleListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (dlaalr DataLakeAnalyticsAccountListResult) IsEmpty() bool { - return dlaalr.Value == nil || len(*dlaalr.Value) == 0 +func (frlr FirewallRuleListResult) IsEmpty() bool { + return frlr.Value == nil || len(*frlr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (dlaalr DataLakeAnalyticsAccountListResult) hasNextLink() bool { - return dlaalr.NextLink != nil && len(*dlaalr.NextLink) != 0 +func (frlr FirewallRuleListResult) hasNextLink() bool { + return frlr.NextLink != nil && len(*frlr.NextLink) != 0 } -// dataLakeAnalyticsAccountListResultPreparer prepares a request to retrieve the next set of results. +// firewallRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListResultPreparer(ctx context.Context) (*http.Request, error) { - if !dlaalr.hasNextLink() { +func (frlr FirewallRuleListResult) firewallRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if !frlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(dlaalr.NextLink))) + autorest.WithBaseURL(to.String(frlr.NextLink))) } -// DataLakeAnalyticsAccountListResultPage contains a page of DataLakeAnalyticsAccount values. -type DataLakeAnalyticsAccountListResultPage struct { - fn func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error) - dlaalr DataLakeAnalyticsAccountListResult +// FirewallRuleListResultPage contains a page of FirewallRule values. +type FirewallRuleListResultPage struct { + fn func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error) + frlr FirewallRuleListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *FirewallRuleListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -449,11 +1825,11 @@ func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context. }() } for { - next, err := page.fn(ctx, page.dlaalr) + next, err := page.fn(ctx, page.frlr) if err != nil { return err } - page.dlaalr = next + page.frlr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -464,65 +1840,331 @@ func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context. // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *DataLakeAnalyticsAccountListResultPage) Next() error { +func (page *FirewallRuleListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DataLakeAnalyticsAccountListResultPage) NotDone() bool { - return !page.dlaalr.IsEmpty() +func (page FirewallRuleListResultPage) NotDone() bool { + return !page.frlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page DataLakeAnalyticsAccountListResultPage) Response() DataLakeAnalyticsAccountListResult { - return page.dlaalr +func (page FirewallRuleListResultPage) Response() FirewallRuleListResult { + return page.frlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page DataLakeAnalyticsAccountListResultPage) Values() []DataLakeAnalyticsAccount { - if page.dlaalr.IsEmpty() { +func (page FirewallRuleListResultPage) Values() []FirewallRule { + if page.frlr.IsEmpty() { return nil } - return *page.dlaalr.Value + return *page.frlr.Value } -// Creates a new instance of the DataLakeAnalyticsAccountListResultPage type. -func NewDataLakeAnalyticsAccountListResultPage(cur DataLakeAnalyticsAccountListResult, getNextPage func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)) DataLakeAnalyticsAccountListResultPage { - return DataLakeAnalyticsAccountListResultPage{ - fn: getNextPage, - dlaalr: cur, +// Creates a new instance of the FirewallRuleListResultPage type. +func NewFirewallRuleListResultPage(cur FirewallRuleListResult, getNextPage func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage { + return FirewallRuleListResultPage{ + fn: getNextPage, + frlr: cur, + } +} + +// FirewallRuleProperties the firewall rule properties. +type FirewallRuleProperties struct { + // StartIPAddress - READ-ONLY; The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + StartIPAddress *string `json:"startIpAddress,omitempty"` + // EndIPAddress - READ-ONLY; The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + EndIPAddress *string `json:"endIpAddress,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallRuleProperties. +func (frp FirewallRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// HiveMetastore ... +type HiveMetastore struct { + // HiveMetastoreProperties - READ-ONLY; The HiveMetastoreProperties rule properties. + *HiveMetastoreProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for HiveMetastore. +func (hm HiveMetastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HiveMetastore struct. +func (hm *HiveMetastore) 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 hiveMetastoreProperties HiveMetastoreProperties + err = json.Unmarshal(*v, &hiveMetastoreProperties) + if err != nil { + return err + } + hm.HiveMetastoreProperties = &hiveMetastoreProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hm.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hm.Type = &typeVar + } + } } + + return nil +} + +// HiveMetastoreListResult data Lake Analytics HiveMetastore list information. +type HiveMetastoreListResult struct { + // Value - READ-ONLY; The results of the list operation. + Value *[]HiveMetastore `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for HiveMetastoreListResult. +func (hmlr HiveMetastoreListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// HiveMetastoreProperties the HiveMetastore properties. +type HiveMetastoreProperties struct { + // ServerURI - READ-ONLY; The serverUri for the Hive MetaStore + ServerURI *string `json:"serverUri,omitempty"` + // DatabaseName - READ-ONLY; The databaseName for the Hive MetaStore + DatabaseName *string `json:"databaseName,omitempty"` + // RuntimeVersion - READ-ONLY; The runtimeVersion for the Hive MetaStore + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // UserName - READ-ONLY; The userName for the Hive MetaStore + UserName *string `json:"userName,omitempty"` + // Password - READ-ONLY; The password for the Hive MetaStore + Password *string `json:"password,omitempty"` + // NestedResourceProvisioningState - READ-ONLY; The current state of the NestedResource. Possible values include: 'NestedResourceProvisioningStateSucceeded', 'NestedResourceProvisioningStateCanceled', 'NestedResourceProvisioningStateFailed' + NestedResourceProvisioningState NestedResourceProvisioningState `json:"nestedResourceProvisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for HiveMetastoreProperties. +func (hmp HiveMetastoreProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// NameAvailabilityInformation data Lake Analytics account name availability result information. +type NameAvailabilityInformation struct { + autorest.Response `json:"-"` + // NameAvailable - READ-ONLY; The Boolean value of true or false to indicate whether the Data Lake Analytics account name is available or not. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Reason - READ-ONLY; The reason why the Data Lake Analytics account name is not available, if nameAvailable is false. + Reason *string `json:"reason,omitempty"` + // Message - READ-ONLY; The message describing why the Data Lake Analytics account name is not available, if nameAvailable is false. + Message *string `json:"message,omitempty"` +} + +// MarshalJSON is the custom marshaler for NameAvailabilityInformation. +func (nai NameAvailabilityInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// Operation an available operation for Data Lake Analytics. +type Operation struct { + // Name - READ-ONLY; The name of the operation. + Name *string `json:"name,omitempty"` + // Display - READ-ONLY; The display information for the operation. + Display *OperationDisplay `json:"display,omitempty"` + // Properties - READ-ONLY; The OperationMetaPropertyInfo for the operation. + Properties *OperationMetaPropertyInfo `json:"properties,omitempty"` + // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'OperationOriginUser', 'OperationOriginSystem', 'OperationOriginUsersystem' + Origin OperationOrigin `json:"origin,omitempty"` +} + +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OperationDisplay the display information for a particular operation. +type OperationDisplay struct { + // Provider - READ-ONLY; The resource provider of the operation. + Provider *string `json:"provider,omitempty"` + // Resource - READ-ONLY; The resource type of the operation. + Resource *string `json:"resource,omitempty"` + // Operation - READ-ONLY; A friendly name of the operation. + Operation *string `json:"operation,omitempty"` + // Description - READ-ONLY; A friendly description of the operation. + Description *string `json:"description,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationDisplay. +func (od OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OperationListResult the list of available operations for Data Lake Analytics. +type OperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The results of the list operation. + Value *[]Operation `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationListResult. +func (olr OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OperationMetaLogSpecification ... +type OperationMetaLogSpecification struct { + // Name - The name for OperationMetaLogSpecification. + Name *string `json:"name,omitempty"` + // DisplayName - The displayName for OperationMetaLogSpecification. + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - The blobDuration for OperationMetaLogSpecification. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// OperationMetaMetricAvailabilitiesSpecification ... +type OperationMetaMetricAvailabilitiesSpecification struct { + // TimeGrain - The timegrain for OperationMetaMetricAvailabilitiesSpecification. + TimeGrain *string `json:"timeGrain,omitempty"` + // BlobDuration - The blobDuration for OperationMetaMetricAvailabilitiesSpecification. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// OperationMetaMetricSpecification ... +type OperationMetaMetricSpecification struct { + // Name - The name for OperationMetaMetricSpecification. + Name *string `json:"name,omitempty"` + // DisplayName - The displayName for OperationMetaMetricSpecification. + DisplayName *string `json:"displayName,omitempty"` + // DisplayDescription - The displayDescription for OperationMetaMetricSpecification. + DisplayDescription *string `json:"displayDescription,omitempty"` + // Unit - The unit for OperationMetaMetricSpecification. + Unit *string `json:"unit,omitempty"` + // AggregationType - The aggregationType for OperationMetaMetricSpecification. + AggregationType *string `json:"aggregationType,omitempty"` + // Availabilities - The availabilities for OperationMetaMetricSpecification. + Availabilities *[]OperationMetaMetricAvailabilitiesSpecification `json:"availabilities,omitempty"` +} + +// OperationMetaPropertyInfo ... +type OperationMetaPropertyInfo struct { + // ServiceSpecification - The operations OperationMetaServiceSpecification. + ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// OperationMetaServiceSpecification ... +type OperationMetaServiceSpecification struct { + // MetricSpecifications - The metricSpecifications for OperationMetaServiceSpecification. + MetricSpecifications *[]OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"` + // LogSpecifications - The logSpecifications for OperationMetaServiceSpecification. + LogSpecifications *[]OperationMetaLogSpecification `json:"logSpecifications,omitempty"` +} + +// Resource the resource model definition. +type Resource struct { + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; The resource location. + Location *string `json:"location,omitempty"` + // Tags - READ-ONLY; The 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{}) + return json.Marshal(objectMap) } -// DataLakeAnalyticsAccountListStorageAccountsResult azure Storage Account list information. -type DataLakeAnalyticsAccountListStorageAccountsResult struct { +// SasTokenInformation SAS token information. +type SasTokenInformation struct { + // AccessToken - READ-ONLY; The access token for the associated Azure Storage Container. + AccessToken *string `json:"accessToken,omitempty"` +} + +// MarshalJSON is the custom marshaler for SasTokenInformation. +func (sti SasTokenInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// SasTokenInformationListResult the SAS response that contains the storage account, container and +// associated SAS token for connection use. +type SasTokenInformationListResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY; the results of the list operation - Value *[]StorageAccountInfo `json:"value,omitempty"` - // Count - READ-ONLY; total number of results. - Count *int32 `json:"count,omitempty"` - // NextLink - READ-ONLY; the link (url) to the next page of results. + // Value - READ-ONLY; The results of the list operation. + Value *[]SasTokenInformation `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountListStorageAccountsResult. -func (dlaalsar DataLakeAnalyticsAccountListStorageAccountsResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for SasTokenInformationListResult. +func (stilr SasTokenInformationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// DataLakeAnalyticsAccountListStorageAccountsResultIterator provides access to a complete listing of -// StorageAccountInfo values. -type DataLakeAnalyticsAccountListStorageAccountsResultIterator struct { +// SasTokenInformationListResultIterator provides access to a complete listing of SasTokenInformation +// values. +type SasTokenInformationListResultIterator struct { i int - page DataLakeAnalyticsAccountListStorageAccountsResultPage + page SasTokenInformationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *DataLakeAnalyticsAccountListStorageAccountsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *SasTokenInformationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListStorageAccountsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -547,67 +2189,67 @@ func (iter *DataLakeAnalyticsAccountListStorageAccountsResultIterator) NextWithC // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *DataLakeAnalyticsAccountListStorageAccountsResultIterator) Next() error { +func (iter *SasTokenInformationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DataLakeAnalyticsAccountListStorageAccountsResultIterator) NotDone() bool { +func (iter SasTokenInformationListResultIterator) 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 DataLakeAnalyticsAccountListStorageAccountsResultIterator) Response() DataLakeAnalyticsAccountListStorageAccountsResult { +func (iter SasTokenInformationListResultIterator) Response() SasTokenInformationListResult { 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 DataLakeAnalyticsAccountListStorageAccountsResultIterator) Value() StorageAccountInfo { +func (iter SasTokenInformationListResultIterator) Value() SasTokenInformation { if !iter.page.NotDone() { - return StorageAccountInfo{} + return SasTokenInformation{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the DataLakeAnalyticsAccountListStorageAccountsResultIterator type. -func NewDataLakeAnalyticsAccountListStorageAccountsResultIterator(page DataLakeAnalyticsAccountListStorageAccountsResultPage) DataLakeAnalyticsAccountListStorageAccountsResultIterator { - return DataLakeAnalyticsAccountListStorageAccountsResultIterator{page: page} +// Creates a new instance of the SasTokenInformationListResultIterator type. +func NewSasTokenInformationListResultIterator(page SasTokenInformationListResultPage) SasTokenInformationListResultIterator { + return SasTokenInformationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (dlaalsar DataLakeAnalyticsAccountListStorageAccountsResult) IsEmpty() bool { - return dlaalsar.Value == nil || len(*dlaalsar.Value) == 0 +func (stilr SasTokenInformationListResult) IsEmpty() bool { + return stilr.Value == nil || len(*stilr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (dlaalsar DataLakeAnalyticsAccountListStorageAccountsResult) hasNextLink() bool { - return dlaalsar.NextLink != nil && len(*dlaalsar.NextLink) != 0 +func (stilr SasTokenInformationListResult) hasNextLink() bool { + return stilr.NextLink != nil && len(*stilr.NextLink) != 0 } -// dataLakeAnalyticsAccountListStorageAccountsResultPreparer prepares a request to retrieve the next set of results. +// sasTokenInformationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (dlaalsar DataLakeAnalyticsAccountListStorageAccountsResult) dataLakeAnalyticsAccountListStorageAccountsResultPreparer(ctx context.Context) (*http.Request, error) { - if !dlaalsar.hasNextLink() { +func (stilr SasTokenInformationListResult) sasTokenInformationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !stilr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(dlaalsar.NextLink))) + autorest.WithBaseURL(to.String(stilr.NextLink))) } -// DataLakeAnalyticsAccountListStorageAccountsResultPage contains a page of StorageAccountInfo values. -type DataLakeAnalyticsAccountListStorageAccountsResultPage struct { - fn func(context.Context, DataLakeAnalyticsAccountListStorageAccountsResult) (DataLakeAnalyticsAccountListStorageAccountsResult, error) - dlaalsar DataLakeAnalyticsAccountListStorageAccountsResult +// SasTokenInformationListResultPage contains a page of SasTokenInformation values. +type SasTokenInformationListResultPage struct { + fn func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error) + stilr SasTokenInformationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *DataLakeAnalyticsAccountListStorageAccountsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *SasTokenInformationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListStorageAccountsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -617,11 +2259,11 @@ func (page *DataLakeAnalyticsAccountListStorageAccountsResultPage) NextWithConte }() } for { - next, err := page.fn(ctx, page.dlaalsar) + next, err := page.fn(ctx, page.stilr) if err != nil { return err } - page.dlaalsar = next + page.stilr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -632,210 +2274,133 @@ func (page *DataLakeAnalyticsAccountListStorageAccountsResultPage) NextWithConte // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *DataLakeAnalyticsAccountListStorageAccountsResultPage) Next() error { +func (page *SasTokenInformationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DataLakeAnalyticsAccountListStorageAccountsResultPage) NotDone() bool { - return !page.dlaalsar.IsEmpty() +func (page SasTokenInformationListResultPage) NotDone() bool { + return !page.stilr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page DataLakeAnalyticsAccountListStorageAccountsResultPage) Response() DataLakeAnalyticsAccountListStorageAccountsResult { - return page.dlaalsar +func (page SasTokenInformationListResultPage) Response() SasTokenInformationListResult { + return page.stilr } // Values returns the slice of values for the current page or nil if there are no values. -func (page DataLakeAnalyticsAccountListStorageAccountsResultPage) Values() []StorageAccountInfo { - if page.dlaalsar.IsEmpty() { +func (page SasTokenInformationListResultPage) Values() []SasTokenInformation { + if page.stilr.IsEmpty() { return nil } - return *page.dlaalsar.Value -} - -// Creates a new instance of the DataLakeAnalyticsAccountListStorageAccountsResultPage type. -func NewDataLakeAnalyticsAccountListStorageAccountsResultPage(cur DataLakeAnalyticsAccountListStorageAccountsResult, getNextPage func(context.Context, DataLakeAnalyticsAccountListStorageAccountsResult) (DataLakeAnalyticsAccountListStorageAccountsResult, error)) DataLakeAnalyticsAccountListStorageAccountsResultPage { - return DataLakeAnalyticsAccountListStorageAccountsResultPage{ - fn: getNextPage, - dlaalsar: cur, - } -} - -// DataLakeAnalyticsAccountProperties the account specific properties that are associated with an -// underlying Data Lake Analytics account. -type DataLakeAnalyticsAccountProperties struct { - // ProvisioningState - READ-ONLY; the provisioning status of the Data Lake Analytics account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted' - ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"` - // State - READ-ONLY; the state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended' - State DataLakeAnalyticsAccountState `json:"state,omitempty"` - // DefaultDataLakeStoreAccount - the default data lake storage account associated with this Data Lake Analytics account. - DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"` - // MaxDegreeOfParallelism - the maximum supported degree of parallelism for this account. - MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` - // MaxJobCount - the maximum supported jobs running under the account at the same time. - MaxJobCount *int32 `json:"maxJobCount,omitempty"` - // DataLakeStoreAccounts - the list of Data Lake storage accounts associated with this account. - DataLakeStoreAccounts *[]DataLakeStoreAccountInfo `json:"dataLakeStoreAccounts,omitempty"` - // StorageAccounts - the list of Azure Blob storage accounts associated with this account. - StorageAccounts *[]StorageAccountInfo `json:"storageAccounts,omitempty"` - // CreationTime - READ-ONLY; the account creation time. - CreationTime *date.Time `json:"creationTime,omitempty"` - // LastModifiedTime - READ-ONLY; the account last modified time. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // Endpoint - READ-ONLY; the full CName endpoint for this account. - Endpoint *string `json:"endpoint,omitempty"` + return *page.stilr.Value } -// MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountProperties. -func (dlaap DataLakeAnalyticsAccountProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dlaap.DefaultDataLakeStoreAccount != nil { - objectMap["defaultDataLakeStoreAccount"] = dlaap.DefaultDataLakeStoreAccount - } - if dlaap.MaxDegreeOfParallelism != nil { - objectMap["maxDegreeOfParallelism"] = dlaap.MaxDegreeOfParallelism - } - if dlaap.MaxJobCount != nil { - objectMap["maxJobCount"] = dlaap.MaxJobCount - } - if dlaap.DataLakeStoreAccounts != nil { - objectMap["dataLakeStoreAccounts"] = dlaap.DataLakeStoreAccounts +// Creates a new instance of the SasTokenInformationListResultPage type. +func NewSasTokenInformationListResultPage(cur SasTokenInformationListResult, getNextPage func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)) SasTokenInformationListResultPage { + return SasTokenInformationListResultPage{ + fn: getNextPage, + stilr: cur, } - if dlaap.StorageAccounts != nil { - objectMap["storageAccounts"] = dlaap.StorageAccounts - } - return json.Marshal(objectMap) } -// DataLakeStoreAccountInfo data Lake Store account information. -type DataLakeStoreAccountInfo struct { +// StorageAccountInformation azure Storage account information. +type StorageAccountInformation struct { autorest.Response `json:"-"` - // Name - the account name of the Data Lake Store account. + // StorageAccountInformationProperties - READ-ONLY; The Azure Storage account properties. + *StorageAccountInformationProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. Name *string `json:"name,omitempty"` - // Properties - the properties associated with this Data Lake Store account. - Properties *DataLakeStoreAccountInfoProperties `json:"properties,omitempty"` -} - -// DataLakeStoreAccountInfoProperties data Lake Store account properties information. -type DataLakeStoreAccountInfoProperties struct { - // Suffix - the optional suffix for the Data Lake Store account. - Suffix *string `json:"suffix,omitempty"` -} - -// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type DeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(Client) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DeleteFuture.Result. -func (future *DeleteFuture) result(client Client) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "account.DeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("account.DeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// Error generic resource error information. -type Error struct { - // Code - READ-ONLY; the HTTP status code or error code associated with this error - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; the error message to display. - Message *string `json:"message,omitempty"` - // Target - READ-ONLY; the target of the error. - Target *string `json:"target,omitempty"` - // Details - READ-ONLY; the list of error details - Details *[]ErrorDetails `json:"details,omitempty"` - // InnerError - READ-ONLY; the inner exceptions or errors, if any - InnerError *InnerError `json:"innerError,omitempty"` -} - -// MarshalJSON is the custom marshaler for Error. -func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ErrorDetails generic resource error details information. -type ErrorDetails struct { - // Code - READ-ONLY; the HTTP status code or error code associated with this error - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; the error message localized based on Accept-Language - Message *string `json:"message,omitempty"` - // Target - READ-ONLY; the target of the particular error (for example, the name of the property in error). - Target *string `json:"target,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for ErrorDetails. -func (ed ErrorDetails) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StorageAccountInformation. +func (sai StorageAccountInformation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// InnerError generic resource inner error information. -type InnerError struct { - // Trace - READ-ONLY; the stack trace for the error - Trace *string `json:"trace,omitempty"` - // Context - READ-ONLY; the context for the error message - Context *string `json:"context,omitempty"` -} +// UnmarshalJSON is the custom unmarshaler for StorageAccountInformation struct. +func (sai *StorageAccountInformation) 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 storageAccountInformationProperties StorageAccountInformationProperties + err = json.Unmarshal(*v, &storageAccountInformationProperties) + if err != nil { + return err + } + sai.StorageAccountInformationProperties = &storageAccountInformationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sai.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sai.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sai.Type = &typeVar + } + } + } -// MarshalJSON is the custom marshaler for InnerError. -func (ie InnerError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) + return nil } -// ListBlobContainersResult the list of blob containers associated with the storage account attached to the -// Data Lake Analytics account. -type ListBlobContainersResult struct { +// StorageAccountInformationListResult azure Storage account list information. +type StorageAccountInformationListResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY; the results of the list operation - Value *[]BlobContainer `json:"value,omitempty"` - // NextLink - READ-ONLY; the link (url) to the next page of results. + // Value - READ-ONLY; The results of the list operation. + Value *[]StorageAccountInformation `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for ListBlobContainersResult. -func (lbcr ListBlobContainersResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StorageAccountInformationListResult. +func (sailr StorageAccountInformationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// ListBlobContainersResultIterator provides access to a complete listing of BlobContainer values. -type ListBlobContainersResultIterator struct { +// StorageAccountInformationListResultIterator provides access to a complete listing of +// StorageAccountInformation values. +type StorageAccountInformationListResultIterator struct { i int - page ListBlobContainersResultPage + page StorageAccountInformationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListBlobContainersResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StorageAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListBlobContainersResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -860,67 +2425,67 @@ func (iter *ListBlobContainersResultIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListBlobContainersResultIterator) Next() error { +func (iter *StorageAccountInformationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListBlobContainersResultIterator) NotDone() bool { +func (iter StorageAccountInformationListResultIterator) 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 ListBlobContainersResultIterator) Response() ListBlobContainersResult { +func (iter StorageAccountInformationListResultIterator) Response() StorageAccountInformationListResult { 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 ListBlobContainersResultIterator) Value() BlobContainer { +func (iter StorageAccountInformationListResultIterator) Value() StorageAccountInformation { if !iter.page.NotDone() { - return BlobContainer{} + return StorageAccountInformation{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListBlobContainersResultIterator type. -func NewListBlobContainersResultIterator(page ListBlobContainersResultPage) ListBlobContainersResultIterator { - return ListBlobContainersResultIterator{page: page} +// Creates a new instance of the StorageAccountInformationListResultIterator type. +func NewStorageAccountInformationListResultIterator(page StorageAccountInformationListResultPage) StorageAccountInformationListResultIterator { + return StorageAccountInformationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lbcr ListBlobContainersResult) IsEmpty() bool { - return lbcr.Value == nil || len(*lbcr.Value) == 0 +func (sailr StorageAccountInformationListResult) IsEmpty() bool { + return sailr.Value == nil || len(*sailr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (lbcr ListBlobContainersResult) hasNextLink() bool { - return lbcr.NextLink != nil && len(*lbcr.NextLink) != 0 +func (sailr StorageAccountInformationListResult) hasNextLink() bool { + return sailr.NextLink != nil && len(*sailr.NextLink) != 0 } -// listBlobContainersResultPreparer prepares a request to retrieve the next set of results. +// storageAccountInformationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lbcr ListBlobContainersResult) listBlobContainersResultPreparer(ctx context.Context) (*http.Request, error) { - if !lbcr.hasNextLink() { +func (sailr StorageAccountInformationListResult) storageAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sailr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lbcr.NextLink))) + autorest.WithBaseURL(to.String(sailr.NextLink))) } -// ListBlobContainersResultPage contains a page of BlobContainer values. -type ListBlobContainersResultPage struct { - fn func(context.Context, ListBlobContainersResult) (ListBlobContainersResult, error) - lbcr ListBlobContainersResult +// StorageAccountInformationListResultPage contains a page of StorageAccountInformation values. +type StorageAccountInformationListResultPage struct { + fn func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error) + sailr StorageAccountInformationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListBlobContainersResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *StorageAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListBlobContainersResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -930,11 +2495,11 @@ func (page *ListBlobContainersResultPage) NextWithContext(ctx context.Context) ( }() } for { - next, err := page.fn(ctx, page.lbcr) + next, err := page.fn(ctx, page.sailr) if err != nil { return err } - page.lbcr = next + page.sailr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -945,63 +2510,154 @@ func (page *ListBlobContainersResultPage) NextWithContext(ctx context.Context) ( // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ListBlobContainersResultPage) Next() error { +func (page *StorageAccountInformationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListBlobContainersResultPage) NotDone() bool { - return !page.lbcr.IsEmpty() +func (page StorageAccountInformationListResultPage) NotDone() bool { + return !page.sailr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListBlobContainersResultPage) Response() ListBlobContainersResult { - return page.lbcr +func (page StorageAccountInformationListResultPage) Response() StorageAccountInformationListResult { + return page.sailr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListBlobContainersResultPage) Values() []BlobContainer { - if page.lbcr.IsEmpty() { +func (page StorageAccountInformationListResultPage) Values() []StorageAccountInformation { + if page.sailr.IsEmpty() { return nil } - return *page.lbcr.Value + return *page.sailr.Value } -// Creates a new instance of the ListBlobContainersResultPage type. -func NewListBlobContainersResultPage(cur ListBlobContainersResult, getNextPage func(context.Context, ListBlobContainersResult) (ListBlobContainersResult, error)) ListBlobContainersResultPage { - return ListBlobContainersResultPage{ - fn: getNextPage, - lbcr: cur, +// Creates a new instance of the StorageAccountInformationListResultPage type. +func NewStorageAccountInformationListResultPage(cur StorageAccountInformationListResult, getNextPage func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)) StorageAccountInformationListResultPage { + return StorageAccountInformationListResultPage{ + fn: getNextPage, + sailr: cur, + } +} + +// StorageAccountInformationProperties the Azure Storage account properties. +type StorageAccountInformationProperties struct { + // Suffix - READ-ONLY; The optional suffix for the storage account. + Suffix *string `json:"suffix,omitempty"` +} + +// MarshalJSON is the custom marshaler for StorageAccountInformationProperties. +func (saip StorageAccountInformationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// StorageAccountProperties the Azure Storage account properties to use when adding a new Azure Storage +// account. +type StorageAccountProperties struct { + // AccessKey - The access key associated with this Azure Storage account that will be used to connect to it. + AccessKey *string `json:"accessKey,omitempty"` + // Suffix - The optional suffix for the storage account. + Suffix *string `json:"suffix,omitempty"` +} + +// StorageContainer azure Storage blob container information. +type StorageContainer struct { + autorest.Response `json:"-"` + // StorageContainerProperties - READ-ONLY; The properties of the blob container. + *StorageContainerProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for StorageContainer. +func (sc StorageContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for StorageContainer struct. +func (sc *StorageContainer) 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 storageContainerProperties StorageContainerProperties + err = json.Unmarshal(*v, &storageContainerProperties) + if err != nil { + return err + } + sc.StorageContainerProperties = &storageContainerProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sc.Type = &typeVar + } + } } + + return nil } -// ListSasTokensResult the SAS response that contains the storage account, container and associated SAS -// token for connection use. -type ListSasTokensResult struct { +// StorageContainerListResult the list of blob containers associated with the storage account attached to +// the Data Lake Analytics account. +type StorageContainerListResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY - Value *[]SasTokenInfo `json:"value,omitempty"` - // NextLink - READ-ONLY; the link (url) to the next page of results. + // Value - READ-ONLY; The results of the list operation. + Value *[]StorageContainer `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for ListSasTokensResult. -func (lstr ListSasTokensResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StorageContainerListResult. +func (sclr StorageContainerListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// ListSasTokensResultIterator provides access to a complete listing of SasTokenInfo values. -type ListSasTokensResultIterator struct { +// StorageContainerListResultIterator provides access to a complete listing of StorageContainer values. +type StorageContainerListResultIterator struct { i int - page ListSasTokensResultPage + page StorageContainerListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListSasTokensResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *StorageContainerListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListSasTokensResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -1026,67 +2682,67 @@ func (iter *ListSasTokensResultIterator) NextWithContext(ctx context.Context) (e // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListSasTokensResultIterator) Next() error { +func (iter *StorageContainerListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListSasTokensResultIterator) NotDone() bool { +func (iter StorageContainerListResultIterator) 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 ListSasTokensResultIterator) Response() ListSasTokensResult { +func (iter StorageContainerListResultIterator) Response() StorageContainerListResult { 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 ListSasTokensResultIterator) Value() SasTokenInfo { +func (iter StorageContainerListResultIterator) Value() StorageContainer { if !iter.page.NotDone() { - return SasTokenInfo{} + return StorageContainer{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListSasTokensResultIterator type. -func NewListSasTokensResultIterator(page ListSasTokensResultPage) ListSasTokensResultIterator { - return ListSasTokensResultIterator{page: page} +// Creates a new instance of the StorageContainerListResultIterator type. +func NewStorageContainerListResultIterator(page StorageContainerListResultPage) StorageContainerListResultIterator { + return StorageContainerListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lstr ListSasTokensResult) IsEmpty() bool { - return lstr.Value == nil || len(*lstr.Value) == 0 +func (sclr StorageContainerListResult) IsEmpty() bool { + return sclr.Value == nil || len(*sclr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (lstr ListSasTokensResult) hasNextLink() bool { - return lstr.NextLink != nil && len(*lstr.NextLink) != 0 +func (sclr StorageContainerListResult) hasNextLink() bool { + return sclr.NextLink != nil && len(*sclr.NextLink) != 0 } -// listSasTokensResultPreparer prepares a request to retrieve the next set of results. +// storageContainerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lstr ListSasTokensResult) listSasTokensResultPreparer(ctx context.Context) (*http.Request, error) { - if !lstr.hasNextLink() { +func (sclr StorageContainerListResult) storageContainerListResultPreparer(ctx context.Context) (*http.Request, error) { + if !sclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lstr.NextLink))) + autorest.WithBaseURL(to.String(sclr.NextLink))) } -// ListSasTokensResultPage contains a page of SasTokenInfo values. -type ListSasTokensResultPage struct { - fn func(context.Context, ListSasTokensResult) (ListSasTokensResult, error) - lstr ListSasTokensResult +// StorageContainerListResultPage contains a page of StorageContainer values. +type StorageContainerListResultPage struct { + fn func(context.Context, StorageContainerListResult) (StorageContainerListResult, error) + sclr StorageContainerListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListSasTokensResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *StorageContainerListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListSasTokensResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -1096,11 +2752,11 @@ func (page *ListSasTokensResultPage) NextWithContext(ctx context.Context) (err e }() } for { - next, err := page.fn(ctx, page.lstr) + next, err := page.fn(ctx, page.sclr) if err != nil { return err } - page.lstr = next + page.sclr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -1111,65 +2767,414 @@ func (page *ListSasTokensResultPage) NextWithContext(ctx context.Context) (err e // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ListSasTokensResultPage) Next() error { +func (page *StorageContainerListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListSasTokensResultPage) NotDone() bool { - return !page.lstr.IsEmpty() +func (page StorageContainerListResultPage) NotDone() bool { + return !page.sclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListSasTokensResultPage) Response() ListSasTokensResult { - return page.lstr +func (page StorageContainerListResultPage) Response() StorageContainerListResult { + return page.sclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListSasTokensResultPage) Values() []SasTokenInfo { - if page.lstr.IsEmpty() { +func (page StorageContainerListResultPage) Values() []StorageContainer { + if page.sclr.IsEmpty() { return nil } - return *page.lstr.Value + return *page.sclr.Value } -// Creates a new instance of the ListSasTokensResultPage type. -func NewListSasTokensResultPage(cur ListSasTokensResult, getNextPage func(context.Context, ListSasTokensResult) (ListSasTokensResult, error)) ListSasTokensResultPage { - return ListSasTokensResultPage{ +// Creates a new instance of the StorageContainerListResultPage type. +func NewStorageContainerListResultPage(cur StorageContainerListResult, getNextPage func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)) StorageContainerListResultPage { + return StorageContainerListResultPage{ fn: getNextPage, - lstr: cur, + sclr: cur, } } -// SasTokenInfo SAS token information. -type SasTokenInfo struct { - // AccessToken - READ-ONLY; the access token for the associated Azure Storage Container. - AccessToken *string `json:"accessToken,omitempty"` +// StorageContainerProperties azure Storage blob container properties information. +type StorageContainerProperties struct { + // LastModifiedTime - READ-ONLY; The last modified time of the blob container. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` } -// MarshalJSON is the custom marshaler for SasTokenInfo. -func (sti SasTokenInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for StorageContainerProperties. +func (scp StorageContainerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// StorageAccountInfo azure Storage account information. -type StorageAccountInfo struct { - autorest.Response `json:"-"` - // Name - the account name associated with the Azure storage account. +// SubResource the resource model definition for a nested resource. +type SubResource struct { + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. Name *string `json:"name,omitempty"` - // Properties - the properties associated with this storage account. - Properties *StorageAccountProperties `json:"properties,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` } -// StorageAccountProperties azure Storage account properties information. -type StorageAccountProperties struct { - // AccessKey - the access key associated with this Azure Storage account that will be used to connect to it. - AccessKey *string `json:"accessKey,omitempty"` - // Suffix - the optional suffix for the Data Lake account. +// MarshalJSON is the custom marshaler for SubResource. +func (sr SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UpdateComputePolicyParameters the parameters used to update a compute policy. +type UpdateComputePolicyParameters struct { + // UpdateComputePolicyProperties - The compute policy properties to use when updating a compute policy. + *UpdateComputePolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateComputePolicyParameters. +func (ucpp UpdateComputePolicyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ucpp.UpdateComputePolicyProperties != nil { + objectMap["properties"] = ucpp.UpdateComputePolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateComputePolicyParameters struct. +func (ucpp *UpdateComputePolicyParameters) 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 updateComputePolicyProperties UpdateComputePolicyProperties + err = json.Unmarshal(*v, &updateComputePolicyProperties) + if err != nil { + return err + } + ucpp.UpdateComputePolicyProperties = &updateComputePolicyProperties + } + } + } + + return nil +} + +// UpdateComputePolicyProperties the compute policy properties to use when updating a compute policy. +type UpdateComputePolicyProperties struct { + // ObjectID - The AAD object identifier for the entity to create a policy for. + ObjectID *uuid.UUID `json:"objectId,omitempty"` + // ObjectType - The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal' + ObjectType AADObjectType `json:"objectType,omitempty"` + // MaxDegreeOfParallelismPerJob - The maximum degree of parallelism per job this user can use to submit jobs. This property, the min priority per job property, or both must be passed. + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + // MinPriorityPerJob - The minimum priority per job this user can use to submit jobs. This property, the max degree of parallelism per job property, or both must be passed. + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` +} + +// UpdateComputePolicyWithAccountParameters the parameters used to update a compute policy while updating a +// Data Lake Analytics account. +type UpdateComputePolicyWithAccountParameters struct { + // Name - The unique name of the compute policy to update. + Name *string `json:"name,omitempty"` + // UpdateComputePolicyProperties - The compute policy properties to use when updating a compute policy. + *UpdateComputePolicyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateComputePolicyWithAccountParameters. +func (ucpwap UpdateComputePolicyWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ucpwap.Name != nil { + objectMap["name"] = ucpwap.Name + } + if ucpwap.UpdateComputePolicyProperties != nil { + objectMap["properties"] = ucpwap.UpdateComputePolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateComputePolicyWithAccountParameters struct. +func (ucpwap *UpdateComputePolicyWithAccountParameters) 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 + } + ucpwap.Name = &name + } + case "properties": + if v != nil { + var updateComputePolicyProperties UpdateComputePolicyProperties + err = json.Unmarshal(*v, &updateComputePolicyProperties) + if err != nil { + return err + } + ucpwap.UpdateComputePolicyProperties = &updateComputePolicyProperties + } + } + } + + return nil +} + +// UpdateDataLakeAnalyticsAccountParameters the parameters that can be used to update an existing Data Lake +// Analytics account. +type UpdateDataLakeAnalyticsAccountParameters struct { + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // UpdateDataLakeAnalyticsAccountProperties - The properties that can be updated in an existing Data Lake Analytics account. + *UpdateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateDataLakeAnalyticsAccountParameters. +func (udlaap UpdateDataLakeAnalyticsAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if udlaap.Tags != nil { + objectMap["tags"] = udlaap.Tags + } + if udlaap.UpdateDataLakeAnalyticsAccountProperties != nil { + objectMap["properties"] = udlaap.UpdateDataLakeAnalyticsAccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateDataLakeAnalyticsAccountParameters struct. +func (udlaap *UpdateDataLakeAnalyticsAccountParameters) 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 "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + udlaap.Tags = tags + } + case "properties": + if v != nil { + var updateDataLakeAnalyticsAccountProperties UpdateDataLakeAnalyticsAccountProperties + err = json.Unmarshal(*v, &updateDataLakeAnalyticsAccountProperties) + if err != nil { + return err + } + udlaap.UpdateDataLakeAnalyticsAccountProperties = &updateDataLakeAnalyticsAccountProperties + } + } + } + + return nil +} + +// UpdateDataLakeAnalyticsAccountProperties the properties to update that are associated with an underlying +// Data Lake Analytics account. +type UpdateDataLakeAnalyticsAccountProperties struct { + // DataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account. + DataLakeStoreAccounts *[]UpdateDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"` + // StorageAccounts - The list of Azure Blob storage accounts associated with this account. + StorageAccounts *[]UpdateStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"` + // ComputePolicies - The list of compute policies associated with this account. + ComputePolicies *[]UpdateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"` + // FirewallRules - The list of firewall rules associated with this account. + FirewallRules *[]UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"` + // FirewallState - The current state of the IP address firewall for this account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' + FirewallState FirewallState `json:"firewallState,omitempty"` + // FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'Enabled', 'Disabled' + FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` + // NewTier - The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours' + NewTier TierType `json:"newTier,omitempty"` + // MaxJobCount - The maximum supported jobs running under the account at the same time. + MaxJobCount *int32 `json:"maxJobCount,omitempty"` + // MaxDegreeOfParallelism - The maximum supported degree of parallelism for this account. + MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` + // MaxDegreeOfParallelismPerJob - The maximum supported degree of parallelism per job for this account. + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + // MinPriorityPerJob - The minimum supported priority per job for this account. + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` + // QueryStoreRetention - The number of days that job metadata is retained. + QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` +} + +// UpdateDataLakeStoreProperties the Data Lake Store account properties to use when updating a Data Lake +// Store account. +type UpdateDataLakeStoreProperties struct { + // Suffix - The optional suffix for the Data Lake Store account. Suffix *string `json:"suffix,omitempty"` } +// UpdateDataLakeStoreWithAccountParameters the parameters used to update a Data Lake Store account while +// updating a Data Lake Analytics account. +type UpdateDataLakeStoreWithAccountParameters struct { + // Name - The unique name of the Data Lake Store account to update. + Name *string `json:"name,omitempty"` + // UpdateDataLakeStoreProperties - The Data Lake Store account properties to use when updating a Data Lake Store account. + *UpdateDataLakeStoreProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateDataLakeStoreWithAccountParameters. +func (udlswap UpdateDataLakeStoreWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if udlswap.Name != nil { + objectMap["name"] = udlswap.Name + } + if udlswap.UpdateDataLakeStoreProperties != nil { + objectMap["properties"] = udlswap.UpdateDataLakeStoreProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateDataLakeStoreWithAccountParameters struct. +func (udlswap *UpdateDataLakeStoreWithAccountParameters) 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 + } + udlswap.Name = &name + } + case "properties": + if v != nil { + var updateDataLakeStoreProperties UpdateDataLakeStoreProperties + err = json.Unmarshal(*v, &updateDataLakeStoreProperties) + if err != nil { + return err + } + udlswap.UpdateDataLakeStoreProperties = &updateDataLakeStoreProperties + } + } + } + + return nil +} + +// UpdateFirewallRuleParameters the parameters used to update a firewall rule. +type UpdateFirewallRuleParameters struct { + // UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule. + *UpdateFirewallRuleProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateFirewallRuleParameters. +func (ufrp UpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ufrp.UpdateFirewallRuleProperties != nil { + objectMap["properties"] = ufrp.UpdateFirewallRuleProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateFirewallRuleParameters struct. +func (ufrp *UpdateFirewallRuleParameters) 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 updateFirewallRuleProperties UpdateFirewallRuleProperties + err = json.Unmarshal(*v, &updateFirewallRuleProperties) + if err != nil { + return err + } + ufrp.UpdateFirewallRuleProperties = &updateFirewallRuleProperties + } + } + } + + return nil +} + +// UpdateFirewallRuleProperties the firewall rule properties to use when updating a firewall rule. +type UpdateFirewallRuleProperties struct { + // StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + StartIPAddress *string `json:"startIpAddress,omitempty"` + // EndIPAddress - The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. + EndIPAddress *string `json:"endIpAddress,omitempty"` +} + +// UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a +// Data Lake Analytics account. +type UpdateFirewallRuleWithAccountParameters struct { + // Name - The unique name of the firewall rule to update. + Name *string `json:"name,omitempty"` + // UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule. + *UpdateFirewallRuleProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateFirewallRuleWithAccountParameters. +func (ufrwap UpdateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ufrwap.Name != nil { + objectMap["name"] = ufrwap.Name + } + if ufrwap.UpdateFirewallRuleProperties != nil { + objectMap["properties"] = ufrwap.UpdateFirewallRuleProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateFirewallRuleWithAccountParameters struct. +func (ufrwap *UpdateFirewallRuleWithAccountParameters) 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 + } + ufrwap.Name = &name + } + case "properties": + if v != nil { + var updateFirewallRuleProperties UpdateFirewallRuleProperties + err = json.Unmarshal(*v, &updateFirewallRuleProperties) + if err != nil { + return err + } + ufrwap.UpdateFirewallRuleProperties = &updateFirewallRuleProperties + } + } + } + + return nil +} + // UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type UpdateFuture struct { azure.FutureAPI @@ -1211,3 +3216,202 @@ func (future *UpdateFuture) result(client Client) (dlaa DataLakeAnalyticsAccount } return } + +// UpdateStorageAccountParameters the parameters used to update an Azure Storage account. +type UpdateStorageAccountParameters struct { + // UpdateStorageAccountProperties - The Azure Storage account properties to use when updating an Azure Storage account. + *UpdateStorageAccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateStorageAccountParameters. +func (usap UpdateStorageAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if usap.UpdateStorageAccountProperties != nil { + objectMap["properties"] = usap.UpdateStorageAccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateStorageAccountParameters struct. +func (usap *UpdateStorageAccountParameters) 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 updateStorageAccountProperties UpdateStorageAccountProperties + err = json.Unmarshal(*v, &updateStorageAccountProperties) + if err != nil { + return err + } + usap.UpdateStorageAccountProperties = &updateStorageAccountProperties + } + } + } + + return nil +} + +// UpdateStorageAccountProperties the Azure Storage account properties to use when updating an Azure +// Storage account. +type UpdateStorageAccountProperties struct { + // AccessKey - The updated access key associated with this Azure Storage account that will be used to connect to it. + AccessKey *string `json:"accessKey,omitempty"` + // Suffix - The optional suffix for the storage account. + Suffix *string `json:"suffix,omitempty"` +} + +// UpdateStorageAccountWithAccountParameters the parameters used to update an Azure Storage account while +// updating a Data Lake Analytics account. +type UpdateStorageAccountWithAccountParameters struct { + // Name - The unique name of the Azure Storage account to update. + Name *string `json:"name,omitempty"` + // UpdateStorageAccountProperties - The Azure Storage account properties to use when updating an Azure Storage account. + *UpdateStorageAccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpdateStorageAccountWithAccountParameters. +func (usawap UpdateStorageAccountWithAccountParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if usawap.Name != nil { + objectMap["name"] = usawap.Name + } + if usawap.UpdateStorageAccountProperties != nil { + objectMap["properties"] = usawap.UpdateStorageAccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UpdateStorageAccountWithAccountParameters struct. +func (usawap *UpdateStorageAccountWithAccountParameters) 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 + } + usawap.Name = &name + } + case "properties": + if v != nil { + var updateStorageAccountProperties UpdateStorageAccountProperties + err = json.Unmarshal(*v, &updateStorageAccountProperties) + if err != nil { + return err + } + usawap.UpdateStorageAccountProperties = &updateStorageAccountProperties + } + } + } + + return nil +} + +// VirtualNetworkRule data Lake Analytics VirtualNetwork Rule information. +type VirtualNetworkRule struct { + // VirtualNetworkRuleProperties - READ-ONLY; The VirtualNetwork rule properties. + *VirtualNetworkRuleProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkRule. +func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct. +func (vnr *VirtualNetworkRule) 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 virtualNetworkRuleProperties VirtualNetworkRuleProperties + err = json.Unmarshal(*v, &virtualNetworkRuleProperties) + if err != nil { + return err + } + vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vnr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vnr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vnr.Type = &typeVar + } + } + } + + return nil +} + +// VirtualNetworkRuleListResult data Lake Analytics VirtualNetwork rule list information. +type VirtualNetworkRuleListResult struct { + // Value - READ-ONLY; The results of the list operation. + Value *[]VirtualNetworkRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The link (url) to the next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkRuleListResult. +func (vnrlr VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// VirtualNetworkRuleProperties the VirtualNetwork Rule properties. +type VirtualNetworkRuleProperties struct { + // SubnetID - READ-ONLY; The resource identifier for the subnet + SubnetID *string `json:"subnetId,omitempty"` + // VirtualNetworkRuleState - READ-ONLY; The current state of the VirtualNetwork Rule. Possible values include: 'VirtualNetworkRuleStateActive', 'VirtualNetworkRuleStateNetworkSourceDeleted', 'VirtualNetworkRuleStateFailed' + VirtualNetworkRuleState VirtualNetworkRuleState `json:"virtualNetworkRuleState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkRuleProperties. +func (vnrp VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/operations.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/operations.go new file mode 100644 index 000000000000..bf5d6a13d01c --- /dev/null +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/operations.go @@ -0,0 +1,98 @@ +package account + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the creates an Azure Data Lake Analytics account management client. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Data Lake Analytics REST API operations. +func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "account.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.OperationsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2015-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.DataLakeAnalytics/operations"), + 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +}