...

Source file src/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account

     1  package account
     2  
     3  // Copyright (c) Microsoft Corporation. All rights reserved.
     4  // Licensed under the MIT License. See License.txt in the project root for license information.
     5  //
     6  // Code generated by Microsoft (R) AutoRest Code Generator.
     7  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
     8  
     9  import (
    10  	"context"
    11  	"encoding/json"
    12  	"github.com/Azure/go-autorest/autorest"
    13  	"github.com/Azure/go-autorest/autorest/azure"
    14  	"github.com/Azure/go-autorest/autorest/date"
    15  	"github.com/Azure/go-autorest/autorest/to"
    16  	"github.com/Azure/go-autorest/tracing"
    17  	"github.com/gofrs/uuid"
    18  	"net/http"
    19  )
    20  
    21  // The package's fully qualified name.
    22  const fqdn = "github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account"
    23  
    24  // AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running
    25  // operation.
    26  type AccountsCreateFutureType struct {
    27  	azure.FutureAPI
    28  	// Result returns the result of the asynchronous operation.
    29  	// If the operation has not completed it will return an error.
    30  	Result func(AccountsClient) (DataLakeAnalyticsAccount, error)
    31  }
    32  
    33  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
    34  func (future *AccountsCreateFutureType) UnmarshalJSON(body []byte) error {
    35  	var azFuture azure.Future
    36  	if err := json.Unmarshal(body, &azFuture); err != nil {
    37  		return err
    38  	}
    39  	future.FutureAPI = &azFuture
    40  	future.Result = future.result
    41  	return nil
    42  }
    43  
    44  // result is the default implementation for AccountsCreateFutureType.Result.
    45  func (future *AccountsCreateFutureType) result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
    46  	var done bool
    47  	done, err = future.DoneWithContext(context.Background(), client)
    48  	if err != nil {
    49  		err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", future.Response(), "Polling failure")
    50  		return
    51  	}
    52  	if !done {
    53  		dlaa.Response.Response = future.Response()
    54  		err = azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType")
    55  		return
    56  	}
    57  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
    58  	if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
    59  		dlaa, err = client.CreateResponder(dlaa.Response.Response)
    60  		if err != nil {
    61  			err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", dlaa.Response.Response, "Failure responding to request")
    62  		}
    63  	}
    64  	return
    65  }
    66  
    67  // AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running
    68  // operation.
    69  type AccountsDeleteFutureType struct {
    70  	azure.FutureAPI
    71  	// Result returns the result of the asynchronous operation.
    72  	// If the operation has not completed it will return an error.
    73  	Result func(AccountsClient) (autorest.Response, error)
    74  }
    75  
    76  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
    77  func (future *AccountsDeleteFutureType) UnmarshalJSON(body []byte) error {
    78  	var azFuture azure.Future
    79  	if err := json.Unmarshal(body, &azFuture); err != nil {
    80  		return err
    81  	}
    82  	future.FutureAPI = &azFuture
    83  	future.Result = future.result
    84  	return nil
    85  }
    86  
    87  // result is the default implementation for AccountsDeleteFutureType.Result.
    88  func (future *AccountsDeleteFutureType) result(client AccountsClient) (ar autorest.Response, err error) {
    89  	var done bool
    90  	done, err = future.DoneWithContext(context.Background(), client)
    91  	if err != nil {
    92  		err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", future.Response(), "Polling failure")
    93  		return
    94  	}
    95  	if !done {
    96  		ar.Response = future.Response()
    97  		err = azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType")
    98  		return
    99  	}
   100  	ar.Response = future.Response()
   101  	return
   102  }
   103  
   104  // AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running
   105  // operation.
   106  type AccountsUpdateFutureType struct {
   107  	azure.FutureAPI
   108  	// Result returns the result of the asynchronous operation.
   109  	// If the operation has not completed it will return an error.
   110  	Result func(AccountsClient) (DataLakeAnalyticsAccount, error)
   111  }
   112  
   113  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   114  func (future *AccountsUpdateFutureType) UnmarshalJSON(body []byte) error {
   115  	var azFuture azure.Future
   116  	if err := json.Unmarshal(body, &azFuture); err != nil {
   117  		return err
   118  	}
   119  	future.FutureAPI = &azFuture
   120  	future.Result = future.result
   121  	return nil
   122  }
   123  
   124  // result is the default implementation for AccountsUpdateFutureType.Result.
   125  func (future *AccountsUpdateFutureType) result(client AccountsClient) (dlaa DataLakeAnalyticsAccount, err error) {
   126  	var done bool
   127  	done, err = future.DoneWithContext(context.Background(), client)
   128  	if err != nil {
   129  		err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", future.Response(), "Polling failure")
   130  		return
   131  	}
   132  	if !done {
   133  		dlaa.Response.Response = future.Response()
   134  		err = azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType")
   135  		return
   136  	}
   137  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   138  	if dlaa.Response.Response, err = future.GetResult(sender); err == nil && dlaa.Response.Response.StatusCode != http.StatusNoContent {
   139  		dlaa, err = client.UpdateResponder(dlaa.Response.Response)
   140  		if err != nil {
   141  			err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", dlaa.Response.Response, "Failure responding to request")
   142  		}
   143  	}
   144  	return
   145  }
   146  
   147  // AddDataLakeStoreParameters the parameters used to add a new Data Lake Store account.
   148  type AddDataLakeStoreParameters struct {
   149  	// AddDataLakeStoreProperties - The Data Lake Store account properties to use when adding a new Data Lake Store account.
   150  	*AddDataLakeStoreProperties `json:"properties,omitempty"`
   151  }
   152  
   153  // MarshalJSON is the custom marshaler for AddDataLakeStoreParameters.
   154  func (adlsp AddDataLakeStoreParameters) MarshalJSON() ([]byte, error) {
   155  	objectMap := make(map[string]interface{})
   156  	if adlsp.AddDataLakeStoreProperties != nil {
   157  		objectMap["properties"] = adlsp.AddDataLakeStoreProperties
   158  	}
   159  	return json.Marshal(objectMap)
   160  }
   161  
   162  // UnmarshalJSON is the custom unmarshaler for AddDataLakeStoreParameters struct.
   163  func (adlsp *AddDataLakeStoreParameters) UnmarshalJSON(body []byte) error {
   164  	var m map[string]*json.RawMessage
   165  	err := json.Unmarshal(body, &m)
   166  	if err != nil {
   167  		return err
   168  	}
   169  	for k, v := range m {
   170  		switch k {
   171  		case "properties":
   172  			if v != nil {
   173  				var addDataLakeStoreProperties AddDataLakeStoreProperties
   174  				err = json.Unmarshal(*v, &addDataLakeStoreProperties)
   175  				if err != nil {
   176  					return err
   177  				}
   178  				adlsp.AddDataLakeStoreProperties = &addDataLakeStoreProperties
   179  			}
   180  		}
   181  	}
   182  
   183  	return nil
   184  }
   185  
   186  // AddDataLakeStoreProperties the Data Lake Store account properties to use when adding a new Data Lake
   187  // Store account.
   188  type AddDataLakeStoreProperties struct {
   189  	// Suffix - The optional suffix for the Data Lake Store account.
   190  	Suffix *string `json:"suffix,omitempty"`
   191  }
   192  
   193  // AddDataLakeStoreWithAccountParameters the parameters used to add a new Data Lake Store account while
   194  // creating a new Data Lake Analytics account.
   195  type AddDataLakeStoreWithAccountParameters struct {
   196  	// Name - The unique name of the Data Lake Store account to add.
   197  	Name *string `json:"name,omitempty"`
   198  	// AddDataLakeStoreProperties - The Data Lake Store account properties to use when adding a new Data Lake Store account.
   199  	*AddDataLakeStoreProperties `json:"properties,omitempty"`
   200  }
   201  
   202  // MarshalJSON is the custom marshaler for AddDataLakeStoreWithAccountParameters.
   203  func (adlswap AddDataLakeStoreWithAccountParameters) MarshalJSON() ([]byte, error) {
   204  	objectMap := make(map[string]interface{})
   205  	if adlswap.Name != nil {
   206  		objectMap["name"] = adlswap.Name
   207  	}
   208  	if adlswap.AddDataLakeStoreProperties != nil {
   209  		objectMap["properties"] = adlswap.AddDataLakeStoreProperties
   210  	}
   211  	return json.Marshal(objectMap)
   212  }
   213  
   214  // UnmarshalJSON is the custom unmarshaler for AddDataLakeStoreWithAccountParameters struct.
   215  func (adlswap *AddDataLakeStoreWithAccountParameters) UnmarshalJSON(body []byte) error {
   216  	var m map[string]*json.RawMessage
   217  	err := json.Unmarshal(body, &m)
   218  	if err != nil {
   219  		return err
   220  	}
   221  	for k, v := range m {
   222  		switch k {
   223  		case "name":
   224  			if v != nil {
   225  				var name string
   226  				err = json.Unmarshal(*v, &name)
   227  				if err != nil {
   228  					return err
   229  				}
   230  				adlswap.Name = &name
   231  			}
   232  		case "properties":
   233  			if v != nil {
   234  				var addDataLakeStoreProperties AddDataLakeStoreProperties
   235  				err = json.Unmarshal(*v, &addDataLakeStoreProperties)
   236  				if err != nil {
   237  					return err
   238  				}
   239  				adlswap.AddDataLakeStoreProperties = &addDataLakeStoreProperties
   240  			}
   241  		}
   242  	}
   243  
   244  	return nil
   245  }
   246  
   247  // AddStorageAccountParameters the parameters used to add a new Azure Storage account.
   248  type AddStorageAccountParameters struct {
   249  	// AddStorageAccountProperties - The Azure Storage account properties to use when adding a new Azure Storage account.
   250  	*AddStorageAccountProperties `json:"properties,omitempty"`
   251  }
   252  
   253  // MarshalJSON is the custom marshaler for AddStorageAccountParameters.
   254  func (asap AddStorageAccountParameters) MarshalJSON() ([]byte, error) {
   255  	objectMap := make(map[string]interface{})
   256  	if asap.AddStorageAccountProperties != nil {
   257  		objectMap["properties"] = asap.AddStorageAccountProperties
   258  	}
   259  	return json.Marshal(objectMap)
   260  }
   261  
   262  // UnmarshalJSON is the custom unmarshaler for AddStorageAccountParameters struct.
   263  func (asap *AddStorageAccountParameters) UnmarshalJSON(body []byte) error {
   264  	var m map[string]*json.RawMessage
   265  	err := json.Unmarshal(body, &m)
   266  	if err != nil {
   267  		return err
   268  	}
   269  	for k, v := range m {
   270  		switch k {
   271  		case "properties":
   272  			if v != nil {
   273  				var addStorageAccountProperties AddStorageAccountProperties
   274  				err = json.Unmarshal(*v, &addStorageAccountProperties)
   275  				if err != nil {
   276  					return err
   277  				}
   278  				asap.AddStorageAccountProperties = &addStorageAccountProperties
   279  			}
   280  		}
   281  	}
   282  
   283  	return nil
   284  }
   285  
   286  // AddStorageAccountProperties the Azure Storage account properties to use when adding a new Azure Storage
   287  // account.
   288  type AddStorageAccountProperties struct {
   289  	// AccessKey - The access key associated with this Azure Storage account that will be used to connect to it.
   290  	AccessKey *string `json:"accessKey,omitempty"`
   291  	// Suffix - The optional suffix for the storage account.
   292  	Suffix *string `json:"suffix,omitempty"`
   293  }
   294  
   295  // AddStorageAccountWithAccountParameters the parameters used to add a new Azure Storage account while
   296  // creating a new Data Lake Analytics account.
   297  type AddStorageAccountWithAccountParameters struct {
   298  	// Name - The unique name of the Azure Storage account to add.
   299  	Name *string `json:"name,omitempty"`
   300  	// AddStorageAccountProperties - The Azure Storage account properties to use when adding a new Azure Storage account.
   301  	*AddStorageAccountProperties `json:"properties,omitempty"`
   302  }
   303  
   304  // MarshalJSON is the custom marshaler for AddStorageAccountWithAccountParameters.
   305  func (asawap AddStorageAccountWithAccountParameters) MarshalJSON() ([]byte, error) {
   306  	objectMap := make(map[string]interface{})
   307  	if asawap.Name != nil {
   308  		objectMap["name"] = asawap.Name
   309  	}
   310  	if asawap.AddStorageAccountProperties != nil {
   311  		objectMap["properties"] = asawap.AddStorageAccountProperties
   312  	}
   313  	return json.Marshal(objectMap)
   314  }
   315  
   316  // UnmarshalJSON is the custom unmarshaler for AddStorageAccountWithAccountParameters struct.
   317  func (asawap *AddStorageAccountWithAccountParameters) UnmarshalJSON(body []byte) error {
   318  	var m map[string]*json.RawMessage
   319  	err := json.Unmarshal(body, &m)
   320  	if err != nil {
   321  		return err
   322  	}
   323  	for k, v := range m {
   324  		switch k {
   325  		case "name":
   326  			if v != nil {
   327  				var name string
   328  				err = json.Unmarshal(*v, &name)
   329  				if err != nil {
   330  					return err
   331  				}
   332  				asawap.Name = &name
   333  			}
   334  		case "properties":
   335  			if v != nil {
   336  				var addStorageAccountProperties AddStorageAccountProperties
   337  				err = json.Unmarshal(*v, &addStorageAccountProperties)
   338  				if err != nil {
   339  					return err
   340  				}
   341  				asawap.AddStorageAccountProperties = &addStorageAccountProperties
   342  			}
   343  		}
   344  	}
   345  
   346  	return nil
   347  }
   348  
   349  // CapabilityInformation subscription-level properties and limits for Data Lake Analytics.
   350  type CapabilityInformation struct {
   351  	autorest.Response `json:"-"`
   352  	// SubscriptionID - READ-ONLY; The subscription credentials that uniquely identifies the subscription.
   353  	SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"`
   354  	// State - READ-ONLY; The subscription state. Possible values include: 'SubscriptionStateRegistered', 'SubscriptionStateSuspended', 'SubscriptionStateDeleted', 'SubscriptionStateUnregistered', 'SubscriptionStateWarned'
   355  	State SubscriptionState `json:"state,omitempty"`
   356  	// MaxAccountCount - READ-ONLY; The maximum supported number of accounts under this subscription.
   357  	MaxAccountCount *int32 `json:"maxAccountCount,omitempty"`
   358  	// AccountCount - READ-ONLY; The current number of accounts under this subscription.
   359  	AccountCount *int32 `json:"accountCount,omitempty"`
   360  	// MigrationState - READ-ONLY; The Boolean value of true or false to indicate the maintenance state.
   361  	MigrationState *bool `json:"migrationState,omitempty"`
   362  }
   363  
   364  // MarshalJSON is the custom marshaler for CapabilityInformation.
   365  func (ci CapabilityInformation) MarshalJSON() ([]byte, error) {
   366  	objectMap := make(map[string]interface{})
   367  	return json.Marshal(objectMap)
   368  }
   369  
   370  // CheckNameAvailabilityParameters data Lake Analytics account name availability check parameters.
   371  type CheckNameAvailabilityParameters struct {
   372  	// Name - The Data Lake Analytics name to check availability for.
   373  	Name *string `json:"name,omitempty"`
   374  	// Type - The resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeAnalytics/accounts
   375  	Type *string `json:"type,omitempty"`
   376  }
   377  
   378  // ComputePolicy data Lake Analytics compute policy information.
   379  type ComputePolicy struct {
   380  	autorest.Response `json:"-"`
   381  	// ComputePolicyProperties - READ-ONLY; The compute policy properties.
   382  	*ComputePolicyProperties `json:"properties,omitempty"`
   383  	// ID - READ-ONLY; The resource identifier.
   384  	ID *string `json:"id,omitempty"`
   385  	// Name - READ-ONLY; The resource name.
   386  	Name *string `json:"name,omitempty"`
   387  	// Type - READ-ONLY; The resource type.
   388  	Type *string `json:"type,omitempty"`
   389  }
   390  
   391  // MarshalJSON is the custom marshaler for ComputePolicy.
   392  func (cp ComputePolicy) MarshalJSON() ([]byte, error) {
   393  	objectMap := make(map[string]interface{})
   394  	return json.Marshal(objectMap)
   395  }
   396  
   397  // UnmarshalJSON is the custom unmarshaler for ComputePolicy struct.
   398  func (cp *ComputePolicy) UnmarshalJSON(body []byte) error {
   399  	var m map[string]*json.RawMessage
   400  	err := json.Unmarshal(body, &m)
   401  	if err != nil {
   402  		return err
   403  	}
   404  	for k, v := range m {
   405  		switch k {
   406  		case "properties":
   407  			if v != nil {
   408  				var computePolicyProperties ComputePolicyProperties
   409  				err = json.Unmarshal(*v, &computePolicyProperties)
   410  				if err != nil {
   411  					return err
   412  				}
   413  				cp.ComputePolicyProperties = &computePolicyProperties
   414  			}
   415  		case "id":
   416  			if v != nil {
   417  				var ID string
   418  				err = json.Unmarshal(*v, &ID)
   419  				if err != nil {
   420  					return err
   421  				}
   422  				cp.ID = &ID
   423  			}
   424  		case "name":
   425  			if v != nil {
   426  				var name string
   427  				err = json.Unmarshal(*v, &name)
   428  				if err != nil {
   429  					return err
   430  				}
   431  				cp.Name = &name
   432  			}
   433  		case "type":
   434  			if v != nil {
   435  				var typeVar string
   436  				err = json.Unmarshal(*v, &typeVar)
   437  				if err != nil {
   438  					return err
   439  				}
   440  				cp.Type = &typeVar
   441  			}
   442  		}
   443  	}
   444  
   445  	return nil
   446  }
   447  
   448  // ComputePolicyListResult the list of compute policies in the account.
   449  type ComputePolicyListResult struct {
   450  	autorest.Response `json:"-"`
   451  	// Value - READ-ONLY; The results of the list operation.
   452  	Value *[]ComputePolicy `json:"value,omitempty"`
   453  	// NextLink - READ-ONLY; The link (url) to the next page of results.
   454  	NextLink *string `json:"nextLink,omitempty"`
   455  }
   456  
   457  // MarshalJSON is the custom marshaler for ComputePolicyListResult.
   458  func (cplr ComputePolicyListResult) MarshalJSON() ([]byte, error) {
   459  	objectMap := make(map[string]interface{})
   460  	return json.Marshal(objectMap)
   461  }
   462  
   463  // ComputePolicyListResultIterator provides access to a complete listing of ComputePolicy values.
   464  type ComputePolicyListResultIterator struct {
   465  	i    int
   466  	page ComputePolicyListResultPage
   467  }
   468  
   469  // NextWithContext advances to the next value.  If there was an error making
   470  // the request the iterator does not advance and the error is returned.
   471  func (iter *ComputePolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
   472  	if tracing.IsEnabled() {
   473  		ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultIterator.NextWithContext")
   474  		defer func() {
   475  			sc := -1
   476  			if iter.Response().Response.Response != nil {
   477  				sc = iter.Response().Response.Response.StatusCode
   478  			}
   479  			tracing.EndSpan(ctx, sc, err)
   480  		}()
   481  	}
   482  	iter.i++
   483  	if iter.i < len(iter.page.Values()) {
   484  		return nil
   485  	}
   486  	err = iter.page.NextWithContext(ctx)
   487  	if err != nil {
   488  		iter.i--
   489  		return err
   490  	}
   491  	iter.i = 0
   492  	return nil
   493  }
   494  
   495  // Next advances to the next value.  If there was an error making
   496  // the request the iterator does not advance and the error is returned.
   497  // Deprecated: Use NextWithContext() instead.
   498  func (iter *ComputePolicyListResultIterator) Next() error {
   499  	return iter.NextWithContext(context.Background())
   500  }
   501  
   502  // NotDone returns true if the enumeration should be started or is not yet complete.
   503  func (iter ComputePolicyListResultIterator) NotDone() bool {
   504  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   505  }
   506  
   507  // Response returns the raw server response from the last page request.
   508  func (iter ComputePolicyListResultIterator) Response() ComputePolicyListResult {
   509  	return iter.page.Response()
   510  }
   511  
   512  // Value returns the current value or a zero-initialized value if the
   513  // iterator has advanced beyond the end of the collection.
   514  func (iter ComputePolicyListResultIterator) Value() ComputePolicy {
   515  	if !iter.page.NotDone() {
   516  		return ComputePolicy{}
   517  	}
   518  	return iter.page.Values()[iter.i]
   519  }
   520  
   521  // Creates a new instance of the ComputePolicyListResultIterator type.
   522  func NewComputePolicyListResultIterator(page ComputePolicyListResultPage) ComputePolicyListResultIterator {
   523  	return ComputePolicyListResultIterator{page: page}
   524  }
   525  
   526  // IsEmpty returns true if the ListResult contains no values.
   527  func (cplr ComputePolicyListResult) IsEmpty() bool {
   528  	return cplr.Value == nil || len(*cplr.Value) == 0
   529  }
   530  
   531  // hasNextLink returns true if the NextLink is not empty.
   532  func (cplr ComputePolicyListResult) hasNextLink() bool {
   533  	return cplr.NextLink != nil && len(*cplr.NextLink) != 0
   534  }
   535  
   536  // computePolicyListResultPreparer prepares a request to retrieve the next set of results.
   537  // It returns nil if no more results exist.
   538  func (cplr ComputePolicyListResult) computePolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
   539  	if !cplr.hasNextLink() {
   540  		return nil, nil
   541  	}
   542  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   543  		autorest.AsJSON(),
   544  		autorest.AsGet(),
   545  		autorest.WithBaseURL(to.String(cplr.NextLink)))
   546  }
   547  
   548  // ComputePolicyListResultPage contains a page of ComputePolicy values.
   549  type ComputePolicyListResultPage struct {
   550  	fn   func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)
   551  	cplr ComputePolicyListResult
   552  }
   553  
   554  // NextWithContext advances to the next page of values.  If there was an error making
   555  // the request the page does not advance and the error is returned.
   556  func (page *ComputePolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
   557  	if tracing.IsEnabled() {
   558  		ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultPage.NextWithContext")
   559  		defer func() {
   560  			sc := -1
   561  			if page.Response().Response.Response != nil {
   562  				sc = page.Response().Response.Response.StatusCode
   563  			}
   564  			tracing.EndSpan(ctx, sc, err)
   565  		}()
   566  	}
   567  	for {
   568  		next, err := page.fn(ctx, page.cplr)
   569  		if err != nil {
   570  			return err
   571  		}
   572  		page.cplr = next
   573  		if !next.hasNextLink() || !next.IsEmpty() {
   574  			break
   575  		}
   576  	}
   577  	return nil
   578  }
   579  
   580  // Next advances to the next page of values.  If there was an error making
   581  // the request the page does not advance and the error is returned.
   582  // Deprecated: Use NextWithContext() instead.
   583  func (page *ComputePolicyListResultPage) Next() error {
   584  	return page.NextWithContext(context.Background())
   585  }
   586  
   587  // NotDone returns true if the page enumeration should be started or is not yet complete.
   588  func (page ComputePolicyListResultPage) NotDone() bool {
   589  	return !page.cplr.IsEmpty()
   590  }
   591  
   592  // Response returns the raw server response from the last page request.
   593  func (page ComputePolicyListResultPage) Response() ComputePolicyListResult {
   594  	return page.cplr
   595  }
   596  
   597  // Values returns the slice of values for the current page or nil if there are no values.
   598  func (page ComputePolicyListResultPage) Values() []ComputePolicy {
   599  	if page.cplr.IsEmpty() {
   600  		return nil
   601  	}
   602  	return *page.cplr.Value
   603  }
   604  
   605  // Creates a new instance of the ComputePolicyListResultPage type.
   606  func NewComputePolicyListResultPage(cur ComputePolicyListResult, getNextPage func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)) ComputePolicyListResultPage {
   607  	return ComputePolicyListResultPage{
   608  		fn:   getNextPage,
   609  		cplr: cur,
   610  	}
   611  }
   612  
   613  // ComputePolicyProperties the compute policy properties.
   614  type ComputePolicyProperties struct {
   615  	// ObjectID - READ-ONLY; The AAD object identifier for the entity to create a policy for.
   616  	ObjectID *uuid.UUID `json:"objectId,omitempty"`
   617  	// ObjectType - READ-ONLY; The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'
   618  	ObjectType AADObjectType `json:"objectType,omitempty"`
   619  	// MaxDegreeOfParallelismPerJob - READ-ONLY; The maximum degree of parallelism per job this user can use to submit jobs.
   620  	MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
   621  	// MinPriorityPerJob - READ-ONLY; The minimum priority per job this user can use to submit jobs.
   622  	MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
   623  }
   624  
   625  // MarshalJSON is the custom marshaler for ComputePolicyProperties.
   626  func (cpp ComputePolicyProperties) MarshalJSON() ([]byte, error) {
   627  	objectMap := make(map[string]interface{})
   628  	return json.Marshal(objectMap)
   629  }
   630  
   631  // CreateComputePolicyWithAccountParameters the parameters used to create a new compute policy while
   632  // creating a new Data Lake Analytics account.
   633  type CreateComputePolicyWithAccountParameters struct {
   634  	// Name - The unique name of the compute policy to create.
   635  	Name *string `json:"name,omitempty"`
   636  	// CreateOrUpdateComputePolicyProperties - The compute policy properties to use when creating a new compute policy.
   637  	*CreateOrUpdateComputePolicyProperties `json:"properties,omitempty"`
   638  }
   639  
   640  // MarshalJSON is the custom marshaler for CreateComputePolicyWithAccountParameters.
   641  func (ccpwap CreateComputePolicyWithAccountParameters) MarshalJSON() ([]byte, error) {
   642  	objectMap := make(map[string]interface{})
   643  	if ccpwap.Name != nil {
   644  		objectMap["name"] = ccpwap.Name
   645  	}
   646  	if ccpwap.CreateOrUpdateComputePolicyProperties != nil {
   647  		objectMap["properties"] = ccpwap.CreateOrUpdateComputePolicyProperties
   648  	}
   649  	return json.Marshal(objectMap)
   650  }
   651  
   652  // UnmarshalJSON is the custom unmarshaler for CreateComputePolicyWithAccountParameters struct.
   653  func (ccpwap *CreateComputePolicyWithAccountParameters) UnmarshalJSON(body []byte) error {
   654  	var m map[string]*json.RawMessage
   655  	err := json.Unmarshal(body, &m)
   656  	if err != nil {
   657  		return err
   658  	}
   659  	for k, v := range m {
   660  		switch k {
   661  		case "name":
   662  			if v != nil {
   663  				var name string
   664  				err = json.Unmarshal(*v, &name)
   665  				if err != nil {
   666  					return err
   667  				}
   668  				ccpwap.Name = &name
   669  			}
   670  		case "properties":
   671  			if v != nil {
   672  				var createOrUpdateComputePolicyProperties CreateOrUpdateComputePolicyProperties
   673  				err = json.Unmarshal(*v, &createOrUpdateComputePolicyProperties)
   674  				if err != nil {
   675  					return err
   676  				}
   677  				ccpwap.CreateOrUpdateComputePolicyProperties = &createOrUpdateComputePolicyProperties
   678  			}
   679  		}
   680  	}
   681  
   682  	return nil
   683  }
   684  
   685  // CreateDataLakeAnalyticsAccountParameters the parameters to use for creating a Data Lake Analytics
   686  // account.
   687  type CreateDataLakeAnalyticsAccountParameters struct {
   688  	// Location - The resource location.
   689  	Location *string `json:"location,omitempty"`
   690  	// Tags - The resource tags.
   691  	Tags map[string]*string `json:"tags"`
   692  	// CreateDataLakeAnalyticsAccountProperties - The Data Lake Analytics account properties to use for creating.
   693  	*CreateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"`
   694  }
   695  
   696  // MarshalJSON is the custom marshaler for CreateDataLakeAnalyticsAccountParameters.
   697  func (cdlaap CreateDataLakeAnalyticsAccountParameters) MarshalJSON() ([]byte, error) {
   698  	objectMap := make(map[string]interface{})
   699  	if cdlaap.Location != nil {
   700  		objectMap["location"] = cdlaap.Location
   701  	}
   702  	if cdlaap.Tags != nil {
   703  		objectMap["tags"] = cdlaap.Tags
   704  	}
   705  	if cdlaap.CreateDataLakeAnalyticsAccountProperties != nil {
   706  		objectMap["properties"] = cdlaap.CreateDataLakeAnalyticsAccountProperties
   707  	}
   708  	return json.Marshal(objectMap)
   709  }
   710  
   711  // UnmarshalJSON is the custom unmarshaler for CreateDataLakeAnalyticsAccountParameters struct.
   712  func (cdlaap *CreateDataLakeAnalyticsAccountParameters) UnmarshalJSON(body []byte) error {
   713  	var m map[string]*json.RawMessage
   714  	err := json.Unmarshal(body, &m)
   715  	if err != nil {
   716  		return err
   717  	}
   718  	for k, v := range m {
   719  		switch k {
   720  		case "location":
   721  			if v != nil {
   722  				var location string
   723  				err = json.Unmarshal(*v, &location)
   724  				if err != nil {
   725  					return err
   726  				}
   727  				cdlaap.Location = &location
   728  			}
   729  		case "tags":
   730  			if v != nil {
   731  				var tags map[string]*string
   732  				err = json.Unmarshal(*v, &tags)
   733  				if err != nil {
   734  					return err
   735  				}
   736  				cdlaap.Tags = tags
   737  			}
   738  		case "properties":
   739  			if v != nil {
   740  				var createDataLakeAnalyticsAccountProperties CreateDataLakeAnalyticsAccountProperties
   741  				err = json.Unmarshal(*v, &createDataLakeAnalyticsAccountProperties)
   742  				if err != nil {
   743  					return err
   744  				}
   745  				cdlaap.CreateDataLakeAnalyticsAccountProperties = &createDataLakeAnalyticsAccountProperties
   746  			}
   747  		}
   748  	}
   749  
   750  	return nil
   751  }
   752  
   753  // CreateDataLakeAnalyticsAccountProperties ...
   754  type CreateDataLakeAnalyticsAccountProperties struct {
   755  	// DefaultDataLakeStoreAccount - The default Data Lake Store account associated with this account.
   756  	DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"`
   757  	// DataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account.
   758  	DataLakeStoreAccounts *[]AddDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"`
   759  	// StorageAccounts - The list of Azure Blob Storage accounts associated with this account.
   760  	StorageAccounts *[]AddStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"`
   761  	// ComputePolicies - The list of compute policies associated with this account.
   762  	ComputePolicies *[]CreateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"`
   763  	// FirewallRules - The list of firewall rules associated with this account.
   764  	FirewallRules *[]CreateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
   765  	// FirewallState - The current state of the IP address firewall for this account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
   766  	FirewallState FirewallState `json:"firewallState,omitempty"`
   767  	// 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'
   768  	FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
   769  	// NewTier - The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours'
   770  	NewTier TierType `json:"newTier,omitempty"`
   771  	// MaxJobCount - The maximum supported jobs running under the account at the same time.
   772  	MaxJobCount *int32 `json:"maxJobCount,omitempty"`
   773  	// MaxDegreeOfParallelism - The maximum supported degree of parallelism for this account.
   774  	MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"`
   775  	// MaxDegreeOfParallelismPerJob - The maximum supported degree of parallelism per job for this account.
   776  	MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
   777  	// MinPriorityPerJob - The minimum supported priority per job for this account.
   778  	MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
   779  	// QueryStoreRetention - The number of days that job metadata is retained.
   780  	QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
   781  }
   782  
   783  // CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating
   784  // a new Data Lake Analytics account.
   785  type CreateFirewallRuleWithAccountParameters struct {
   786  	// Name - The unique name of the firewall rule to create.
   787  	Name *string `json:"name,omitempty"`
   788  	// CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule.
   789  	*CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"`
   790  }
   791  
   792  // MarshalJSON is the custom marshaler for CreateFirewallRuleWithAccountParameters.
   793  func (cfrwap CreateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) {
   794  	objectMap := make(map[string]interface{})
   795  	if cfrwap.Name != nil {
   796  		objectMap["name"] = cfrwap.Name
   797  	}
   798  	if cfrwap.CreateOrUpdateFirewallRuleProperties != nil {
   799  		objectMap["properties"] = cfrwap.CreateOrUpdateFirewallRuleProperties
   800  	}
   801  	return json.Marshal(objectMap)
   802  }
   803  
   804  // UnmarshalJSON is the custom unmarshaler for CreateFirewallRuleWithAccountParameters struct.
   805  func (cfrwap *CreateFirewallRuleWithAccountParameters) UnmarshalJSON(body []byte) error {
   806  	var m map[string]*json.RawMessage
   807  	err := json.Unmarshal(body, &m)
   808  	if err != nil {
   809  		return err
   810  	}
   811  	for k, v := range m {
   812  		switch k {
   813  		case "name":
   814  			if v != nil {
   815  				var name string
   816  				err = json.Unmarshal(*v, &name)
   817  				if err != nil {
   818  					return err
   819  				}
   820  				cfrwap.Name = &name
   821  			}
   822  		case "properties":
   823  			if v != nil {
   824  				var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties
   825  				err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties)
   826  				if err != nil {
   827  					return err
   828  				}
   829  				cfrwap.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties
   830  			}
   831  		}
   832  	}
   833  
   834  	return nil
   835  }
   836  
   837  // CreateOrUpdateComputePolicyParameters the parameters used to create a new compute policy.
   838  type CreateOrUpdateComputePolicyParameters struct {
   839  	// CreateOrUpdateComputePolicyProperties - The compute policy properties to use when creating a new compute policy.
   840  	*CreateOrUpdateComputePolicyProperties `json:"properties,omitempty"`
   841  }
   842  
   843  // MarshalJSON is the custom marshaler for CreateOrUpdateComputePolicyParameters.
   844  func (coucpp CreateOrUpdateComputePolicyParameters) MarshalJSON() ([]byte, error) {
   845  	objectMap := make(map[string]interface{})
   846  	if coucpp.CreateOrUpdateComputePolicyProperties != nil {
   847  		objectMap["properties"] = coucpp.CreateOrUpdateComputePolicyProperties
   848  	}
   849  	return json.Marshal(objectMap)
   850  }
   851  
   852  // UnmarshalJSON is the custom unmarshaler for CreateOrUpdateComputePolicyParameters struct.
   853  func (coucpp *CreateOrUpdateComputePolicyParameters) UnmarshalJSON(body []byte) error {
   854  	var m map[string]*json.RawMessage
   855  	err := json.Unmarshal(body, &m)
   856  	if err != nil {
   857  		return err
   858  	}
   859  	for k, v := range m {
   860  		switch k {
   861  		case "properties":
   862  			if v != nil {
   863  				var createOrUpdateComputePolicyProperties CreateOrUpdateComputePolicyProperties
   864  				err = json.Unmarshal(*v, &createOrUpdateComputePolicyProperties)
   865  				if err != nil {
   866  					return err
   867  				}
   868  				coucpp.CreateOrUpdateComputePolicyProperties = &createOrUpdateComputePolicyProperties
   869  			}
   870  		}
   871  	}
   872  
   873  	return nil
   874  }
   875  
   876  // CreateOrUpdateComputePolicyProperties the compute policy properties to use when creating a new compute
   877  // policy.
   878  type CreateOrUpdateComputePolicyProperties struct {
   879  	// ObjectID - The AAD object identifier for the entity to create a policy for.
   880  	ObjectID *uuid.UUID `json:"objectId,omitempty"`
   881  	// ObjectType - The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'
   882  	ObjectType AADObjectType `json:"objectType,omitempty"`
   883  	// 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.
   884  	MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
   885  	// 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.
   886  	MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
   887  }
   888  
   889  // CreateOrUpdateFirewallRuleParameters the parameters used to create a new firewall rule.
   890  type CreateOrUpdateFirewallRuleParameters struct {
   891  	// CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule.
   892  	*CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"`
   893  }
   894  
   895  // MarshalJSON is the custom marshaler for CreateOrUpdateFirewallRuleParameters.
   896  func (coufrp CreateOrUpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) {
   897  	objectMap := make(map[string]interface{})
   898  	if coufrp.CreateOrUpdateFirewallRuleProperties != nil {
   899  		objectMap["properties"] = coufrp.CreateOrUpdateFirewallRuleProperties
   900  	}
   901  	return json.Marshal(objectMap)
   902  }
   903  
   904  // UnmarshalJSON is the custom unmarshaler for CreateOrUpdateFirewallRuleParameters struct.
   905  func (coufrp *CreateOrUpdateFirewallRuleParameters) UnmarshalJSON(body []byte) error {
   906  	var m map[string]*json.RawMessage
   907  	err := json.Unmarshal(body, &m)
   908  	if err != nil {
   909  		return err
   910  	}
   911  	for k, v := range m {
   912  		switch k {
   913  		case "properties":
   914  			if v != nil {
   915  				var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties
   916  				err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties)
   917  				if err != nil {
   918  					return err
   919  				}
   920  				coufrp.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties
   921  			}
   922  		}
   923  	}
   924  
   925  	return nil
   926  }
   927  
   928  // CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall
   929  // rule.
   930  type CreateOrUpdateFirewallRuleProperties struct {
   931  	// 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.
   932  	StartIPAddress *string `json:"startIpAddress,omitempty"`
   933  	// 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.
   934  	EndIPAddress *string `json:"endIpAddress,omitempty"`
   935  }
   936  
   937  // DataLakeAnalyticsAccount a Data Lake Analytics account object, containing all information associated
   938  // with the named Data Lake Analytics account.
   939  type DataLakeAnalyticsAccount struct {
   940  	autorest.Response `json:"-"`
   941  	// DataLakeAnalyticsAccountProperties - READ-ONLY; The properties defined by Data Lake Analytics all properties are specific to each resource provider.
   942  	*DataLakeAnalyticsAccountProperties `json:"properties,omitempty"`
   943  	// ID - READ-ONLY; The resource identifer.
   944  	ID *string `json:"id,omitempty"`
   945  	// Name - READ-ONLY; The resource name.
   946  	Name *string `json:"name,omitempty"`
   947  	// Type - READ-ONLY; The resource type.
   948  	Type *string `json:"type,omitempty"`
   949  	// Location - READ-ONLY; The resource location.
   950  	Location *string `json:"location,omitempty"`
   951  	// Tags - READ-ONLY; The resource tags.
   952  	Tags map[string]*string `json:"tags"`
   953  }
   954  
   955  // MarshalJSON is the custom marshaler for DataLakeAnalyticsAccount.
   956  func (dlaa DataLakeAnalyticsAccount) MarshalJSON() ([]byte, error) {
   957  	objectMap := make(map[string]interface{})
   958  	return json.Marshal(objectMap)
   959  }
   960  
   961  // UnmarshalJSON is the custom unmarshaler for DataLakeAnalyticsAccount struct.
   962  func (dlaa *DataLakeAnalyticsAccount) UnmarshalJSON(body []byte) error {
   963  	var m map[string]*json.RawMessage
   964  	err := json.Unmarshal(body, &m)
   965  	if err != nil {
   966  		return err
   967  	}
   968  	for k, v := range m {
   969  		switch k {
   970  		case "properties":
   971  			if v != nil {
   972  				var dataLakeAnalyticsAccountProperties DataLakeAnalyticsAccountProperties
   973  				err = json.Unmarshal(*v, &dataLakeAnalyticsAccountProperties)
   974  				if err != nil {
   975  					return err
   976  				}
   977  				dlaa.DataLakeAnalyticsAccountProperties = &dataLakeAnalyticsAccountProperties
   978  			}
   979  		case "id":
   980  			if v != nil {
   981  				var ID string
   982  				err = json.Unmarshal(*v, &ID)
   983  				if err != nil {
   984  					return err
   985  				}
   986  				dlaa.ID = &ID
   987  			}
   988  		case "name":
   989  			if v != nil {
   990  				var name string
   991  				err = json.Unmarshal(*v, &name)
   992  				if err != nil {
   993  					return err
   994  				}
   995  				dlaa.Name = &name
   996  			}
   997  		case "type":
   998  			if v != nil {
   999  				var typeVar string
  1000  				err = json.Unmarshal(*v, &typeVar)
  1001  				if err != nil {
  1002  					return err
  1003  				}
  1004  				dlaa.Type = &typeVar
  1005  			}
  1006  		case "location":
  1007  			if v != nil {
  1008  				var location string
  1009  				err = json.Unmarshal(*v, &location)
  1010  				if err != nil {
  1011  					return err
  1012  				}
  1013  				dlaa.Location = &location
  1014  			}
  1015  		case "tags":
  1016  			if v != nil {
  1017  				var tags map[string]*string
  1018  				err = json.Unmarshal(*v, &tags)
  1019  				if err != nil {
  1020  					return err
  1021  				}
  1022  				dlaa.Tags = tags
  1023  			}
  1024  		}
  1025  	}
  1026  
  1027  	return nil
  1028  }
  1029  
  1030  // DataLakeAnalyticsAccountBasic a Data Lake Analytics account object, containing all information
  1031  // associated with the named Data Lake Analytics account.
  1032  type DataLakeAnalyticsAccountBasic struct {
  1033  	// DataLakeAnalyticsAccountPropertiesBasic - READ-ONLY; The properties defined by Data Lake Analytics all properties are specific to each resource provider.
  1034  	*DataLakeAnalyticsAccountPropertiesBasic `json:"properties,omitempty"`
  1035  	// ID - READ-ONLY; The resource identifer.
  1036  	ID *string `json:"id,omitempty"`
  1037  	// Name - READ-ONLY; The resource name.
  1038  	Name *string `json:"name,omitempty"`
  1039  	// Type - READ-ONLY; The resource type.
  1040  	Type *string `json:"type,omitempty"`
  1041  	// Location - READ-ONLY; The resource location.
  1042  	Location *string `json:"location,omitempty"`
  1043  	// Tags - READ-ONLY; The resource tags.
  1044  	Tags map[string]*string `json:"tags"`
  1045  }
  1046  
  1047  // MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountBasic.
  1048  func (dlaab DataLakeAnalyticsAccountBasic) MarshalJSON() ([]byte, error) {
  1049  	objectMap := make(map[string]interface{})
  1050  	return json.Marshal(objectMap)
  1051  }
  1052  
  1053  // UnmarshalJSON is the custom unmarshaler for DataLakeAnalyticsAccountBasic struct.
  1054  func (dlaab *DataLakeAnalyticsAccountBasic) UnmarshalJSON(body []byte) error {
  1055  	var m map[string]*json.RawMessage
  1056  	err := json.Unmarshal(body, &m)
  1057  	if err != nil {
  1058  		return err
  1059  	}
  1060  	for k, v := range m {
  1061  		switch k {
  1062  		case "properties":
  1063  			if v != nil {
  1064  				var dataLakeAnalyticsAccountPropertiesBasic DataLakeAnalyticsAccountPropertiesBasic
  1065  				err = json.Unmarshal(*v, &dataLakeAnalyticsAccountPropertiesBasic)
  1066  				if err != nil {
  1067  					return err
  1068  				}
  1069  				dlaab.DataLakeAnalyticsAccountPropertiesBasic = &dataLakeAnalyticsAccountPropertiesBasic
  1070  			}
  1071  		case "id":
  1072  			if v != nil {
  1073  				var ID string
  1074  				err = json.Unmarshal(*v, &ID)
  1075  				if err != nil {
  1076  					return err
  1077  				}
  1078  				dlaab.ID = &ID
  1079  			}
  1080  		case "name":
  1081  			if v != nil {
  1082  				var name string
  1083  				err = json.Unmarshal(*v, &name)
  1084  				if err != nil {
  1085  					return err
  1086  				}
  1087  				dlaab.Name = &name
  1088  			}
  1089  		case "type":
  1090  			if v != nil {
  1091  				var typeVar string
  1092  				err = json.Unmarshal(*v, &typeVar)
  1093  				if err != nil {
  1094  					return err
  1095  				}
  1096  				dlaab.Type = &typeVar
  1097  			}
  1098  		case "location":
  1099  			if v != nil {
  1100  				var location string
  1101  				err = json.Unmarshal(*v, &location)
  1102  				if err != nil {
  1103  					return err
  1104  				}
  1105  				dlaab.Location = &location
  1106  			}
  1107  		case "tags":
  1108  			if v != nil {
  1109  				var tags map[string]*string
  1110  				err = json.Unmarshal(*v, &tags)
  1111  				if err != nil {
  1112  					return err
  1113  				}
  1114  				dlaab.Tags = tags
  1115  			}
  1116  		}
  1117  	}
  1118  
  1119  	return nil
  1120  }
  1121  
  1122  // DataLakeAnalyticsAccountListResult data Lake Analytics account list information.
  1123  type DataLakeAnalyticsAccountListResult struct {
  1124  	autorest.Response `json:"-"`
  1125  	// Value - READ-ONLY; The results of the list operation.
  1126  	Value *[]DataLakeAnalyticsAccountBasic `json:"value,omitempty"`
  1127  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  1128  	NextLink *string `json:"nextLink,omitempty"`
  1129  }
  1130  
  1131  // MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountListResult.
  1132  func (dlaalr DataLakeAnalyticsAccountListResult) MarshalJSON() ([]byte, error) {
  1133  	objectMap := make(map[string]interface{})
  1134  	return json.Marshal(objectMap)
  1135  }
  1136  
  1137  // DataLakeAnalyticsAccountListResultIterator provides access to a complete listing of
  1138  // DataLakeAnalyticsAccountBasic values.
  1139  type DataLakeAnalyticsAccountListResultIterator struct {
  1140  	i    int
  1141  	page DataLakeAnalyticsAccountListResultPage
  1142  }
  1143  
  1144  // NextWithContext advances to the next value.  If there was an error making
  1145  // the request the iterator does not advance and the error is returned.
  1146  func (iter *DataLakeAnalyticsAccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1147  	if tracing.IsEnabled() {
  1148  		ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultIterator.NextWithContext")
  1149  		defer func() {
  1150  			sc := -1
  1151  			if iter.Response().Response.Response != nil {
  1152  				sc = iter.Response().Response.Response.StatusCode
  1153  			}
  1154  			tracing.EndSpan(ctx, sc, err)
  1155  		}()
  1156  	}
  1157  	iter.i++
  1158  	if iter.i < len(iter.page.Values()) {
  1159  		return nil
  1160  	}
  1161  	err = iter.page.NextWithContext(ctx)
  1162  	if err != nil {
  1163  		iter.i--
  1164  		return err
  1165  	}
  1166  	iter.i = 0
  1167  	return nil
  1168  }
  1169  
  1170  // Next advances to the next value.  If there was an error making
  1171  // the request the iterator does not advance and the error is returned.
  1172  // Deprecated: Use NextWithContext() instead.
  1173  func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error {
  1174  	return iter.NextWithContext(context.Background())
  1175  }
  1176  
  1177  // NotDone returns true if the enumeration should be started or is not yet complete.
  1178  func (iter DataLakeAnalyticsAccountListResultIterator) NotDone() bool {
  1179  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1180  }
  1181  
  1182  // Response returns the raw server response from the last page request.
  1183  func (iter DataLakeAnalyticsAccountListResultIterator) Response() DataLakeAnalyticsAccountListResult {
  1184  	return iter.page.Response()
  1185  }
  1186  
  1187  // Value returns the current value or a zero-initialized value if the
  1188  // iterator has advanced beyond the end of the collection.
  1189  func (iter DataLakeAnalyticsAccountListResultIterator) Value() DataLakeAnalyticsAccountBasic {
  1190  	if !iter.page.NotDone() {
  1191  		return DataLakeAnalyticsAccountBasic{}
  1192  	}
  1193  	return iter.page.Values()[iter.i]
  1194  }
  1195  
  1196  // Creates a new instance of the DataLakeAnalyticsAccountListResultIterator type.
  1197  func NewDataLakeAnalyticsAccountListResultIterator(page DataLakeAnalyticsAccountListResultPage) DataLakeAnalyticsAccountListResultIterator {
  1198  	return DataLakeAnalyticsAccountListResultIterator{page: page}
  1199  }
  1200  
  1201  // IsEmpty returns true if the ListResult contains no values.
  1202  func (dlaalr DataLakeAnalyticsAccountListResult) IsEmpty() bool {
  1203  	return dlaalr.Value == nil || len(*dlaalr.Value) == 0
  1204  }
  1205  
  1206  // hasNextLink returns true if the NextLink is not empty.
  1207  func (dlaalr DataLakeAnalyticsAccountListResult) hasNextLink() bool {
  1208  	return dlaalr.NextLink != nil && len(*dlaalr.NextLink) != 0
  1209  }
  1210  
  1211  // dataLakeAnalyticsAccountListResultPreparer prepares a request to retrieve the next set of results.
  1212  // It returns nil if no more results exist.
  1213  func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListResultPreparer(ctx context.Context) (*http.Request, error) {
  1214  	if !dlaalr.hasNextLink() {
  1215  		return nil, nil
  1216  	}
  1217  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1218  		autorest.AsJSON(),
  1219  		autorest.AsGet(),
  1220  		autorest.WithBaseURL(to.String(dlaalr.NextLink)))
  1221  }
  1222  
  1223  // DataLakeAnalyticsAccountListResultPage contains a page of DataLakeAnalyticsAccountBasic values.
  1224  type DataLakeAnalyticsAccountListResultPage struct {
  1225  	fn     func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)
  1226  	dlaalr DataLakeAnalyticsAccountListResult
  1227  }
  1228  
  1229  // NextWithContext advances to the next page of values.  If there was an error making
  1230  // the request the page does not advance and the error is returned.
  1231  func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context.Context) (err error) {
  1232  	if tracing.IsEnabled() {
  1233  		ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultPage.NextWithContext")
  1234  		defer func() {
  1235  			sc := -1
  1236  			if page.Response().Response.Response != nil {
  1237  				sc = page.Response().Response.Response.StatusCode
  1238  			}
  1239  			tracing.EndSpan(ctx, sc, err)
  1240  		}()
  1241  	}
  1242  	for {
  1243  		next, err := page.fn(ctx, page.dlaalr)
  1244  		if err != nil {
  1245  			return err
  1246  		}
  1247  		page.dlaalr = next
  1248  		if !next.hasNextLink() || !next.IsEmpty() {
  1249  			break
  1250  		}
  1251  	}
  1252  	return nil
  1253  }
  1254  
  1255  // Next advances to the next page of values.  If there was an error making
  1256  // the request the page does not advance and the error is returned.
  1257  // Deprecated: Use NextWithContext() instead.
  1258  func (page *DataLakeAnalyticsAccountListResultPage) Next() error {
  1259  	return page.NextWithContext(context.Background())
  1260  }
  1261  
  1262  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1263  func (page DataLakeAnalyticsAccountListResultPage) NotDone() bool {
  1264  	return !page.dlaalr.IsEmpty()
  1265  }
  1266  
  1267  // Response returns the raw server response from the last page request.
  1268  func (page DataLakeAnalyticsAccountListResultPage) Response() DataLakeAnalyticsAccountListResult {
  1269  	return page.dlaalr
  1270  }
  1271  
  1272  // Values returns the slice of values for the current page or nil if there are no values.
  1273  func (page DataLakeAnalyticsAccountListResultPage) Values() []DataLakeAnalyticsAccountBasic {
  1274  	if page.dlaalr.IsEmpty() {
  1275  		return nil
  1276  	}
  1277  	return *page.dlaalr.Value
  1278  }
  1279  
  1280  // Creates a new instance of the DataLakeAnalyticsAccountListResultPage type.
  1281  func NewDataLakeAnalyticsAccountListResultPage(cur DataLakeAnalyticsAccountListResult, getNextPage func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)) DataLakeAnalyticsAccountListResultPage {
  1282  	return DataLakeAnalyticsAccountListResultPage{
  1283  		fn:     getNextPage,
  1284  		dlaalr: cur,
  1285  	}
  1286  }
  1287  
  1288  // DataLakeAnalyticsAccountProperties the account specific properties that are associated with an
  1289  // underlying Data Lake Analytics account. Returned only when retrieving a specific account.
  1290  type DataLakeAnalyticsAccountProperties struct {
  1291  	// DefaultDataLakeStoreAccount - READ-ONLY; The default Data Lake Store account associated with this account.
  1292  	DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"`
  1293  	// DataLakeStoreAccounts - READ-ONLY; The list of Data Lake Store accounts associated with this account.
  1294  	DataLakeStoreAccounts *[]DataLakeStoreAccountInformation `json:"dataLakeStoreAccounts,omitempty"`
  1295  	// StorageAccounts - READ-ONLY; The list of Azure Blob Storage accounts associated with this account.
  1296  	StorageAccounts *[]StorageAccountInformation `json:"storageAccounts,omitempty"`
  1297  	// ComputePolicies - READ-ONLY; The list of compute policies associated with this account.
  1298  	ComputePolicies *[]ComputePolicy `json:"computePolicies,omitempty"`
  1299  	// FirewallRules - READ-ONLY; The list of firewall rules associated with this account.
  1300  	FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"`
  1301  	// FirewallState - READ-ONLY; The current state of the IP address firewall for this account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled'
  1302  	FirewallState FirewallState `json:"firewallState,omitempty"`
  1303  	// 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'
  1304  	FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
  1305  	// NewTier - READ-ONLY; The commitment tier for the next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours'
  1306  	NewTier TierType `json:"newTier,omitempty"`
  1307  	// CurrentTier - READ-ONLY; The commitment tier in use for the current month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours'
  1308  	CurrentTier TierType `json:"currentTier,omitempty"`
  1309  	// MaxJobCount - READ-ONLY; The maximum supported jobs running under the account at the same time.
  1310  	MaxJobCount *int32 `json:"maxJobCount,omitempty"`
  1311  	// 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.
  1312  	SystemMaxJobCount *int32 `json:"systemMaxJobCount,omitempty"`
  1313  	// MaxDegreeOfParallelism - READ-ONLY; The maximum supported degree of parallelism for this account.
  1314  	MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"`
  1315  	// 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.
  1316  	SystemMaxDegreeOfParallelism *int32 `json:"systemMaxDegreeOfParallelism,omitempty"`
  1317  	// MaxDegreeOfParallelismPerJob - READ-ONLY; The maximum supported degree of parallelism per job for this account.
  1318  	MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
  1319  	// MinPriorityPerJob - READ-ONLY; The minimum supported priority per job for this account.
  1320  	MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
  1321  	// QueryStoreRetention - READ-ONLY; The number of days that job metadata is retained.
  1322  	QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
  1323  	// AccountID - READ-ONLY; The unique identifier associated with this Data Lake Analytics account.
  1324  	AccountID *uuid.UUID `json:"accountId,omitempty"`
  1325  	// 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'
  1326  	ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"`
  1327  	// State - READ-ONLY; The state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended'
  1328  	State DataLakeAnalyticsAccountState `json:"state,omitempty"`
  1329  	// CreationTime - READ-ONLY; The account creation time.
  1330  	CreationTime *date.Time `json:"creationTime,omitempty"`
  1331  	// LastModifiedTime - READ-ONLY; The account last modified time.
  1332  	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
  1333  	// Endpoint - READ-ONLY; The full CName endpoint for this account.
  1334  	Endpoint *string `json:"endpoint,omitempty"`
  1335  }
  1336  
  1337  // MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountProperties.
  1338  func (dlaap DataLakeAnalyticsAccountProperties) MarshalJSON() ([]byte, error) {
  1339  	objectMap := make(map[string]interface{})
  1340  	return json.Marshal(objectMap)
  1341  }
  1342  
  1343  // DataLakeAnalyticsAccountPropertiesBasic the basic account specific properties that are associated with
  1344  // an underlying Data Lake Analytics account.
  1345  type DataLakeAnalyticsAccountPropertiesBasic struct {
  1346  	// AccountID - READ-ONLY; The unique identifier associated with this Data Lake Analytics account.
  1347  	AccountID *uuid.UUID `json:"accountId,omitempty"`
  1348  	// 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'
  1349  	ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"`
  1350  	// State - READ-ONLY; The state of the Data Lake Analytics account. Possible values include: 'Active', 'Suspended'
  1351  	State DataLakeAnalyticsAccountState `json:"state,omitempty"`
  1352  	// CreationTime - READ-ONLY; The account creation time.
  1353  	CreationTime *date.Time `json:"creationTime,omitempty"`
  1354  	// LastModifiedTime - READ-ONLY; The account last modified time.
  1355  	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
  1356  	// Endpoint - READ-ONLY; The full CName endpoint for this account.
  1357  	Endpoint *string `json:"endpoint,omitempty"`
  1358  }
  1359  
  1360  // MarshalJSON is the custom marshaler for DataLakeAnalyticsAccountPropertiesBasic.
  1361  func (dlaapb DataLakeAnalyticsAccountPropertiesBasic) MarshalJSON() ([]byte, error) {
  1362  	objectMap := make(map[string]interface{})
  1363  	return json.Marshal(objectMap)
  1364  }
  1365  
  1366  // DataLakeStoreAccountInformation data Lake Store account information.
  1367  type DataLakeStoreAccountInformation struct {
  1368  	autorest.Response `json:"-"`
  1369  	// DataLakeStoreAccountInformationProperties - READ-ONLY; The Data Lake Store account properties.
  1370  	*DataLakeStoreAccountInformationProperties `json:"properties,omitempty"`
  1371  	// ID - READ-ONLY; The resource identifier.
  1372  	ID *string `json:"id,omitempty"`
  1373  	// Name - READ-ONLY; The resource name.
  1374  	Name *string `json:"name,omitempty"`
  1375  	// Type - READ-ONLY; The resource type.
  1376  	Type *string `json:"type,omitempty"`
  1377  }
  1378  
  1379  // MarshalJSON is the custom marshaler for DataLakeStoreAccountInformation.
  1380  func (dlsai DataLakeStoreAccountInformation) MarshalJSON() ([]byte, error) {
  1381  	objectMap := make(map[string]interface{})
  1382  	return json.Marshal(objectMap)
  1383  }
  1384  
  1385  // UnmarshalJSON is the custom unmarshaler for DataLakeStoreAccountInformation struct.
  1386  func (dlsai *DataLakeStoreAccountInformation) UnmarshalJSON(body []byte) error {
  1387  	var m map[string]*json.RawMessage
  1388  	err := json.Unmarshal(body, &m)
  1389  	if err != nil {
  1390  		return err
  1391  	}
  1392  	for k, v := range m {
  1393  		switch k {
  1394  		case "properties":
  1395  			if v != nil {
  1396  				var dataLakeStoreAccountInformationProperties DataLakeStoreAccountInformationProperties
  1397  				err = json.Unmarshal(*v, &dataLakeStoreAccountInformationProperties)
  1398  				if err != nil {
  1399  					return err
  1400  				}
  1401  				dlsai.DataLakeStoreAccountInformationProperties = &dataLakeStoreAccountInformationProperties
  1402  			}
  1403  		case "id":
  1404  			if v != nil {
  1405  				var ID string
  1406  				err = json.Unmarshal(*v, &ID)
  1407  				if err != nil {
  1408  					return err
  1409  				}
  1410  				dlsai.ID = &ID
  1411  			}
  1412  		case "name":
  1413  			if v != nil {
  1414  				var name string
  1415  				err = json.Unmarshal(*v, &name)
  1416  				if err != nil {
  1417  					return err
  1418  				}
  1419  				dlsai.Name = &name
  1420  			}
  1421  		case "type":
  1422  			if v != nil {
  1423  				var typeVar string
  1424  				err = json.Unmarshal(*v, &typeVar)
  1425  				if err != nil {
  1426  					return err
  1427  				}
  1428  				dlsai.Type = &typeVar
  1429  			}
  1430  		}
  1431  	}
  1432  
  1433  	return nil
  1434  }
  1435  
  1436  // DataLakeStoreAccountInformationListResult data Lake Store account list information.
  1437  type DataLakeStoreAccountInformationListResult struct {
  1438  	autorest.Response `json:"-"`
  1439  	// Value - READ-ONLY; The results of the list operation.
  1440  	Value *[]DataLakeStoreAccountInformation `json:"value,omitempty"`
  1441  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  1442  	NextLink *string `json:"nextLink,omitempty"`
  1443  }
  1444  
  1445  // MarshalJSON is the custom marshaler for DataLakeStoreAccountInformationListResult.
  1446  func (dlsailr DataLakeStoreAccountInformationListResult) MarshalJSON() ([]byte, error) {
  1447  	objectMap := make(map[string]interface{})
  1448  	return json.Marshal(objectMap)
  1449  }
  1450  
  1451  // DataLakeStoreAccountInformationListResultIterator provides access to a complete listing of
  1452  // DataLakeStoreAccountInformation values.
  1453  type DataLakeStoreAccountInformationListResultIterator struct {
  1454  	i    int
  1455  	page DataLakeStoreAccountInformationListResultPage
  1456  }
  1457  
  1458  // NextWithContext advances to the next value.  If there was an error making
  1459  // the request the iterator does not advance and the error is returned.
  1460  func (iter *DataLakeStoreAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1461  	if tracing.IsEnabled() {
  1462  		ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultIterator.NextWithContext")
  1463  		defer func() {
  1464  			sc := -1
  1465  			if iter.Response().Response.Response != nil {
  1466  				sc = iter.Response().Response.Response.StatusCode
  1467  			}
  1468  			tracing.EndSpan(ctx, sc, err)
  1469  		}()
  1470  	}
  1471  	iter.i++
  1472  	if iter.i < len(iter.page.Values()) {
  1473  		return nil
  1474  	}
  1475  	err = iter.page.NextWithContext(ctx)
  1476  	if err != nil {
  1477  		iter.i--
  1478  		return err
  1479  	}
  1480  	iter.i = 0
  1481  	return nil
  1482  }
  1483  
  1484  // Next advances to the next value.  If there was an error making
  1485  // the request the iterator does not advance and the error is returned.
  1486  // Deprecated: Use NextWithContext() instead.
  1487  func (iter *DataLakeStoreAccountInformationListResultIterator) Next() error {
  1488  	return iter.NextWithContext(context.Background())
  1489  }
  1490  
  1491  // NotDone returns true if the enumeration should be started or is not yet complete.
  1492  func (iter DataLakeStoreAccountInformationListResultIterator) NotDone() bool {
  1493  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1494  }
  1495  
  1496  // Response returns the raw server response from the last page request.
  1497  func (iter DataLakeStoreAccountInformationListResultIterator) Response() DataLakeStoreAccountInformationListResult {
  1498  	return iter.page.Response()
  1499  }
  1500  
  1501  // Value returns the current value or a zero-initialized value if the
  1502  // iterator has advanced beyond the end of the collection.
  1503  func (iter DataLakeStoreAccountInformationListResultIterator) Value() DataLakeStoreAccountInformation {
  1504  	if !iter.page.NotDone() {
  1505  		return DataLakeStoreAccountInformation{}
  1506  	}
  1507  	return iter.page.Values()[iter.i]
  1508  }
  1509  
  1510  // Creates a new instance of the DataLakeStoreAccountInformationListResultIterator type.
  1511  func NewDataLakeStoreAccountInformationListResultIterator(page DataLakeStoreAccountInformationListResultPage) DataLakeStoreAccountInformationListResultIterator {
  1512  	return DataLakeStoreAccountInformationListResultIterator{page: page}
  1513  }
  1514  
  1515  // IsEmpty returns true if the ListResult contains no values.
  1516  func (dlsailr DataLakeStoreAccountInformationListResult) IsEmpty() bool {
  1517  	return dlsailr.Value == nil || len(*dlsailr.Value) == 0
  1518  }
  1519  
  1520  // hasNextLink returns true if the NextLink is not empty.
  1521  func (dlsailr DataLakeStoreAccountInformationListResult) hasNextLink() bool {
  1522  	return dlsailr.NextLink != nil && len(*dlsailr.NextLink) != 0
  1523  }
  1524  
  1525  // dataLakeStoreAccountInformationListResultPreparer prepares a request to retrieve the next set of results.
  1526  // It returns nil if no more results exist.
  1527  func (dlsailr DataLakeStoreAccountInformationListResult) dataLakeStoreAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
  1528  	if !dlsailr.hasNextLink() {
  1529  		return nil, nil
  1530  	}
  1531  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1532  		autorest.AsJSON(),
  1533  		autorest.AsGet(),
  1534  		autorest.WithBaseURL(to.String(dlsailr.NextLink)))
  1535  }
  1536  
  1537  // DataLakeStoreAccountInformationListResultPage contains a page of DataLakeStoreAccountInformation values.
  1538  type DataLakeStoreAccountInformationListResultPage struct {
  1539  	fn      func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)
  1540  	dlsailr DataLakeStoreAccountInformationListResult
  1541  }
  1542  
  1543  // NextWithContext advances to the next page of values.  If there was an error making
  1544  // the request the page does not advance and the error is returned.
  1545  func (page *DataLakeStoreAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
  1546  	if tracing.IsEnabled() {
  1547  		ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultPage.NextWithContext")
  1548  		defer func() {
  1549  			sc := -1
  1550  			if page.Response().Response.Response != nil {
  1551  				sc = page.Response().Response.Response.StatusCode
  1552  			}
  1553  			tracing.EndSpan(ctx, sc, err)
  1554  		}()
  1555  	}
  1556  	for {
  1557  		next, err := page.fn(ctx, page.dlsailr)
  1558  		if err != nil {
  1559  			return err
  1560  		}
  1561  		page.dlsailr = next
  1562  		if !next.hasNextLink() || !next.IsEmpty() {
  1563  			break
  1564  		}
  1565  	}
  1566  	return nil
  1567  }
  1568  
  1569  // Next advances to the next page of values.  If there was an error making
  1570  // the request the page does not advance and the error is returned.
  1571  // Deprecated: Use NextWithContext() instead.
  1572  func (page *DataLakeStoreAccountInformationListResultPage) Next() error {
  1573  	return page.NextWithContext(context.Background())
  1574  }
  1575  
  1576  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1577  func (page DataLakeStoreAccountInformationListResultPage) NotDone() bool {
  1578  	return !page.dlsailr.IsEmpty()
  1579  }
  1580  
  1581  // Response returns the raw server response from the last page request.
  1582  func (page DataLakeStoreAccountInformationListResultPage) Response() DataLakeStoreAccountInformationListResult {
  1583  	return page.dlsailr
  1584  }
  1585  
  1586  // Values returns the slice of values for the current page or nil if there are no values.
  1587  func (page DataLakeStoreAccountInformationListResultPage) Values() []DataLakeStoreAccountInformation {
  1588  	if page.dlsailr.IsEmpty() {
  1589  		return nil
  1590  	}
  1591  	return *page.dlsailr.Value
  1592  }
  1593  
  1594  // Creates a new instance of the DataLakeStoreAccountInformationListResultPage type.
  1595  func NewDataLakeStoreAccountInformationListResultPage(cur DataLakeStoreAccountInformationListResult, getNextPage func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)) DataLakeStoreAccountInformationListResultPage {
  1596  	return DataLakeStoreAccountInformationListResultPage{
  1597  		fn:      getNextPage,
  1598  		dlsailr: cur,
  1599  	}
  1600  }
  1601  
  1602  // DataLakeStoreAccountInformationProperties the Data Lake Store account properties.
  1603  type DataLakeStoreAccountInformationProperties struct {
  1604  	// Suffix - READ-ONLY; The optional suffix for the Data Lake Store account.
  1605  	Suffix *string `json:"suffix,omitempty"`
  1606  }
  1607  
  1608  // MarshalJSON is the custom marshaler for DataLakeStoreAccountInformationProperties.
  1609  func (dlsaip DataLakeStoreAccountInformationProperties) MarshalJSON() ([]byte, error) {
  1610  	objectMap := make(map[string]interface{})
  1611  	return json.Marshal(objectMap)
  1612  }
  1613  
  1614  // FirewallRule data Lake Analytics firewall rule information.
  1615  type FirewallRule struct {
  1616  	autorest.Response `json:"-"`
  1617  	// FirewallRuleProperties - READ-ONLY; The firewall rule properties.
  1618  	*FirewallRuleProperties `json:"properties,omitempty"`
  1619  	// ID - READ-ONLY; The resource identifier.
  1620  	ID *string `json:"id,omitempty"`
  1621  	// Name - READ-ONLY; The resource name.
  1622  	Name *string `json:"name,omitempty"`
  1623  	// Type - READ-ONLY; The resource type.
  1624  	Type *string `json:"type,omitempty"`
  1625  }
  1626  
  1627  // MarshalJSON is the custom marshaler for FirewallRule.
  1628  func (fr FirewallRule) MarshalJSON() ([]byte, error) {
  1629  	objectMap := make(map[string]interface{})
  1630  	return json.Marshal(objectMap)
  1631  }
  1632  
  1633  // UnmarshalJSON is the custom unmarshaler for FirewallRule struct.
  1634  func (fr *FirewallRule) UnmarshalJSON(body []byte) error {
  1635  	var m map[string]*json.RawMessage
  1636  	err := json.Unmarshal(body, &m)
  1637  	if err != nil {
  1638  		return err
  1639  	}
  1640  	for k, v := range m {
  1641  		switch k {
  1642  		case "properties":
  1643  			if v != nil {
  1644  				var firewallRuleProperties FirewallRuleProperties
  1645  				err = json.Unmarshal(*v, &firewallRuleProperties)
  1646  				if err != nil {
  1647  					return err
  1648  				}
  1649  				fr.FirewallRuleProperties = &firewallRuleProperties
  1650  			}
  1651  		case "id":
  1652  			if v != nil {
  1653  				var ID string
  1654  				err = json.Unmarshal(*v, &ID)
  1655  				if err != nil {
  1656  					return err
  1657  				}
  1658  				fr.ID = &ID
  1659  			}
  1660  		case "name":
  1661  			if v != nil {
  1662  				var name string
  1663  				err = json.Unmarshal(*v, &name)
  1664  				if err != nil {
  1665  					return err
  1666  				}
  1667  				fr.Name = &name
  1668  			}
  1669  		case "type":
  1670  			if v != nil {
  1671  				var typeVar string
  1672  				err = json.Unmarshal(*v, &typeVar)
  1673  				if err != nil {
  1674  					return err
  1675  				}
  1676  				fr.Type = &typeVar
  1677  			}
  1678  		}
  1679  	}
  1680  
  1681  	return nil
  1682  }
  1683  
  1684  // FirewallRuleListResult data Lake Analytics firewall rule list information.
  1685  type FirewallRuleListResult struct {
  1686  	autorest.Response `json:"-"`
  1687  	// Value - READ-ONLY; The results of the list operation.
  1688  	Value *[]FirewallRule `json:"value,omitempty"`
  1689  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  1690  	NextLink *string `json:"nextLink,omitempty"`
  1691  }
  1692  
  1693  // MarshalJSON is the custom marshaler for FirewallRuleListResult.
  1694  func (frlr FirewallRuleListResult) MarshalJSON() ([]byte, error) {
  1695  	objectMap := make(map[string]interface{})
  1696  	return json.Marshal(objectMap)
  1697  }
  1698  
  1699  // FirewallRuleListResultIterator provides access to a complete listing of FirewallRule values.
  1700  type FirewallRuleListResultIterator struct {
  1701  	i    int
  1702  	page FirewallRuleListResultPage
  1703  }
  1704  
  1705  // NextWithContext advances to the next value.  If there was an error making
  1706  // the request the iterator does not advance and the error is returned.
  1707  func (iter *FirewallRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1708  	if tracing.IsEnabled() {
  1709  		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultIterator.NextWithContext")
  1710  		defer func() {
  1711  			sc := -1
  1712  			if iter.Response().Response.Response != nil {
  1713  				sc = iter.Response().Response.Response.StatusCode
  1714  			}
  1715  			tracing.EndSpan(ctx, sc, err)
  1716  		}()
  1717  	}
  1718  	iter.i++
  1719  	if iter.i < len(iter.page.Values()) {
  1720  		return nil
  1721  	}
  1722  	err = iter.page.NextWithContext(ctx)
  1723  	if err != nil {
  1724  		iter.i--
  1725  		return err
  1726  	}
  1727  	iter.i = 0
  1728  	return nil
  1729  }
  1730  
  1731  // Next advances to the next value.  If there was an error making
  1732  // the request the iterator does not advance and the error is returned.
  1733  // Deprecated: Use NextWithContext() instead.
  1734  func (iter *FirewallRuleListResultIterator) Next() error {
  1735  	return iter.NextWithContext(context.Background())
  1736  }
  1737  
  1738  // NotDone returns true if the enumeration should be started or is not yet complete.
  1739  func (iter FirewallRuleListResultIterator) NotDone() bool {
  1740  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1741  }
  1742  
  1743  // Response returns the raw server response from the last page request.
  1744  func (iter FirewallRuleListResultIterator) Response() FirewallRuleListResult {
  1745  	return iter.page.Response()
  1746  }
  1747  
  1748  // Value returns the current value or a zero-initialized value if the
  1749  // iterator has advanced beyond the end of the collection.
  1750  func (iter FirewallRuleListResultIterator) Value() FirewallRule {
  1751  	if !iter.page.NotDone() {
  1752  		return FirewallRule{}
  1753  	}
  1754  	return iter.page.Values()[iter.i]
  1755  }
  1756  
  1757  // Creates a new instance of the FirewallRuleListResultIterator type.
  1758  func NewFirewallRuleListResultIterator(page FirewallRuleListResultPage) FirewallRuleListResultIterator {
  1759  	return FirewallRuleListResultIterator{page: page}
  1760  }
  1761  
  1762  // IsEmpty returns true if the ListResult contains no values.
  1763  func (frlr FirewallRuleListResult) IsEmpty() bool {
  1764  	return frlr.Value == nil || len(*frlr.Value) == 0
  1765  }
  1766  
  1767  // hasNextLink returns true if the NextLink is not empty.
  1768  func (frlr FirewallRuleListResult) hasNextLink() bool {
  1769  	return frlr.NextLink != nil && len(*frlr.NextLink) != 0
  1770  }
  1771  
  1772  // firewallRuleListResultPreparer prepares a request to retrieve the next set of results.
  1773  // It returns nil if no more results exist.
  1774  func (frlr FirewallRuleListResult) firewallRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
  1775  	if !frlr.hasNextLink() {
  1776  		return nil, nil
  1777  	}
  1778  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1779  		autorest.AsJSON(),
  1780  		autorest.AsGet(),
  1781  		autorest.WithBaseURL(to.String(frlr.NextLink)))
  1782  }
  1783  
  1784  // FirewallRuleListResultPage contains a page of FirewallRule values.
  1785  type FirewallRuleListResultPage struct {
  1786  	fn   func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)
  1787  	frlr FirewallRuleListResult
  1788  }
  1789  
  1790  // NextWithContext advances to the next page of values.  If there was an error making
  1791  // the request the page does not advance and the error is returned.
  1792  func (page *FirewallRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
  1793  	if tracing.IsEnabled() {
  1794  		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultPage.NextWithContext")
  1795  		defer func() {
  1796  			sc := -1
  1797  			if page.Response().Response.Response != nil {
  1798  				sc = page.Response().Response.Response.StatusCode
  1799  			}
  1800  			tracing.EndSpan(ctx, sc, err)
  1801  		}()
  1802  	}
  1803  	for {
  1804  		next, err := page.fn(ctx, page.frlr)
  1805  		if err != nil {
  1806  			return err
  1807  		}
  1808  		page.frlr = next
  1809  		if !next.hasNextLink() || !next.IsEmpty() {
  1810  			break
  1811  		}
  1812  	}
  1813  	return nil
  1814  }
  1815  
  1816  // Next advances to the next page of values.  If there was an error making
  1817  // the request the page does not advance and the error is returned.
  1818  // Deprecated: Use NextWithContext() instead.
  1819  func (page *FirewallRuleListResultPage) Next() error {
  1820  	return page.NextWithContext(context.Background())
  1821  }
  1822  
  1823  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1824  func (page FirewallRuleListResultPage) NotDone() bool {
  1825  	return !page.frlr.IsEmpty()
  1826  }
  1827  
  1828  // Response returns the raw server response from the last page request.
  1829  func (page FirewallRuleListResultPage) Response() FirewallRuleListResult {
  1830  	return page.frlr
  1831  }
  1832  
  1833  // Values returns the slice of values for the current page or nil if there are no values.
  1834  func (page FirewallRuleListResultPage) Values() []FirewallRule {
  1835  	if page.frlr.IsEmpty() {
  1836  		return nil
  1837  	}
  1838  	return *page.frlr.Value
  1839  }
  1840  
  1841  // Creates a new instance of the FirewallRuleListResultPage type.
  1842  func NewFirewallRuleListResultPage(cur FirewallRuleListResult, getNextPage func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage {
  1843  	return FirewallRuleListResultPage{
  1844  		fn:   getNextPage,
  1845  		frlr: cur,
  1846  	}
  1847  }
  1848  
  1849  // FirewallRuleProperties the firewall rule properties.
  1850  type FirewallRuleProperties struct {
  1851  	// 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.
  1852  	StartIPAddress *string `json:"startIpAddress,omitempty"`
  1853  	// 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.
  1854  	EndIPAddress *string `json:"endIpAddress,omitempty"`
  1855  }
  1856  
  1857  // MarshalJSON is the custom marshaler for FirewallRuleProperties.
  1858  func (frp FirewallRuleProperties) MarshalJSON() ([]byte, error) {
  1859  	objectMap := make(map[string]interface{})
  1860  	return json.Marshal(objectMap)
  1861  }
  1862  
  1863  // NameAvailabilityInformation data Lake Analytics account name availability result information.
  1864  type NameAvailabilityInformation struct {
  1865  	autorest.Response `json:"-"`
  1866  	// NameAvailable - READ-ONLY; The Boolean value of true or false to indicate whether the Data Lake Analytics account name is available or not.
  1867  	NameAvailable *bool `json:"nameAvailable,omitempty"`
  1868  	// Reason - READ-ONLY; The reason why the Data Lake Analytics account name is not available, if nameAvailable is false.
  1869  	Reason *string `json:"reason,omitempty"`
  1870  	// Message - READ-ONLY; The message describing why the Data Lake Analytics account name is not available, if nameAvailable is false.
  1871  	Message *string `json:"message,omitempty"`
  1872  }
  1873  
  1874  // MarshalJSON is the custom marshaler for NameAvailabilityInformation.
  1875  func (nai NameAvailabilityInformation) MarshalJSON() ([]byte, error) {
  1876  	objectMap := make(map[string]interface{})
  1877  	return json.Marshal(objectMap)
  1878  }
  1879  
  1880  // Operation an available operation for Data Lake Analytics.
  1881  type Operation struct {
  1882  	// Name - READ-ONLY; The name of the operation.
  1883  	Name *string `json:"name,omitempty"`
  1884  	// Display - READ-ONLY; The display information for the operation.
  1885  	Display *OperationDisplay `json:"display,omitempty"`
  1886  	// Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'OperationOriginUser', 'OperationOriginSystem', 'OperationOriginUsersystem'
  1887  	Origin OperationOrigin `json:"origin,omitempty"`
  1888  }
  1889  
  1890  // MarshalJSON is the custom marshaler for Operation.
  1891  func (o Operation) MarshalJSON() ([]byte, error) {
  1892  	objectMap := make(map[string]interface{})
  1893  	return json.Marshal(objectMap)
  1894  }
  1895  
  1896  // OperationDisplay the display information for a particular operation.
  1897  type OperationDisplay struct {
  1898  	// Provider - READ-ONLY; The resource provider of the operation.
  1899  	Provider *string `json:"provider,omitempty"`
  1900  	// Resource - READ-ONLY; The resource type of the operation.
  1901  	Resource *string `json:"resource,omitempty"`
  1902  	// Operation - READ-ONLY; A friendly name of the operation.
  1903  	Operation *string `json:"operation,omitempty"`
  1904  	// Description - READ-ONLY; A friendly description of the operation.
  1905  	Description *string `json:"description,omitempty"`
  1906  }
  1907  
  1908  // MarshalJSON is the custom marshaler for OperationDisplay.
  1909  func (od OperationDisplay) MarshalJSON() ([]byte, error) {
  1910  	objectMap := make(map[string]interface{})
  1911  	return json.Marshal(objectMap)
  1912  }
  1913  
  1914  // OperationListResult the list of available operations for Data Lake Analytics.
  1915  type OperationListResult struct {
  1916  	autorest.Response `json:"-"`
  1917  	// Value - READ-ONLY; The results of the list operation.
  1918  	Value *[]Operation `json:"value,omitempty"`
  1919  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  1920  	NextLink *string `json:"nextLink,omitempty"`
  1921  }
  1922  
  1923  // MarshalJSON is the custom marshaler for OperationListResult.
  1924  func (olr OperationListResult) MarshalJSON() ([]byte, error) {
  1925  	objectMap := make(map[string]interface{})
  1926  	return json.Marshal(objectMap)
  1927  }
  1928  
  1929  // Resource the resource model definition.
  1930  type Resource struct {
  1931  	// ID - READ-ONLY; The resource identifer.
  1932  	ID *string `json:"id,omitempty"`
  1933  	// Name - READ-ONLY; The resource name.
  1934  	Name *string `json:"name,omitempty"`
  1935  	// Type - READ-ONLY; The resource type.
  1936  	Type *string `json:"type,omitempty"`
  1937  	// Location - READ-ONLY; The resource location.
  1938  	Location *string `json:"location,omitempty"`
  1939  	// Tags - READ-ONLY; The resource tags.
  1940  	Tags map[string]*string `json:"tags"`
  1941  }
  1942  
  1943  // MarshalJSON is the custom marshaler for Resource.
  1944  func (r Resource) MarshalJSON() ([]byte, error) {
  1945  	objectMap := make(map[string]interface{})
  1946  	return json.Marshal(objectMap)
  1947  }
  1948  
  1949  // SasTokenInformation SAS token information.
  1950  type SasTokenInformation struct {
  1951  	// AccessToken - READ-ONLY; The access token for the associated Azure Storage Container.
  1952  	AccessToken *string `json:"accessToken,omitempty"`
  1953  }
  1954  
  1955  // MarshalJSON is the custom marshaler for SasTokenInformation.
  1956  func (sti SasTokenInformation) MarshalJSON() ([]byte, error) {
  1957  	objectMap := make(map[string]interface{})
  1958  	return json.Marshal(objectMap)
  1959  }
  1960  
  1961  // SasTokenInformationListResult the SAS response that contains the storage account, container and
  1962  // associated SAS token for connection use.
  1963  type SasTokenInformationListResult struct {
  1964  	autorest.Response `json:"-"`
  1965  	// Value - READ-ONLY; The results of the list operation.
  1966  	Value *[]SasTokenInformation `json:"value,omitempty"`
  1967  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  1968  	NextLink *string `json:"nextLink,omitempty"`
  1969  }
  1970  
  1971  // MarshalJSON is the custom marshaler for SasTokenInformationListResult.
  1972  func (stilr SasTokenInformationListResult) MarshalJSON() ([]byte, error) {
  1973  	objectMap := make(map[string]interface{})
  1974  	return json.Marshal(objectMap)
  1975  }
  1976  
  1977  // SasTokenInformationListResultIterator provides access to a complete listing of SasTokenInformation
  1978  // values.
  1979  type SasTokenInformationListResultIterator struct {
  1980  	i    int
  1981  	page SasTokenInformationListResultPage
  1982  }
  1983  
  1984  // NextWithContext advances to the next value.  If there was an error making
  1985  // the request the iterator does not advance and the error is returned.
  1986  func (iter *SasTokenInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1987  	if tracing.IsEnabled() {
  1988  		ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultIterator.NextWithContext")
  1989  		defer func() {
  1990  			sc := -1
  1991  			if iter.Response().Response.Response != nil {
  1992  				sc = iter.Response().Response.Response.StatusCode
  1993  			}
  1994  			tracing.EndSpan(ctx, sc, err)
  1995  		}()
  1996  	}
  1997  	iter.i++
  1998  	if iter.i < len(iter.page.Values()) {
  1999  		return nil
  2000  	}
  2001  	err = iter.page.NextWithContext(ctx)
  2002  	if err != nil {
  2003  		iter.i--
  2004  		return err
  2005  	}
  2006  	iter.i = 0
  2007  	return nil
  2008  }
  2009  
  2010  // Next advances to the next value.  If there was an error making
  2011  // the request the iterator does not advance and the error is returned.
  2012  // Deprecated: Use NextWithContext() instead.
  2013  func (iter *SasTokenInformationListResultIterator) Next() error {
  2014  	return iter.NextWithContext(context.Background())
  2015  }
  2016  
  2017  // NotDone returns true if the enumeration should be started or is not yet complete.
  2018  func (iter SasTokenInformationListResultIterator) NotDone() bool {
  2019  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  2020  }
  2021  
  2022  // Response returns the raw server response from the last page request.
  2023  func (iter SasTokenInformationListResultIterator) Response() SasTokenInformationListResult {
  2024  	return iter.page.Response()
  2025  }
  2026  
  2027  // Value returns the current value or a zero-initialized value if the
  2028  // iterator has advanced beyond the end of the collection.
  2029  func (iter SasTokenInformationListResultIterator) Value() SasTokenInformation {
  2030  	if !iter.page.NotDone() {
  2031  		return SasTokenInformation{}
  2032  	}
  2033  	return iter.page.Values()[iter.i]
  2034  }
  2035  
  2036  // Creates a new instance of the SasTokenInformationListResultIterator type.
  2037  func NewSasTokenInformationListResultIterator(page SasTokenInformationListResultPage) SasTokenInformationListResultIterator {
  2038  	return SasTokenInformationListResultIterator{page: page}
  2039  }
  2040  
  2041  // IsEmpty returns true if the ListResult contains no values.
  2042  func (stilr SasTokenInformationListResult) IsEmpty() bool {
  2043  	return stilr.Value == nil || len(*stilr.Value) == 0
  2044  }
  2045  
  2046  // hasNextLink returns true if the NextLink is not empty.
  2047  func (stilr SasTokenInformationListResult) hasNextLink() bool {
  2048  	return stilr.NextLink != nil && len(*stilr.NextLink) != 0
  2049  }
  2050  
  2051  // sasTokenInformationListResultPreparer prepares a request to retrieve the next set of results.
  2052  // It returns nil if no more results exist.
  2053  func (stilr SasTokenInformationListResult) sasTokenInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
  2054  	if !stilr.hasNextLink() {
  2055  		return nil, nil
  2056  	}
  2057  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  2058  		autorest.AsJSON(),
  2059  		autorest.AsGet(),
  2060  		autorest.WithBaseURL(to.String(stilr.NextLink)))
  2061  }
  2062  
  2063  // SasTokenInformationListResultPage contains a page of SasTokenInformation values.
  2064  type SasTokenInformationListResultPage struct {
  2065  	fn    func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)
  2066  	stilr SasTokenInformationListResult
  2067  }
  2068  
  2069  // NextWithContext advances to the next page of values.  If there was an error making
  2070  // the request the page does not advance and the error is returned.
  2071  func (page *SasTokenInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
  2072  	if tracing.IsEnabled() {
  2073  		ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultPage.NextWithContext")
  2074  		defer func() {
  2075  			sc := -1
  2076  			if page.Response().Response.Response != nil {
  2077  				sc = page.Response().Response.Response.StatusCode
  2078  			}
  2079  			tracing.EndSpan(ctx, sc, err)
  2080  		}()
  2081  	}
  2082  	for {
  2083  		next, err := page.fn(ctx, page.stilr)
  2084  		if err != nil {
  2085  			return err
  2086  		}
  2087  		page.stilr = next
  2088  		if !next.hasNextLink() || !next.IsEmpty() {
  2089  			break
  2090  		}
  2091  	}
  2092  	return nil
  2093  }
  2094  
  2095  // Next advances to the next page of values.  If there was an error making
  2096  // the request the page does not advance and the error is returned.
  2097  // Deprecated: Use NextWithContext() instead.
  2098  func (page *SasTokenInformationListResultPage) Next() error {
  2099  	return page.NextWithContext(context.Background())
  2100  }
  2101  
  2102  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2103  func (page SasTokenInformationListResultPage) NotDone() bool {
  2104  	return !page.stilr.IsEmpty()
  2105  }
  2106  
  2107  // Response returns the raw server response from the last page request.
  2108  func (page SasTokenInformationListResultPage) Response() SasTokenInformationListResult {
  2109  	return page.stilr
  2110  }
  2111  
  2112  // Values returns the slice of values for the current page or nil if there are no values.
  2113  func (page SasTokenInformationListResultPage) Values() []SasTokenInformation {
  2114  	if page.stilr.IsEmpty() {
  2115  		return nil
  2116  	}
  2117  	return *page.stilr.Value
  2118  }
  2119  
  2120  // Creates a new instance of the SasTokenInformationListResultPage type.
  2121  func NewSasTokenInformationListResultPage(cur SasTokenInformationListResult, getNextPage func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)) SasTokenInformationListResultPage {
  2122  	return SasTokenInformationListResultPage{
  2123  		fn:    getNextPage,
  2124  		stilr: cur,
  2125  	}
  2126  }
  2127  
  2128  // StorageAccountInformation azure Storage account information.
  2129  type StorageAccountInformation struct {
  2130  	autorest.Response `json:"-"`
  2131  	// StorageAccountInformationProperties - READ-ONLY; The Azure Storage account properties.
  2132  	*StorageAccountInformationProperties `json:"properties,omitempty"`
  2133  	// ID - READ-ONLY; The resource identifier.
  2134  	ID *string `json:"id,omitempty"`
  2135  	// Name - READ-ONLY; The resource name.
  2136  	Name *string `json:"name,omitempty"`
  2137  	// Type - READ-ONLY; The resource type.
  2138  	Type *string `json:"type,omitempty"`
  2139  }
  2140  
  2141  // MarshalJSON is the custom marshaler for StorageAccountInformation.
  2142  func (sai StorageAccountInformation) MarshalJSON() ([]byte, error) {
  2143  	objectMap := make(map[string]interface{})
  2144  	return json.Marshal(objectMap)
  2145  }
  2146  
  2147  // UnmarshalJSON is the custom unmarshaler for StorageAccountInformation struct.
  2148  func (sai *StorageAccountInformation) UnmarshalJSON(body []byte) error {
  2149  	var m map[string]*json.RawMessage
  2150  	err := json.Unmarshal(body, &m)
  2151  	if err != nil {
  2152  		return err
  2153  	}
  2154  	for k, v := range m {
  2155  		switch k {
  2156  		case "properties":
  2157  			if v != nil {
  2158  				var storageAccountInformationProperties StorageAccountInformationProperties
  2159  				err = json.Unmarshal(*v, &storageAccountInformationProperties)
  2160  				if err != nil {
  2161  					return err
  2162  				}
  2163  				sai.StorageAccountInformationProperties = &storageAccountInformationProperties
  2164  			}
  2165  		case "id":
  2166  			if v != nil {
  2167  				var ID string
  2168  				err = json.Unmarshal(*v, &ID)
  2169  				if err != nil {
  2170  					return err
  2171  				}
  2172  				sai.ID = &ID
  2173  			}
  2174  		case "name":
  2175  			if v != nil {
  2176  				var name string
  2177  				err = json.Unmarshal(*v, &name)
  2178  				if err != nil {
  2179  					return err
  2180  				}
  2181  				sai.Name = &name
  2182  			}
  2183  		case "type":
  2184  			if v != nil {
  2185  				var typeVar string
  2186  				err = json.Unmarshal(*v, &typeVar)
  2187  				if err != nil {
  2188  					return err
  2189  				}
  2190  				sai.Type = &typeVar
  2191  			}
  2192  		}
  2193  	}
  2194  
  2195  	return nil
  2196  }
  2197  
  2198  // StorageAccountInformationListResult azure Storage account list information.
  2199  type StorageAccountInformationListResult struct {
  2200  	autorest.Response `json:"-"`
  2201  	// Value - READ-ONLY; The results of the list operation.
  2202  	Value *[]StorageAccountInformation `json:"value,omitempty"`
  2203  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  2204  	NextLink *string `json:"nextLink,omitempty"`
  2205  }
  2206  
  2207  // MarshalJSON is the custom marshaler for StorageAccountInformationListResult.
  2208  func (sailr StorageAccountInformationListResult) MarshalJSON() ([]byte, error) {
  2209  	objectMap := make(map[string]interface{})
  2210  	return json.Marshal(objectMap)
  2211  }
  2212  
  2213  // StorageAccountInformationListResultIterator provides access to a complete listing of
  2214  // StorageAccountInformation values.
  2215  type StorageAccountInformationListResultIterator struct {
  2216  	i    int
  2217  	page StorageAccountInformationListResultPage
  2218  }
  2219  
  2220  // NextWithContext advances to the next value.  If there was an error making
  2221  // the request the iterator does not advance and the error is returned.
  2222  func (iter *StorageAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  2223  	if tracing.IsEnabled() {
  2224  		ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultIterator.NextWithContext")
  2225  		defer func() {
  2226  			sc := -1
  2227  			if iter.Response().Response.Response != nil {
  2228  				sc = iter.Response().Response.Response.StatusCode
  2229  			}
  2230  			tracing.EndSpan(ctx, sc, err)
  2231  		}()
  2232  	}
  2233  	iter.i++
  2234  	if iter.i < len(iter.page.Values()) {
  2235  		return nil
  2236  	}
  2237  	err = iter.page.NextWithContext(ctx)
  2238  	if err != nil {
  2239  		iter.i--
  2240  		return err
  2241  	}
  2242  	iter.i = 0
  2243  	return nil
  2244  }
  2245  
  2246  // Next advances to the next value.  If there was an error making
  2247  // the request the iterator does not advance and the error is returned.
  2248  // Deprecated: Use NextWithContext() instead.
  2249  func (iter *StorageAccountInformationListResultIterator) Next() error {
  2250  	return iter.NextWithContext(context.Background())
  2251  }
  2252  
  2253  // NotDone returns true if the enumeration should be started or is not yet complete.
  2254  func (iter StorageAccountInformationListResultIterator) NotDone() bool {
  2255  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  2256  }
  2257  
  2258  // Response returns the raw server response from the last page request.
  2259  func (iter StorageAccountInformationListResultIterator) Response() StorageAccountInformationListResult {
  2260  	return iter.page.Response()
  2261  }
  2262  
  2263  // Value returns the current value or a zero-initialized value if the
  2264  // iterator has advanced beyond the end of the collection.
  2265  func (iter StorageAccountInformationListResultIterator) Value() StorageAccountInformation {
  2266  	if !iter.page.NotDone() {
  2267  		return StorageAccountInformation{}
  2268  	}
  2269  	return iter.page.Values()[iter.i]
  2270  }
  2271  
  2272  // Creates a new instance of the StorageAccountInformationListResultIterator type.
  2273  func NewStorageAccountInformationListResultIterator(page StorageAccountInformationListResultPage) StorageAccountInformationListResultIterator {
  2274  	return StorageAccountInformationListResultIterator{page: page}
  2275  }
  2276  
  2277  // IsEmpty returns true if the ListResult contains no values.
  2278  func (sailr StorageAccountInformationListResult) IsEmpty() bool {
  2279  	return sailr.Value == nil || len(*sailr.Value) == 0
  2280  }
  2281  
  2282  // hasNextLink returns true if the NextLink is not empty.
  2283  func (sailr StorageAccountInformationListResult) hasNextLink() bool {
  2284  	return sailr.NextLink != nil && len(*sailr.NextLink) != 0
  2285  }
  2286  
  2287  // storageAccountInformationListResultPreparer prepares a request to retrieve the next set of results.
  2288  // It returns nil if no more results exist.
  2289  func (sailr StorageAccountInformationListResult) storageAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
  2290  	if !sailr.hasNextLink() {
  2291  		return nil, nil
  2292  	}
  2293  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  2294  		autorest.AsJSON(),
  2295  		autorest.AsGet(),
  2296  		autorest.WithBaseURL(to.String(sailr.NextLink)))
  2297  }
  2298  
  2299  // StorageAccountInformationListResultPage contains a page of StorageAccountInformation values.
  2300  type StorageAccountInformationListResultPage struct {
  2301  	fn    func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)
  2302  	sailr StorageAccountInformationListResult
  2303  }
  2304  
  2305  // NextWithContext advances to the next page of values.  If there was an error making
  2306  // the request the page does not advance and the error is returned.
  2307  func (page *StorageAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
  2308  	if tracing.IsEnabled() {
  2309  		ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultPage.NextWithContext")
  2310  		defer func() {
  2311  			sc := -1
  2312  			if page.Response().Response.Response != nil {
  2313  				sc = page.Response().Response.Response.StatusCode
  2314  			}
  2315  			tracing.EndSpan(ctx, sc, err)
  2316  		}()
  2317  	}
  2318  	for {
  2319  		next, err := page.fn(ctx, page.sailr)
  2320  		if err != nil {
  2321  			return err
  2322  		}
  2323  		page.sailr = next
  2324  		if !next.hasNextLink() || !next.IsEmpty() {
  2325  			break
  2326  		}
  2327  	}
  2328  	return nil
  2329  }
  2330  
  2331  // Next advances to the next page of values.  If there was an error making
  2332  // the request the page does not advance and the error is returned.
  2333  // Deprecated: Use NextWithContext() instead.
  2334  func (page *StorageAccountInformationListResultPage) Next() error {
  2335  	return page.NextWithContext(context.Background())
  2336  }
  2337  
  2338  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2339  func (page StorageAccountInformationListResultPage) NotDone() bool {
  2340  	return !page.sailr.IsEmpty()
  2341  }
  2342  
  2343  // Response returns the raw server response from the last page request.
  2344  func (page StorageAccountInformationListResultPage) Response() StorageAccountInformationListResult {
  2345  	return page.sailr
  2346  }
  2347  
  2348  // Values returns the slice of values for the current page or nil if there are no values.
  2349  func (page StorageAccountInformationListResultPage) Values() []StorageAccountInformation {
  2350  	if page.sailr.IsEmpty() {
  2351  		return nil
  2352  	}
  2353  	return *page.sailr.Value
  2354  }
  2355  
  2356  // Creates a new instance of the StorageAccountInformationListResultPage type.
  2357  func NewStorageAccountInformationListResultPage(cur StorageAccountInformationListResult, getNextPage func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)) StorageAccountInformationListResultPage {
  2358  	return StorageAccountInformationListResultPage{
  2359  		fn:    getNextPage,
  2360  		sailr: cur,
  2361  	}
  2362  }
  2363  
  2364  // StorageAccountInformationProperties the Azure Storage account properties.
  2365  type StorageAccountInformationProperties struct {
  2366  	// Suffix - READ-ONLY; The optional suffix for the storage account.
  2367  	Suffix *string `json:"suffix,omitempty"`
  2368  }
  2369  
  2370  // MarshalJSON is the custom marshaler for StorageAccountInformationProperties.
  2371  func (saip StorageAccountInformationProperties) MarshalJSON() ([]byte, error) {
  2372  	objectMap := make(map[string]interface{})
  2373  	return json.Marshal(objectMap)
  2374  }
  2375  
  2376  // StorageContainer azure Storage blob container information.
  2377  type StorageContainer struct {
  2378  	autorest.Response `json:"-"`
  2379  	// StorageContainerProperties - READ-ONLY; The properties of the blob container.
  2380  	*StorageContainerProperties `json:"properties,omitempty"`
  2381  	// ID - READ-ONLY; The resource identifier.
  2382  	ID *string `json:"id,omitempty"`
  2383  	// Name - READ-ONLY; The resource name.
  2384  	Name *string `json:"name,omitempty"`
  2385  	// Type - READ-ONLY; The resource type.
  2386  	Type *string `json:"type,omitempty"`
  2387  }
  2388  
  2389  // MarshalJSON is the custom marshaler for StorageContainer.
  2390  func (sc StorageContainer) MarshalJSON() ([]byte, error) {
  2391  	objectMap := make(map[string]interface{})
  2392  	return json.Marshal(objectMap)
  2393  }
  2394  
  2395  // UnmarshalJSON is the custom unmarshaler for StorageContainer struct.
  2396  func (sc *StorageContainer) UnmarshalJSON(body []byte) error {
  2397  	var m map[string]*json.RawMessage
  2398  	err := json.Unmarshal(body, &m)
  2399  	if err != nil {
  2400  		return err
  2401  	}
  2402  	for k, v := range m {
  2403  		switch k {
  2404  		case "properties":
  2405  			if v != nil {
  2406  				var storageContainerProperties StorageContainerProperties
  2407  				err = json.Unmarshal(*v, &storageContainerProperties)
  2408  				if err != nil {
  2409  					return err
  2410  				}
  2411  				sc.StorageContainerProperties = &storageContainerProperties
  2412  			}
  2413  		case "id":
  2414  			if v != nil {
  2415  				var ID string
  2416  				err = json.Unmarshal(*v, &ID)
  2417  				if err != nil {
  2418  					return err
  2419  				}
  2420  				sc.ID = &ID
  2421  			}
  2422  		case "name":
  2423  			if v != nil {
  2424  				var name string
  2425  				err = json.Unmarshal(*v, &name)
  2426  				if err != nil {
  2427  					return err
  2428  				}
  2429  				sc.Name = &name
  2430  			}
  2431  		case "type":
  2432  			if v != nil {
  2433  				var typeVar string
  2434  				err = json.Unmarshal(*v, &typeVar)
  2435  				if err != nil {
  2436  					return err
  2437  				}
  2438  				sc.Type = &typeVar
  2439  			}
  2440  		}
  2441  	}
  2442  
  2443  	return nil
  2444  }
  2445  
  2446  // StorageContainerListResult the list of blob containers associated with the storage account attached to
  2447  // the Data Lake Analytics account.
  2448  type StorageContainerListResult struct {
  2449  	autorest.Response `json:"-"`
  2450  	// Value - READ-ONLY; The results of the list operation.
  2451  	Value *[]StorageContainer `json:"value,omitempty"`
  2452  	// NextLink - READ-ONLY; The link (url) to the next page of results.
  2453  	NextLink *string `json:"nextLink,omitempty"`
  2454  }
  2455  
  2456  // MarshalJSON is the custom marshaler for StorageContainerListResult.
  2457  func (sclr StorageContainerListResult) MarshalJSON() ([]byte, error) {
  2458  	objectMap := make(map[string]interface{})
  2459  	return json.Marshal(objectMap)
  2460  }
  2461  
  2462  // StorageContainerListResultIterator provides access to a complete listing of StorageContainer values.
  2463  type StorageContainerListResultIterator struct {
  2464  	i    int
  2465  	page StorageContainerListResultPage
  2466  }
  2467  
  2468  // NextWithContext advances to the next value.  If there was an error making
  2469  // the request the iterator does not advance and the error is returned.
  2470  func (iter *StorageContainerListResultIterator) NextWithContext(ctx context.Context) (err error) {
  2471  	if tracing.IsEnabled() {
  2472  		ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultIterator.NextWithContext")
  2473  		defer func() {
  2474  			sc := -1
  2475  			if iter.Response().Response.Response != nil {
  2476  				sc = iter.Response().Response.Response.StatusCode
  2477  			}
  2478  			tracing.EndSpan(ctx, sc, err)
  2479  		}()
  2480  	}
  2481  	iter.i++
  2482  	if iter.i < len(iter.page.Values()) {
  2483  		return nil
  2484  	}
  2485  	err = iter.page.NextWithContext(ctx)
  2486  	if err != nil {
  2487  		iter.i--
  2488  		return err
  2489  	}
  2490  	iter.i = 0
  2491  	return nil
  2492  }
  2493  
  2494  // Next advances to the next value.  If there was an error making
  2495  // the request the iterator does not advance and the error is returned.
  2496  // Deprecated: Use NextWithContext() instead.
  2497  func (iter *StorageContainerListResultIterator) Next() error {
  2498  	return iter.NextWithContext(context.Background())
  2499  }
  2500  
  2501  // NotDone returns true if the enumeration should be started or is not yet complete.
  2502  func (iter StorageContainerListResultIterator) NotDone() bool {
  2503  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  2504  }
  2505  
  2506  // Response returns the raw server response from the last page request.
  2507  func (iter StorageContainerListResultIterator) Response() StorageContainerListResult {
  2508  	return iter.page.Response()
  2509  }
  2510  
  2511  // Value returns the current value or a zero-initialized value if the
  2512  // iterator has advanced beyond the end of the collection.
  2513  func (iter StorageContainerListResultIterator) Value() StorageContainer {
  2514  	if !iter.page.NotDone() {
  2515  		return StorageContainer{}
  2516  	}
  2517  	return iter.page.Values()[iter.i]
  2518  }
  2519  
  2520  // Creates a new instance of the StorageContainerListResultIterator type.
  2521  func NewStorageContainerListResultIterator(page StorageContainerListResultPage) StorageContainerListResultIterator {
  2522  	return StorageContainerListResultIterator{page: page}
  2523  }
  2524  
  2525  // IsEmpty returns true if the ListResult contains no values.
  2526  func (sclr StorageContainerListResult) IsEmpty() bool {
  2527  	return sclr.Value == nil || len(*sclr.Value) == 0
  2528  }
  2529  
  2530  // hasNextLink returns true if the NextLink is not empty.
  2531  func (sclr StorageContainerListResult) hasNextLink() bool {
  2532  	return sclr.NextLink != nil && len(*sclr.NextLink) != 0
  2533  }
  2534  
  2535  // storageContainerListResultPreparer prepares a request to retrieve the next set of results.
  2536  // It returns nil if no more results exist.
  2537  func (sclr StorageContainerListResult) storageContainerListResultPreparer(ctx context.Context) (*http.Request, error) {
  2538  	if !sclr.hasNextLink() {
  2539  		return nil, nil
  2540  	}
  2541  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  2542  		autorest.AsJSON(),
  2543  		autorest.AsGet(),
  2544  		autorest.WithBaseURL(to.String(sclr.NextLink)))
  2545  }
  2546  
  2547  // StorageContainerListResultPage contains a page of StorageContainer values.
  2548  type StorageContainerListResultPage struct {
  2549  	fn   func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)
  2550  	sclr StorageContainerListResult
  2551  }
  2552  
  2553  // NextWithContext advances to the next page of values.  If there was an error making
  2554  // the request the page does not advance and the error is returned.
  2555  func (page *StorageContainerListResultPage) NextWithContext(ctx context.Context) (err error) {
  2556  	if tracing.IsEnabled() {
  2557  		ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultPage.NextWithContext")
  2558  		defer func() {
  2559  			sc := -1
  2560  			if page.Response().Response.Response != nil {
  2561  				sc = page.Response().Response.Response.StatusCode
  2562  			}
  2563  			tracing.EndSpan(ctx, sc, err)
  2564  		}()
  2565  	}
  2566  	for {
  2567  		next, err := page.fn(ctx, page.sclr)
  2568  		if err != nil {
  2569  			return err
  2570  		}
  2571  		page.sclr = next
  2572  		if !next.hasNextLink() || !next.IsEmpty() {
  2573  			break
  2574  		}
  2575  	}
  2576  	return nil
  2577  }
  2578  
  2579  // Next advances to the next page of values.  If there was an error making
  2580  // the request the page does not advance and the error is returned.
  2581  // Deprecated: Use NextWithContext() instead.
  2582  func (page *StorageContainerListResultPage) Next() error {
  2583  	return page.NextWithContext(context.Background())
  2584  }
  2585  
  2586  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2587  func (page StorageContainerListResultPage) NotDone() bool {
  2588  	return !page.sclr.IsEmpty()
  2589  }
  2590  
  2591  // Response returns the raw server response from the last page request.
  2592  func (page StorageContainerListResultPage) Response() StorageContainerListResult {
  2593  	return page.sclr
  2594  }
  2595  
  2596  // Values returns the slice of values for the current page or nil if there are no values.
  2597  func (page StorageContainerListResultPage) Values() []StorageContainer {
  2598  	if page.sclr.IsEmpty() {
  2599  		return nil
  2600  	}
  2601  	return *page.sclr.Value
  2602  }
  2603  
  2604  // Creates a new instance of the StorageContainerListResultPage type.
  2605  func NewStorageContainerListResultPage(cur StorageContainerListResult, getNextPage func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)) StorageContainerListResultPage {
  2606  	return StorageContainerListResultPage{
  2607  		fn:   getNextPage,
  2608  		sclr: cur,
  2609  	}
  2610  }
  2611  
  2612  // StorageContainerProperties azure Storage blob container properties information.
  2613  type StorageContainerProperties struct {
  2614  	// LastModifiedTime - READ-ONLY; The last modified time of the blob container.
  2615  	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
  2616  }
  2617  
  2618  // MarshalJSON is the custom marshaler for StorageContainerProperties.
  2619  func (scp StorageContainerProperties) MarshalJSON() ([]byte, error) {
  2620  	objectMap := make(map[string]interface{})
  2621  	return json.Marshal(objectMap)
  2622  }
  2623  
  2624  // SubResource the resource model definition for a nested resource.
  2625  type SubResource struct {
  2626  	// ID - READ-ONLY; The resource identifier.
  2627  	ID *string `json:"id,omitempty"`
  2628  	// Name - READ-ONLY; The resource name.
  2629  	Name *string `json:"name,omitempty"`
  2630  	// Type - READ-ONLY; The resource type.
  2631  	Type *string `json:"type,omitempty"`
  2632  }
  2633  
  2634  // MarshalJSON is the custom marshaler for SubResource.
  2635  func (sr SubResource) MarshalJSON() ([]byte, error) {
  2636  	objectMap := make(map[string]interface{})
  2637  	return json.Marshal(objectMap)
  2638  }
  2639  
  2640  // UpdateComputePolicyParameters the parameters used to update a compute policy.
  2641  type UpdateComputePolicyParameters struct {
  2642  	// UpdateComputePolicyProperties - The compute policy properties to use when updating a compute policy.
  2643  	*UpdateComputePolicyProperties `json:"properties,omitempty"`
  2644  }
  2645  
  2646  // MarshalJSON is the custom marshaler for UpdateComputePolicyParameters.
  2647  func (ucpp UpdateComputePolicyParameters) MarshalJSON() ([]byte, error) {
  2648  	objectMap := make(map[string]interface{})
  2649  	if ucpp.UpdateComputePolicyProperties != nil {
  2650  		objectMap["properties"] = ucpp.UpdateComputePolicyProperties
  2651  	}
  2652  	return json.Marshal(objectMap)
  2653  }
  2654  
  2655  // UnmarshalJSON is the custom unmarshaler for UpdateComputePolicyParameters struct.
  2656  func (ucpp *UpdateComputePolicyParameters) UnmarshalJSON(body []byte) error {
  2657  	var m map[string]*json.RawMessage
  2658  	err := json.Unmarshal(body, &m)
  2659  	if err != nil {
  2660  		return err
  2661  	}
  2662  	for k, v := range m {
  2663  		switch k {
  2664  		case "properties":
  2665  			if v != nil {
  2666  				var updateComputePolicyProperties UpdateComputePolicyProperties
  2667  				err = json.Unmarshal(*v, &updateComputePolicyProperties)
  2668  				if err != nil {
  2669  					return err
  2670  				}
  2671  				ucpp.UpdateComputePolicyProperties = &updateComputePolicyProperties
  2672  			}
  2673  		}
  2674  	}
  2675  
  2676  	return nil
  2677  }
  2678  
  2679  // UpdateComputePolicyProperties the compute policy properties to use when updating a compute policy.
  2680  type UpdateComputePolicyProperties struct {
  2681  	// ObjectID - The AAD object identifier for the entity to create a policy for.
  2682  	ObjectID *uuid.UUID `json:"objectId,omitempty"`
  2683  	// ObjectType - The type of AAD object the object identifier refers to. Possible values include: 'User', 'Group', 'ServicePrincipal'
  2684  	ObjectType AADObjectType `json:"objectType,omitempty"`
  2685  	// 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.
  2686  	MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
  2687  	// 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.
  2688  	MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
  2689  }
  2690  
  2691  // UpdateComputePolicyWithAccountParameters the parameters used to update a compute policy while updating a
  2692  // Data Lake Analytics account.
  2693  type UpdateComputePolicyWithAccountParameters struct {
  2694  	// Name - The unique name of the compute policy to update.
  2695  	Name *string `json:"name,omitempty"`
  2696  	// UpdateComputePolicyProperties - The compute policy properties to use when updating a compute policy.
  2697  	*UpdateComputePolicyProperties `json:"properties,omitempty"`
  2698  }
  2699  
  2700  // MarshalJSON is the custom marshaler for UpdateComputePolicyWithAccountParameters.
  2701  func (ucpwap UpdateComputePolicyWithAccountParameters) MarshalJSON() ([]byte, error) {
  2702  	objectMap := make(map[string]interface{})
  2703  	if ucpwap.Name != nil {
  2704  		objectMap["name"] = ucpwap.Name
  2705  	}
  2706  	if ucpwap.UpdateComputePolicyProperties != nil {
  2707  		objectMap["properties"] = ucpwap.UpdateComputePolicyProperties
  2708  	}
  2709  	return json.Marshal(objectMap)
  2710  }
  2711  
  2712  // UnmarshalJSON is the custom unmarshaler for UpdateComputePolicyWithAccountParameters struct.
  2713  func (ucpwap *UpdateComputePolicyWithAccountParameters) UnmarshalJSON(body []byte) error {
  2714  	var m map[string]*json.RawMessage
  2715  	err := json.Unmarshal(body, &m)
  2716  	if err != nil {
  2717  		return err
  2718  	}
  2719  	for k, v := range m {
  2720  		switch k {
  2721  		case "name":
  2722  			if v != nil {
  2723  				var name string
  2724  				err = json.Unmarshal(*v, &name)
  2725  				if err != nil {
  2726  					return err
  2727  				}
  2728  				ucpwap.Name = &name
  2729  			}
  2730  		case "properties":
  2731  			if v != nil {
  2732  				var updateComputePolicyProperties UpdateComputePolicyProperties
  2733  				err = json.Unmarshal(*v, &updateComputePolicyProperties)
  2734  				if err != nil {
  2735  					return err
  2736  				}
  2737  				ucpwap.UpdateComputePolicyProperties = &updateComputePolicyProperties
  2738  			}
  2739  		}
  2740  	}
  2741  
  2742  	return nil
  2743  }
  2744  
  2745  // UpdateDataLakeAnalyticsAccountParameters the parameters that can be used to update an existing Data Lake
  2746  // Analytics account.
  2747  type UpdateDataLakeAnalyticsAccountParameters struct {
  2748  	// Tags - The resource tags.
  2749  	Tags map[string]*string `json:"tags"`
  2750  	// UpdateDataLakeAnalyticsAccountProperties - The properties that can be updated in an existing Data Lake Analytics account.
  2751  	*UpdateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"`
  2752  }
  2753  
  2754  // MarshalJSON is the custom marshaler for UpdateDataLakeAnalyticsAccountParameters.
  2755  func (udlaap UpdateDataLakeAnalyticsAccountParameters) MarshalJSON() ([]byte, error) {
  2756  	objectMap := make(map[string]interface{})
  2757  	if udlaap.Tags != nil {
  2758  		objectMap["tags"] = udlaap.Tags
  2759  	}
  2760  	if udlaap.UpdateDataLakeAnalyticsAccountProperties != nil {
  2761  		objectMap["properties"] = udlaap.UpdateDataLakeAnalyticsAccountProperties
  2762  	}
  2763  	return json.Marshal(objectMap)
  2764  }
  2765  
  2766  // UnmarshalJSON is the custom unmarshaler for UpdateDataLakeAnalyticsAccountParameters struct.
  2767  func (udlaap *UpdateDataLakeAnalyticsAccountParameters) UnmarshalJSON(body []byte) error {
  2768  	var m map[string]*json.RawMessage
  2769  	err := json.Unmarshal(body, &m)
  2770  	if err != nil {
  2771  		return err
  2772  	}
  2773  	for k, v := range m {
  2774  		switch k {
  2775  		case "tags":
  2776  			if v != nil {
  2777  				var tags map[string]*string
  2778  				err = json.Unmarshal(*v, &tags)
  2779  				if err != nil {
  2780  					return err
  2781  				}
  2782  				udlaap.Tags = tags
  2783  			}
  2784  		case "properties":
  2785  			if v != nil {
  2786  				var updateDataLakeAnalyticsAccountProperties UpdateDataLakeAnalyticsAccountProperties
  2787  				err = json.Unmarshal(*v, &updateDataLakeAnalyticsAccountProperties)
  2788  				if err != nil {
  2789  					return err
  2790  				}
  2791  				udlaap.UpdateDataLakeAnalyticsAccountProperties = &updateDataLakeAnalyticsAccountProperties
  2792  			}
  2793  		}
  2794  	}
  2795  
  2796  	return nil
  2797  }
  2798  
  2799  // UpdateDataLakeAnalyticsAccountProperties the properties to update that are associated with an underlying
  2800  // Data Lake Analytics account.
  2801  type UpdateDataLakeAnalyticsAccountProperties struct {
  2802  	// DataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account.
  2803  	DataLakeStoreAccounts *[]UpdateDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"`
  2804  	// StorageAccounts - The list of Azure Blob storage accounts associated with this account.
  2805  	StorageAccounts *[]UpdateStorageAccountWithAccountParameters `json:"storageAccounts,omitempty"`
  2806  	// ComputePolicies - The list of compute policies associated with this account.
  2807  	ComputePolicies *[]UpdateComputePolicyWithAccountParameters `json:"computePolicies,omitempty"`
  2808  	// FirewallRules - The list of firewall rules associated with this account.
  2809  	FirewallRules *[]UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`
  2810  	// 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'
  2811  	FirewallState FirewallState `json:"firewallState,omitempty"`
  2812  	// 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'
  2813  	FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"`
  2814  	// NewTier - The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment100AUHours', 'Commitment500AUHours', 'Commitment1000AUHours', 'Commitment5000AUHours', 'Commitment10000AUHours', 'Commitment50000AUHours', 'Commitment100000AUHours', 'Commitment500000AUHours'
  2815  	NewTier TierType `json:"newTier,omitempty"`
  2816  	// MaxJobCount - The maximum supported jobs running under the account at the same time.
  2817  	MaxJobCount *int32 `json:"maxJobCount,omitempty"`
  2818  	// MaxDegreeOfParallelism - The maximum supported degree of parallelism for this account.
  2819  	MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"`
  2820  	// MaxDegreeOfParallelismPerJob - The maximum supported degree of parallelism per job for this account.
  2821  	MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"`
  2822  	// MinPriorityPerJob - The minimum supported priority per job for this account.
  2823  	MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
  2824  	// QueryStoreRetention - The number of days that job metadata is retained.
  2825  	QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
  2826  }
  2827  
  2828  // UpdateDataLakeStoreProperties the Data Lake Store account properties to use when updating a Data Lake
  2829  // Store account.
  2830  type UpdateDataLakeStoreProperties struct {
  2831  	// Suffix - The optional suffix for the Data Lake Store account.
  2832  	Suffix *string `json:"suffix,omitempty"`
  2833  }
  2834  
  2835  // UpdateDataLakeStoreWithAccountParameters the parameters used to update a Data Lake Store account while
  2836  // updating a Data Lake Analytics account.
  2837  type UpdateDataLakeStoreWithAccountParameters struct {
  2838  	// Name - The unique name of the Data Lake Store account to update.
  2839  	Name *string `json:"name,omitempty"`
  2840  	// UpdateDataLakeStoreProperties - The Data Lake Store account properties to use when updating a Data Lake Store account.
  2841  	*UpdateDataLakeStoreProperties `json:"properties,omitempty"`
  2842  }
  2843  
  2844  // MarshalJSON is the custom marshaler for UpdateDataLakeStoreWithAccountParameters.
  2845  func (udlswap UpdateDataLakeStoreWithAccountParameters) MarshalJSON() ([]byte, error) {
  2846  	objectMap := make(map[string]interface{})
  2847  	if udlswap.Name != nil {
  2848  		objectMap["name"] = udlswap.Name
  2849  	}
  2850  	if udlswap.UpdateDataLakeStoreProperties != nil {
  2851  		objectMap["properties"] = udlswap.UpdateDataLakeStoreProperties
  2852  	}
  2853  	return json.Marshal(objectMap)
  2854  }
  2855  
  2856  // UnmarshalJSON is the custom unmarshaler for UpdateDataLakeStoreWithAccountParameters struct.
  2857  func (udlswap *UpdateDataLakeStoreWithAccountParameters) UnmarshalJSON(body []byte) error {
  2858  	var m map[string]*json.RawMessage
  2859  	err := json.Unmarshal(body, &m)
  2860  	if err != nil {
  2861  		return err
  2862  	}
  2863  	for k, v := range m {
  2864  		switch k {
  2865  		case "name":
  2866  			if v != nil {
  2867  				var name string
  2868  				err = json.Unmarshal(*v, &name)
  2869  				if err != nil {
  2870  					return err
  2871  				}
  2872  				udlswap.Name = &name
  2873  			}
  2874  		case "properties":
  2875  			if v != nil {
  2876  				var updateDataLakeStoreProperties UpdateDataLakeStoreProperties
  2877  				err = json.Unmarshal(*v, &updateDataLakeStoreProperties)
  2878  				if err != nil {
  2879  					return err
  2880  				}
  2881  				udlswap.UpdateDataLakeStoreProperties = &updateDataLakeStoreProperties
  2882  			}
  2883  		}
  2884  	}
  2885  
  2886  	return nil
  2887  }
  2888  
  2889  // UpdateFirewallRuleParameters the parameters used to update a firewall rule.
  2890  type UpdateFirewallRuleParameters struct {
  2891  	// UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule.
  2892  	*UpdateFirewallRuleProperties `json:"properties,omitempty"`
  2893  }
  2894  
  2895  // MarshalJSON is the custom marshaler for UpdateFirewallRuleParameters.
  2896  func (ufrp UpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) {
  2897  	objectMap := make(map[string]interface{})
  2898  	if ufrp.UpdateFirewallRuleProperties != nil {
  2899  		objectMap["properties"] = ufrp.UpdateFirewallRuleProperties
  2900  	}
  2901  	return json.Marshal(objectMap)
  2902  }
  2903  
  2904  // UnmarshalJSON is the custom unmarshaler for UpdateFirewallRuleParameters struct.
  2905  func (ufrp *UpdateFirewallRuleParameters) UnmarshalJSON(body []byte) error {
  2906  	var m map[string]*json.RawMessage
  2907  	err := json.Unmarshal(body, &m)
  2908  	if err != nil {
  2909  		return err
  2910  	}
  2911  	for k, v := range m {
  2912  		switch k {
  2913  		case "properties":
  2914  			if v != nil {
  2915  				var updateFirewallRuleProperties UpdateFirewallRuleProperties
  2916  				err = json.Unmarshal(*v, &updateFirewallRuleProperties)
  2917  				if err != nil {
  2918  					return err
  2919  				}
  2920  				ufrp.UpdateFirewallRuleProperties = &updateFirewallRuleProperties
  2921  			}
  2922  		}
  2923  	}
  2924  
  2925  	return nil
  2926  }
  2927  
  2928  // UpdateFirewallRuleProperties the firewall rule properties to use when updating a firewall rule.
  2929  type UpdateFirewallRuleProperties struct {
  2930  	// 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.
  2931  	StartIPAddress *string `json:"startIpAddress,omitempty"`
  2932  	// 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.
  2933  	EndIPAddress *string `json:"endIpAddress,omitempty"`
  2934  }
  2935  
  2936  // UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a
  2937  // Data Lake Analytics account.
  2938  type UpdateFirewallRuleWithAccountParameters struct {
  2939  	// Name - The unique name of the firewall rule to update.
  2940  	Name *string `json:"name,omitempty"`
  2941  	// UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule.
  2942  	*UpdateFirewallRuleProperties `json:"properties,omitempty"`
  2943  }
  2944  
  2945  // MarshalJSON is the custom marshaler for UpdateFirewallRuleWithAccountParameters.
  2946  func (ufrwap UpdateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) {
  2947  	objectMap := make(map[string]interface{})
  2948  	if ufrwap.Name != nil {
  2949  		objectMap["name"] = ufrwap.Name
  2950  	}
  2951  	if ufrwap.UpdateFirewallRuleProperties != nil {
  2952  		objectMap["properties"] = ufrwap.UpdateFirewallRuleProperties
  2953  	}
  2954  	return json.Marshal(objectMap)
  2955  }
  2956  
  2957  // UnmarshalJSON is the custom unmarshaler for UpdateFirewallRuleWithAccountParameters struct.
  2958  func (ufrwap *UpdateFirewallRuleWithAccountParameters) UnmarshalJSON(body []byte) error {
  2959  	var m map[string]*json.RawMessage
  2960  	err := json.Unmarshal(body, &m)
  2961  	if err != nil {
  2962  		return err
  2963  	}
  2964  	for k, v := range m {
  2965  		switch k {
  2966  		case "name":
  2967  			if v != nil {
  2968  				var name string
  2969  				err = json.Unmarshal(*v, &name)
  2970  				if err != nil {
  2971  					return err
  2972  				}
  2973  				ufrwap.Name = &name
  2974  			}
  2975  		case "properties":
  2976  			if v != nil {
  2977  				var updateFirewallRuleProperties UpdateFirewallRuleProperties
  2978  				err = json.Unmarshal(*v, &updateFirewallRuleProperties)
  2979  				if err != nil {
  2980  					return err
  2981  				}
  2982  				ufrwap.UpdateFirewallRuleProperties = &updateFirewallRuleProperties
  2983  			}
  2984  		}
  2985  	}
  2986  
  2987  	return nil
  2988  }
  2989  
  2990  // UpdateStorageAccountParameters the parameters used to update an Azure Storage account.
  2991  type UpdateStorageAccountParameters struct {
  2992  	// UpdateStorageAccountProperties - The Azure Storage account properties to use when updating an Azure Storage account.
  2993  	*UpdateStorageAccountProperties `json:"properties,omitempty"`
  2994  }
  2995  
  2996  // MarshalJSON is the custom marshaler for UpdateStorageAccountParameters.
  2997  func (usap UpdateStorageAccountParameters) MarshalJSON() ([]byte, error) {
  2998  	objectMap := make(map[string]interface{})
  2999  	if usap.UpdateStorageAccountProperties != nil {
  3000  		objectMap["properties"] = usap.UpdateStorageAccountProperties
  3001  	}
  3002  	return json.Marshal(objectMap)
  3003  }
  3004  
  3005  // UnmarshalJSON is the custom unmarshaler for UpdateStorageAccountParameters struct.
  3006  func (usap *UpdateStorageAccountParameters) UnmarshalJSON(body []byte) error {
  3007  	var m map[string]*json.RawMessage
  3008  	err := json.Unmarshal(body, &m)
  3009  	if err != nil {
  3010  		return err
  3011  	}
  3012  	for k, v := range m {
  3013  		switch k {
  3014  		case "properties":
  3015  			if v != nil {
  3016  				var updateStorageAccountProperties UpdateStorageAccountProperties
  3017  				err = json.Unmarshal(*v, &updateStorageAccountProperties)
  3018  				if err != nil {
  3019  					return err
  3020  				}
  3021  				usap.UpdateStorageAccountProperties = &updateStorageAccountProperties
  3022  			}
  3023  		}
  3024  	}
  3025  
  3026  	return nil
  3027  }
  3028  
  3029  // UpdateStorageAccountProperties the Azure Storage account properties to use when updating an Azure
  3030  // Storage account.
  3031  type UpdateStorageAccountProperties struct {
  3032  	// AccessKey - The updated access key associated with this Azure Storage account that will be used to connect to it.
  3033  	AccessKey *string `json:"accessKey,omitempty"`
  3034  	// Suffix - The optional suffix for the storage account.
  3035  	Suffix *string `json:"suffix,omitempty"`
  3036  }
  3037  
  3038  // UpdateStorageAccountWithAccountParameters the parameters used to update an Azure Storage account while
  3039  // updating a Data Lake Analytics account.
  3040  type UpdateStorageAccountWithAccountParameters struct {
  3041  	// Name - The unique name of the Azure Storage account to update.
  3042  	Name *string `json:"name,omitempty"`
  3043  	// UpdateStorageAccountProperties - The Azure Storage account properties to use when updating an Azure Storage account.
  3044  	*UpdateStorageAccountProperties `json:"properties,omitempty"`
  3045  }
  3046  
  3047  // MarshalJSON is the custom marshaler for UpdateStorageAccountWithAccountParameters.
  3048  func (usawap UpdateStorageAccountWithAccountParameters) MarshalJSON() ([]byte, error) {
  3049  	objectMap := make(map[string]interface{})
  3050  	if usawap.Name != nil {
  3051  		objectMap["name"] = usawap.Name
  3052  	}
  3053  	if usawap.UpdateStorageAccountProperties != nil {
  3054  		objectMap["properties"] = usawap.UpdateStorageAccountProperties
  3055  	}
  3056  	return json.Marshal(objectMap)
  3057  }
  3058  
  3059  // UnmarshalJSON is the custom unmarshaler for UpdateStorageAccountWithAccountParameters struct.
  3060  func (usawap *UpdateStorageAccountWithAccountParameters) UnmarshalJSON(body []byte) error {
  3061  	var m map[string]*json.RawMessage
  3062  	err := json.Unmarshal(body, &m)
  3063  	if err != nil {
  3064  		return err
  3065  	}
  3066  	for k, v := range m {
  3067  		switch k {
  3068  		case "name":
  3069  			if v != nil {
  3070  				var name string
  3071  				err = json.Unmarshal(*v, &name)
  3072  				if err != nil {
  3073  					return err
  3074  				}
  3075  				usawap.Name = &name
  3076  			}
  3077  		case "properties":
  3078  			if v != nil {
  3079  				var updateStorageAccountProperties UpdateStorageAccountProperties
  3080  				err = json.Unmarshal(*v, &updateStorageAccountProperties)
  3081  				if err != nil {
  3082  					return err
  3083  				}
  3084  				usawap.UpdateStorageAccountProperties = &updateStorageAccountProperties
  3085  			}
  3086  		}
  3087  	}
  3088  
  3089  	return nil
  3090  }
  3091  

View as plain text