...

Source file src/github.com/Azure/azure-sdk-for-go/services/storsimple1200series/mgmt/2016-10-01/storsimple/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/storsimple1200series/mgmt/2016-10-01/storsimple

     1  package storsimple
     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  	"net/http"
    18  )
    19  
    20  // The package's fully qualified name.
    21  const fqdn = "github.com/Azure/azure-sdk-for-go/services/storsimple1200series/mgmt/2016-10-01/storsimple"
    22  
    23  // AccessControlRecord the access control record
    24  type AccessControlRecord struct {
    25  	autorest.Response `json:"-"`
    26  	// AccessControlRecordProperties - Properties of AccessControlRecord
    27  	*AccessControlRecordProperties `json:"properties,omitempty"`
    28  	// ID - READ-ONLY; The identifier.
    29  	ID *string `json:"id,omitempty"`
    30  	// Name - READ-ONLY; The name.
    31  	Name *string `json:"name,omitempty"`
    32  	// Type - READ-ONLY; The type.
    33  	Type *string `json:"type,omitempty"`
    34  }
    35  
    36  // MarshalJSON is the custom marshaler for AccessControlRecord.
    37  func (acr AccessControlRecord) MarshalJSON() ([]byte, error) {
    38  	objectMap := make(map[string]interface{})
    39  	if acr.AccessControlRecordProperties != nil {
    40  		objectMap["properties"] = acr.AccessControlRecordProperties
    41  	}
    42  	return json.Marshal(objectMap)
    43  }
    44  
    45  // UnmarshalJSON is the custom unmarshaler for AccessControlRecord struct.
    46  func (acr *AccessControlRecord) UnmarshalJSON(body []byte) error {
    47  	var m map[string]*json.RawMessage
    48  	err := json.Unmarshal(body, &m)
    49  	if err != nil {
    50  		return err
    51  	}
    52  	for k, v := range m {
    53  		switch k {
    54  		case "properties":
    55  			if v != nil {
    56  				var accessControlRecordProperties AccessControlRecordProperties
    57  				err = json.Unmarshal(*v, &accessControlRecordProperties)
    58  				if err != nil {
    59  					return err
    60  				}
    61  				acr.AccessControlRecordProperties = &accessControlRecordProperties
    62  			}
    63  		case "id":
    64  			if v != nil {
    65  				var ID string
    66  				err = json.Unmarshal(*v, &ID)
    67  				if err != nil {
    68  					return err
    69  				}
    70  				acr.ID = &ID
    71  			}
    72  		case "name":
    73  			if v != nil {
    74  				var name string
    75  				err = json.Unmarshal(*v, &name)
    76  				if err != nil {
    77  					return err
    78  				}
    79  				acr.Name = &name
    80  			}
    81  		case "type":
    82  			if v != nil {
    83  				var typeVar string
    84  				err = json.Unmarshal(*v, &typeVar)
    85  				if err != nil {
    86  					return err
    87  				}
    88  				acr.Type = &typeVar
    89  			}
    90  		}
    91  	}
    92  
    93  	return nil
    94  }
    95  
    96  // AccessControlRecordList collection of AccessControlRecords
    97  type AccessControlRecordList struct {
    98  	autorest.Response `json:"-"`
    99  	// Value - The value.
   100  	Value *[]AccessControlRecord `json:"value,omitempty"`
   101  }
   102  
   103  // AccessControlRecordProperties properties of access control record
   104  type AccessControlRecordProperties struct {
   105  	// InitiatorName - The Iscsi initiator name (IQN)
   106  	InitiatorName *string `json:"initiatorName,omitempty"`
   107  }
   108  
   109  // AccessControlRecordsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
   110  // long-running operation.
   111  type AccessControlRecordsCreateOrUpdateFuture struct {
   112  	azure.FutureAPI
   113  	// Result returns the result of the asynchronous operation.
   114  	// If the operation has not completed it will return an error.
   115  	Result func(AccessControlRecordsClient) (AccessControlRecord, error)
   116  }
   117  
   118  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   119  func (future *AccessControlRecordsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
   120  	var azFuture azure.Future
   121  	if err := json.Unmarshal(body, &azFuture); err != nil {
   122  		return err
   123  	}
   124  	future.FutureAPI = &azFuture
   125  	future.Result = future.result
   126  	return nil
   127  }
   128  
   129  // result is the default implementation for AccessControlRecordsCreateOrUpdateFuture.Result.
   130  func (future *AccessControlRecordsCreateOrUpdateFuture) result(client AccessControlRecordsClient) (acr AccessControlRecord, err error) {
   131  	var done bool
   132  	done, err = future.DoneWithContext(context.Background(), client)
   133  	if err != nil {
   134  		err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
   135  		return
   136  	}
   137  	if !done {
   138  		acr.Response.Response = future.Response()
   139  		err = azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsCreateOrUpdateFuture")
   140  		return
   141  	}
   142  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   143  	if acr.Response.Response, err = future.GetResult(sender); err == nil && acr.Response.Response.StatusCode != http.StatusNoContent {
   144  		acr, err = client.CreateOrUpdateResponder(acr.Response.Response)
   145  		if err != nil {
   146  			err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", acr.Response.Response, "Failure responding to request")
   147  		}
   148  	}
   149  	return
   150  }
   151  
   152  // AccessControlRecordsDeleteFuture an abstraction for monitoring and retrieving the results of a
   153  // long-running operation.
   154  type AccessControlRecordsDeleteFuture struct {
   155  	azure.FutureAPI
   156  	// Result returns the result of the asynchronous operation.
   157  	// If the operation has not completed it will return an error.
   158  	Result func(AccessControlRecordsClient) (autorest.Response, error)
   159  }
   160  
   161  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   162  func (future *AccessControlRecordsDeleteFuture) UnmarshalJSON(body []byte) error {
   163  	var azFuture azure.Future
   164  	if err := json.Unmarshal(body, &azFuture); err != nil {
   165  		return err
   166  	}
   167  	future.FutureAPI = &azFuture
   168  	future.Result = future.result
   169  	return nil
   170  }
   171  
   172  // result is the default implementation for AccessControlRecordsDeleteFuture.Result.
   173  func (future *AccessControlRecordsDeleteFuture) result(client AccessControlRecordsClient) (ar autorest.Response, err error) {
   174  	var done bool
   175  	done, err = future.DoneWithContext(context.Background(), client)
   176  	if err != nil {
   177  		err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsDeleteFuture", "Result", future.Response(), "Polling failure")
   178  		return
   179  	}
   180  	if !done {
   181  		ar.Response = future.Response()
   182  		err = azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsDeleteFuture")
   183  		return
   184  	}
   185  	ar.Response = future.Response()
   186  	return
   187  }
   188  
   189  // Alert alert class
   190  type Alert struct {
   191  	// AlertProperties - Properties of alert
   192  	*AlertProperties `json:"properties,omitempty"`
   193  	// ID - READ-ONLY; The identifier.
   194  	ID *string `json:"id,omitempty"`
   195  	// Name - READ-ONLY; The name.
   196  	Name *string `json:"name,omitempty"`
   197  	// Type - READ-ONLY; The type.
   198  	Type *string `json:"type,omitempty"`
   199  }
   200  
   201  // MarshalJSON is the custom marshaler for Alert.
   202  func (a Alert) MarshalJSON() ([]byte, error) {
   203  	objectMap := make(map[string]interface{})
   204  	if a.AlertProperties != nil {
   205  		objectMap["properties"] = a.AlertProperties
   206  	}
   207  	return json.Marshal(objectMap)
   208  }
   209  
   210  // UnmarshalJSON is the custom unmarshaler for Alert struct.
   211  func (a *Alert) UnmarshalJSON(body []byte) error {
   212  	var m map[string]*json.RawMessage
   213  	err := json.Unmarshal(body, &m)
   214  	if err != nil {
   215  		return err
   216  	}
   217  	for k, v := range m {
   218  		switch k {
   219  		case "properties":
   220  			if v != nil {
   221  				var alertProperties AlertProperties
   222  				err = json.Unmarshal(*v, &alertProperties)
   223  				if err != nil {
   224  					return err
   225  				}
   226  				a.AlertProperties = &alertProperties
   227  			}
   228  		case "id":
   229  			if v != nil {
   230  				var ID string
   231  				err = json.Unmarshal(*v, &ID)
   232  				if err != nil {
   233  					return err
   234  				}
   235  				a.ID = &ID
   236  			}
   237  		case "name":
   238  			if v != nil {
   239  				var name string
   240  				err = json.Unmarshal(*v, &name)
   241  				if err != nil {
   242  					return err
   243  				}
   244  				a.Name = &name
   245  			}
   246  		case "type":
   247  			if v != nil {
   248  				var typeVar string
   249  				err = json.Unmarshal(*v, &typeVar)
   250  				if err != nil {
   251  					return err
   252  				}
   253  				a.Type = &typeVar
   254  			}
   255  		}
   256  	}
   257  
   258  	return nil
   259  }
   260  
   261  // AlertErrorDetails error details for the alert
   262  type AlertErrorDetails struct {
   263  	// ErrorCode - Error code.
   264  	ErrorCode *string `json:"errorCode,omitempty"`
   265  	// ErrorMessage - Error Message
   266  	ErrorMessage *string `json:"errorMessage,omitempty"`
   267  	// Occurences - Number of occurrences.
   268  	Occurences *int32 `json:"occurences,omitempty"`
   269  }
   270  
   271  // AlertFilter filters that can be specified on the alert
   272  type AlertFilter struct {
   273  	// Status - Status of the alert. Possible values include: 'Active', 'Cleared'
   274  	Status AlertStatus `json:"status,omitempty"`
   275  	// Severity - Severity of the alert. Possible values include: 'Informational', 'Warning', 'Critical'
   276  	Severity AlertSeverity `json:"severity,omitempty"`
   277  	// SourceType - Source of the alert. Possible values include: 'AlertSourceTypeResource', 'AlertSourceTypeDevice'
   278  	SourceType AlertSourceType `json:"sourceType,omitempty"`
   279  	// SourceName - Source name of the alert
   280  	SourceName *string `json:"sourceName,omitempty"`
   281  	// AppearedOnTime - UTC time on which the alert appeared
   282  	AppearedOnTime *date.Time `json:"appearedOnTime,omitempty"`
   283  }
   284  
   285  // AlertList collection of Alerts
   286  type AlertList struct {
   287  	autorest.Response `json:"-"`
   288  	// Value - The value.
   289  	Value *[]Alert `json:"value,omitempty"`
   290  	// NextLink - Id of the next page of alerts
   291  	NextLink *string `json:"nextLink,omitempty"`
   292  }
   293  
   294  // AlertListIterator provides access to a complete listing of Alert values.
   295  type AlertListIterator struct {
   296  	i    int
   297  	page AlertListPage
   298  }
   299  
   300  // NextWithContext advances to the next value.  If there was an error making
   301  // the request the iterator does not advance and the error is returned.
   302  func (iter *AlertListIterator) NextWithContext(ctx context.Context) (err error) {
   303  	if tracing.IsEnabled() {
   304  		ctx = tracing.StartSpan(ctx, fqdn+"/AlertListIterator.NextWithContext")
   305  		defer func() {
   306  			sc := -1
   307  			if iter.Response().Response.Response != nil {
   308  				sc = iter.Response().Response.Response.StatusCode
   309  			}
   310  			tracing.EndSpan(ctx, sc, err)
   311  		}()
   312  	}
   313  	iter.i++
   314  	if iter.i < len(iter.page.Values()) {
   315  		return nil
   316  	}
   317  	err = iter.page.NextWithContext(ctx)
   318  	if err != nil {
   319  		iter.i--
   320  		return err
   321  	}
   322  	iter.i = 0
   323  	return nil
   324  }
   325  
   326  // Next advances to the next value.  If there was an error making
   327  // the request the iterator does not advance and the error is returned.
   328  // Deprecated: Use NextWithContext() instead.
   329  func (iter *AlertListIterator) Next() error {
   330  	return iter.NextWithContext(context.Background())
   331  }
   332  
   333  // NotDone returns true if the enumeration should be started or is not yet complete.
   334  func (iter AlertListIterator) NotDone() bool {
   335  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   336  }
   337  
   338  // Response returns the raw server response from the last page request.
   339  func (iter AlertListIterator) Response() AlertList {
   340  	return iter.page.Response()
   341  }
   342  
   343  // Value returns the current value or a zero-initialized value if the
   344  // iterator has advanced beyond the end of the collection.
   345  func (iter AlertListIterator) Value() Alert {
   346  	if !iter.page.NotDone() {
   347  		return Alert{}
   348  	}
   349  	return iter.page.Values()[iter.i]
   350  }
   351  
   352  // Creates a new instance of the AlertListIterator type.
   353  func NewAlertListIterator(page AlertListPage) AlertListIterator {
   354  	return AlertListIterator{page: page}
   355  }
   356  
   357  // IsEmpty returns true if the ListResult contains no values.
   358  func (al AlertList) IsEmpty() bool {
   359  	return al.Value == nil || len(*al.Value) == 0
   360  }
   361  
   362  // hasNextLink returns true if the NextLink is not empty.
   363  func (al AlertList) hasNextLink() bool {
   364  	return al.NextLink != nil && len(*al.NextLink) != 0
   365  }
   366  
   367  // alertListPreparer prepares a request to retrieve the next set of results.
   368  // It returns nil if no more results exist.
   369  func (al AlertList) alertListPreparer(ctx context.Context) (*http.Request, error) {
   370  	if !al.hasNextLink() {
   371  		return nil, nil
   372  	}
   373  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   374  		autorest.AsJSON(),
   375  		autorest.AsGet(),
   376  		autorest.WithBaseURL(to.String(al.NextLink)))
   377  }
   378  
   379  // AlertListPage contains a page of Alert values.
   380  type AlertListPage struct {
   381  	fn func(context.Context, AlertList) (AlertList, error)
   382  	al AlertList
   383  }
   384  
   385  // NextWithContext advances to the next page of values.  If there was an error making
   386  // the request the page does not advance and the error is returned.
   387  func (page *AlertListPage) NextWithContext(ctx context.Context) (err error) {
   388  	if tracing.IsEnabled() {
   389  		ctx = tracing.StartSpan(ctx, fqdn+"/AlertListPage.NextWithContext")
   390  		defer func() {
   391  			sc := -1
   392  			if page.Response().Response.Response != nil {
   393  				sc = page.Response().Response.Response.StatusCode
   394  			}
   395  			tracing.EndSpan(ctx, sc, err)
   396  		}()
   397  	}
   398  	for {
   399  		next, err := page.fn(ctx, page.al)
   400  		if err != nil {
   401  			return err
   402  		}
   403  		page.al = next
   404  		if !next.hasNextLink() || !next.IsEmpty() {
   405  			break
   406  		}
   407  	}
   408  	return nil
   409  }
   410  
   411  // Next advances to the next page of values.  If there was an error making
   412  // the request the page does not advance and the error is returned.
   413  // Deprecated: Use NextWithContext() instead.
   414  func (page *AlertListPage) Next() error {
   415  	return page.NextWithContext(context.Background())
   416  }
   417  
   418  // NotDone returns true if the page enumeration should be started or is not yet complete.
   419  func (page AlertListPage) NotDone() bool {
   420  	return !page.al.IsEmpty()
   421  }
   422  
   423  // Response returns the raw server response from the last page request.
   424  func (page AlertListPage) Response() AlertList {
   425  	return page.al
   426  }
   427  
   428  // Values returns the slice of values for the current page or nil if there are no values.
   429  func (page AlertListPage) Values() []Alert {
   430  	if page.al.IsEmpty() {
   431  		return nil
   432  	}
   433  	return *page.al.Value
   434  }
   435  
   436  // Creates a new instance of the AlertListPage type.
   437  func NewAlertListPage(cur AlertList, getNextPage func(context.Context, AlertList) (AlertList, error)) AlertListPage {
   438  	return AlertListPage{
   439  		fn: getNextPage,
   440  		al: cur,
   441  	}
   442  }
   443  
   444  // AlertProperties properties of alert
   445  type AlertProperties struct {
   446  	// Title - Title of the alert
   447  	Title *string `json:"title,omitempty"`
   448  	// Scope - Device or Resource alert. Possible values include: 'AlertScopeResource', 'AlertScopeDevice'
   449  	Scope AlertScope `json:"scope,omitempty"`
   450  	// AlertType - Type of the alert
   451  	AlertType *string `json:"alertType,omitempty"`
   452  	// AppearedAtTime - UTC time at which the alert appeared
   453  	AppearedAtTime *date.Time `json:"appearedAtTime,omitempty"`
   454  	// AppearedAtSourceTime - UTC time at which the alert appeared on the source
   455  	AppearedAtSourceTime *date.Time `json:"appearedAtSourceTime,omitempty"`
   456  	// ClearedAtTime - UTC time at which the alert got cleared
   457  	ClearedAtTime *date.Time `json:"clearedAtTime,omitempty"`
   458  	// ClearedAtSourceTime - UTC time at which the alert was cleared on the source
   459  	ClearedAtSourceTime *date.Time `json:"clearedAtSourceTime,omitempty"`
   460  	// Source - Source at which the alert was cleared
   461  	Source *AlertSource `json:"source,omitempty"`
   462  	// Recommendation - Recommendation for acting on the alert
   463  	Recommendation *string `json:"recommendation,omitempty"`
   464  	// ResolutionReason - Reason for resolving the alert
   465  	ResolutionReason *string `json:"resolutionReason,omitempty"`
   466  	// Severity - Severity of the alert. Possible values include: 'Informational', 'Warning', 'Critical'
   467  	Severity AlertSeverity `json:"severity,omitempty"`
   468  	// Status - Current status of the alert. Possible values include: 'Active', 'Cleared'
   469  	Status AlertStatus `json:"status,omitempty"`
   470  	// ErrorDetails - ErrorDetails of the alert
   471  	ErrorDetails *AlertErrorDetails `json:"errorDetails,omitempty"`
   472  	// DetailedInformation - Other information about the alert
   473  	DetailedInformation map[string]*string `json:"detailedInformation"`
   474  }
   475  
   476  // MarshalJSON is the custom marshaler for AlertProperties.
   477  func (ap AlertProperties) MarshalJSON() ([]byte, error) {
   478  	objectMap := make(map[string]interface{})
   479  	if ap.Title != nil {
   480  		objectMap["title"] = ap.Title
   481  	}
   482  	if ap.Scope != "" {
   483  		objectMap["scope"] = ap.Scope
   484  	}
   485  	if ap.AlertType != nil {
   486  		objectMap["alertType"] = ap.AlertType
   487  	}
   488  	if ap.AppearedAtTime != nil {
   489  		objectMap["appearedAtTime"] = ap.AppearedAtTime
   490  	}
   491  	if ap.AppearedAtSourceTime != nil {
   492  		objectMap["appearedAtSourceTime"] = ap.AppearedAtSourceTime
   493  	}
   494  	if ap.ClearedAtTime != nil {
   495  		objectMap["clearedAtTime"] = ap.ClearedAtTime
   496  	}
   497  	if ap.ClearedAtSourceTime != nil {
   498  		objectMap["clearedAtSourceTime"] = ap.ClearedAtSourceTime
   499  	}
   500  	if ap.Source != nil {
   501  		objectMap["source"] = ap.Source
   502  	}
   503  	if ap.Recommendation != nil {
   504  		objectMap["recommendation"] = ap.Recommendation
   505  	}
   506  	if ap.ResolutionReason != nil {
   507  		objectMap["resolutionReason"] = ap.ResolutionReason
   508  	}
   509  	if ap.Severity != "" {
   510  		objectMap["severity"] = ap.Severity
   511  	}
   512  	if ap.Status != "" {
   513  		objectMap["status"] = ap.Status
   514  	}
   515  	if ap.ErrorDetails != nil {
   516  		objectMap["errorDetails"] = ap.ErrorDetails
   517  	}
   518  	if ap.DetailedInformation != nil {
   519  		objectMap["detailedInformation"] = ap.DetailedInformation
   520  	}
   521  	return json.Marshal(objectMap)
   522  }
   523  
   524  // AlertSettings alertSettings on the device which represents how alerts will be processed
   525  type AlertSettings struct {
   526  	autorest.Response `json:"-"`
   527  	// AlertSettingsProperties - Properties of AlertSettings
   528  	*AlertSettingsProperties `json:"properties,omitempty"`
   529  	// ID - READ-ONLY; The identifier.
   530  	ID *string `json:"id,omitempty"`
   531  	// Name - READ-ONLY; The name.
   532  	Name *string `json:"name,omitempty"`
   533  	// Type - READ-ONLY; The type.
   534  	Type *string `json:"type,omitempty"`
   535  }
   536  
   537  // MarshalJSON is the custom marshaler for AlertSettings.
   538  func (as AlertSettings) MarshalJSON() ([]byte, error) {
   539  	objectMap := make(map[string]interface{})
   540  	if as.AlertSettingsProperties != nil {
   541  		objectMap["properties"] = as.AlertSettingsProperties
   542  	}
   543  	return json.Marshal(objectMap)
   544  }
   545  
   546  // UnmarshalJSON is the custom unmarshaler for AlertSettings struct.
   547  func (as *AlertSettings) UnmarshalJSON(body []byte) error {
   548  	var m map[string]*json.RawMessage
   549  	err := json.Unmarshal(body, &m)
   550  	if err != nil {
   551  		return err
   552  	}
   553  	for k, v := range m {
   554  		switch k {
   555  		case "properties":
   556  			if v != nil {
   557  				var alertSettingsProperties AlertSettingsProperties
   558  				err = json.Unmarshal(*v, &alertSettingsProperties)
   559  				if err != nil {
   560  					return err
   561  				}
   562  				as.AlertSettingsProperties = &alertSettingsProperties
   563  			}
   564  		case "id":
   565  			if v != nil {
   566  				var ID string
   567  				err = json.Unmarshal(*v, &ID)
   568  				if err != nil {
   569  					return err
   570  				}
   571  				as.ID = &ID
   572  			}
   573  		case "name":
   574  			if v != nil {
   575  				var name string
   576  				err = json.Unmarshal(*v, &name)
   577  				if err != nil {
   578  					return err
   579  				}
   580  				as.Name = &name
   581  			}
   582  		case "type":
   583  			if v != nil {
   584  				var typeVar string
   585  				err = json.Unmarshal(*v, &typeVar)
   586  				if err != nil {
   587  					return err
   588  				}
   589  				as.Type = &typeVar
   590  			}
   591  		}
   592  	}
   593  
   594  	return nil
   595  }
   596  
   597  // AlertSettingsProperties class containing the properties of AlertSettings
   598  type AlertSettingsProperties struct {
   599  	// EmailNotification - Value indicating whether user/admins will receive emails when an alert condition occurs on the system. Possible values include: 'Enabled', 'Disabled'
   600  	EmailNotification AlertEmailNotificationStatus `json:"emailNotification,omitempty"`
   601  	// NotificationToServiceOwners - Value indicating whether service owners will receive emails when an alert condition occurs on the system. Applicable only if emailNotification flag is Enabled. Possible values include: 'ServiceOwnersAlertNotificationStatusEnabled', 'ServiceOwnersAlertNotificationStatusDisabled'
   602  	NotificationToServiceOwners ServiceOwnersAlertNotificationStatus `json:"notificationToServiceOwners,omitempty"`
   603  	// AlertNotificationCulture - Culture setting to be used while building alert emails. For eg: "en-US"
   604  	AlertNotificationCulture *string `json:"alertNotificationCulture,omitempty"`
   605  	// AdditionalRecipientEmailList - List of email addresses (apart from admin/co-admin of subscription) to whom the alert emails need to be sent
   606  	AdditionalRecipientEmailList *[]string `json:"additionalRecipientEmailList,omitempty"`
   607  }
   608  
   609  // AlertSource source at which the alert can be raised
   610  type AlertSource struct {
   611  	// Name - Name of the source.
   612  	Name *string `json:"name,omitempty"`
   613  	// TimeZone - The time zone.
   614  	TimeZone *string `json:"timeZone,omitempty"`
   615  	// AlertSourceType - Source type of the alert. Possible values include: 'AlertSourceTypeResource', 'AlertSourceTypeDevice'
   616  	AlertSourceType AlertSourceType `json:"alertSourceType,omitempty"`
   617  }
   618  
   619  // AsymmetricEncryptedSecret this class can be used as the Type for any secret entity represented as
   620  // Password, CertThumbprint, Algorithm. This class is intended to be used when the secret is encrypted with
   621  // an asymmetric key pair. The encryptionAlgorithm field is mainly for future usage to potentially allow
   622  // different entities encrypted using different algorithms.
   623  type AsymmetricEncryptedSecret struct {
   624  	// Value - The value of the secret itself. If the secret is in plaintext then EncryptionAlgorithm will be none and EncryptionCertThumbprint will be null.
   625  	Value *string `json:"value,omitempty"`
   626  	// EncryptionCertificateThumbprint - Thumbprint certificate that was used to encrypt "Value"
   627  	EncryptionCertificateThumbprint *string `json:"encryptionCertificateThumbprint,omitempty"`
   628  	// EncryptionAlgorithm - Algorithm used to encrypt "Value". Possible values include: 'EncryptionAlgorithmNone', 'EncryptionAlgorithmAES256', 'EncryptionAlgorithmRSAESPKCS1V15'
   629  	EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"`
   630  }
   631  
   632  // AvailableProviderOperation class represents provider operation
   633  type AvailableProviderOperation struct {
   634  	// Name - Gets or sets the name of the operation being performed on this particular object
   635  	// Return value format: "{resourceProviderNamespace}/{resourceType}/{read|write|deletion|action}"
   636  	// Eg: Microsoft.StorSimple/managers/devices/fileServers/read
   637  	//     Microsoft.StorSimple/managers/devices/alerts/clearAlerts/action
   638  	Name *string `json:"name,omitempty"`
   639  	// Display - Gets or sets Display information
   640  	// Contains the localized display information for this particular operation/action
   641  	Display *AvailableProviderOperationDisplay `json:"display,omitempty"`
   642  	// Origin - Gets or sets Origin
   643  	// The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX.
   644  	// Default value is “user,system”
   645  	Origin *string `json:"origin,omitempty"`
   646  	// Properties - Gets or sets Properties
   647  	// Reserved for future use
   648  	Properties interface{} `json:"properties,omitempty"`
   649  }
   650  
   651  // AvailableProviderOperationDisplay contains the localized display information for this particular
   652  // operation / action.
   653  // These value will be used by several clients for
   654  // (1) custom role definitions for RBAC;
   655  // (2) complex query filters for the event service; and (3) audit history / records for management
   656  // operations.
   657  type AvailableProviderOperationDisplay struct {
   658  	// Provider - Gets or sets Provider
   659  	// The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible.
   660  	// It should use Title Casing and begin with “Microsoft” for 1st party services.
   661  	Provider *string `json:"provider,omitempty"`
   662  	// Resource - Gets or sets Resource
   663  	// The localized friendly form of the resource type related to this action/operation – it should match the public documentation for the resource provider.
   664  	// It should use Title Casing – for examples, please refer to the “name” section.
   665  	Resource *string `json:"resource,omitempty"`
   666  	// Operation - Gets or sets Operation
   667  	// The localized friendly name for the operation, as it should be shown to the user.
   668  	// It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing and include the entity/resource to which it applies.
   669  	Operation *string `json:"operation,omitempty"`
   670  	// Description - Gets or sets Description
   671  	// The localized friendly description for the operation, as it should be shown to the user.
   672  	// It should be thorough, yet concise – it will be used in tool tips and detailed views.
   673  	Description *string `json:"description,omitempty"`
   674  }
   675  
   676  // AvailableProviderOperations class for set of operations used for discovery of available provider
   677  // operations.
   678  type AvailableProviderOperations struct {
   679  	autorest.Response `json:"-"`
   680  	// Value - The value.
   681  	Value *[]AvailableProviderOperation `json:"value,omitempty"`
   682  	// NextLink - The NextLink.
   683  	NextLink *string `json:"nextLink,omitempty"`
   684  }
   685  
   686  // AvailableProviderOperationsIterator provides access to a complete listing of AvailableProviderOperation
   687  // values.
   688  type AvailableProviderOperationsIterator struct {
   689  	i    int
   690  	page AvailableProviderOperationsPage
   691  }
   692  
   693  // NextWithContext advances to the next value.  If there was an error making
   694  // the request the iterator does not advance and the error is returned.
   695  func (iter *AvailableProviderOperationsIterator) NextWithContext(ctx context.Context) (err error) {
   696  	if tracing.IsEnabled() {
   697  		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableProviderOperationsIterator.NextWithContext")
   698  		defer func() {
   699  			sc := -1
   700  			if iter.Response().Response.Response != nil {
   701  				sc = iter.Response().Response.Response.StatusCode
   702  			}
   703  			tracing.EndSpan(ctx, sc, err)
   704  		}()
   705  	}
   706  	iter.i++
   707  	if iter.i < len(iter.page.Values()) {
   708  		return nil
   709  	}
   710  	err = iter.page.NextWithContext(ctx)
   711  	if err != nil {
   712  		iter.i--
   713  		return err
   714  	}
   715  	iter.i = 0
   716  	return nil
   717  }
   718  
   719  // Next advances to the next value.  If there was an error making
   720  // the request the iterator does not advance and the error is returned.
   721  // Deprecated: Use NextWithContext() instead.
   722  func (iter *AvailableProviderOperationsIterator) Next() error {
   723  	return iter.NextWithContext(context.Background())
   724  }
   725  
   726  // NotDone returns true if the enumeration should be started or is not yet complete.
   727  func (iter AvailableProviderOperationsIterator) NotDone() bool {
   728  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   729  }
   730  
   731  // Response returns the raw server response from the last page request.
   732  func (iter AvailableProviderOperationsIterator) Response() AvailableProviderOperations {
   733  	return iter.page.Response()
   734  }
   735  
   736  // Value returns the current value or a zero-initialized value if the
   737  // iterator has advanced beyond the end of the collection.
   738  func (iter AvailableProviderOperationsIterator) Value() AvailableProviderOperation {
   739  	if !iter.page.NotDone() {
   740  		return AvailableProviderOperation{}
   741  	}
   742  	return iter.page.Values()[iter.i]
   743  }
   744  
   745  // Creates a new instance of the AvailableProviderOperationsIterator type.
   746  func NewAvailableProviderOperationsIterator(page AvailableProviderOperationsPage) AvailableProviderOperationsIterator {
   747  	return AvailableProviderOperationsIterator{page: page}
   748  }
   749  
   750  // IsEmpty returns true if the ListResult contains no values.
   751  func (apo AvailableProviderOperations) IsEmpty() bool {
   752  	return apo.Value == nil || len(*apo.Value) == 0
   753  }
   754  
   755  // hasNextLink returns true if the NextLink is not empty.
   756  func (apo AvailableProviderOperations) hasNextLink() bool {
   757  	return apo.NextLink != nil && len(*apo.NextLink) != 0
   758  }
   759  
   760  // availableProviderOperationsPreparer prepares a request to retrieve the next set of results.
   761  // It returns nil if no more results exist.
   762  func (apo AvailableProviderOperations) availableProviderOperationsPreparer(ctx context.Context) (*http.Request, error) {
   763  	if !apo.hasNextLink() {
   764  		return nil, nil
   765  	}
   766  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   767  		autorest.AsJSON(),
   768  		autorest.AsGet(),
   769  		autorest.WithBaseURL(to.String(apo.NextLink)))
   770  }
   771  
   772  // AvailableProviderOperationsPage contains a page of AvailableProviderOperation values.
   773  type AvailableProviderOperationsPage struct {
   774  	fn  func(context.Context, AvailableProviderOperations) (AvailableProviderOperations, error)
   775  	apo AvailableProviderOperations
   776  }
   777  
   778  // NextWithContext advances to the next page of values.  If there was an error making
   779  // the request the page does not advance and the error is returned.
   780  func (page *AvailableProviderOperationsPage) NextWithContext(ctx context.Context) (err error) {
   781  	if tracing.IsEnabled() {
   782  		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableProviderOperationsPage.NextWithContext")
   783  		defer func() {
   784  			sc := -1
   785  			if page.Response().Response.Response != nil {
   786  				sc = page.Response().Response.Response.StatusCode
   787  			}
   788  			tracing.EndSpan(ctx, sc, err)
   789  		}()
   790  	}
   791  	for {
   792  		next, err := page.fn(ctx, page.apo)
   793  		if err != nil {
   794  			return err
   795  		}
   796  		page.apo = next
   797  		if !next.hasNextLink() || !next.IsEmpty() {
   798  			break
   799  		}
   800  	}
   801  	return nil
   802  }
   803  
   804  // Next advances to the next page of values.  If there was an error making
   805  // the request the page does not advance and the error is returned.
   806  // Deprecated: Use NextWithContext() instead.
   807  func (page *AvailableProviderOperationsPage) Next() error {
   808  	return page.NextWithContext(context.Background())
   809  }
   810  
   811  // NotDone returns true if the page enumeration should be started or is not yet complete.
   812  func (page AvailableProviderOperationsPage) NotDone() bool {
   813  	return !page.apo.IsEmpty()
   814  }
   815  
   816  // Response returns the raw server response from the last page request.
   817  func (page AvailableProviderOperationsPage) Response() AvailableProviderOperations {
   818  	return page.apo
   819  }
   820  
   821  // Values returns the slice of values for the current page or nil if there are no values.
   822  func (page AvailableProviderOperationsPage) Values() []AvailableProviderOperation {
   823  	if page.apo.IsEmpty() {
   824  		return nil
   825  	}
   826  	return *page.apo.Value
   827  }
   828  
   829  // Creates a new instance of the AvailableProviderOperationsPage type.
   830  func NewAvailableProviderOperationsPage(cur AvailableProviderOperations, getNextPage func(context.Context, AvailableProviderOperations) (AvailableProviderOperations, error)) AvailableProviderOperationsPage {
   831  	return AvailableProviderOperationsPage{
   832  		fn:  getNextPage,
   833  		apo: cur,
   834  	}
   835  }
   836  
   837  // Backup the backup.
   838  type Backup struct {
   839  	// BackupProperties - Properties of backup
   840  	*BackupProperties `json:"properties,omitempty"`
   841  	// ID - READ-ONLY; The identifier.
   842  	ID *string `json:"id,omitempty"`
   843  	// Name - READ-ONLY; The name.
   844  	Name *string `json:"name,omitempty"`
   845  	// Type - READ-ONLY; The type.
   846  	Type *string `json:"type,omitempty"`
   847  }
   848  
   849  // MarshalJSON is the custom marshaler for Backup.
   850  func (b Backup) MarshalJSON() ([]byte, error) {
   851  	objectMap := make(map[string]interface{})
   852  	if b.BackupProperties != nil {
   853  		objectMap["properties"] = b.BackupProperties
   854  	}
   855  	return json.Marshal(objectMap)
   856  }
   857  
   858  // UnmarshalJSON is the custom unmarshaler for Backup struct.
   859  func (b *Backup) UnmarshalJSON(body []byte) error {
   860  	var m map[string]*json.RawMessage
   861  	err := json.Unmarshal(body, &m)
   862  	if err != nil {
   863  		return err
   864  	}
   865  	for k, v := range m {
   866  		switch k {
   867  		case "properties":
   868  			if v != nil {
   869  				var backupProperties BackupProperties
   870  				err = json.Unmarshal(*v, &backupProperties)
   871  				if err != nil {
   872  					return err
   873  				}
   874  				b.BackupProperties = &backupProperties
   875  			}
   876  		case "id":
   877  			if v != nil {
   878  				var ID string
   879  				err = json.Unmarshal(*v, &ID)
   880  				if err != nil {
   881  					return err
   882  				}
   883  				b.ID = &ID
   884  			}
   885  		case "name":
   886  			if v != nil {
   887  				var name string
   888  				err = json.Unmarshal(*v, &name)
   889  				if err != nil {
   890  					return err
   891  				}
   892  				b.Name = &name
   893  			}
   894  		case "type":
   895  			if v != nil {
   896  				var typeVar string
   897  				err = json.Unmarshal(*v, &typeVar)
   898  				if err != nil {
   899  					return err
   900  				}
   901  				b.Type = &typeVar
   902  			}
   903  		}
   904  	}
   905  
   906  	return nil
   907  }
   908  
   909  // BackupElement class represents BackupElement
   910  type BackupElement struct {
   911  	// BackupElementProperties - The Properties of backup element
   912  	*BackupElementProperties `json:"properties,omitempty"`
   913  	// ID - READ-ONLY; The identifier.
   914  	ID *string `json:"id,omitempty"`
   915  	// Name - READ-ONLY; The name.
   916  	Name *string `json:"name,omitempty"`
   917  	// Type - READ-ONLY; The type.
   918  	Type *string `json:"type,omitempty"`
   919  }
   920  
   921  // MarshalJSON is the custom marshaler for BackupElement.
   922  func (be BackupElement) MarshalJSON() ([]byte, error) {
   923  	objectMap := make(map[string]interface{})
   924  	if be.BackupElementProperties != nil {
   925  		objectMap["properties"] = be.BackupElementProperties
   926  	}
   927  	return json.Marshal(objectMap)
   928  }
   929  
   930  // UnmarshalJSON is the custom unmarshaler for BackupElement struct.
   931  func (be *BackupElement) UnmarshalJSON(body []byte) error {
   932  	var m map[string]*json.RawMessage
   933  	err := json.Unmarshal(body, &m)
   934  	if err != nil {
   935  		return err
   936  	}
   937  	for k, v := range m {
   938  		switch k {
   939  		case "properties":
   940  			if v != nil {
   941  				var backupElementProperties BackupElementProperties
   942  				err = json.Unmarshal(*v, &backupElementProperties)
   943  				if err != nil {
   944  					return err
   945  				}
   946  				be.BackupElementProperties = &backupElementProperties
   947  			}
   948  		case "id":
   949  			if v != nil {
   950  				var ID string
   951  				err = json.Unmarshal(*v, &ID)
   952  				if err != nil {
   953  					return err
   954  				}
   955  				be.ID = &ID
   956  			}
   957  		case "name":
   958  			if v != nil {
   959  				var name string
   960  				err = json.Unmarshal(*v, &name)
   961  				if err != nil {
   962  					return err
   963  				}
   964  				be.Name = &name
   965  			}
   966  		case "type":
   967  			if v != nil {
   968  				var typeVar string
   969  				err = json.Unmarshal(*v, &typeVar)
   970  				if err != nil {
   971  					return err
   972  				}
   973  				be.Type = &typeVar
   974  			}
   975  		}
   976  	}
   977  
   978  	return nil
   979  }
   980  
   981  // BackupElementProperties the backup element properties
   982  type BackupElementProperties struct {
   983  	// SizeInBytes - The size in bytes.
   984  	SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
   985  	// EndpointName - The name of the endpoint.
   986  	EndpointName *string `json:"endpointName,omitempty"`
   987  	// DataPolicy - The data policy of backed up endpoint. Possible values include: 'DataPolicyInvalid', 'DataPolicyLocal', 'DataPolicyTiered', 'DataPolicyCloud'
   988  	DataPolicy DataPolicy `json:"dataPolicy,omitempty"`
   989  }
   990  
   991  // BackupFilter backup OData filter class
   992  type BackupFilter struct {
   993  	// InitiatedBy - Gets or sets InitiatedBy. Possible values include: 'Manual', 'Scheduled'
   994  	InitiatedBy InitiatedBy `json:"initiatedBy,omitempty"`
   995  	// CreatedTime - Gets or sets CreatedTime
   996  	CreatedTime *date.Time `json:"createdTime,omitempty"`
   997  }
   998  
   999  // BackupList collection of backups
  1000  type BackupList struct {
  1001  	autorest.Response `json:"-"`
  1002  	// Value - The value.
  1003  	Value *[]Backup `json:"value,omitempty"`
  1004  	// NextLink - The NextLink.
  1005  	NextLink *string `json:"nextLink,omitempty"`
  1006  }
  1007  
  1008  // BackupListIterator provides access to a complete listing of Backup values.
  1009  type BackupListIterator struct {
  1010  	i    int
  1011  	page BackupListPage
  1012  }
  1013  
  1014  // NextWithContext advances to the next value.  If there was an error making
  1015  // the request the iterator does not advance and the error is returned.
  1016  func (iter *BackupListIterator) NextWithContext(ctx context.Context) (err error) {
  1017  	if tracing.IsEnabled() {
  1018  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupListIterator.NextWithContext")
  1019  		defer func() {
  1020  			sc := -1
  1021  			if iter.Response().Response.Response != nil {
  1022  				sc = iter.Response().Response.Response.StatusCode
  1023  			}
  1024  			tracing.EndSpan(ctx, sc, err)
  1025  		}()
  1026  	}
  1027  	iter.i++
  1028  	if iter.i < len(iter.page.Values()) {
  1029  		return nil
  1030  	}
  1031  	err = iter.page.NextWithContext(ctx)
  1032  	if err != nil {
  1033  		iter.i--
  1034  		return err
  1035  	}
  1036  	iter.i = 0
  1037  	return nil
  1038  }
  1039  
  1040  // Next advances to the next value.  If there was an error making
  1041  // the request the iterator does not advance and the error is returned.
  1042  // Deprecated: Use NextWithContext() instead.
  1043  func (iter *BackupListIterator) Next() error {
  1044  	return iter.NextWithContext(context.Background())
  1045  }
  1046  
  1047  // NotDone returns true if the enumeration should be started or is not yet complete.
  1048  func (iter BackupListIterator) NotDone() bool {
  1049  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1050  }
  1051  
  1052  // Response returns the raw server response from the last page request.
  1053  func (iter BackupListIterator) Response() BackupList {
  1054  	return iter.page.Response()
  1055  }
  1056  
  1057  // Value returns the current value or a zero-initialized value if the
  1058  // iterator has advanced beyond the end of the collection.
  1059  func (iter BackupListIterator) Value() Backup {
  1060  	if !iter.page.NotDone() {
  1061  		return Backup{}
  1062  	}
  1063  	return iter.page.Values()[iter.i]
  1064  }
  1065  
  1066  // Creates a new instance of the BackupListIterator type.
  1067  func NewBackupListIterator(page BackupListPage) BackupListIterator {
  1068  	return BackupListIterator{page: page}
  1069  }
  1070  
  1071  // IsEmpty returns true if the ListResult contains no values.
  1072  func (bl BackupList) IsEmpty() bool {
  1073  	return bl.Value == nil || len(*bl.Value) == 0
  1074  }
  1075  
  1076  // hasNextLink returns true if the NextLink is not empty.
  1077  func (bl BackupList) hasNextLink() bool {
  1078  	return bl.NextLink != nil && len(*bl.NextLink) != 0
  1079  }
  1080  
  1081  // backupListPreparer prepares a request to retrieve the next set of results.
  1082  // It returns nil if no more results exist.
  1083  func (bl BackupList) backupListPreparer(ctx context.Context) (*http.Request, error) {
  1084  	if !bl.hasNextLink() {
  1085  		return nil, nil
  1086  	}
  1087  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1088  		autorest.AsJSON(),
  1089  		autorest.AsGet(),
  1090  		autorest.WithBaseURL(to.String(bl.NextLink)))
  1091  }
  1092  
  1093  // BackupListPage contains a page of Backup values.
  1094  type BackupListPage struct {
  1095  	fn func(context.Context, BackupList) (BackupList, error)
  1096  	bl BackupList
  1097  }
  1098  
  1099  // NextWithContext advances to the next page of values.  If there was an error making
  1100  // the request the page does not advance and the error is returned.
  1101  func (page *BackupListPage) NextWithContext(ctx context.Context) (err error) {
  1102  	if tracing.IsEnabled() {
  1103  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupListPage.NextWithContext")
  1104  		defer func() {
  1105  			sc := -1
  1106  			if page.Response().Response.Response != nil {
  1107  				sc = page.Response().Response.Response.StatusCode
  1108  			}
  1109  			tracing.EndSpan(ctx, sc, err)
  1110  		}()
  1111  	}
  1112  	for {
  1113  		next, err := page.fn(ctx, page.bl)
  1114  		if err != nil {
  1115  			return err
  1116  		}
  1117  		page.bl = next
  1118  		if !next.hasNextLink() || !next.IsEmpty() {
  1119  			break
  1120  		}
  1121  	}
  1122  	return nil
  1123  }
  1124  
  1125  // Next advances to the next page of values.  If there was an error making
  1126  // the request the page does not advance and the error is returned.
  1127  // Deprecated: Use NextWithContext() instead.
  1128  func (page *BackupListPage) Next() error {
  1129  	return page.NextWithContext(context.Background())
  1130  }
  1131  
  1132  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1133  func (page BackupListPage) NotDone() bool {
  1134  	return !page.bl.IsEmpty()
  1135  }
  1136  
  1137  // Response returns the raw server response from the last page request.
  1138  func (page BackupListPage) Response() BackupList {
  1139  	return page.bl
  1140  }
  1141  
  1142  // Values returns the slice of values for the current page or nil if there are no values.
  1143  func (page BackupListPage) Values() []Backup {
  1144  	if page.bl.IsEmpty() {
  1145  		return nil
  1146  	}
  1147  	return *page.bl.Value
  1148  }
  1149  
  1150  // Creates a new instance of the BackupListPage type.
  1151  func NewBackupListPage(cur BackupList, getNextPage func(context.Context, BackupList) (BackupList, error)) BackupListPage {
  1152  	return BackupListPage{
  1153  		fn: getNextPage,
  1154  		bl: cur,
  1155  	}
  1156  }
  1157  
  1158  // BackupProperties class represents Backup properties
  1159  type BackupProperties struct {
  1160  	// TargetID - The path id of the target FileServer or IscsiServer for which the backup was taken.
  1161  	TargetID *string `json:"targetId,omitempty"`
  1162  	// TargetType - Type of target, FileServer or IscsiServer
  1163  	TargetType *string `json:"targetType,omitempty"`
  1164  	// SizeInBytes - The backup size in bytes.
  1165  	SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
  1166  	// CreatedTime - The time when the backup was created.
  1167  	CreatedTime *date.Time `json:"createdTime,omitempty"`
  1168  	// ExpirationTime - The time when the backup will expire.
  1169  	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
  1170  	// InitiatedBy - Indicates how the backup was initiated "Manual | Scheduled". Possible values include: 'Manual', 'Scheduled'
  1171  	InitiatedBy InitiatedBy `json:"initiatedBy,omitempty"`
  1172  	// DeviceID - The Device Identifier.
  1173  	DeviceID *string `json:"deviceId,omitempty"`
  1174  	// Elements - The backup elements.
  1175  	Elements *[]BackupElement `json:"elements,omitempty"`
  1176  }
  1177  
  1178  // BackupScheduleGroup the Backup Schedule Group
  1179  type BackupScheduleGroup struct {
  1180  	autorest.Response `json:"-"`
  1181  	// BackupScheduleGroupProperties - Properties of BackupScheduleGroup
  1182  	*BackupScheduleGroupProperties `json:"properties,omitempty"`
  1183  	// ID - READ-ONLY; The identifier.
  1184  	ID *string `json:"id,omitempty"`
  1185  	// Name - READ-ONLY; The name.
  1186  	Name *string `json:"name,omitempty"`
  1187  	// Type - READ-ONLY; The type.
  1188  	Type *string `json:"type,omitempty"`
  1189  }
  1190  
  1191  // MarshalJSON is the custom marshaler for BackupScheduleGroup.
  1192  func (bsg BackupScheduleGroup) MarshalJSON() ([]byte, error) {
  1193  	objectMap := make(map[string]interface{})
  1194  	if bsg.BackupScheduleGroupProperties != nil {
  1195  		objectMap["properties"] = bsg.BackupScheduleGroupProperties
  1196  	}
  1197  	return json.Marshal(objectMap)
  1198  }
  1199  
  1200  // UnmarshalJSON is the custom unmarshaler for BackupScheduleGroup struct.
  1201  func (bsg *BackupScheduleGroup) UnmarshalJSON(body []byte) error {
  1202  	var m map[string]*json.RawMessage
  1203  	err := json.Unmarshal(body, &m)
  1204  	if err != nil {
  1205  		return err
  1206  	}
  1207  	for k, v := range m {
  1208  		switch k {
  1209  		case "properties":
  1210  			if v != nil {
  1211  				var backupScheduleGroupProperties BackupScheduleGroupProperties
  1212  				err = json.Unmarshal(*v, &backupScheduleGroupProperties)
  1213  				if err != nil {
  1214  					return err
  1215  				}
  1216  				bsg.BackupScheduleGroupProperties = &backupScheduleGroupProperties
  1217  			}
  1218  		case "id":
  1219  			if v != nil {
  1220  				var ID string
  1221  				err = json.Unmarshal(*v, &ID)
  1222  				if err != nil {
  1223  					return err
  1224  				}
  1225  				bsg.ID = &ID
  1226  			}
  1227  		case "name":
  1228  			if v != nil {
  1229  				var name string
  1230  				err = json.Unmarshal(*v, &name)
  1231  				if err != nil {
  1232  					return err
  1233  				}
  1234  				bsg.Name = &name
  1235  			}
  1236  		case "type":
  1237  			if v != nil {
  1238  				var typeVar string
  1239  				err = json.Unmarshal(*v, &typeVar)
  1240  				if err != nil {
  1241  					return err
  1242  				}
  1243  				bsg.Type = &typeVar
  1244  			}
  1245  		}
  1246  	}
  1247  
  1248  	return nil
  1249  }
  1250  
  1251  // BackupScheduleGroupList the list response of backup schedule groups
  1252  type BackupScheduleGroupList struct {
  1253  	autorest.Response `json:"-"`
  1254  	// Value - The value.
  1255  	Value *[]BackupScheduleGroup `json:"value,omitempty"`
  1256  }
  1257  
  1258  // BackupScheduleGroupProperties the Backup Schedule Group Properties
  1259  type BackupScheduleGroupProperties struct {
  1260  	// StartTime - The start time. When this field is specified we will generate Default GrandFather Father Son Backup Schedules.
  1261  	StartTime *Time `json:"startTime,omitempty"`
  1262  }
  1263  
  1264  // BackupScheduleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  1265  // long-running operation.
  1266  type BackupScheduleGroupsCreateOrUpdateFuture struct {
  1267  	azure.FutureAPI
  1268  	// Result returns the result of the asynchronous operation.
  1269  	// If the operation has not completed it will return an error.
  1270  	Result func(BackupScheduleGroupsClient) (BackupScheduleGroup, error)
  1271  }
  1272  
  1273  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1274  func (future *BackupScheduleGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1275  	var azFuture azure.Future
  1276  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1277  		return err
  1278  	}
  1279  	future.FutureAPI = &azFuture
  1280  	future.Result = future.result
  1281  	return nil
  1282  }
  1283  
  1284  // result is the default implementation for BackupScheduleGroupsCreateOrUpdateFuture.Result.
  1285  func (future *BackupScheduleGroupsCreateOrUpdateFuture) result(client BackupScheduleGroupsClient) (bsg BackupScheduleGroup, err error) {
  1286  	var done bool
  1287  	done, err = future.DoneWithContext(context.Background(), client)
  1288  	if err != nil {
  1289  		err = autorest.NewErrorWithError(err, "storsimple.BackupScheduleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1290  		return
  1291  	}
  1292  	if !done {
  1293  		bsg.Response.Response = future.Response()
  1294  		err = azure.NewAsyncOpIncompleteError("storsimple.BackupScheduleGroupsCreateOrUpdateFuture")
  1295  		return
  1296  	}
  1297  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1298  	if bsg.Response.Response, err = future.GetResult(sender); err == nil && bsg.Response.Response.StatusCode != http.StatusNoContent {
  1299  		bsg, err = client.CreateOrUpdateResponder(bsg.Response.Response)
  1300  		if err != nil {
  1301  			err = autorest.NewErrorWithError(err, "storsimple.BackupScheduleGroupsCreateOrUpdateFuture", "Result", bsg.Response.Response, "Failure responding to request")
  1302  		}
  1303  	}
  1304  	return
  1305  }
  1306  
  1307  // BackupScheduleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
  1308  // long-running operation.
  1309  type BackupScheduleGroupsDeleteFuture struct {
  1310  	azure.FutureAPI
  1311  	// Result returns the result of the asynchronous operation.
  1312  	// If the operation has not completed it will return an error.
  1313  	Result func(BackupScheduleGroupsClient) (autorest.Response, error)
  1314  }
  1315  
  1316  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1317  func (future *BackupScheduleGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
  1318  	var azFuture azure.Future
  1319  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1320  		return err
  1321  	}
  1322  	future.FutureAPI = &azFuture
  1323  	future.Result = future.result
  1324  	return nil
  1325  }
  1326  
  1327  // result is the default implementation for BackupScheduleGroupsDeleteFuture.Result.
  1328  func (future *BackupScheduleGroupsDeleteFuture) result(client BackupScheduleGroupsClient) (ar autorest.Response, err error) {
  1329  	var done bool
  1330  	done, err = future.DoneWithContext(context.Background(), client)
  1331  	if err != nil {
  1332  		err = autorest.NewErrorWithError(err, "storsimple.BackupScheduleGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
  1333  		return
  1334  	}
  1335  	if !done {
  1336  		ar.Response = future.Response()
  1337  		err = azure.NewAsyncOpIncompleteError("storsimple.BackupScheduleGroupsDeleteFuture")
  1338  		return
  1339  	}
  1340  	ar.Response = future.Response()
  1341  	return
  1342  }
  1343  
  1344  // BackupsCloneFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  1345  type BackupsCloneFuture struct {
  1346  	azure.FutureAPI
  1347  	// Result returns the result of the asynchronous operation.
  1348  	// If the operation has not completed it will return an error.
  1349  	Result func(BackupsClient) (autorest.Response, error)
  1350  }
  1351  
  1352  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1353  func (future *BackupsCloneFuture) UnmarshalJSON(body []byte) error {
  1354  	var azFuture azure.Future
  1355  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1356  		return err
  1357  	}
  1358  	future.FutureAPI = &azFuture
  1359  	future.Result = future.result
  1360  	return nil
  1361  }
  1362  
  1363  // result is the default implementation for BackupsCloneFuture.Result.
  1364  func (future *BackupsCloneFuture) result(client BackupsClient) (ar autorest.Response, err error) {
  1365  	var done bool
  1366  	done, err = future.DoneWithContext(context.Background(), client)
  1367  	if err != nil {
  1368  		err = autorest.NewErrorWithError(err, "storsimple.BackupsCloneFuture", "Result", future.Response(), "Polling failure")
  1369  		return
  1370  	}
  1371  	if !done {
  1372  		ar.Response = future.Response()
  1373  		err = azure.NewAsyncOpIncompleteError("storsimple.BackupsCloneFuture")
  1374  		return
  1375  	}
  1376  	ar.Response = future.Response()
  1377  	return
  1378  }
  1379  
  1380  // BackupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1381  // operation.
  1382  type BackupsDeleteFuture struct {
  1383  	azure.FutureAPI
  1384  	// Result returns the result of the asynchronous operation.
  1385  	// If the operation has not completed it will return an error.
  1386  	Result func(BackupsClient) (autorest.Response, error)
  1387  }
  1388  
  1389  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1390  func (future *BackupsDeleteFuture) UnmarshalJSON(body []byte) error {
  1391  	var azFuture azure.Future
  1392  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1393  		return err
  1394  	}
  1395  	future.FutureAPI = &azFuture
  1396  	future.Result = future.result
  1397  	return nil
  1398  }
  1399  
  1400  // result is the default implementation for BackupsDeleteFuture.Result.
  1401  func (future *BackupsDeleteFuture) result(client BackupsClient) (ar autorest.Response, err error) {
  1402  	var done bool
  1403  	done, err = future.DoneWithContext(context.Background(), client)
  1404  	if err != nil {
  1405  		err = autorest.NewErrorWithError(err, "storsimple.BackupsDeleteFuture", "Result", future.Response(), "Polling failure")
  1406  		return
  1407  	}
  1408  	if !done {
  1409  		ar.Response = future.Response()
  1410  		err = azure.NewAsyncOpIncompleteError("storsimple.BackupsDeleteFuture")
  1411  		return
  1412  	}
  1413  	ar.Response = future.Response()
  1414  	return
  1415  }
  1416  
  1417  // BaseModel base class for models
  1418  type BaseModel struct {
  1419  	// ID - READ-ONLY; The identifier.
  1420  	ID *string `json:"id,omitempty"`
  1421  	// Name - READ-ONLY; The name.
  1422  	Name *string `json:"name,omitempty"`
  1423  	// Type - READ-ONLY; The type.
  1424  	Type *string `json:"type,omitempty"`
  1425  }
  1426  
  1427  // MarshalJSON is the custom marshaler for BaseModel.
  1428  func (bm BaseModel) MarshalJSON() ([]byte, error) {
  1429  	objectMap := make(map[string]interface{})
  1430  	return json.Marshal(objectMap)
  1431  }
  1432  
  1433  // ChapProperties chap properties
  1434  type ChapProperties struct {
  1435  	// Password - The chap password.
  1436  	Password *AsymmetricEncryptedSecret `json:"password,omitempty"`
  1437  }
  1438  
  1439  // ChapSettings challenge-Handshake Authentication Protocol (CHAP) setting
  1440  type ChapSettings struct {
  1441  	autorest.Response `json:"-"`
  1442  	// ChapProperties - Chap properties
  1443  	*ChapProperties `json:"properties,omitempty"`
  1444  	// ID - READ-ONLY; The identifier.
  1445  	ID *string `json:"id,omitempty"`
  1446  	// Name - READ-ONLY; The name.
  1447  	Name *string `json:"name,omitempty"`
  1448  	// Type - READ-ONLY; The type.
  1449  	Type *string `json:"type,omitempty"`
  1450  }
  1451  
  1452  // MarshalJSON is the custom marshaler for ChapSettings.
  1453  func (cs ChapSettings) MarshalJSON() ([]byte, error) {
  1454  	objectMap := make(map[string]interface{})
  1455  	if cs.ChapProperties != nil {
  1456  		objectMap["properties"] = cs.ChapProperties
  1457  	}
  1458  	return json.Marshal(objectMap)
  1459  }
  1460  
  1461  // UnmarshalJSON is the custom unmarshaler for ChapSettings struct.
  1462  func (cs *ChapSettings) UnmarshalJSON(body []byte) error {
  1463  	var m map[string]*json.RawMessage
  1464  	err := json.Unmarshal(body, &m)
  1465  	if err != nil {
  1466  		return err
  1467  	}
  1468  	for k, v := range m {
  1469  		switch k {
  1470  		case "properties":
  1471  			if v != nil {
  1472  				var chapProperties ChapProperties
  1473  				err = json.Unmarshal(*v, &chapProperties)
  1474  				if err != nil {
  1475  					return err
  1476  				}
  1477  				cs.ChapProperties = &chapProperties
  1478  			}
  1479  		case "id":
  1480  			if v != nil {
  1481  				var ID string
  1482  				err = json.Unmarshal(*v, &ID)
  1483  				if err != nil {
  1484  					return err
  1485  				}
  1486  				cs.ID = &ID
  1487  			}
  1488  		case "name":
  1489  			if v != nil {
  1490  				var name string
  1491  				err = json.Unmarshal(*v, &name)
  1492  				if err != nil {
  1493  					return err
  1494  				}
  1495  				cs.Name = &name
  1496  			}
  1497  		case "type":
  1498  			if v != nil {
  1499  				var typeVar string
  1500  				err = json.Unmarshal(*v, &typeVar)
  1501  				if err != nil {
  1502  					return err
  1503  				}
  1504  				cs.Type = &typeVar
  1505  			}
  1506  		}
  1507  	}
  1508  
  1509  	return nil
  1510  }
  1511  
  1512  // ChapSettingsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  1513  // long-running operation.
  1514  type ChapSettingsCreateOrUpdateFuture struct {
  1515  	azure.FutureAPI
  1516  	// Result returns the result of the asynchronous operation.
  1517  	// If the operation has not completed it will return an error.
  1518  	Result func(ChapSettingsClient) (ChapSettings, error)
  1519  }
  1520  
  1521  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1522  func (future *ChapSettingsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1523  	var azFuture azure.Future
  1524  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1525  		return err
  1526  	}
  1527  	future.FutureAPI = &azFuture
  1528  	future.Result = future.result
  1529  	return nil
  1530  }
  1531  
  1532  // result is the default implementation for ChapSettingsCreateOrUpdateFuture.Result.
  1533  func (future *ChapSettingsCreateOrUpdateFuture) result(client ChapSettingsClient) (cs ChapSettings, err error) {
  1534  	var done bool
  1535  	done, err = future.DoneWithContext(context.Background(), client)
  1536  	if err != nil {
  1537  		err = autorest.NewErrorWithError(err, "storsimple.ChapSettingsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1538  		return
  1539  	}
  1540  	if !done {
  1541  		cs.Response.Response = future.Response()
  1542  		err = azure.NewAsyncOpIncompleteError("storsimple.ChapSettingsCreateOrUpdateFuture")
  1543  		return
  1544  	}
  1545  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1546  	if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
  1547  		cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
  1548  		if err != nil {
  1549  			err = autorest.NewErrorWithError(err, "storsimple.ChapSettingsCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
  1550  		}
  1551  	}
  1552  	return
  1553  }
  1554  
  1555  // ChapSettingsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1556  // operation.
  1557  type ChapSettingsDeleteFuture struct {
  1558  	azure.FutureAPI
  1559  	// Result returns the result of the asynchronous operation.
  1560  	// If the operation has not completed it will return an error.
  1561  	Result func(ChapSettingsClient) (autorest.Response, error)
  1562  }
  1563  
  1564  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1565  func (future *ChapSettingsDeleteFuture) UnmarshalJSON(body []byte) error {
  1566  	var azFuture azure.Future
  1567  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1568  		return err
  1569  	}
  1570  	future.FutureAPI = &azFuture
  1571  	future.Result = future.result
  1572  	return nil
  1573  }
  1574  
  1575  // result is the default implementation for ChapSettingsDeleteFuture.Result.
  1576  func (future *ChapSettingsDeleteFuture) result(client ChapSettingsClient) (ar autorest.Response, err error) {
  1577  	var done bool
  1578  	done, err = future.DoneWithContext(context.Background(), client)
  1579  	if err != nil {
  1580  		err = autorest.NewErrorWithError(err, "storsimple.ChapSettingsDeleteFuture", "Result", future.Response(), "Polling failure")
  1581  		return
  1582  	}
  1583  	if !done {
  1584  		ar.Response = future.Response()
  1585  		err = azure.NewAsyncOpIncompleteError("storsimple.ChapSettingsDeleteFuture")
  1586  		return
  1587  	}
  1588  	ar.Response = future.Response()
  1589  	return
  1590  }
  1591  
  1592  // ChapSettingsList collection of Chap setting entities
  1593  type ChapSettingsList struct {
  1594  	autorest.Response `json:"-"`
  1595  	// Value - The chap settings entity collection
  1596  	Value *[]ChapSettings `json:"value,omitempty"`
  1597  }
  1598  
  1599  // ClearAlertRequest request for clearing the alert
  1600  type ClearAlertRequest struct {
  1601  	// ResolutionMessage - Resolution message while clearing the request
  1602  	ResolutionMessage *string `json:"resolutionMessage,omitempty"`
  1603  	// Alerts - List of alert Ids to be cleared
  1604  	Alerts *[]string `json:"alerts,omitempty"`
  1605  }
  1606  
  1607  // CloneRequest clone Job Request Model.
  1608  type CloneRequest struct {
  1609  	// CloneRequestProperties - CloneJob Properties are encapsulated in this object.
  1610  	*CloneRequestProperties `json:"properties,omitempty"`
  1611  }
  1612  
  1613  // MarshalJSON is the custom marshaler for CloneRequest.
  1614  func (cr CloneRequest) MarshalJSON() ([]byte, error) {
  1615  	objectMap := make(map[string]interface{})
  1616  	if cr.CloneRequestProperties != nil {
  1617  		objectMap["properties"] = cr.CloneRequestProperties
  1618  	}
  1619  	return json.Marshal(objectMap)
  1620  }
  1621  
  1622  // UnmarshalJSON is the custom unmarshaler for CloneRequest struct.
  1623  func (cr *CloneRequest) UnmarshalJSON(body []byte) error {
  1624  	var m map[string]*json.RawMessage
  1625  	err := json.Unmarshal(body, &m)
  1626  	if err != nil {
  1627  		return err
  1628  	}
  1629  	for k, v := range m {
  1630  		switch k {
  1631  		case "properties":
  1632  			if v != nil {
  1633  				var cloneRequestProperties CloneRequestProperties
  1634  				err = json.Unmarshal(*v, &cloneRequestProperties)
  1635  				if err != nil {
  1636  					return err
  1637  				}
  1638  				cr.CloneRequestProperties = &cloneRequestProperties
  1639  			}
  1640  		}
  1641  	}
  1642  
  1643  	return nil
  1644  }
  1645  
  1646  // CloneRequestProperties properties of CloneRequest
  1647  type CloneRequestProperties struct {
  1648  	// TargetDeviceID - DeviceId of the device which will act as the Clone target
  1649  	TargetDeviceID *string `json:"targetDeviceId,omitempty"`
  1650  	// TargetAccessPointID - Access point Id on which clone job will performed.
  1651  	TargetAccessPointID *string `json:"targetAccessPointId,omitempty"`
  1652  	// NewEndpointName - Name of new endpoint which will created as part of clone job.
  1653  	NewEndpointName *string `json:"newEndpointName,omitempty"`
  1654  	// Share - Share Object.
  1655  	Share *FileShare `json:"share,omitempty"`
  1656  	// Disk - Disk Object
  1657  	Disk *ISCSIDisk `json:"disk,omitempty"`
  1658  }
  1659  
  1660  // Device represents a StorSimple device object along with its properties
  1661  type Device struct {
  1662  	autorest.Response `json:"-"`
  1663  	// DeviceProperties - Collection of properties for the device
  1664  	*DeviceProperties `json:"properties,omitempty"`
  1665  	// ID - READ-ONLY; The identifier.
  1666  	ID *string `json:"id,omitempty"`
  1667  	// Name - READ-ONLY; The name.
  1668  	Name *string `json:"name,omitempty"`
  1669  	// Type - READ-ONLY; The type.
  1670  	Type *string `json:"type,omitempty"`
  1671  }
  1672  
  1673  // MarshalJSON is the custom marshaler for Device.
  1674  func (d Device) MarshalJSON() ([]byte, error) {
  1675  	objectMap := make(map[string]interface{})
  1676  	if d.DeviceProperties != nil {
  1677  		objectMap["properties"] = d.DeviceProperties
  1678  	}
  1679  	return json.Marshal(objectMap)
  1680  }
  1681  
  1682  // UnmarshalJSON is the custom unmarshaler for Device struct.
  1683  func (d *Device) UnmarshalJSON(body []byte) error {
  1684  	var m map[string]*json.RawMessage
  1685  	err := json.Unmarshal(body, &m)
  1686  	if err != nil {
  1687  		return err
  1688  	}
  1689  	for k, v := range m {
  1690  		switch k {
  1691  		case "properties":
  1692  			if v != nil {
  1693  				var deviceProperties DeviceProperties
  1694  				err = json.Unmarshal(*v, &deviceProperties)
  1695  				if err != nil {
  1696  					return err
  1697  				}
  1698  				d.DeviceProperties = &deviceProperties
  1699  			}
  1700  		case "id":
  1701  			if v != nil {
  1702  				var ID string
  1703  				err = json.Unmarshal(*v, &ID)
  1704  				if err != nil {
  1705  					return err
  1706  				}
  1707  				d.ID = &ID
  1708  			}
  1709  		case "name":
  1710  			if v != nil {
  1711  				var name string
  1712  				err = json.Unmarshal(*v, &name)
  1713  				if err != nil {
  1714  					return err
  1715  				}
  1716  				d.Name = &name
  1717  			}
  1718  		case "type":
  1719  			if v != nil {
  1720  				var typeVar string
  1721  				err = json.Unmarshal(*v, &typeVar)
  1722  				if err != nil {
  1723  					return err
  1724  				}
  1725  				d.Type = &typeVar
  1726  			}
  1727  		}
  1728  	}
  1729  
  1730  	return nil
  1731  }
  1732  
  1733  // DeviceDetails class containing more granular details about the device
  1734  type DeviceDetails struct {
  1735  	// EndpointCount - Total number of endpoints that are currently on the device ( i.e. number of shares on FileServer or number of volumes on IscsiServer)
  1736  	EndpointCount *int32 `json:"endpointCount,omitempty"`
  1737  	// TotalStorageInBytes - Total storage available on the device in bytes.
  1738  	TotalStorageInBytes *int64 `json:"totalStorageInBytes,omitempty"`
  1739  	// TotalLocalStorageInBytes - Total local storage capacity in device in bytes.
  1740  	TotalLocalStorageInBytes *int64 `json:"totalLocalStorageInBytes,omitempty"`
  1741  	// ProvisionedStorageInBytes - Storage in bytes that has been provisioned on the device including both local and cloud
  1742  	ProvisionedStorageInBytes *int64 `json:"provisionedStorageInBytes,omitempty"`
  1743  	// ProvisionedLocalStorageInBytes - Storage in bytes that has been provisioned locally on the device
  1744  	ProvisionedLocalStorageInBytes *int64 `json:"provisionedLocalStorageInBytes,omitempty"`
  1745  	// UsingStorageInBytes - Storage that is being currently used in bytes including both local and cloud
  1746  	UsingStorageInBytes *int64 `json:"usingStorageInBytes,omitempty"`
  1747  	// UsingLocalStorageInBytes - Local Storage that is being currently used in bytes
  1748  	UsingLocalStorageInBytes *int64 `json:"usingLocalStorageInBytes,omitempty"`
  1749  	// TotalBackupSizeInBytes - Total size taken up by backups in bytes
  1750  	TotalBackupSizeInBytes *int64 `json:"totalBackupSizeInBytes,omitempty"`
  1751  	// AvailableStorageInBytes - Total pending available storage on the device in bytes
  1752  	AvailableStorageInBytes *int64 `json:"availableStorageInBytes,omitempty"`
  1753  	// AvailableLocalStorageInBytes - Local pending storage available on the device in bytes
  1754  	AvailableLocalStorageInBytes *int64 `json:"availableLocalStorageInBytes,omitempty"`
  1755  }
  1756  
  1757  // DeviceList collection of Devices
  1758  type DeviceList struct {
  1759  	autorest.Response `json:"-"`
  1760  	// Value - The value.
  1761  	Value *[]Device `json:"value,omitempty"`
  1762  }
  1763  
  1764  // DevicePatch class that represents the Input for the PATCH call on Device. Currently the only patchable
  1765  // property on device is "DeviceDescription"
  1766  type DevicePatch struct {
  1767  	// DeviceDescription - Short description given for the device
  1768  	DeviceDescription *string `json:"deviceDescription,omitempty"`
  1769  }
  1770  
  1771  // DeviceProperties encases all the properties of the Device
  1772  type DeviceProperties struct {
  1773  	// ActivationTime - The UTC time at which the device was activated
  1774  	ActivationTime *date.Time `json:"activationTime,omitempty"`
  1775  	// AllowedDeviceOperations - Operations that are allowed on the device based on its current state
  1776  	AllowedDeviceOperations *[]DeviceOperation `json:"allowedDeviceOperations,omitempty"`
  1777  	// Culture - Language culture setting on the device. For eg: "en-US"
  1778  	Culture *string `json:"culture,omitempty"`
  1779  	// DeviceCapabilities - Device can be configured either as FileServer or IscsiServer
  1780  	DeviceCapabilities *[]SupportedDeviceCapabilities `json:"deviceCapabilities,omitempty"`
  1781  	// DeviceDescription - Short description given for the device
  1782  	DeviceDescription *string `json:"deviceDescription,omitempty"`
  1783  	// DomainName - Fully qualified name of the domain to which the device is attached
  1784  	DomainName *string `json:"domainName,omitempty"`
  1785  	// DeviceSoftwareVersion - Version number of the software running on the device
  1786  	DeviceSoftwareVersion *string `json:"deviceSoftwareVersion,omitempty"`
  1787  	// FriendlySoftwareName - Friendly name for the software version
  1788  	FriendlySoftwareName *string `json:"friendlySoftwareName,omitempty"`
  1789  	// DeviceConfigurationStatus - "Complete" if the device has been successfully registered as File/IscsiServer and the creation of share/volume is complete, "Pending" if the device is only registered but the creation of share/volume is complete is still pending. Possible values include: 'Complete', 'Pending'
  1790  	DeviceConfigurationStatus DeviceConfigurationStatus `json:"deviceConfigurationStatus,omitempty"`
  1791  	// ModelDescription - Name of the device model
  1792  	ModelDescription *string `json:"modelDescription,omitempty"`
  1793  	// Status - Current status of the device. Possible values include: 'Unknown', 'Online', 'Offline', 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', 'Deleted', 'ReadyToSetup', 'Deactivated', 'Deactivating'
  1794  	Status DeviceStatus `json:"status,omitempty"`
  1795  	// Type - Type of the device. Possible values include: 'DeviceTypeInvalid', 'DeviceTypeAppliance', 'DeviceTypeVirtualAppliance', 'DeviceTypeSeries9000OnPremVirtualAppliance', 'DeviceTypeSeries9000VirtualAppliance', 'DeviceTypeSeries9000PhysicalAppliance'
  1796  	Type DeviceType `json:"type,omitempty"`
  1797  	// Details - subclass containing more storage-related information about the device. This field will be populated only if the get call is made with $expand = details.
  1798  	Details *DeviceDetails `json:"details,omitempty"`
  1799  }
  1800  
  1801  // DevicesCreateOrUpdateAlertSettingsFuture an abstraction for monitoring and retrieving the results of a
  1802  // long-running operation.
  1803  type DevicesCreateOrUpdateAlertSettingsFuture struct {
  1804  	azure.FutureAPI
  1805  	// Result returns the result of the asynchronous operation.
  1806  	// If the operation has not completed it will return an error.
  1807  	Result func(DevicesClient) (AlertSettings, error)
  1808  }
  1809  
  1810  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1811  func (future *DevicesCreateOrUpdateAlertSettingsFuture) UnmarshalJSON(body []byte) error {
  1812  	var azFuture azure.Future
  1813  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1814  		return err
  1815  	}
  1816  	future.FutureAPI = &azFuture
  1817  	future.Result = future.result
  1818  	return nil
  1819  }
  1820  
  1821  // result is the default implementation for DevicesCreateOrUpdateAlertSettingsFuture.Result.
  1822  func (future *DevicesCreateOrUpdateAlertSettingsFuture) result(client DevicesClient) (as AlertSettings, err error) {
  1823  	var done bool
  1824  	done, err = future.DoneWithContext(context.Background(), client)
  1825  	if err != nil {
  1826  		err = autorest.NewErrorWithError(err, "storsimple.DevicesCreateOrUpdateAlertSettingsFuture", "Result", future.Response(), "Polling failure")
  1827  		return
  1828  	}
  1829  	if !done {
  1830  		as.Response.Response = future.Response()
  1831  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesCreateOrUpdateAlertSettingsFuture")
  1832  		return
  1833  	}
  1834  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1835  	if as.Response.Response, err = future.GetResult(sender); err == nil && as.Response.Response.StatusCode != http.StatusNoContent {
  1836  		as, err = client.CreateOrUpdateAlertSettingsResponder(as.Response.Response)
  1837  		if err != nil {
  1838  			err = autorest.NewErrorWithError(err, "storsimple.DevicesCreateOrUpdateAlertSettingsFuture", "Result", as.Response.Response, "Failure responding to request")
  1839  		}
  1840  	}
  1841  	return
  1842  }
  1843  
  1844  // DevicesCreateOrUpdateSecuritySettingsFuture an abstraction for monitoring and retrieving the results of
  1845  // a long-running operation.
  1846  type DevicesCreateOrUpdateSecuritySettingsFuture struct {
  1847  	azure.FutureAPI
  1848  	// Result returns the result of the asynchronous operation.
  1849  	// If the operation has not completed it will return an error.
  1850  	Result func(DevicesClient) (autorest.Response, error)
  1851  }
  1852  
  1853  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1854  func (future *DevicesCreateOrUpdateSecuritySettingsFuture) UnmarshalJSON(body []byte) error {
  1855  	var azFuture azure.Future
  1856  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1857  		return err
  1858  	}
  1859  	future.FutureAPI = &azFuture
  1860  	future.Result = future.result
  1861  	return nil
  1862  }
  1863  
  1864  // result is the default implementation for DevicesCreateOrUpdateSecuritySettingsFuture.Result.
  1865  func (future *DevicesCreateOrUpdateSecuritySettingsFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  1866  	var done bool
  1867  	done, err = future.DoneWithContext(context.Background(), client)
  1868  	if err != nil {
  1869  		err = autorest.NewErrorWithError(err, "storsimple.DevicesCreateOrUpdateSecuritySettingsFuture", "Result", future.Response(), "Polling failure")
  1870  		return
  1871  	}
  1872  	if !done {
  1873  		ar.Response = future.Response()
  1874  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesCreateOrUpdateSecuritySettingsFuture")
  1875  		return
  1876  	}
  1877  	ar.Response = future.Response()
  1878  	return
  1879  }
  1880  
  1881  // DevicesDeactivateFuture an abstraction for monitoring and retrieving the results of a long-running
  1882  // operation.
  1883  type DevicesDeactivateFuture struct {
  1884  	azure.FutureAPI
  1885  	// Result returns the result of the asynchronous operation.
  1886  	// If the operation has not completed it will return an error.
  1887  	Result func(DevicesClient) (autorest.Response, error)
  1888  }
  1889  
  1890  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1891  func (future *DevicesDeactivateFuture) UnmarshalJSON(body []byte) error {
  1892  	var azFuture azure.Future
  1893  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1894  		return err
  1895  	}
  1896  	future.FutureAPI = &azFuture
  1897  	future.Result = future.result
  1898  	return nil
  1899  }
  1900  
  1901  // result is the default implementation for DevicesDeactivateFuture.Result.
  1902  func (future *DevicesDeactivateFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  1903  	var done bool
  1904  	done, err = future.DoneWithContext(context.Background(), client)
  1905  	if err != nil {
  1906  		err = autorest.NewErrorWithError(err, "storsimple.DevicesDeactivateFuture", "Result", future.Response(), "Polling failure")
  1907  		return
  1908  	}
  1909  	if !done {
  1910  		ar.Response = future.Response()
  1911  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDeactivateFuture")
  1912  		return
  1913  	}
  1914  	ar.Response = future.Response()
  1915  	return
  1916  }
  1917  
  1918  // DevicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1919  // operation.
  1920  type DevicesDeleteFuture struct {
  1921  	azure.FutureAPI
  1922  	// Result returns the result of the asynchronous operation.
  1923  	// If the operation has not completed it will return an error.
  1924  	Result func(DevicesClient) (autorest.Response, error)
  1925  }
  1926  
  1927  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1928  func (future *DevicesDeleteFuture) UnmarshalJSON(body []byte) error {
  1929  	var azFuture azure.Future
  1930  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1931  		return err
  1932  	}
  1933  	future.FutureAPI = &azFuture
  1934  	future.Result = future.result
  1935  	return nil
  1936  }
  1937  
  1938  // result is the default implementation for DevicesDeleteFuture.Result.
  1939  func (future *DevicesDeleteFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  1940  	var done bool
  1941  	done, err = future.DoneWithContext(context.Background(), client)
  1942  	if err != nil {
  1943  		err = autorest.NewErrorWithError(err, "storsimple.DevicesDeleteFuture", "Result", future.Response(), "Polling failure")
  1944  		return
  1945  	}
  1946  	if !done {
  1947  		ar.Response = future.Response()
  1948  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDeleteFuture")
  1949  		return
  1950  	}
  1951  	ar.Response = future.Response()
  1952  	return
  1953  }
  1954  
  1955  // DevicesDownloadUpdatesFuture an abstraction for monitoring and retrieving the results of a long-running
  1956  // operation.
  1957  type DevicesDownloadUpdatesFuture struct {
  1958  	azure.FutureAPI
  1959  	// Result returns the result of the asynchronous operation.
  1960  	// If the operation has not completed it will return an error.
  1961  	Result func(DevicesClient) (autorest.Response, error)
  1962  }
  1963  
  1964  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1965  func (future *DevicesDownloadUpdatesFuture) UnmarshalJSON(body []byte) error {
  1966  	var azFuture azure.Future
  1967  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1968  		return err
  1969  	}
  1970  	future.FutureAPI = &azFuture
  1971  	future.Result = future.result
  1972  	return nil
  1973  }
  1974  
  1975  // result is the default implementation for DevicesDownloadUpdatesFuture.Result.
  1976  func (future *DevicesDownloadUpdatesFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  1977  	var done bool
  1978  	done, err = future.DoneWithContext(context.Background(), client)
  1979  	if err != nil {
  1980  		err = autorest.NewErrorWithError(err, "storsimple.DevicesDownloadUpdatesFuture", "Result", future.Response(), "Polling failure")
  1981  		return
  1982  	}
  1983  	if !done {
  1984  		ar.Response = future.Response()
  1985  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDownloadUpdatesFuture")
  1986  		return
  1987  	}
  1988  	ar.Response = future.Response()
  1989  	return
  1990  }
  1991  
  1992  // DevicesFailoverFuture an abstraction for monitoring and retrieving the results of a long-running
  1993  // operation.
  1994  type DevicesFailoverFuture struct {
  1995  	azure.FutureAPI
  1996  	// Result returns the result of the asynchronous operation.
  1997  	// If the operation has not completed it will return an error.
  1998  	Result func(DevicesClient) (autorest.Response, error)
  1999  }
  2000  
  2001  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2002  func (future *DevicesFailoverFuture) UnmarshalJSON(body []byte) error {
  2003  	var azFuture azure.Future
  2004  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2005  		return err
  2006  	}
  2007  	future.FutureAPI = &azFuture
  2008  	future.Result = future.result
  2009  	return nil
  2010  }
  2011  
  2012  // result is the default implementation for DevicesFailoverFuture.Result.
  2013  func (future *DevicesFailoverFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  2014  	var done bool
  2015  	done, err = future.DoneWithContext(context.Background(), client)
  2016  	if err != nil {
  2017  		err = autorest.NewErrorWithError(err, "storsimple.DevicesFailoverFuture", "Result", future.Response(), "Polling failure")
  2018  		return
  2019  	}
  2020  	if !done {
  2021  		ar.Response = future.Response()
  2022  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesFailoverFuture")
  2023  		return
  2024  	}
  2025  	ar.Response = future.Response()
  2026  	return
  2027  }
  2028  
  2029  // DevicesInstallUpdatesFuture an abstraction for monitoring and retrieving the results of a long-running
  2030  // operation.
  2031  type DevicesInstallUpdatesFuture struct {
  2032  	azure.FutureAPI
  2033  	// Result returns the result of the asynchronous operation.
  2034  	// If the operation has not completed it will return an error.
  2035  	Result func(DevicesClient) (autorest.Response, error)
  2036  }
  2037  
  2038  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2039  func (future *DevicesInstallUpdatesFuture) UnmarshalJSON(body []byte) error {
  2040  	var azFuture azure.Future
  2041  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2042  		return err
  2043  	}
  2044  	future.FutureAPI = &azFuture
  2045  	future.Result = future.result
  2046  	return nil
  2047  }
  2048  
  2049  // result is the default implementation for DevicesInstallUpdatesFuture.Result.
  2050  func (future *DevicesInstallUpdatesFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  2051  	var done bool
  2052  	done, err = future.DoneWithContext(context.Background(), client)
  2053  	if err != nil {
  2054  		err = autorest.NewErrorWithError(err, "storsimple.DevicesInstallUpdatesFuture", "Result", future.Response(), "Polling failure")
  2055  		return
  2056  	}
  2057  	if !done {
  2058  		ar.Response = future.Response()
  2059  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesInstallUpdatesFuture")
  2060  		return
  2061  	}
  2062  	ar.Response = future.Response()
  2063  	return
  2064  }
  2065  
  2066  // DevicesPatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  2067  type DevicesPatchFuture struct {
  2068  	azure.FutureAPI
  2069  	// Result returns the result of the asynchronous operation.
  2070  	// If the operation has not completed it will return an error.
  2071  	Result func(DevicesClient) (Device, error)
  2072  }
  2073  
  2074  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2075  func (future *DevicesPatchFuture) UnmarshalJSON(body []byte) error {
  2076  	var azFuture azure.Future
  2077  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2078  		return err
  2079  	}
  2080  	future.FutureAPI = &azFuture
  2081  	future.Result = future.result
  2082  	return nil
  2083  }
  2084  
  2085  // result is the default implementation for DevicesPatchFuture.Result.
  2086  func (future *DevicesPatchFuture) result(client DevicesClient) (d Device, err error) {
  2087  	var done bool
  2088  	done, err = future.DoneWithContext(context.Background(), client)
  2089  	if err != nil {
  2090  		err = autorest.NewErrorWithError(err, "storsimple.DevicesPatchFuture", "Result", future.Response(), "Polling failure")
  2091  		return
  2092  	}
  2093  	if !done {
  2094  		d.Response.Response = future.Response()
  2095  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesPatchFuture")
  2096  		return
  2097  	}
  2098  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2099  	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
  2100  		d, err = client.PatchResponder(d.Response.Response)
  2101  		if err != nil {
  2102  			err = autorest.NewErrorWithError(err, "storsimple.DevicesPatchFuture", "Result", d.Response.Response, "Failure responding to request")
  2103  		}
  2104  	}
  2105  	return
  2106  }
  2107  
  2108  // DevicesScanForUpdatesFuture an abstraction for monitoring and retrieving the results of a long-running
  2109  // operation.
  2110  type DevicesScanForUpdatesFuture struct {
  2111  	azure.FutureAPI
  2112  	// Result returns the result of the asynchronous operation.
  2113  	// If the operation has not completed it will return an error.
  2114  	Result func(DevicesClient) (autorest.Response, error)
  2115  }
  2116  
  2117  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2118  func (future *DevicesScanForUpdatesFuture) UnmarshalJSON(body []byte) error {
  2119  	var azFuture azure.Future
  2120  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2121  		return err
  2122  	}
  2123  	future.FutureAPI = &azFuture
  2124  	future.Result = future.result
  2125  	return nil
  2126  }
  2127  
  2128  // result is the default implementation for DevicesScanForUpdatesFuture.Result.
  2129  func (future *DevicesScanForUpdatesFuture) result(client DevicesClient) (ar autorest.Response, err error) {
  2130  	var done bool
  2131  	done, err = future.DoneWithContext(context.Background(), client)
  2132  	if err != nil {
  2133  		err = autorest.NewErrorWithError(err, "storsimple.DevicesScanForUpdatesFuture", "Result", future.Response(), "Polling failure")
  2134  		return
  2135  	}
  2136  	if !done {
  2137  		ar.Response = future.Response()
  2138  		err = azure.NewAsyncOpIncompleteError("storsimple.DevicesScanForUpdatesFuture")
  2139  		return
  2140  	}
  2141  	ar.Response = future.Response()
  2142  	return
  2143  }
  2144  
  2145  // EncryptionSettings the EncryptionSettings
  2146  type EncryptionSettings struct {
  2147  	autorest.Response `json:"-"`
  2148  	// EncryptionSettingsProperties - Properties of the EncryptionSettings.
  2149  	*EncryptionSettingsProperties `json:"properties,omitempty"`
  2150  	// ID - READ-ONLY; The identifier.
  2151  	ID *string `json:"id,omitempty"`
  2152  	// Name - READ-ONLY; The name.
  2153  	Name *string `json:"name,omitempty"`
  2154  	// Type - READ-ONLY; The type.
  2155  	Type *string `json:"type,omitempty"`
  2156  }
  2157  
  2158  // MarshalJSON is the custom marshaler for EncryptionSettings.
  2159  func (es EncryptionSettings) MarshalJSON() ([]byte, error) {
  2160  	objectMap := make(map[string]interface{})
  2161  	if es.EncryptionSettingsProperties != nil {
  2162  		objectMap["properties"] = es.EncryptionSettingsProperties
  2163  	}
  2164  	return json.Marshal(objectMap)
  2165  }
  2166  
  2167  // UnmarshalJSON is the custom unmarshaler for EncryptionSettings struct.
  2168  func (es *EncryptionSettings) UnmarshalJSON(body []byte) error {
  2169  	var m map[string]*json.RawMessage
  2170  	err := json.Unmarshal(body, &m)
  2171  	if err != nil {
  2172  		return err
  2173  	}
  2174  	for k, v := range m {
  2175  		switch k {
  2176  		case "properties":
  2177  			if v != nil {
  2178  				var encryptionSettingsProperties EncryptionSettingsProperties
  2179  				err = json.Unmarshal(*v, &encryptionSettingsProperties)
  2180  				if err != nil {
  2181  					return err
  2182  				}
  2183  				es.EncryptionSettingsProperties = &encryptionSettingsProperties
  2184  			}
  2185  		case "id":
  2186  			if v != nil {
  2187  				var ID string
  2188  				err = json.Unmarshal(*v, &ID)
  2189  				if err != nil {
  2190  					return err
  2191  				}
  2192  				es.ID = &ID
  2193  			}
  2194  		case "name":
  2195  			if v != nil {
  2196  				var name string
  2197  				err = json.Unmarshal(*v, &name)
  2198  				if err != nil {
  2199  					return err
  2200  				}
  2201  				es.Name = &name
  2202  			}
  2203  		case "type":
  2204  			if v != nil {
  2205  				var typeVar string
  2206  				err = json.Unmarshal(*v, &typeVar)
  2207  				if err != nil {
  2208  					return err
  2209  				}
  2210  				es.Type = &typeVar
  2211  			}
  2212  		}
  2213  	}
  2214  
  2215  	return nil
  2216  }
  2217  
  2218  // EncryptionSettingsProperties the properties of EncryptionSettings
  2219  type EncryptionSettingsProperties struct {
  2220  	// EncryptionStatus - The encryption status which indicates if encryption is enabled or not. Possible values include: 'EncryptionStatusEnabled', 'EncryptionStatusDisabled'
  2221  	EncryptionStatus EncryptionStatus `json:"encryptionStatus,omitempty"`
  2222  	// KeyRolloverStatus - The key rollover status which indicates if key rollover is required or not. If secrets encryption has been upgraded, then it requires key rollover. Possible values include: 'Required', 'NotRequired'
  2223  	KeyRolloverStatus KeyRolloverStatus `json:"keyRolloverStatus,omitempty"`
  2224  }
  2225  
  2226  // Error ...
  2227  type Error struct {
  2228  	ErrorCode *string  `json:"errorCode,omitempty"`
  2229  	Message   *Message `json:"message,omitempty"`
  2230  	Values    *[]Item  `json:"values,omitempty"`
  2231  }
  2232  
  2233  // FailoverRequest the Failover request object.
  2234  type FailoverRequest struct {
  2235  	AccesspointIds   *[]string `json:"accesspointIds,omitempty"`
  2236  	TargetDeviceID   *string   `json:"targetDeviceId,omitempty"`
  2237  	SkipValidation   *bool     `json:"skipValidation,omitempty"`
  2238  	KeepSourceDevice *bool     `json:"keepSourceDevice,omitempty"`
  2239  }
  2240  
  2241  // FileServer the file server.
  2242  type FileServer struct {
  2243  	autorest.Response `json:"-"`
  2244  	// FileServerProperties - The properties.
  2245  	*FileServerProperties `json:"properties,omitempty"`
  2246  	// ID - READ-ONLY; The identifier.
  2247  	ID *string `json:"id,omitempty"`
  2248  	// Name - READ-ONLY; The name.
  2249  	Name *string `json:"name,omitempty"`
  2250  	// Type - READ-ONLY; The type.
  2251  	Type *string `json:"type,omitempty"`
  2252  }
  2253  
  2254  // MarshalJSON is the custom marshaler for FileServer.
  2255  func (fs FileServer) MarshalJSON() ([]byte, error) {
  2256  	objectMap := make(map[string]interface{})
  2257  	if fs.FileServerProperties != nil {
  2258  		objectMap["properties"] = fs.FileServerProperties
  2259  	}
  2260  	return json.Marshal(objectMap)
  2261  }
  2262  
  2263  // UnmarshalJSON is the custom unmarshaler for FileServer struct.
  2264  func (fs *FileServer) UnmarshalJSON(body []byte) error {
  2265  	var m map[string]*json.RawMessage
  2266  	err := json.Unmarshal(body, &m)
  2267  	if err != nil {
  2268  		return err
  2269  	}
  2270  	for k, v := range m {
  2271  		switch k {
  2272  		case "properties":
  2273  			if v != nil {
  2274  				var fileServerProperties FileServerProperties
  2275  				err = json.Unmarshal(*v, &fileServerProperties)
  2276  				if err != nil {
  2277  					return err
  2278  				}
  2279  				fs.FileServerProperties = &fileServerProperties
  2280  			}
  2281  		case "id":
  2282  			if v != nil {
  2283  				var ID string
  2284  				err = json.Unmarshal(*v, &ID)
  2285  				if err != nil {
  2286  					return err
  2287  				}
  2288  				fs.ID = &ID
  2289  			}
  2290  		case "name":
  2291  			if v != nil {
  2292  				var name string
  2293  				err = json.Unmarshal(*v, &name)
  2294  				if err != nil {
  2295  					return err
  2296  				}
  2297  				fs.Name = &name
  2298  			}
  2299  		case "type":
  2300  			if v != nil {
  2301  				var typeVar string
  2302  				err = json.Unmarshal(*v, &typeVar)
  2303  				if err != nil {
  2304  					return err
  2305  				}
  2306  				fs.Type = &typeVar
  2307  			}
  2308  		}
  2309  	}
  2310  
  2311  	return nil
  2312  }
  2313  
  2314  // FileServerList collection of file servers
  2315  type FileServerList struct {
  2316  	autorest.Response `json:"-"`
  2317  	// Value - The value.
  2318  	Value *[]FileServer `json:"value,omitempty"`
  2319  }
  2320  
  2321  // FileServerProperties the file server properties.
  2322  type FileServerProperties struct {
  2323  	// DomainName - Domain of the file server
  2324  	DomainName *string `json:"domainName,omitempty"`
  2325  	// StorageDomainID - The storage domain id.
  2326  	StorageDomainID *string `json:"storageDomainId,omitempty"`
  2327  	// BackupScheduleGroupID - The backup policy id.
  2328  	BackupScheduleGroupID *string `json:"backupScheduleGroupId,omitempty"`
  2329  	// Description - The description of the file server
  2330  	Description *string `json:"description,omitempty"`
  2331  }
  2332  
  2333  // FileServersBackupNowFuture an abstraction for monitoring and retrieving the results of a long-running
  2334  // operation.
  2335  type FileServersBackupNowFuture struct {
  2336  	azure.FutureAPI
  2337  	// Result returns the result of the asynchronous operation.
  2338  	// If the operation has not completed it will return an error.
  2339  	Result func(FileServersClient) (autorest.Response, error)
  2340  }
  2341  
  2342  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2343  func (future *FileServersBackupNowFuture) UnmarshalJSON(body []byte) error {
  2344  	var azFuture azure.Future
  2345  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2346  		return err
  2347  	}
  2348  	future.FutureAPI = &azFuture
  2349  	future.Result = future.result
  2350  	return nil
  2351  }
  2352  
  2353  // result is the default implementation for FileServersBackupNowFuture.Result.
  2354  func (future *FileServersBackupNowFuture) result(client FileServersClient) (ar autorest.Response, err error) {
  2355  	var done bool
  2356  	done, err = future.DoneWithContext(context.Background(), client)
  2357  	if err != nil {
  2358  		err = autorest.NewErrorWithError(err, "storsimple.FileServersBackupNowFuture", "Result", future.Response(), "Polling failure")
  2359  		return
  2360  	}
  2361  	if !done {
  2362  		ar.Response = future.Response()
  2363  		err = azure.NewAsyncOpIncompleteError("storsimple.FileServersBackupNowFuture")
  2364  		return
  2365  	}
  2366  	ar.Response = future.Response()
  2367  	return
  2368  }
  2369  
  2370  // FileServersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  2371  // long-running operation.
  2372  type FileServersCreateOrUpdateFuture struct {
  2373  	azure.FutureAPI
  2374  	// Result returns the result of the asynchronous operation.
  2375  	// If the operation has not completed it will return an error.
  2376  	Result func(FileServersClient) (FileServer, error)
  2377  }
  2378  
  2379  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2380  func (future *FileServersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  2381  	var azFuture azure.Future
  2382  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2383  		return err
  2384  	}
  2385  	future.FutureAPI = &azFuture
  2386  	future.Result = future.result
  2387  	return nil
  2388  }
  2389  
  2390  // result is the default implementation for FileServersCreateOrUpdateFuture.Result.
  2391  func (future *FileServersCreateOrUpdateFuture) result(client FileServersClient) (fs FileServer, err error) {
  2392  	var done bool
  2393  	done, err = future.DoneWithContext(context.Background(), client)
  2394  	if err != nil {
  2395  		err = autorest.NewErrorWithError(err, "storsimple.FileServersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  2396  		return
  2397  	}
  2398  	if !done {
  2399  		fs.Response.Response = future.Response()
  2400  		err = azure.NewAsyncOpIncompleteError("storsimple.FileServersCreateOrUpdateFuture")
  2401  		return
  2402  	}
  2403  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2404  	if fs.Response.Response, err = future.GetResult(sender); err == nil && fs.Response.Response.StatusCode != http.StatusNoContent {
  2405  		fs, err = client.CreateOrUpdateResponder(fs.Response.Response)
  2406  		if err != nil {
  2407  			err = autorest.NewErrorWithError(err, "storsimple.FileServersCreateOrUpdateFuture", "Result", fs.Response.Response, "Failure responding to request")
  2408  		}
  2409  	}
  2410  	return
  2411  }
  2412  
  2413  // FileServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  2414  // operation.
  2415  type FileServersDeleteFuture struct {
  2416  	azure.FutureAPI
  2417  	// Result returns the result of the asynchronous operation.
  2418  	// If the operation has not completed it will return an error.
  2419  	Result func(FileServersClient) (autorest.Response, error)
  2420  }
  2421  
  2422  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2423  func (future *FileServersDeleteFuture) UnmarshalJSON(body []byte) error {
  2424  	var azFuture azure.Future
  2425  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2426  		return err
  2427  	}
  2428  	future.FutureAPI = &azFuture
  2429  	future.Result = future.result
  2430  	return nil
  2431  }
  2432  
  2433  // result is the default implementation for FileServersDeleteFuture.Result.
  2434  func (future *FileServersDeleteFuture) result(client FileServersClient) (ar autorest.Response, err error) {
  2435  	var done bool
  2436  	done, err = future.DoneWithContext(context.Background(), client)
  2437  	if err != nil {
  2438  		err = autorest.NewErrorWithError(err, "storsimple.FileServersDeleteFuture", "Result", future.Response(), "Polling failure")
  2439  		return
  2440  	}
  2441  	if !done {
  2442  		ar.Response = future.Response()
  2443  		err = azure.NewAsyncOpIncompleteError("storsimple.FileServersDeleteFuture")
  2444  		return
  2445  	}
  2446  	ar.Response = future.Response()
  2447  	return
  2448  }
  2449  
  2450  // FileShare the File Share.
  2451  type FileShare struct {
  2452  	autorest.Response `json:"-"`
  2453  	// FileShareProperties - The properties.
  2454  	*FileShareProperties `json:"properties,omitempty"`
  2455  	// ID - READ-ONLY; The identifier.
  2456  	ID *string `json:"id,omitempty"`
  2457  	// Name - READ-ONLY; The name.
  2458  	Name *string `json:"name,omitempty"`
  2459  	// Type - READ-ONLY; The type.
  2460  	Type *string `json:"type,omitempty"`
  2461  }
  2462  
  2463  // MarshalJSON is the custom marshaler for FileShare.
  2464  func (fs FileShare) MarshalJSON() ([]byte, error) {
  2465  	objectMap := make(map[string]interface{})
  2466  	if fs.FileShareProperties != nil {
  2467  		objectMap["properties"] = fs.FileShareProperties
  2468  	}
  2469  	return json.Marshal(objectMap)
  2470  }
  2471  
  2472  // UnmarshalJSON is the custom unmarshaler for FileShare struct.
  2473  func (fs *FileShare) UnmarshalJSON(body []byte) error {
  2474  	var m map[string]*json.RawMessage
  2475  	err := json.Unmarshal(body, &m)
  2476  	if err != nil {
  2477  		return err
  2478  	}
  2479  	for k, v := range m {
  2480  		switch k {
  2481  		case "properties":
  2482  			if v != nil {
  2483  				var fileShareProperties FileShareProperties
  2484  				err = json.Unmarshal(*v, &fileShareProperties)
  2485  				if err != nil {
  2486  					return err
  2487  				}
  2488  				fs.FileShareProperties = &fileShareProperties
  2489  			}
  2490  		case "id":
  2491  			if v != nil {
  2492  				var ID string
  2493  				err = json.Unmarshal(*v, &ID)
  2494  				if err != nil {
  2495  					return err
  2496  				}
  2497  				fs.ID = &ID
  2498  			}
  2499  		case "name":
  2500  			if v != nil {
  2501  				var name string
  2502  				err = json.Unmarshal(*v, &name)
  2503  				if err != nil {
  2504  					return err
  2505  				}
  2506  				fs.Name = &name
  2507  			}
  2508  		case "type":
  2509  			if v != nil {
  2510  				var typeVar string
  2511  				err = json.Unmarshal(*v, &typeVar)
  2512  				if err != nil {
  2513  					return err
  2514  				}
  2515  				fs.Type = &typeVar
  2516  			}
  2517  		}
  2518  	}
  2519  
  2520  	return nil
  2521  }
  2522  
  2523  // FileShareList collection of file shares
  2524  type FileShareList struct {
  2525  	autorest.Response `json:"-"`
  2526  	// Value - The value.
  2527  	Value *[]FileShare `json:"value,omitempty"`
  2528  }
  2529  
  2530  // FileShareProperties the File Share.
  2531  type FileShareProperties struct {
  2532  	// Description - Description for file share
  2533  	Description *string `json:"description,omitempty"`
  2534  	// ShareStatus - The Share Status. Possible values include: 'ShareStatusOnline', 'ShareStatusOffline'
  2535  	ShareStatus ShareStatus `json:"shareStatus,omitempty"`
  2536  	// DataPolicy - The data policy. Possible values include: 'DataPolicyInvalid', 'DataPolicyLocal', 'DataPolicyTiered', 'DataPolicyCloud'
  2537  	DataPolicy DataPolicy `json:"dataPolicy,omitempty"`
  2538  	// AdminUser - The user/group who will have full permission in this share. Active directory email address. Example: xyz@contoso.com or Contoso\xyz.
  2539  	AdminUser *string `json:"adminUser,omitempty"`
  2540  	// ProvisionedCapacityInBytes - The total provisioned capacity in Bytes
  2541  	ProvisionedCapacityInBytes *int64 `json:"provisionedCapacityInBytes,omitempty"`
  2542  	// UsedCapacityInBytes - READ-ONLY; The used capacity in Bytes.
  2543  	UsedCapacityInBytes *int64 `json:"usedCapacityInBytes,omitempty"`
  2544  	// LocalUsedCapacityInBytes - READ-ONLY; The local used capacity in Bytes.
  2545  	LocalUsedCapacityInBytes *int64 `json:"localUsedCapacityInBytes,omitempty"`
  2546  	// MonitoringStatus - The monitoring status. Possible values include: 'MonitoringStatusEnabled', 'MonitoringStatusDisabled'
  2547  	MonitoringStatus MonitoringStatus `json:"monitoringStatus,omitempty"`
  2548  }
  2549  
  2550  // MarshalJSON is the custom marshaler for FileShareProperties.
  2551  func (fsp FileShareProperties) MarshalJSON() ([]byte, error) {
  2552  	objectMap := make(map[string]interface{})
  2553  	if fsp.Description != nil {
  2554  		objectMap["description"] = fsp.Description
  2555  	}
  2556  	if fsp.ShareStatus != "" {
  2557  		objectMap["shareStatus"] = fsp.ShareStatus
  2558  	}
  2559  	if fsp.DataPolicy != "" {
  2560  		objectMap["dataPolicy"] = fsp.DataPolicy
  2561  	}
  2562  	if fsp.AdminUser != nil {
  2563  		objectMap["adminUser"] = fsp.AdminUser
  2564  	}
  2565  	if fsp.ProvisionedCapacityInBytes != nil {
  2566  		objectMap["provisionedCapacityInBytes"] = fsp.ProvisionedCapacityInBytes
  2567  	}
  2568  	if fsp.MonitoringStatus != "" {
  2569  		objectMap["monitoringStatus"] = fsp.MonitoringStatus
  2570  	}
  2571  	return json.Marshal(objectMap)
  2572  }
  2573  
  2574  // FileSharesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  2575  // long-running operation.
  2576  type FileSharesCreateOrUpdateFuture struct {
  2577  	azure.FutureAPI
  2578  	// Result returns the result of the asynchronous operation.
  2579  	// If the operation has not completed it will return an error.
  2580  	Result func(FileSharesClient) (FileShare, error)
  2581  }
  2582  
  2583  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2584  func (future *FileSharesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  2585  	var azFuture azure.Future
  2586  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2587  		return err
  2588  	}
  2589  	future.FutureAPI = &azFuture
  2590  	future.Result = future.result
  2591  	return nil
  2592  }
  2593  
  2594  // result is the default implementation for FileSharesCreateOrUpdateFuture.Result.
  2595  func (future *FileSharesCreateOrUpdateFuture) result(client FileSharesClient) (fs FileShare, err error) {
  2596  	var done bool
  2597  	done, err = future.DoneWithContext(context.Background(), client)
  2598  	if err != nil {
  2599  		err = autorest.NewErrorWithError(err, "storsimple.FileSharesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  2600  		return
  2601  	}
  2602  	if !done {
  2603  		fs.Response.Response = future.Response()
  2604  		err = azure.NewAsyncOpIncompleteError("storsimple.FileSharesCreateOrUpdateFuture")
  2605  		return
  2606  	}
  2607  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2608  	if fs.Response.Response, err = future.GetResult(sender); err == nil && fs.Response.Response.StatusCode != http.StatusNoContent {
  2609  		fs, err = client.CreateOrUpdateResponder(fs.Response.Response)
  2610  		if err != nil {
  2611  			err = autorest.NewErrorWithError(err, "storsimple.FileSharesCreateOrUpdateFuture", "Result", fs.Response.Response, "Failure responding to request")
  2612  		}
  2613  	}
  2614  	return
  2615  }
  2616  
  2617  // FileSharesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  2618  // operation.
  2619  type FileSharesDeleteFuture struct {
  2620  	azure.FutureAPI
  2621  	// Result returns the result of the asynchronous operation.
  2622  	// If the operation has not completed it will return an error.
  2623  	Result func(FileSharesClient) (autorest.Response, error)
  2624  }
  2625  
  2626  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2627  func (future *FileSharesDeleteFuture) UnmarshalJSON(body []byte) error {
  2628  	var azFuture azure.Future
  2629  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2630  		return err
  2631  	}
  2632  	future.FutureAPI = &azFuture
  2633  	future.Result = future.result
  2634  	return nil
  2635  }
  2636  
  2637  // result is the default implementation for FileSharesDeleteFuture.Result.
  2638  func (future *FileSharesDeleteFuture) result(client FileSharesClient) (ar autorest.Response, err error) {
  2639  	var done bool
  2640  	done, err = future.DoneWithContext(context.Background(), client)
  2641  	if err != nil {
  2642  		err = autorest.NewErrorWithError(err, "storsimple.FileSharesDeleteFuture", "Result", future.Response(), "Polling failure")
  2643  		return
  2644  	}
  2645  	if !done {
  2646  		ar.Response = future.Response()
  2647  		err = azure.NewAsyncOpIncompleteError("storsimple.FileSharesDeleteFuture")
  2648  		return
  2649  	}
  2650  	ar.Response = future.Response()
  2651  	return
  2652  }
  2653  
  2654  // IPConfig details related to the IP address configuration
  2655  type IPConfig struct {
  2656  	// IPAddress - The IP address of the network adapter, either ipv4 or ipv6.
  2657  	IPAddress *string `json:"ipAddress,omitempty"`
  2658  	// PrefixLength - The prefix length of the network adapter.
  2659  	PrefixLength *int32 `json:"prefixLength,omitempty"`
  2660  	// Gateway - The gateway of the network adapter.
  2661  	Gateway *string `json:"gateway,omitempty"`
  2662  }
  2663  
  2664  // ISCSIDisk the iSCSI disk.
  2665  type ISCSIDisk struct {
  2666  	autorest.Response `json:"-"`
  2667  	// ISCSIDiskProperties - The properties.
  2668  	*ISCSIDiskProperties `json:"properties,omitempty"`
  2669  	// ID - READ-ONLY; The identifier.
  2670  	ID *string `json:"id,omitempty"`
  2671  	// Name - READ-ONLY; The name.
  2672  	Name *string `json:"name,omitempty"`
  2673  	// Type - READ-ONLY; The type.
  2674  	Type *string `json:"type,omitempty"`
  2675  }
  2676  
  2677  // MarshalJSON is the custom marshaler for ISCSIDisk.
  2678  func (ID ISCSIDisk) MarshalJSON() ([]byte, error) {
  2679  	objectMap := make(map[string]interface{})
  2680  	if ID.ISCSIDiskProperties != nil {
  2681  		objectMap["properties"] = ID.ISCSIDiskProperties
  2682  	}
  2683  	return json.Marshal(objectMap)
  2684  }
  2685  
  2686  // UnmarshalJSON is the custom unmarshaler for ISCSIDisk struct.
  2687  func (ID *ISCSIDisk) UnmarshalJSON(body []byte) error {
  2688  	var m map[string]*json.RawMessage
  2689  	err := json.Unmarshal(body, &m)
  2690  	if err != nil {
  2691  		return err
  2692  	}
  2693  	for k, v := range m {
  2694  		switch k {
  2695  		case "properties":
  2696  			if v != nil {
  2697  				var iSCSIDiskProperties ISCSIDiskProperties
  2698  				err = json.Unmarshal(*v, &iSCSIDiskProperties)
  2699  				if err != nil {
  2700  					return err
  2701  				}
  2702  				ID.ISCSIDiskProperties = &iSCSIDiskProperties
  2703  			}
  2704  		case "id":
  2705  			if v != nil {
  2706  				var ID1 string
  2707  				err = json.Unmarshal(*v, &ID1)
  2708  				if err != nil {
  2709  					return err
  2710  				}
  2711  				ID.ID = &ID1
  2712  			}
  2713  		case "name":
  2714  			if v != nil {
  2715  				var name string
  2716  				err = json.Unmarshal(*v, &name)
  2717  				if err != nil {
  2718  					return err
  2719  				}
  2720  				ID.Name = &name
  2721  			}
  2722  		case "type":
  2723  			if v != nil {
  2724  				var typeVar string
  2725  				err = json.Unmarshal(*v, &typeVar)
  2726  				if err != nil {
  2727  					return err
  2728  				}
  2729  				ID.Type = &typeVar
  2730  			}
  2731  		}
  2732  	}
  2733  
  2734  	return nil
  2735  }
  2736  
  2737  // ISCSIDiskList collection of Iscsi disk
  2738  type ISCSIDiskList struct {
  2739  	autorest.Response `json:"-"`
  2740  	// Value - The value.
  2741  	Value *[]ISCSIDisk `json:"value,omitempty"`
  2742  }
  2743  
  2744  // ISCSIDiskProperties the iSCSI disk properties.
  2745  type ISCSIDiskProperties struct {
  2746  	// Description - The description.
  2747  	Description *string `json:"description,omitempty"`
  2748  	// DiskStatus - The disk status. Possible values include: 'DiskStatusOnline', 'DiskStatusOffline'
  2749  	DiskStatus DiskStatus `json:"diskStatus,omitempty"`
  2750  	// AccessControlRecords - The access control records.
  2751  	AccessControlRecords *[]string `json:"accessControlRecords,omitempty"`
  2752  	// DataPolicy - The data policy. Possible values include: 'DataPolicyInvalid', 'DataPolicyLocal', 'DataPolicyTiered', 'DataPolicyCloud'
  2753  	DataPolicy DataPolicy `json:"dataPolicy,omitempty"`
  2754  	// ProvisionedCapacityInBytes - The provisioned capacity in bytes.
  2755  	ProvisionedCapacityInBytes *int64 `json:"provisionedCapacityInBytes,omitempty"`
  2756  	// UsedCapacityInBytes - READ-ONLY; The used capacity in bytes.
  2757  	UsedCapacityInBytes *int64 `json:"usedCapacityInBytes,omitempty"`
  2758  	// LocalUsedCapacityInBytes - READ-ONLY; The local used capacity in bytes.
  2759  	LocalUsedCapacityInBytes *int64 `json:"localUsedCapacityInBytes,omitempty"`
  2760  	// MonitoringStatus - The monitoring. Possible values include: 'MonitoringStatusEnabled', 'MonitoringStatusDisabled'
  2761  	MonitoringStatus MonitoringStatus `json:"monitoringStatus,omitempty"`
  2762  }
  2763  
  2764  // MarshalJSON is the custom marshaler for ISCSIDiskProperties.
  2765  func (idp ISCSIDiskProperties) MarshalJSON() ([]byte, error) {
  2766  	objectMap := make(map[string]interface{})
  2767  	if idp.Description != nil {
  2768  		objectMap["description"] = idp.Description
  2769  	}
  2770  	if idp.DiskStatus != "" {
  2771  		objectMap["diskStatus"] = idp.DiskStatus
  2772  	}
  2773  	if idp.AccessControlRecords != nil {
  2774  		objectMap["accessControlRecords"] = idp.AccessControlRecords
  2775  	}
  2776  	if idp.DataPolicy != "" {
  2777  		objectMap["dataPolicy"] = idp.DataPolicy
  2778  	}
  2779  	if idp.ProvisionedCapacityInBytes != nil {
  2780  		objectMap["provisionedCapacityInBytes"] = idp.ProvisionedCapacityInBytes
  2781  	}
  2782  	if idp.MonitoringStatus != "" {
  2783  		objectMap["monitoringStatus"] = idp.MonitoringStatus
  2784  	}
  2785  	return json.Marshal(objectMap)
  2786  }
  2787  
  2788  // IscsiDisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  2789  // long-running operation.
  2790  type IscsiDisksCreateOrUpdateFuture struct {
  2791  	azure.FutureAPI
  2792  	// Result returns the result of the asynchronous operation.
  2793  	// If the operation has not completed it will return an error.
  2794  	Result func(IscsiDisksClient) (ISCSIDisk, error)
  2795  }
  2796  
  2797  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2798  func (future *IscsiDisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  2799  	var azFuture azure.Future
  2800  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2801  		return err
  2802  	}
  2803  	future.FutureAPI = &azFuture
  2804  	future.Result = future.result
  2805  	return nil
  2806  }
  2807  
  2808  // result is the default implementation for IscsiDisksCreateOrUpdateFuture.Result.
  2809  func (future *IscsiDisksCreateOrUpdateFuture) result(client IscsiDisksClient) (ID ISCSIDisk, err error) {
  2810  	var done bool
  2811  	done, err = future.DoneWithContext(context.Background(), client)
  2812  	if err != nil {
  2813  		err = autorest.NewErrorWithError(err, "storsimple.IscsiDisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  2814  		return
  2815  	}
  2816  	if !done {
  2817  		ID.Response.Response = future.Response()
  2818  		err = azure.NewAsyncOpIncompleteError("storsimple.IscsiDisksCreateOrUpdateFuture")
  2819  		return
  2820  	}
  2821  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2822  	if ID.Response.Response, err = future.GetResult(sender); err == nil && ID.Response.Response.StatusCode != http.StatusNoContent {
  2823  		ID, err = client.CreateOrUpdateResponder(ID.Response.Response)
  2824  		if err != nil {
  2825  			err = autorest.NewErrorWithError(err, "storsimple.IscsiDisksCreateOrUpdateFuture", "Result", ID.Response.Response, "Failure responding to request")
  2826  		}
  2827  	}
  2828  	return
  2829  }
  2830  
  2831  // IscsiDisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  2832  // operation.
  2833  type IscsiDisksDeleteFuture struct {
  2834  	azure.FutureAPI
  2835  	// Result returns the result of the asynchronous operation.
  2836  	// If the operation has not completed it will return an error.
  2837  	Result func(IscsiDisksClient) (autorest.Response, error)
  2838  }
  2839  
  2840  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2841  func (future *IscsiDisksDeleteFuture) UnmarshalJSON(body []byte) error {
  2842  	var azFuture azure.Future
  2843  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2844  		return err
  2845  	}
  2846  	future.FutureAPI = &azFuture
  2847  	future.Result = future.result
  2848  	return nil
  2849  }
  2850  
  2851  // result is the default implementation for IscsiDisksDeleteFuture.Result.
  2852  func (future *IscsiDisksDeleteFuture) result(client IscsiDisksClient) (ar autorest.Response, err error) {
  2853  	var done bool
  2854  	done, err = future.DoneWithContext(context.Background(), client)
  2855  	if err != nil {
  2856  		err = autorest.NewErrorWithError(err, "storsimple.IscsiDisksDeleteFuture", "Result", future.Response(), "Polling failure")
  2857  		return
  2858  	}
  2859  	if !done {
  2860  		ar.Response = future.Response()
  2861  		err = azure.NewAsyncOpIncompleteError("storsimple.IscsiDisksDeleteFuture")
  2862  		return
  2863  	}
  2864  	ar.Response = future.Response()
  2865  	return
  2866  }
  2867  
  2868  // ISCSIServer the iSCSI server.
  2869  type ISCSIServer struct {
  2870  	autorest.Response `json:"-"`
  2871  	// ISCSIServerProperties - The properties.
  2872  	*ISCSIServerProperties `json:"properties,omitempty"`
  2873  	// ID - READ-ONLY; The identifier.
  2874  	ID *string `json:"id,omitempty"`
  2875  	// Name - READ-ONLY; The name.
  2876  	Name *string `json:"name,omitempty"`
  2877  	// Type - READ-ONLY; The type.
  2878  	Type *string `json:"type,omitempty"`
  2879  }
  2880  
  2881  // MarshalJSON is the custom marshaler for ISCSIServer.
  2882  func (is ISCSIServer) MarshalJSON() ([]byte, error) {
  2883  	objectMap := make(map[string]interface{})
  2884  	if is.ISCSIServerProperties != nil {
  2885  		objectMap["properties"] = is.ISCSIServerProperties
  2886  	}
  2887  	return json.Marshal(objectMap)
  2888  }
  2889  
  2890  // UnmarshalJSON is the custom unmarshaler for ISCSIServer struct.
  2891  func (is *ISCSIServer) UnmarshalJSON(body []byte) error {
  2892  	var m map[string]*json.RawMessage
  2893  	err := json.Unmarshal(body, &m)
  2894  	if err != nil {
  2895  		return err
  2896  	}
  2897  	for k, v := range m {
  2898  		switch k {
  2899  		case "properties":
  2900  			if v != nil {
  2901  				var iSCSIServerProperties ISCSIServerProperties
  2902  				err = json.Unmarshal(*v, &iSCSIServerProperties)
  2903  				if err != nil {
  2904  					return err
  2905  				}
  2906  				is.ISCSIServerProperties = &iSCSIServerProperties
  2907  			}
  2908  		case "id":
  2909  			if v != nil {
  2910  				var ID string
  2911  				err = json.Unmarshal(*v, &ID)
  2912  				if err != nil {
  2913  					return err
  2914  				}
  2915  				is.ID = &ID
  2916  			}
  2917  		case "name":
  2918  			if v != nil {
  2919  				var name string
  2920  				err = json.Unmarshal(*v, &name)
  2921  				if err != nil {
  2922  					return err
  2923  				}
  2924  				is.Name = &name
  2925  			}
  2926  		case "type":
  2927  			if v != nil {
  2928  				var typeVar string
  2929  				err = json.Unmarshal(*v, &typeVar)
  2930  				if err != nil {
  2931  					return err
  2932  				}
  2933  				is.Type = &typeVar
  2934  			}
  2935  		}
  2936  	}
  2937  
  2938  	return nil
  2939  }
  2940  
  2941  // ISCSIServerList collection of Iscsi servers
  2942  type ISCSIServerList struct {
  2943  	autorest.Response `json:"-"`
  2944  	// Value - The value.
  2945  	Value *[]ISCSIServer `json:"value,omitempty"`
  2946  }
  2947  
  2948  // ISCSIServerProperties the iSCSI server properties.
  2949  type ISCSIServerProperties struct {
  2950  	// StorageDomainID - The storage domain id.
  2951  	StorageDomainID *string `json:"storageDomainId,omitempty"`
  2952  	// BackupScheduleGroupID - The backup policy id.
  2953  	BackupScheduleGroupID *string `json:"backupScheduleGroupId,omitempty"`
  2954  	// Description - The description.
  2955  	Description *string `json:"description,omitempty"`
  2956  	// ChapID - The chap id.
  2957  	ChapID *string `json:"chapId,omitempty"`
  2958  	// ReverseChapID - The reverse chap id.
  2959  	ReverseChapID *string `json:"reverseChapId,omitempty"`
  2960  }
  2961  
  2962  // IscsiServersBackupNowFuture an abstraction for monitoring and retrieving the results of a long-running
  2963  // operation.
  2964  type IscsiServersBackupNowFuture struct {
  2965  	azure.FutureAPI
  2966  	// Result returns the result of the asynchronous operation.
  2967  	// If the operation has not completed it will return an error.
  2968  	Result func(IscsiServersClient) (autorest.Response, error)
  2969  }
  2970  
  2971  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2972  func (future *IscsiServersBackupNowFuture) UnmarshalJSON(body []byte) error {
  2973  	var azFuture azure.Future
  2974  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2975  		return err
  2976  	}
  2977  	future.FutureAPI = &azFuture
  2978  	future.Result = future.result
  2979  	return nil
  2980  }
  2981  
  2982  // result is the default implementation for IscsiServersBackupNowFuture.Result.
  2983  func (future *IscsiServersBackupNowFuture) result(client IscsiServersClient) (ar autorest.Response, err error) {
  2984  	var done bool
  2985  	done, err = future.DoneWithContext(context.Background(), client)
  2986  	if err != nil {
  2987  		err = autorest.NewErrorWithError(err, "storsimple.IscsiServersBackupNowFuture", "Result", future.Response(), "Polling failure")
  2988  		return
  2989  	}
  2990  	if !done {
  2991  		ar.Response = future.Response()
  2992  		err = azure.NewAsyncOpIncompleteError("storsimple.IscsiServersBackupNowFuture")
  2993  		return
  2994  	}
  2995  	ar.Response = future.Response()
  2996  	return
  2997  }
  2998  
  2999  // IscsiServersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  3000  // long-running operation.
  3001  type IscsiServersCreateOrUpdateFuture struct {
  3002  	azure.FutureAPI
  3003  	// Result returns the result of the asynchronous operation.
  3004  	// If the operation has not completed it will return an error.
  3005  	Result func(IscsiServersClient) (ISCSIServer, error)
  3006  }
  3007  
  3008  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3009  func (future *IscsiServersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  3010  	var azFuture azure.Future
  3011  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3012  		return err
  3013  	}
  3014  	future.FutureAPI = &azFuture
  3015  	future.Result = future.result
  3016  	return nil
  3017  }
  3018  
  3019  // result is the default implementation for IscsiServersCreateOrUpdateFuture.Result.
  3020  func (future *IscsiServersCreateOrUpdateFuture) result(client IscsiServersClient) (is ISCSIServer, err error) {
  3021  	var done bool
  3022  	done, err = future.DoneWithContext(context.Background(), client)
  3023  	if err != nil {
  3024  		err = autorest.NewErrorWithError(err, "storsimple.IscsiServersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  3025  		return
  3026  	}
  3027  	if !done {
  3028  		is.Response.Response = future.Response()
  3029  		err = azure.NewAsyncOpIncompleteError("storsimple.IscsiServersCreateOrUpdateFuture")
  3030  		return
  3031  	}
  3032  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3033  	if is.Response.Response, err = future.GetResult(sender); err == nil && is.Response.Response.StatusCode != http.StatusNoContent {
  3034  		is, err = client.CreateOrUpdateResponder(is.Response.Response)
  3035  		if err != nil {
  3036  			err = autorest.NewErrorWithError(err, "storsimple.IscsiServersCreateOrUpdateFuture", "Result", is.Response.Response, "Failure responding to request")
  3037  		}
  3038  	}
  3039  	return
  3040  }
  3041  
  3042  // IscsiServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  3043  // operation.
  3044  type IscsiServersDeleteFuture struct {
  3045  	azure.FutureAPI
  3046  	// Result returns the result of the asynchronous operation.
  3047  	// If the operation has not completed it will return an error.
  3048  	Result func(IscsiServersClient) (autorest.Response, error)
  3049  }
  3050  
  3051  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  3052  func (future *IscsiServersDeleteFuture) UnmarshalJSON(body []byte) error {
  3053  	var azFuture azure.Future
  3054  	if err := json.Unmarshal(body, &azFuture); err != nil {
  3055  		return err
  3056  	}
  3057  	future.FutureAPI = &azFuture
  3058  	future.Result = future.result
  3059  	return nil
  3060  }
  3061  
  3062  // result is the default implementation for IscsiServersDeleteFuture.Result.
  3063  func (future *IscsiServersDeleteFuture) result(client IscsiServersClient) (ar autorest.Response, err error) {
  3064  	var done bool
  3065  	done, err = future.DoneWithContext(context.Background(), client)
  3066  	if err != nil {
  3067  		err = autorest.NewErrorWithError(err, "storsimple.IscsiServersDeleteFuture", "Result", future.Response(), "Polling failure")
  3068  		return
  3069  	}
  3070  	if !done {
  3071  		ar.Response = future.Response()
  3072  		err = azure.NewAsyncOpIncompleteError("storsimple.IscsiServersDeleteFuture")
  3073  		return
  3074  	}
  3075  	ar.Response = future.Response()
  3076  	return
  3077  }
  3078  
  3079  // Item ...
  3080  type Item struct {
  3081  	Key   *string `json:"key,omitempty"`
  3082  	Value *string `json:"value,omitempty"`
  3083  }
  3084  
  3085  // Job the Job.
  3086  type Job struct {
  3087  	autorest.Response `json:"-"`
  3088  	// Status - Current status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusRunning', 'JobStatusSucceeded', 'JobStatusFailed', 'JobStatusCanceled', 'JobStatusPaused', 'JobStatusScheduled'
  3089  	Status JobStatus `json:"status,omitempty"`
  3090  	// StartTime - The UTC time at which the job was started
  3091  	StartTime *date.Time `json:"startTime,omitempty"`
  3092  	// EndTime - The UTC time at which the job completed
  3093  	EndTime *date.Time `json:"endTime,omitempty"`
  3094  	// PercentComplete - The percentage of the job that is already complete
  3095  	PercentComplete *int32 `json:"percentComplete,omitempty"`
  3096  	// Error - The Error details.
  3097  	Error *JobErrorDetails `json:"error,omitempty"`
  3098  	// JobProperties - Other properties of the job
  3099  	*JobProperties `json:"properties,omitempty"`
  3100  	// ID - READ-ONLY; The identifier.
  3101  	ID *string `json:"id,omitempty"`
  3102  	// Name - READ-ONLY; The name.
  3103  	Name *string `json:"name,omitempty"`
  3104  	// Type - READ-ONLY; The type.
  3105  	Type *string `json:"type,omitempty"`
  3106  }
  3107  
  3108  // MarshalJSON is the custom marshaler for Job.
  3109  func (j Job) MarshalJSON() ([]byte, error) {
  3110  	objectMap := make(map[string]interface{})
  3111  	if j.Status != "" {
  3112  		objectMap["status"] = j.Status
  3113  	}
  3114  	if j.StartTime != nil {
  3115  		objectMap["startTime"] = j.StartTime
  3116  	}
  3117  	if j.EndTime != nil {
  3118  		objectMap["endTime"] = j.EndTime
  3119  	}
  3120  	if j.PercentComplete != nil {
  3121  		objectMap["percentComplete"] = j.PercentComplete
  3122  	}
  3123  	if j.Error != nil {
  3124  		objectMap["error"] = j.Error
  3125  	}
  3126  	if j.JobProperties != nil {
  3127  		objectMap["properties"] = j.JobProperties
  3128  	}
  3129  	return json.Marshal(objectMap)
  3130  }
  3131  
  3132  // UnmarshalJSON is the custom unmarshaler for Job struct.
  3133  func (j *Job) UnmarshalJSON(body []byte) error {
  3134  	var m map[string]*json.RawMessage
  3135  	err := json.Unmarshal(body, &m)
  3136  	if err != nil {
  3137  		return err
  3138  	}
  3139  	for k, v := range m {
  3140  		switch k {
  3141  		case "status":
  3142  			if v != nil {
  3143  				var status JobStatus
  3144  				err = json.Unmarshal(*v, &status)
  3145  				if err != nil {
  3146  					return err
  3147  				}
  3148  				j.Status = status
  3149  			}
  3150  		case "startTime":
  3151  			if v != nil {
  3152  				var startTime date.Time
  3153  				err = json.Unmarshal(*v, &startTime)
  3154  				if err != nil {
  3155  					return err
  3156  				}
  3157  				j.StartTime = &startTime
  3158  			}
  3159  		case "endTime":
  3160  			if v != nil {
  3161  				var endTime date.Time
  3162  				err = json.Unmarshal(*v, &endTime)
  3163  				if err != nil {
  3164  					return err
  3165  				}
  3166  				j.EndTime = &endTime
  3167  			}
  3168  		case "percentComplete":
  3169  			if v != nil {
  3170  				var percentComplete int32
  3171  				err = json.Unmarshal(*v, &percentComplete)
  3172  				if err != nil {
  3173  					return err
  3174  				}
  3175  				j.PercentComplete = &percentComplete
  3176  			}
  3177  		case "error":
  3178  			if v != nil {
  3179  				var errorVar JobErrorDetails
  3180  				err = json.Unmarshal(*v, &errorVar)
  3181  				if err != nil {
  3182  					return err
  3183  				}
  3184  				j.Error = &errorVar
  3185  			}
  3186  		case "properties":
  3187  			if v != nil {
  3188  				var jobProperties JobProperties
  3189  				err = json.Unmarshal(*v, &jobProperties)
  3190  				if err != nil {
  3191  					return err
  3192  				}
  3193  				j.JobProperties = &jobProperties
  3194  			}
  3195  		case "id":
  3196  			if v != nil {
  3197  				var ID string
  3198  				err = json.Unmarshal(*v, &ID)
  3199  				if err != nil {
  3200  					return err
  3201  				}
  3202  				j.ID = &ID
  3203  			}
  3204  		case "name":
  3205  			if v != nil {
  3206  				var name string
  3207  				err = json.Unmarshal(*v, &name)
  3208  				if err != nil {
  3209  					return err
  3210  				}
  3211  				j.Name = &name
  3212  			}
  3213  		case "type":
  3214  			if v != nil {
  3215  				var typeVar string
  3216  				err = json.Unmarshal(*v, &typeVar)
  3217  				if err != nil {
  3218  					return err
  3219  				}
  3220  				j.Type = &typeVar
  3221  			}
  3222  		}
  3223  	}
  3224  
  3225  	return nil
  3226  }
  3227  
  3228  // JobErrorDetails the job error information containing List of JobErrorItem.
  3229  type JobErrorDetails struct {
  3230  	// ErrorDetails - The error details.
  3231  	ErrorDetails *[]JobErrorItem `json:"errorDetails,omitempty"`
  3232  	// Code - The code intended for programmatic access
  3233  	Code *string `json:"code,omitempty"`
  3234  	// Message - The message intended to describe the error in detail
  3235  	Message *string `json:"message,omitempty"`
  3236  }
  3237  
  3238  // JobErrorItem the job error items.
  3239  type JobErrorItem struct {
  3240  	// Recommendations - The recommended actions.
  3241  	Recommendations *[]string `json:"recommendations,omitempty"`
  3242  	// Code - The code intended for programmatic access
  3243  	Code *string `json:"code,omitempty"`
  3244  	// Message - The message intended to describe the error in detail
  3245  	Message *string `json:"message,omitempty"`
  3246  }
  3247  
  3248  // JobFilter filters that can be specified for the job
  3249  type JobFilter struct {
  3250  	// JobType - The job type. Possible values include: 'JobTypeBackup', 'JobTypeClone', 'JobTypeFailover', 'JobTypeDownloadUpdates', 'JobTypeInstallUpdates'
  3251  	JobType JobType `json:"jobType,omitempty"`
  3252  	// Status - The job status. Possible values include: 'JobStatusInvalid', 'JobStatusRunning', 'JobStatusSucceeded', 'JobStatusFailed', 'JobStatusCanceled', 'JobStatusPaused', 'JobStatusScheduled'
  3253  	Status JobStatus `json:"status,omitempty"`
  3254  	// StartTime - The start time of the job.
  3255  	StartTime *date.Time `json:"startTime,omitempty"`
  3256  }
  3257  
  3258  // JobList collection of jobs
  3259  type JobList struct {
  3260  	autorest.Response `json:"-"`
  3261  	// Value - The value.
  3262  	Value *[]Job `json:"value,omitempty"`
  3263  	// NextLink - The NextLink.
  3264  	NextLink *string `json:"nextLink,omitempty"`
  3265  }
  3266  
  3267  // JobListIterator provides access to a complete listing of Job values.
  3268  type JobListIterator struct {
  3269  	i    int
  3270  	page JobListPage
  3271  }
  3272  
  3273  // NextWithContext advances to the next value.  If there was an error making
  3274  // the request the iterator does not advance and the error is returned.
  3275  func (iter *JobListIterator) NextWithContext(ctx context.Context) (err error) {
  3276  	if tracing.IsEnabled() {
  3277  		ctx = tracing.StartSpan(ctx, fqdn+"/JobListIterator.NextWithContext")
  3278  		defer func() {
  3279  			sc := -1
  3280  			if iter.Response().Response.Response != nil {
  3281  				sc = iter.Response().Response.Response.StatusCode
  3282  			}
  3283  			tracing.EndSpan(ctx, sc, err)
  3284  		}()
  3285  	}
  3286  	iter.i++
  3287  	if iter.i < len(iter.page.Values()) {
  3288  		return nil
  3289  	}
  3290  	err = iter.page.NextWithContext(ctx)
  3291  	if err != nil {
  3292  		iter.i--
  3293  		return err
  3294  	}
  3295  	iter.i = 0
  3296  	return nil
  3297  }
  3298  
  3299  // Next advances to the next value.  If there was an error making
  3300  // the request the iterator does not advance and the error is returned.
  3301  // Deprecated: Use NextWithContext() instead.
  3302  func (iter *JobListIterator) Next() error {
  3303  	return iter.NextWithContext(context.Background())
  3304  }
  3305  
  3306  // NotDone returns true if the enumeration should be started or is not yet complete.
  3307  func (iter JobListIterator) NotDone() bool {
  3308  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  3309  }
  3310  
  3311  // Response returns the raw server response from the last page request.
  3312  func (iter JobListIterator) Response() JobList {
  3313  	return iter.page.Response()
  3314  }
  3315  
  3316  // Value returns the current value or a zero-initialized value if the
  3317  // iterator has advanced beyond the end of the collection.
  3318  func (iter JobListIterator) Value() Job {
  3319  	if !iter.page.NotDone() {
  3320  		return Job{}
  3321  	}
  3322  	return iter.page.Values()[iter.i]
  3323  }
  3324  
  3325  // Creates a new instance of the JobListIterator type.
  3326  func NewJobListIterator(page JobListPage) JobListIterator {
  3327  	return JobListIterator{page: page}
  3328  }
  3329  
  3330  // IsEmpty returns true if the ListResult contains no values.
  3331  func (jl JobList) IsEmpty() bool {
  3332  	return jl.Value == nil || len(*jl.Value) == 0
  3333  }
  3334  
  3335  // hasNextLink returns true if the NextLink is not empty.
  3336  func (jl JobList) hasNextLink() bool {
  3337  	return jl.NextLink != nil && len(*jl.NextLink) != 0
  3338  }
  3339  
  3340  // jobListPreparer prepares a request to retrieve the next set of results.
  3341  // It returns nil if no more results exist.
  3342  func (jl JobList) jobListPreparer(ctx context.Context) (*http.Request, error) {
  3343  	if !jl.hasNextLink() {
  3344  		return nil, nil
  3345  	}
  3346  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  3347  		autorest.AsJSON(),
  3348  		autorest.AsGet(),
  3349  		autorest.WithBaseURL(to.String(jl.NextLink)))
  3350  }
  3351  
  3352  // JobListPage contains a page of Job values.
  3353  type JobListPage struct {
  3354  	fn func(context.Context, JobList) (JobList, error)
  3355  	jl JobList
  3356  }
  3357  
  3358  // NextWithContext advances to the next page of values.  If there was an error making
  3359  // the request the page does not advance and the error is returned.
  3360  func (page *JobListPage) NextWithContext(ctx context.Context) (err error) {
  3361  	if tracing.IsEnabled() {
  3362  		ctx = tracing.StartSpan(ctx, fqdn+"/JobListPage.NextWithContext")
  3363  		defer func() {
  3364  			sc := -1
  3365  			if page.Response().Response.Response != nil {
  3366  				sc = page.Response().Response.Response.StatusCode
  3367  			}
  3368  			tracing.EndSpan(ctx, sc, err)
  3369  		}()
  3370  	}
  3371  	for {
  3372  		next, err := page.fn(ctx, page.jl)
  3373  		if err != nil {
  3374  			return err
  3375  		}
  3376  		page.jl = next
  3377  		if !next.hasNextLink() || !next.IsEmpty() {
  3378  			break
  3379  		}
  3380  	}
  3381  	return nil
  3382  }
  3383  
  3384  // Next advances to the next page of values.  If there was an error making
  3385  // the request the page does not advance and the error is returned.
  3386  // Deprecated: Use NextWithContext() instead.
  3387  func (page *JobListPage) Next() error {
  3388  	return page.NextWithContext(context.Background())
  3389  }
  3390  
  3391  // NotDone returns true if the page enumeration should be started or is not yet complete.
  3392  func (page JobListPage) NotDone() bool {
  3393  	return !page.jl.IsEmpty()
  3394  }
  3395  
  3396  // Response returns the raw server response from the last page request.
  3397  func (page JobListPage) Response() JobList {
  3398  	return page.jl
  3399  }
  3400  
  3401  // Values returns the slice of values for the current page or nil if there are no values.
  3402  func (page JobListPage) Values() []Job {
  3403  	if page.jl.IsEmpty() {
  3404  		return nil
  3405  	}
  3406  	return *page.jl.Value
  3407  }
  3408  
  3409  // Creates a new instance of the JobListPage type.
  3410  func NewJobListPage(cur JobList, getNextPage func(context.Context, JobList) (JobList, error)) JobListPage {
  3411  	return JobListPage{
  3412  		fn: getNextPage,
  3413  		jl: cur,
  3414  	}
  3415  }
  3416  
  3417  // JobProperties properties for the job
  3418  type JobProperties struct {
  3419  	// JobType - Type of the job. Possible values include: 'JobTypeBackup', 'JobTypeClone', 'JobTypeFailover', 'JobTypeDownloadUpdates', 'JobTypeInstallUpdates'
  3420  	JobType JobType `json:"jobType,omitempty"`
  3421  	// TargetID - Id of the object that is created by the job
  3422  	TargetID *string `json:"targetId,omitempty"`
  3423  	// EntityID - The entity identifier for which the job ran.
  3424  	EntityID *string `json:"entityId,omitempty"`
  3425  	// EntityType - The entity type for which the job ran.
  3426  	EntityType *string `json:"entityType,omitempty"`
  3427  	// JobStages - The job stages.
  3428  	JobStages *[]JobStage `json:"jobStages,omitempty"`
  3429  	// DeviceID - The device id in which the job is currently running
  3430  	DeviceID *string `json:"deviceId,omitempty"`
  3431  	// IsCancellable - Represents whether the job is cancellable or not
  3432  	IsCancellable *bool `json:"isCancellable,omitempty"`
  3433  	// Stats - stats properties for the job
  3434  	Stats *JobStats `json:"stats,omitempty"`
  3435  	// TargetType - The target type of the backup. Possible values include: 'TargetTypeFileServer', 'TargetTypeDiskServer'
  3436  	TargetType TargetType `json:"targetType,omitempty"`
  3437  	// SourceDeviceID - The source device identifier of the failover job.
  3438  	SourceDeviceID *string `json:"sourceDeviceId,omitempty"`
  3439  	// BackupPointInTime - The time of the backup used for the failover.
  3440  	BackupPointInTime *date.Time `json:"backupPointInTime,omitempty"`
  3441  	// DownloadProgress - The download progress.
  3442  	DownloadProgress *UpdateDownloadProgress `json:"downloadProgress,omitempty"`
  3443  	// InstallProgress - The install progress.
  3444  	InstallProgress *UpdateInstallProgress `json:"installProgress,omitempty"`
  3445  }
  3446  
  3447  // JobStage contains details about the multiple job stages of a job
  3448  type JobStage struct {
  3449  	// Message - The message of the job stage.
  3450  	Message *string `json:"message,omitempty"`
  3451  	// StageStatus - The stage status. Possible values include: 'JobStatusInvalid', 'JobStatusRunning', 'JobStatusSucceeded', 'JobStatusFailed', 'JobStatusCanceled', 'JobStatusPaused', 'JobStatusScheduled'
  3452  	StageStatus JobStatus `json:"stageStatus,omitempty"`
  3453  	// Detail - The details of the stage.
  3454  	Detail *string `json:"detail,omitempty"`
  3455  	// ErrorCode - The error code of the stage if any.
  3456  	ErrorCode *string `json:"errorCode,omitempty"`
  3457  }
  3458  
  3459  // JobStats stats that are available for all jobs in common
  3460  type JobStats struct {
  3461  	// CompletedWorkItemCount - Completed work item count.
  3462  	CompletedWorkItemCount *int32 `json:"completedWorkItemCount,omitempty"`
  3463  	// TotalWorkItemCount - Total work item count.
  3464  	TotalWorkItemCount *int32 `json:"totalWorkItemCount,omitempty"`
  3465  	// EstimatedTimeRemaining - The estimated time remaining.
  3466  	EstimatedTimeRemaining *int32 `json:"estimatedTimeRemaining,omitempty"`
  3467  }
  3468  
  3469  // Manager the StorSimple Manager
  3470  type Manager struct {
  3471  	autorest.Response `json:"-"`
  3472  	// ManagerProperties - List of properties of the Manager
  3473  	*ManagerProperties `json:"properties,omitempty"`
  3474  	// Etag - ETag of the Manager
  3475  	Etag *string `json:"etag,omitempty"`
  3476  	// ID - READ-ONLY; The Resource Id
  3477  	ID *string `json:"id,omitempty"`
  3478  	// Name - READ-ONLY; The Resource Name
  3479  	Name *string `json:"name,omitempty"`
  3480  	// Type - READ-ONLY; The Resource type
  3481  	Type *string `json:"type,omitempty"`
  3482  	// Location - The Geo location of the Manager
  3483  	Location *string `json:"location,omitempty"`
  3484  	// Tags - Tags attached to the Manager
  3485  	Tags map[string]*string `json:"tags"`
  3486  }
  3487  
  3488  // MarshalJSON is the custom marshaler for Manager.
  3489  func (mVar Manager) MarshalJSON() ([]byte, error) {
  3490  	objectMap := make(map[string]interface{})
  3491  	if mVar.ManagerProperties != nil {
  3492  		objectMap["properties"] = mVar.ManagerProperties
  3493  	}
  3494  	if mVar.Etag != nil {
  3495  		objectMap["etag"] = mVar.Etag
  3496  	}
  3497  	if mVar.Location != nil {
  3498  		objectMap["location"] = mVar.Location
  3499  	}
  3500  	if mVar.Tags != nil {
  3501  		objectMap["tags"] = mVar.Tags
  3502  	}
  3503  	return json.Marshal(objectMap)
  3504  }
  3505  
  3506  // UnmarshalJSON is the custom unmarshaler for Manager struct.
  3507  func (mVar *Manager) UnmarshalJSON(body []byte) error {
  3508  	var m map[string]*json.RawMessage
  3509  	err := json.Unmarshal(body, &m)
  3510  	if err != nil {
  3511  		return err
  3512  	}
  3513  	for k, v := range m {
  3514  		switch k {
  3515  		case "properties":
  3516  			if v != nil {
  3517  				var managerProperties ManagerProperties
  3518  				err = json.Unmarshal(*v, &managerProperties)
  3519  				if err != nil {
  3520  					return err
  3521  				}
  3522  				mVar.ManagerProperties = &managerProperties
  3523  			}
  3524  		case "etag":
  3525  			if v != nil {
  3526  				var etag string
  3527  				err = json.Unmarshal(*v, &etag)
  3528  				if err != nil {
  3529  					return err
  3530  				}
  3531  				mVar.Etag = &etag
  3532  			}
  3533  		case "id":
  3534  			if v != nil {
  3535  				var ID string
  3536  				err = json.Unmarshal(*v, &ID)
  3537  				if err != nil {
  3538  					return err
  3539  				}
  3540  				mVar.ID = &ID
  3541  			}
  3542  		case "name":
  3543  			if v != nil {
  3544  				var name string
  3545  				err = json.Unmarshal(*v, &name)
  3546  				if err != nil {
  3547  					return err
  3548  				}
  3549  				mVar.Name = &name
  3550  			}
  3551  		case "type":
  3552  			if v != nil {
  3553  				var typeVar string
  3554  				err = json.Unmarshal(*v, &typeVar)
  3555  				if err != nil {
  3556  					return err
  3557  				}
  3558  				mVar.Type = &typeVar
  3559  			}
  3560  		case "location":
  3561  			if v != nil {
  3562  				var location string
  3563  				err = json.Unmarshal(*v, &location)
  3564  				if err != nil {
  3565  					return err
  3566  				}
  3567  				mVar.Location = &location
  3568  			}
  3569  		case "tags":
  3570  			if v != nil {
  3571  				var tags map[string]*string
  3572  				err = json.Unmarshal(*v, &tags)
  3573  				if err != nil {
  3574  					return err
  3575  				}
  3576  				mVar.Tags = tags
  3577  			}
  3578  		}
  3579  	}
  3580  
  3581  	return nil
  3582  }
  3583  
  3584  // ManagerExtendedInfo the extended info of the manager.
  3585  type ManagerExtendedInfo struct {
  3586  	autorest.Response `json:"-"`
  3587  	// ManagerExtendedInfoProperties - The extended info properties.
  3588  	*ManagerExtendedInfoProperties `json:"properties,omitempty"`
  3589  	// Etag - ETag of the Resource
  3590  	Etag *string `json:"etag,omitempty"`
  3591  	// ID - READ-ONLY; The identifier.
  3592  	ID *string `json:"id,omitempty"`
  3593  	// Name - READ-ONLY; The name.
  3594  	Name *string `json:"name,omitempty"`
  3595  	// Type - READ-ONLY; The type.
  3596  	Type *string `json:"type,omitempty"`
  3597  }
  3598  
  3599  // MarshalJSON is the custom marshaler for ManagerExtendedInfo.
  3600  func (mei ManagerExtendedInfo) MarshalJSON() ([]byte, error) {
  3601  	objectMap := make(map[string]interface{})
  3602  	if mei.ManagerExtendedInfoProperties != nil {
  3603  		objectMap["properties"] = mei.ManagerExtendedInfoProperties
  3604  	}
  3605  	if mei.Etag != nil {
  3606  		objectMap["etag"] = mei.Etag
  3607  	}
  3608  	return json.Marshal(objectMap)
  3609  }
  3610  
  3611  // UnmarshalJSON is the custom unmarshaler for ManagerExtendedInfo struct.
  3612  func (mei *ManagerExtendedInfo) UnmarshalJSON(body []byte) error {
  3613  	var m map[string]*json.RawMessage
  3614  	err := json.Unmarshal(body, &m)
  3615  	if err != nil {
  3616  		return err
  3617  	}
  3618  	for k, v := range m {
  3619  		switch k {
  3620  		case "properties":
  3621  			if v != nil {
  3622  				var managerExtendedInfoProperties ManagerExtendedInfoProperties
  3623  				err = json.Unmarshal(*v, &managerExtendedInfoProperties)
  3624  				if err != nil {
  3625  					return err
  3626  				}
  3627  				mei.ManagerExtendedInfoProperties = &managerExtendedInfoProperties
  3628  			}
  3629  		case "etag":
  3630  			if v != nil {
  3631  				var etag string
  3632  				err = json.Unmarshal(*v, &etag)
  3633  				if err != nil {
  3634  					return err
  3635  				}
  3636  				mei.Etag = &etag
  3637  			}
  3638  		case "id":
  3639  			if v != nil {
  3640  				var ID string
  3641  				err = json.Unmarshal(*v, &ID)
  3642  				if err != nil {
  3643  					return err
  3644  				}
  3645  				mei.ID = &ID
  3646  			}
  3647  		case "name":
  3648  			if v != nil {
  3649  				var name string
  3650  				err = json.Unmarshal(*v, &name)
  3651  				if err != nil {
  3652  					return err
  3653  				}
  3654  				mei.Name = &name
  3655  			}
  3656  		case "type":
  3657  			if v != nil {
  3658  				var typeVar string
  3659  				err = json.Unmarshal(*v, &typeVar)
  3660  				if err != nil {
  3661  					return err
  3662  				}
  3663  				mei.Type = &typeVar
  3664  			}
  3665  		}
  3666  	}
  3667  
  3668  	return nil
  3669  }
  3670  
  3671  // ManagerExtendedInfoProperties properties of the ManagerExtendedInfo
  3672  type ManagerExtendedInfoProperties struct {
  3673  	// Version - Represents the version of the ExtendedInfo object being persisted
  3674  	Version *string `json:"version,omitempty"`
  3675  	// IntegrityKey - Represents the CIK of the resource
  3676  	IntegrityKey *string `json:"integrityKey,omitempty"`
  3677  	// EncryptionKey - Represents the CEK of the resource
  3678  	EncryptionKey *string `json:"encryptionKey,omitempty"`
  3679  	// EncryptionKeyThumbprint - Represents the Cert thumbprint that was used to encrypt the CEK
  3680  	EncryptionKeyThumbprint *string `json:"encryptionKeyThumbprint,omitempty"`
  3681  	// PortalCertificateThumbprint - Represents the portal thumbprint which can be used optionally to encrypt the entire data before storing it.
  3682  	PortalCertificateThumbprint *string `json:"portalCertificateThumbprint,omitempty"`
  3683  	// Algorithm - Represents the encryption algorithm used to encrypt the other keys. None - if EncryptionKey is saved in plain text format. AlgorithmName - if encryption is used
  3684  	Algorithm *string `json:"algorithm,omitempty"`
  3685  }
  3686  
  3687  // ManagerIntrinsicSettings intrinsic settings which refers to the type of the StorSimple manager
  3688  type ManagerIntrinsicSettings struct {
  3689  	// Type - Refers to the type of the StorSimple Manager. Possible values include: 'GardaV1', 'HelsinkiV1'
  3690  	Type ManagerType `json:"type,omitempty"`
  3691  }
  3692  
  3693  // ManagerList list of StorSimple Managers under a particular resourceGroup
  3694  type ManagerList struct {
  3695  	autorest.Response `json:"-"`
  3696  	// Value - List of Managers
  3697  	Value *[]Manager `json:"value,omitempty"`
  3698  }
  3699  
  3700  // ManagerPatch the StorSimple Manager patch.
  3701  type ManagerPatch struct {
  3702  	// Tags - The tags attached to the StorSimple Manager.
  3703  	Tags map[string]*string `json:"tags"`
  3704  }
  3705  
  3706  // MarshalJSON is the custom marshaler for ManagerPatch.
  3707  func (mp ManagerPatch) MarshalJSON() ([]byte, error) {
  3708  	objectMap := make(map[string]interface{})
  3709  	if mp.Tags != nil {
  3710  		objectMap["tags"] = mp.Tags
  3711  	}
  3712  	return json.Marshal(objectMap)
  3713  }
  3714  
  3715  // ManagerProperties the properties of the Manager
  3716  type ManagerProperties struct {
  3717  	// CisIntrinsicSettings - Specifies if the Manager is Garda or Helsinki
  3718  	CisIntrinsicSettings *ManagerIntrinsicSettings `json:"cisIntrinsicSettings,omitempty"`
  3719  	// Sku - Specifies the Sku
  3720  	Sku *ManagerSku `json:"sku,omitempty"`
  3721  	// ProvisioningState - READ-ONLY; Specifies the state of the resource as it is getting provisioned. Value of "Succeeded" means the Manager was successfully created
  3722  	ProvisioningState *string `json:"provisioningState,omitempty"`
  3723  }
  3724  
  3725  // MarshalJSON is the custom marshaler for ManagerProperties.
  3726  func (mp ManagerProperties) MarshalJSON() ([]byte, error) {
  3727  	objectMap := make(map[string]interface{})
  3728  	if mp.CisIntrinsicSettings != nil {
  3729  		objectMap["cisIntrinsicSettings"] = mp.CisIntrinsicSettings
  3730  	}
  3731  	if mp.Sku != nil {
  3732  		objectMap["sku"] = mp.Sku
  3733  	}
  3734  	return json.Marshal(objectMap)
  3735  }
  3736  
  3737  // ManagerSku the Sku.
  3738  type ManagerSku struct {
  3739  	// Name - Refers to the sku name which should be "Standard"
  3740  	Name *string `json:"name,omitempty"`
  3741  }
  3742  
  3743  // Message ...
  3744  type Message struct {
  3745  	Language *string `json:"language,omitempty"`
  3746  	Value    *string `json:"value,omitempty"`
  3747  }
  3748  
  3749  // MetricAvailablity metric availability specifies the time grain (aggregation interval or frequency) and
  3750  // the retention period for that time grain
  3751  type MetricAvailablity struct {
  3752  	// TimeGrain - The time grain, specifies the aggregation interval for the metric.
  3753  	TimeGrain *string `json:"timeGrain,omitempty"`
  3754  	// Retention - The retention period for the metric at the specified timegrain
  3755  	Retention *string `json:"retention,omitempty"`
  3756  }
  3757  
  3758  // MetricData the metric data.
  3759  type MetricData struct {
  3760  	// TimeStamp - The time when the metric data is fetched
  3761  	TimeStamp *date.Time `json:"timeStamp,omitempty"`
  3762  	// Sum - The sum of all the samples available in the given instance of time for the specific metric data
  3763  	Sum *float64 `json:"sum,omitempty"`
  3764  	// Count - The count of samples of the metric data available for the given instance
  3765  	Count *int32 `json:"count,omitempty"`
  3766  	// Average - The average of all sample for the given instance
  3767  	Average *float64 `json:"average,omitempty"`
  3768  	// Minimum - The minimum of all samples available
  3769  	Minimum *float64 `json:"minimum,omitempty"`
  3770  	// Maximum - The maximum of all samples available
  3771  	Maximum *float64 `json:"maximum,omitempty"`
  3772  }
  3773  
  3774  // MetricDefinition monitoring metric definition represents the metadata of the metrics.
  3775  type MetricDefinition struct {
  3776  	// Name - The metric name
  3777  	Name *MetricName `json:"name,omitempty"`
  3778  	// Unit - The metric unit. Possible values include: 'Bytes', 'BytesPerSecond', 'Count', 'CountPerSecond', 'Percent', 'Seconds'
  3779  	Unit MetricUnit `json:"unit,omitempty"`
  3780  	// PrimaryAggregationType - The metric aggregation type. Possible values include: 'MetricAggregationTypeAverage', 'MetricAggregationTypeLast', 'MetricAggregationTypeMaximum', 'MetricAggregationTypeMinimum', 'MetricAggregationTypeNone', 'MetricAggregationTypeTotal'
  3781  	PrimaryAggregationType MetricAggregationType `json:"primaryAggregationType,omitempty"`
  3782  	// ResourceID - The metric source id
  3783  	ResourceID *string `json:"resourceId,omitempty"`
  3784  	// MetricAvailabilities - The available metric granularities
  3785  	MetricAvailabilities *[]MetricAvailablity `json:"metricAvailabilities,omitempty"`
  3786  	// Dimensions - The supported dimensions
  3787  	Dimensions *[]MetricDimension `json:"dimensions,omitempty"`
  3788  	// Type - The metric definition type
  3789  	Type *string `json:"type,omitempty"`
  3790  }
  3791  
  3792  // MetricDefinitionList list of metric definition
  3793  type MetricDefinitionList struct {
  3794  	autorest.Response `json:"-"`
  3795  	// Value - The list of metric definition
  3796  	Value *[]MetricDefinition `json:"value,omitempty"`
  3797  }
  3798  
  3799  // MetricDimension metric dimension
  3800  type MetricDimension struct {
  3801  	// Name - Metric dimension name
  3802  	Name *string `json:"name,omitempty"`
  3803  	// Value - Metric dimension values
  3804  	Value *string `json:"value,omitempty"`
  3805  }
  3806  
  3807  // MetricFilter class representing the filters to be passed while fetching metrics
  3808  type MetricFilter struct {
  3809  	// Name - filter for name property
  3810  	Name *MetricNameFilter `json:"name,omitempty"`
  3811  	// StartTime - starttime for fetching metrics
  3812  	StartTime *date.Time `json:"startTime,omitempty"`
  3813  	// EndTime - endtime for fetching metrics
  3814  	EndTime *date.Time `json:"endTime,omitempty"`
  3815  	// TimeGrain - timegrain of the metrics
  3816  	TimeGrain *string `json:"timeGrain,omitempty"`
  3817  }
  3818  
  3819  // MetricList collection of metrics
  3820  type MetricList struct {
  3821  	autorest.Response `json:"-"`
  3822  	// Value - The value.
  3823  	Value *[]Metrics `json:"value,omitempty"`
  3824  }
  3825  
  3826  // MetricName the name of the metric
  3827  type MetricName struct {
  3828  	// Value - Name of the metric
  3829  	Value *string `json:"value,omitempty"`
  3830  	// LocalizedValue - Localized name of the metric
  3831  	LocalizedValue *string `json:"localizedValue,omitempty"`
  3832  }
  3833  
  3834  // MetricNameFilter class representing the name filter to be passed while fetching metrics
  3835  type MetricNameFilter struct {
  3836  	// Value - The value.
  3837  	Value *string `json:"value,omitempty"`
  3838  }
  3839  
  3840  // Metrics monitoring metric
  3841  type Metrics struct {
  3842  	// ResourceID - The id of metric source
  3843  	ResourceID *string `json:"resourceId,omitempty"`
  3844  	// StartTime - The metric start time
  3845  	StartTime *date.Time `json:"startTime,omitempty"`
  3846  	// EndTime - The metric end time
  3847  	EndTime *date.Time `json:"endTime,omitempty"`
  3848  	// TimeGrain - The time grain, time grain indicates frequency of the metric data
  3849  	TimeGrain *string `json:"timeGrain,omitempty"`
  3850  	// PrimaryAggregation - The metric aggregation type. Possible values include: 'MetricAggregationTypeAverage', 'MetricAggregationTypeLast', 'MetricAggregationTypeMaximum', 'MetricAggregationTypeMinimum', 'MetricAggregationTypeNone', 'MetricAggregationTypeTotal'
  3851  	PrimaryAggregation MetricAggregationType `json:"primaryAggregation,omitempty"`
  3852  	// Name - The name of the metrics
  3853  	Name *MetricName `json:"name,omitempty"`
  3854  	// Dimensions - The Metric dimension which indicates the source of the metric
  3855  	Dimensions *[]MetricDimension `json:"dimensions,omitempty"`
  3856  	// Unit - The unit of the metric data. Possible values include: 'Bytes', 'BytesPerSecond', 'Count', 'CountPerSecond', 'Percent', 'Seconds'
  3857  	Unit MetricUnit `json:"unit,omitempty"`
  3858  	// Type - The Type of the metric data
  3859  	Type *string `json:"type,omitempty"`
  3860  	// Values - The metric data
  3861  	Values *[]MetricData `json:"values,omitempty"`
  3862  }
  3863  
  3864  // NetworkAdapter represents a networkAdapter in a particular node.
  3865  type NetworkAdapter struct {
  3866  	// NetworkAdapterName - The name of the network adapter.
  3867  	NetworkAdapterName *string `json:"networkAdapterName,omitempty"`
  3868  	// IPv4Info - The ipv4 configuration of the network adapter.
  3869  	IPv4Info *IPConfig `json:"iPv4Info,omitempty"`
  3870  	// IPv6Info - The ipv6 configuration of the network adapter.
  3871  	IPv6Info *IPConfig `json:"iPv6Info,omitempty"`
  3872  	// DhcpStatus - Represents state of DHCP. Possible values include: 'DhcpStatusEnabled', 'DhcpStatusDisabled'
  3873  	DhcpStatus DhcpStatus `json:"dhcpStatus,omitempty"`
  3874  	// LinkSpeed - The speed of the network adapter.
  3875  	LinkSpeed *int64 `json:"linkSpeed,omitempty"`
  3876  }
  3877  
  3878  // NetworkSettings the NetworkSettings of a device
  3879  type NetworkSettings struct {
  3880  	autorest.Response `json:"-"`
  3881  	// NetworkSettingsProperties - Properties of the given NetworkSettings.
  3882  	*NetworkSettingsProperties `json:"properties,omitempty"`
  3883  	// ID - READ-ONLY; The identifier.
  3884  	ID *string `json:"id,omitempty"`
  3885  	// Name - READ-ONLY; The name.
  3886  	Name *string `json:"name,omitempty"`
  3887  	// Type - READ-ONLY; The type.
  3888  	Type *string `json:"type,omitempty"`
  3889  }
  3890  
  3891  // MarshalJSON is the custom marshaler for NetworkSettings.
  3892  func (ns NetworkSettings) MarshalJSON() ([]byte, error) {
  3893  	objectMap := make(map[string]interface{})
  3894  	if ns.NetworkSettingsProperties != nil {
  3895  		objectMap["properties"] = ns.NetworkSettingsProperties
  3896  	}
  3897  	return json.Marshal(objectMap)
  3898  }
  3899  
  3900  // UnmarshalJSON is the custom unmarshaler for NetworkSettings struct.
  3901  func (ns *NetworkSettings) UnmarshalJSON(body []byte) error {
  3902  	var m map[string]*json.RawMessage
  3903  	err := json.Unmarshal(body, &m)
  3904  	if err != nil {
  3905  		return err
  3906  	}
  3907  	for k, v := range m {
  3908  		switch k {
  3909  		case "properties":
  3910  			if v != nil {
  3911  				var networkSettingsProperties NetworkSettingsProperties
  3912  				err = json.Unmarshal(*v, &networkSettingsProperties)
  3913  				if err != nil {
  3914  					return err
  3915  				}
  3916  				ns.NetworkSettingsProperties = &networkSettingsProperties
  3917  			}
  3918  		case "id":
  3919  			if v != nil {
  3920  				var ID string
  3921  				err = json.Unmarshal(*v, &ID)
  3922  				if err != nil {
  3923  					return err
  3924  				}
  3925  				ns.ID = &ID
  3926  			}
  3927  		case "name":
  3928  			if v != nil {
  3929  				var name string
  3930  				err = json.Unmarshal(*v, &name)
  3931  				if err != nil {
  3932  					return err
  3933  				}
  3934  				ns.Name = &name
  3935  			}
  3936  		case "type":
  3937  			if v != nil {
  3938  				var typeVar string
  3939  				err = json.Unmarshal(*v, &typeVar)
  3940  				if err != nil {
  3941  					return err
  3942  				}
  3943  				ns.Type = &typeVar
  3944  			}
  3945  		}
  3946  	}
  3947  
  3948  	return nil
  3949  }
  3950  
  3951  // NetworkSettingsProperties the properties of NetworkSettings
  3952  type NetworkSettingsProperties struct {
  3953  	// PrimaryDNSServer - The Primary DNS server for the device
  3954  	PrimaryDNSServer *string `json:"primaryDnsServer,omitempty"`
  3955  	// SecondaryDNSServer - The secondary DNS server for the device
  3956  	SecondaryDNSServer *string `json:"secondaryDnsServer,omitempty"`
  3957  	// NodeNetworks - The NetworkAdapters under each node of the device.
  3958  	NodeNetworks *[]NodeNetwork `json:"nodeNetworks,omitempty"`
  3959  }
  3960  
  3961  // NodeNetwork represents a single node in a device.
  3962  type NodeNetwork struct {
  3963  	// NetworkAdapters - The array of network adapters in the node.
  3964  	NetworkAdapters *[]NetworkAdapter `json:"networkAdapters,omitempty"`
  3965  }
  3966  
  3967  // RawCertificateData raw Certificate Data From IDM
  3968  type RawCertificateData struct {
  3969  	// AuthType - Specify the Authentication type. Possible values include: 'Invalid', 'AccessControlService', 'AzureActiveDirectory'
  3970  	AuthType AuthType `json:"authType,omitempty"`
  3971  	// Certificate - Gets or sets the base64 encoded certificate raw data string
  3972  	Certificate *string `json:"certificate,omitempty"`
  3973  }
  3974  
  3975  // Resource the Azure Resource.
  3976  type Resource struct {
  3977  	// ID - READ-ONLY; The Resource Id
  3978  	ID *string `json:"id,omitempty"`
  3979  	// Name - READ-ONLY; The Resource Name
  3980  	Name *string `json:"name,omitempty"`
  3981  	// Type - READ-ONLY; The Resource type
  3982  	Type *string `json:"type,omitempty"`
  3983  	// Location - The Geo location of the Manager
  3984  	Location *string `json:"location,omitempty"`
  3985  	// Tags - Tags attached to the Manager
  3986  	Tags map[string]*string `json:"tags"`
  3987  }
  3988  
  3989  // MarshalJSON is the custom marshaler for Resource.
  3990  func (r Resource) MarshalJSON() ([]byte, error) {
  3991  	objectMap := make(map[string]interface{})
  3992  	if r.Location != nil {
  3993  		objectMap["location"] = r.Location
  3994  	}
  3995  	if r.Tags != nil {
  3996  		objectMap["tags"] = r.Tags
  3997  	}
  3998  	return json.Marshal(objectMap)
  3999  }
  4000  
  4001  // ResourceCertificateAndAADDetails resource Certificate And AAD Details from IDM
  4002  type ResourceCertificateAndAADDetails struct {
  4003  	// AuthType - Specify the Authentication type. Possible values include: 'Invalid', 'AccessControlService', 'AzureActiveDirectory'
  4004  	AuthType AuthType `json:"authType,omitempty"`
  4005  	// Certificate - Gets or sets the base64 encoded certificate raw data string
  4006  	Certificate *string `json:"certificate,omitempty"`
  4007  	// ResourceID - Gets or Sets the ResourceId
  4008  	ResourceID *int64 `json:"resourceId,omitempty"`
  4009  	// AadAuthority - AAD tenant authority
  4010  	AadAuthority *string `json:"aadAuthority,omitempty"`
  4011  	// AadTenantID - AAD tenant Id
  4012  	AadTenantID *string `json:"aadTenantId,omitempty"`
  4013  	// ServicePrincipalClientID - AAD service principal clientId
  4014  	ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
  4015  	// ServicePrincipalObjectID - AAD service principal ObjectId
  4016  	ServicePrincipalObjectID *string `json:"servicePrincipalObjectId,omitempty"`
  4017  	// AzureManagementEndpointAudience - Azure Management Endpoint Audience
  4018  	AzureManagementEndpointAudience *string `json:"azureManagementEndpointAudience,omitempty"`
  4019  	// Subject - Certificate Subject Name
  4020  	Subject *string `json:"subject,omitempty"`
  4021  	// ValidFrom - Certificate Validity start Date time
  4022  	ValidFrom *date.Time `json:"validFrom,omitempty"`
  4023  	// ValidTo - Certificate Validity End Date time
  4024  	ValidTo *date.Time `json:"validTo,omitempty"`
  4025  	// Thumbprint - Certificate thumbprint
  4026  	Thumbprint *string `json:"thumbprint,omitempty"`
  4027  	// FriendlyName - Certificate friendly name
  4028  	FriendlyName *string `json:"friendlyName,omitempty"`
  4029  	// Issuer - Certificate issuer
  4030  	Issuer *string `json:"issuer,omitempty"`
  4031  }
  4032  
  4033  // SecuritySettings the SecuritySettings of a device
  4034  type SecuritySettings struct {
  4035  	// SecuritySettingsProperties - Properties of the SecuritySettings.
  4036  	*SecuritySettingsProperties `json:"properties,omitempty"`
  4037  	// ID - READ-ONLY; The identifier.
  4038  	ID *string `json:"id,omitempty"`
  4039  	// Name - READ-ONLY; The name.
  4040  	Name *string `json:"name,omitempty"`
  4041  	// Type - READ-ONLY; The type.
  4042  	Type *string `json:"type,omitempty"`
  4043  }
  4044  
  4045  // MarshalJSON is the custom marshaler for SecuritySettings.
  4046  func (ss SecuritySettings) MarshalJSON() ([]byte, error) {
  4047  	objectMap := make(map[string]interface{})
  4048  	if ss.SecuritySettingsProperties != nil {
  4049  		objectMap["properties"] = ss.SecuritySettingsProperties
  4050  	}
  4051  	return json.Marshal(objectMap)
  4052  }
  4053  
  4054  // UnmarshalJSON is the custom unmarshaler for SecuritySettings struct.
  4055  func (ss *SecuritySettings) UnmarshalJSON(body []byte) error {
  4056  	var m map[string]*json.RawMessage
  4057  	err := json.Unmarshal(body, &m)
  4058  	if err != nil {
  4059  		return err
  4060  	}
  4061  	for k, v := range m {
  4062  		switch k {
  4063  		case "properties":
  4064  			if v != nil {
  4065  				var securitySettingsProperties SecuritySettingsProperties
  4066  				err = json.Unmarshal(*v, &securitySettingsProperties)
  4067  				if err != nil {
  4068  					return err
  4069  				}
  4070  				ss.SecuritySettingsProperties = &securitySettingsProperties
  4071  			}
  4072  		case "id":
  4073  			if v != nil {
  4074  				var ID string
  4075  				err = json.Unmarshal(*v, &ID)
  4076  				if err != nil {
  4077  					return err
  4078  				}
  4079  				ss.ID = &ID
  4080  			}
  4081  		case "name":
  4082  			if v != nil {
  4083  				var name string
  4084  				err = json.Unmarshal(*v, &name)
  4085  				if err != nil {
  4086  					return err
  4087  				}
  4088  				ss.Name = &name
  4089  			}
  4090  		case "type":
  4091  			if v != nil {
  4092  				var typeVar string
  4093  				err = json.Unmarshal(*v, &typeVar)
  4094  				if err != nil {
  4095  					return err
  4096  				}
  4097  				ss.Type = &typeVar
  4098  			}
  4099  		}
  4100  	}
  4101  
  4102  	return nil
  4103  }
  4104  
  4105  // SecuritySettingsProperties the properties of SecuritySettings
  4106  type SecuritySettingsProperties struct {
  4107  	// DeviceAdminPassword - Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to log into the  local web UI of the device. Actual password could have at least 8 characters that are a combination of  uppercase, lowercase, numeric, and special characters
  4108  	DeviceAdminPassword *AsymmetricEncryptedSecret `json:"deviceAdminPassword,omitempty"`
  4109  }
  4110  
  4111  // SendTestAlertEmailRequest request for sending test alert email
  4112  type SendTestAlertEmailRequest struct {
  4113  	// EmailList - List of emails to send the test alerts
  4114  	EmailList *[]string `json:"emailList,omitempty"`
  4115  }
  4116  
  4117  // StorageAccountCredential the storage account credential
  4118  type StorageAccountCredential struct {
  4119  	autorest.Response `json:"-"`
  4120  	// StorageAccountCredentialProperties - Credential properties
  4121  	*StorageAccountCredentialProperties `json:"properties,omitempty"`
  4122  	// ID - READ-ONLY; The identifier.
  4123  	ID *string `json:"id,omitempty"`
  4124  	// Name - READ-ONLY; The name.
  4125  	Name *string `json:"name,omitempty"`
  4126  	// Type - READ-ONLY; The type.
  4127  	Type *string `json:"type,omitempty"`
  4128  }
  4129  
  4130  // MarshalJSON is the custom marshaler for StorageAccountCredential.
  4131  func (sac StorageAccountCredential) MarshalJSON() ([]byte, error) {
  4132  	objectMap := make(map[string]interface{})
  4133  	if sac.StorageAccountCredentialProperties != nil {
  4134  		objectMap["properties"] = sac.StorageAccountCredentialProperties
  4135  	}
  4136  	return json.Marshal(objectMap)
  4137  }
  4138  
  4139  // UnmarshalJSON is the custom unmarshaler for StorageAccountCredential struct.
  4140  func (sac *StorageAccountCredential) UnmarshalJSON(body []byte) error {
  4141  	var m map[string]*json.RawMessage
  4142  	err := json.Unmarshal(body, &m)
  4143  	if err != nil {
  4144  		return err
  4145  	}
  4146  	for k, v := range m {
  4147  		switch k {
  4148  		case "properties":
  4149  			if v != nil {
  4150  				var storageAccountCredentialProperties StorageAccountCredentialProperties
  4151  				err = json.Unmarshal(*v, &storageAccountCredentialProperties)
  4152  				if err != nil {
  4153  					return err
  4154  				}
  4155  				sac.StorageAccountCredentialProperties = &storageAccountCredentialProperties
  4156  			}
  4157  		case "id":
  4158  			if v != nil {
  4159  				var ID string
  4160  				err = json.Unmarshal(*v, &ID)
  4161  				if err != nil {
  4162  					return err
  4163  				}
  4164  				sac.ID = &ID
  4165  			}
  4166  		case "name":
  4167  			if v != nil {
  4168  				var name string
  4169  				err = json.Unmarshal(*v, &name)
  4170  				if err != nil {
  4171  					return err
  4172  				}
  4173  				sac.Name = &name
  4174  			}
  4175  		case "type":
  4176  			if v != nil {
  4177  				var typeVar string
  4178  				err = json.Unmarshal(*v, &typeVar)
  4179  				if err != nil {
  4180  					return err
  4181  				}
  4182  				sac.Type = &typeVar
  4183  			}
  4184  		}
  4185  	}
  4186  
  4187  	return nil
  4188  }
  4189  
  4190  // StorageAccountCredentialList collection of Storage account credential entities
  4191  type StorageAccountCredentialList struct {
  4192  	autorest.Response `json:"-"`
  4193  	// Value - The value.
  4194  	Value *[]StorageAccountCredential `json:"value,omitempty"`
  4195  }
  4196  
  4197  // StorageAccountCredentialProperties storage account properties
  4198  type StorageAccountCredentialProperties struct {
  4199  	// CloudType - The cloud service provider. Possible values include: 'Azure', 'S3', 'S3RRS', 'OpenStack', 'HP'
  4200  	CloudType CloudType `json:"cloudType,omitempty"`
  4201  	// EndPoint - The storage endpoint
  4202  	EndPoint *string `json:"endPoint,omitempty"`
  4203  	// Login - The storage account login
  4204  	Login *string `json:"login,omitempty"`
  4205  	// Location - The storage account's geo location
  4206  	Location *string `json:"location,omitempty"`
  4207  	// EnableSSL - SSL needs to be enabled or not. Possible values include: 'SslStatusEnabled', 'SslStatusDisabled'
  4208  	EnableSSL SslStatus `json:"enableSSL,omitempty"`
  4209  	// AccessKey - The details of the storage account password
  4210  	AccessKey *AsymmetricEncryptedSecret `json:"accessKey,omitempty"`
  4211  }
  4212  
  4213  // StorageAccountCredentialsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
  4214  // of a long-running operation.
  4215  type StorageAccountCredentialsCreateOrUpdateFuture struct {
  4216  	azure.FutureAPI
  4217  	// Result returns the result of the asynchronous operation.
  4218  	// If the operation has not completed it will return an error.
  4219  	Result func(StorageAccountCredentialsClient) (StorageAccountCredential, error)
  4220  }
  4221  
  4222  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4223  func (future *StorageAccountCredentialsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  4224  	var azFuture azure.Future
  4225  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4226  		return err
  4227  	}
  4228  	future.FutureAPI = &azFuture
  4229  	future.Result = future.result
  4230  	return nil
  4231  }
  4232  
  4233  // result is the default implementation for StorageAccountCredentialsCreateOrUpdateFuture.Result.
  4234  func (future *StorageAccountCredentialsCreateOrUpdateFuture) result(client StorageAccountCredentialsClient) (sac StorageAccountCredential, err error) {
  4235  	var done bool
  4236  	done, err = future.DoneWithContext(context.Background(), client)
  4237  	if err != nil {
  4238  		err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  4239  		return
  4240  	}
  4241  	if !done {
  4242  		sac.Response.Response = future.Response()
  4243  		err = azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsCreateOrUpdateFuture")
  4244  		return
  4245  	}
  4246  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4247  	if sac.Response.Response, err = future.GetResult(sender); err == nil && sac.Response.Response.StatusCode != http.StatusNoContent {
  4248  		sac, err = client.CreateOrUpdateResponder(sac.Response.Response)
  4249  		if err != nil {
  4250  			err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", sac.Response.Response, "Failure responding to request")
  4251  		}
  4252  	}
  4253  	return
  4254  }
  4255  
  4256  // StorageAccountCredentialsDeleteFuture an abstraction for monitoring and retrieving the results of a
  4257  // long-running operation.
  4258  type StorageAccountCredentialsDeleteFuture struct {
  4259  	azure.FutureAPI
  4260  	// Result returns the result of the asynchronous operation.
  4261  	// If the operation has not completed it will return an error.
  4262  	Result func(StorageAccountCredentialsClient) (autorest.Response, error)
  4263  }
  4264  
  4265  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4266  func (future *StorageAccountCredentialsDeleteFuture) UnmarshalJSON(body []byte) error {
  4267  	var azFuture azure.Future
  4268  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4269  		return err
  4270  	}
  4271  	future.FutureAPI = &azFuture
  4272  	future.Result = future.result
  4273  	return nil
  4274  }
  4275  
  4276  // result is the default implementation for StorageAccountCredentialsDeleteFuture.Result.
  4277  func (future *StorageAccountCredentialsDeleteFuture) result(client StorageAccountCredentialsClient) (ar autorest.Response, err error) {
  4278  	var done bool
  4279  	done, err = future.DoneWithContext(context.Background(), client)
  4280  	if err != nil {
  4281  		err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsDeleteFuture", "Result", future.Response(), "Polling failure")
  4282  		return
  4283  	}
  4284  	if !done {
  4285  		ar.Response = future.Response()
  4286  		err = azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsDeleteFuture")
  4287  		return
  4288  	}
  4289  	ar.Response = future.Response()
  4290  	return
  4291  }
  4292  
  4293  // StorageDomain the storage domain.
  4294  type StorageDomain struct {
  4295  	autorest.Response `json:"-"`
  4296  	// StorageDomainProperties - The properties.
  4297  	*StorageDomainProperties `json:"properties,omitempty"`
  4298  	// ID - READ-ONLY; The identifier.
  4299  	ID *string `json:"id,omitempty"`
  4300  	// Name - READ-ONLY; The name.
  4301  	Name *string `json:"name,omitempty"`
  4302  	// Type - READ-ONLY; The type.
  4303  	Type *string `json:"type,omitempty"`
  4304  }
  4305  
  4306  // MarshalJSON is the custom marshaler for StorageDomain.
  4307  func (sd StorageDomain) MarshalJSON() ([]byte, error) {
  4308  	objectMap := make(map[string]interface{})
  4309  	if sd.StorageDomainProperties != nil {
  4310  		objectMap["properties"] = sd.StorageDomainProperties
  4311  	}
  4312  	return json.Marshal(objectMap)
  4313  }
  4314  
  4315  // UnmarshalJSON is the custom unmarshaler for StorageDomain struct.
  4316  func (sd *StorageDomain) UnmarshalJSON(body []byte) error {
  4317  	var m map[string]*json.RawMessage
  4318  	err := json.Unmarshal(body, &m)
  4319  	if err != nil {
  4320  		return err
  4321  	}
  4322  	for k, v := range m {
  4323  		switch k {
  4324  		case "properties":
  4325  			if v != nil {
  4326  				var storageDomainProperties StorageDomainProperties
  4327  				err = json.Unmarshal(*v, &storageDomainProperties)
  4328  				if err != nil {
  4329  					return err
  4330  				}
  4331  				sd.StorageDomainProperties = &storageDomainProperties
  4332  			}
  4333  		case "id":
  4334  			if v != nil {
  4335  				var ID string
  4336  				err = json.Unmarshal(*v, &ID)
  4337  				if err != nil {
  4338  					return err
  4339  				}
  4340  				sd.ID = &ID
  4341  			}
  4342  		case "name":
  4343  			if v != nil {
  4344  				var name string
  4345  				err = json.Unmarshal(*v, &name)
  4346  				if err != nil {
  4347  					return err
  4348  				}
  4349  				sd.Name = &name
  4350  			}
  4351  		case "type":
  4352  			if v != nil {
  4353  				var typeVar string
  4354  				err = json.Unmarshal(*v, &typeVar)
  4355  				if err != nil {
  4356  					return err
  4357  				}
  4358  				sd.Type = &typeVar
  4359  			}
  4360  		}
  4361  	}
  4362  
  4363  	return nil
  4364  }
  4365  
  4366  // StorageDomainList collection of storage domains
  4367  type StorageDomainList struct {
  4368  	autorest.Response `json:"-"`
  4369  	// Value - The value.
  4370  	Value *[]StorageDomain `json:"value,omitempty"`
  4371  }
  4372  
  4373  // StorageDomainProperties the storage domain properties.
  4374  type StorageDomainProperties struct {
  4375  	// StorageAccountCredentialIds - The storage account credentials.
  4376  	StorageAccountCredentialIds *[]string `json:"storageAccountCredentialIds,omitempty"`
  4377  	// EncryptionKey - The encryption key used to encrypt the data. This is a user secret.
  4378  	EncryptionKey *AsymmetricEncryptedSecret `json:"encryptionKey,omitempty"`
  4379  	// EncryptionStatus - The encryption status "Enabled | Disabled". Possible values include: 'EncryptionStatusEnabled', 'EncryptionStatusDisabled'
  4380  	EncryptionStatus EncryptionStatus `json:"encryptionStatus,omitempty"`
  4381  }
  4382  
  4383  // StorageDomainsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  4384  // long-running operation.
  4385  type StorageDomainsCreateOrUpdateFuture struct {
  4386  	azure.FutureAPI
  4387  	// Result returns the result of the asynchronous operation.
  4388  	// If the operation has not completed it will return an error.
  4389  	Result func(StorageDomainsClient) (StorageDomain, error)
  4390  }
  4391  
  4392  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4393  func (future *StorageDomainsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  4394  	var azFuture azure.Future
  4395  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4396  		return err
  4397  	}
  4398  	future.FutureAPI = &azFuture
  4399  	future.Result = future.result
  4400  	return nil
  4401  }
  4402  
  4403  // result is the default implementation for StorageDomainsCreateOrUpdateFuture.Result.
  4404  func (future *StorageDomainsCreateOrUpdateFuture) result(client StorageDomainsClient) (sd StorageDomain, err error) {
  4405  	var done bool
  4406  	done, err = future.DoneWithContext(context.Background(), client)
  4407  	if err != nil {
  4408  		err = autorest.NewErrorWithError(err, "storsimple.StorageDomainsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  4409  		return
  4410  	}
  4411  	if !done {
  4412  		sd.Response.Response = future.Response()
  4413  		err = azure.NewAsyncOpIncompleteError("storsimple.StorageDomainsCreateOrUpdateFuture")
  4414  		return
  4415  	}
  4416  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4417  	if sd.Response.Response, err = future.GetResult(sender); err == nil && sd.Response.Response.StatusCode != http.StatusNoContent {
  4418  		sd, err = client.CreateOrUpdateResponder(sd.Response.Response)
  4419  		if err != nil {
  4420  			err = autorest.NewErrorWithError(err, "storsimple.StorageDomainsCreateOrUpdateFuture", "Result", sd.Response.Response, "Failure responding to request")
  4421  		}
  4422  	}
  4423  	return
  4424  }
  4425  
  4426  // StorageDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  4427  // operation.
  4428  type StorageDomainsDeleteFuture struct {
  4429  	azure.FutureAPI
  4430  	// Result returns the result of the asynchronous operation.
  4431  	// If the operation has not completed it will return an error.
  4432  	Result func(StorageDomainsClient) (autorest.Response, error)
  4433  }
  4434  
  4435  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  4436  func (future *StorageDomainsDeleteFuture) UnmarshalJSON(body []byte) error {
  4437  	var azFuture azure.Future
  4438  	if err := json.Unmarshal(body, &azFuture); err != nil {
  4439  		return err
  4440  	}
  4441  	future.FutureAPI = &azFuture
  4442  	future.Result = future.result
  4443  	return nil
  4444  }
  4445  
  4446  // result is the default implementation for StorageDomainsDeleteFuture.Result.
  4447  func (future *StorageDomainsDeleteFuture) result(client StorageDomainsClient) (ar autorest.Response, err error) {
  4448  	var done bool
  4449  	done, err = future.DoneWithContext(context.Background(), client)
  4450  	if err != nil {
  4451  		err = autorest.NewErrorWithError(err, "storsimple.StorageDomainsDeleteFuture", "Result", future.Response(), "Polling failure")
  4452  		return
  4453  	}
  4454  	if !done {
  4455  		ar.Response = future.Response()
  4456  		err = azure.NewAsyncOpIncompleteError("storsimple.StorageDomainsDeleteFuture")
  4457  		return
  4458  	}
  4459  	ar.Response = future.Response()
  4460  	return
  4461  }
  4462  
  4463  // SymmetricEncryptedSecret this class can be used as the Type for any secret entity represented as Value,
  4464  // ValueCertificateThumbprint, EncryptionAlgorithm. In this case, "Value" is a secret and the
  4465  // "valueThumbprint" represents the certificate thumbprint of the value. The algorithm field is mainly for
  4466  // future usage to potentially allow different entities encrypted using different algorithms.
  4467  type SymmetricEncryptedSecret struct {
  4468  	autorest.Response `json:"-"`
  4469  	// Value - The value of the secret itself. If the secret is in plaintext or null then EncryptionAlgorithm will be none
  4470  	Value *string `json:"value,omitempty"`
  4471  	// ValueCertificateThumbprint - Thumbprint cert that was used to encrypt "Value"
  4472  	ValueCertificateThumbprint *string `json:"valueCertificateThumbprint,omitempty"`
  4473  	// EncryptionAlgorithm - Algorithm used to encrypt "Value". Possible values include: 'EncryptionAlgorithmNone', 'EncryptionAlgorithmAES256', 'EncryptionAlgorithmRSAESPKCS1V15'
  4474  	EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"`
  4475  }
  4476  
  4477  // Time the Time.
  4478  type Time struct {
  4479  	// Hour - The hour.
  4480  	Hour *int32 `json:"hour,omitempty"`
  4481  	// Minute - The minute.
  4482  	Minute *int32 `json:"minute,omitempty"`
  4483  }
  4484  
  4485  // TimeSettings the TimeSettings of a device
  4486  type TimeSettings struct {
  4487  	autorest.Response `json:"-"`
  4488  	// TimeSettingsProperties - Properties of the TimeSettings.
  4489  	*TimeSettingsProperties `json:"properties,omitempty"`
  4490  	// ID - READ-ONLY; The identifier.
  4491  	ID *string `json:"id,omitempty"`
  4492  	// Name - READ-ONLY; The name.
  4493  	Name *string `json:"name,omitempty"`
  4494  	// Type - READ-ONLY; The type.
  4495  	Type *string `json:"type,omitempty"`
  4496  }
  4497  
  4498  // MarshalJSON is the custom marshaler for TimeSettings.
  4499  func (ts TimeSettings) MarshalJSON() ([]byte, error) {
  4500  	objectMap := make(map[string]interface{})
  4501  	if ts.TimeSettingsProperties != nil {
  4502  		objectMap["properties"] = ts.TimeSettingsProperties
  4503  	}
  4504  	return json.Marshal(objectMap)
  4505  }
  4506  
  4507  // UnmarshalJSON is the custom unmarshaler for TimeSettings struct.
  4508  func (ts *TimeSettings) UnmarshalJSON(body []byte) error {
  4509  	var m map[string]*json.RawMessage
  4510  	err := json.Unmarshal(body, &m)
  4511  	if err != nil {
  4512  		return err
  4513  	}
  4514  	for k, v := range m {
  4515  		switch k {
  4516  		case "properties":
  4517  			if v != nil {
  4518  				var timeSettingsProperties TimeSettingsProperties
  4519  				err = json.Unmarshal(*v, &timeSettingsProperties)
  4520  				if err != nil {
  4521  					return err
  4522  				}
  4523  				ts.TimeSettingsProperties = &timeSettingsProperties
  4524  			}
  4525  		case "id":
  4526  			if v != nil {
  4527  				var ID string
  4528  				err = json.Unmarshal(*v, &ID)
  4529  				if err != nil {
  4530  					return err
  4531  				}
  4532  				ts.ID = &ID
  4533  			}
  4534  		case "name":
  4535  			if v != nil {
  4536  				var name string
  4537  				err = json.Unmarshal(*v, &name)
  4538  				if err != nil {
  4539  					return err
  4540  				}
  4541  				ts.Name = &name
  4542  			}
  4543  		case "type":
  4544  			if v != nil {
  4545  				var typeVar string
  4546  				err = json.Unmarshal(*v, &typeVar)
  4547  				if err != nil {
  4548  					return err
  4549  				}
  4550  				ts.Type = &typeVar
  4551  			}
  4552  		}
  4553  	}
  4554  
  4555  	return nil
  4556  }
  4557  
  4558  // TimeSettingsProperties the properties of TimeSettings
  4559  type TimeSettingsProperties struct {
  4560  	// TimeZone - The timezone of device, like '(UTC -06:00) Central America'
  4561  	TimeZone *string `json:"timeZone,omitempty"`
  4562  	// PrimaryTimeServer - The primary Network Time Protocol (NTP) server name, like 'time.windows.com'.
  4563  	PrimaryTimeServer *string `json:"primaryTimeServer,omitempty"`
  4564  	// SecondaryTimeServer - The secondary Network Time Protocol (NTP) server name, like 'time.contoso.com'. It's optional.
  4565  	SecondaryTimeServer *string `json:"secondaryTimeServer,omitempty"`
  4566  }
  4567  
  4568  // UpdateDownloadProgress details available during the download
  4569  type UpdateDownloadProgress struct {
  4570  	// DownloadPhase - The download phase. Possible values include: 'DownloadPhaseUnknown', 'DownloadPhaseInitializing', 'DownloadPhaseDownloading', 'DownloadPhaseVerifying'
  4571  	DownloadPhase DownloadPhase `json:"downloadPhase,omitempty"`
  4572  	// PercentComplete - Percentage of completion.
  4573  	PercentComplete *int32 `json:"percentComplete,omitempty"`
  4574  	// TotalBytesToDownload - Total bytes to download.
  4575  	TotalBytesToDownload *float64 `json:"totalBytesToDownload,omitempty"`
  4576  	// TotalBytesDownloaded - Total bytes downloaded.
  4577  	TotalBytesDownloaded *float64 `json:"totalBytesDownloaded,omitempty"`
  4578  	// NumberOfUpdatesToDownload - Number of updates to download.
  4579  	NumberOfUpdatesToDownload *int32 `json:"numberOfUpdatesToDownload,omitempty"`
  4580  	// NumberOfUpdatesDownloaded - Number of updates downloaded.
  4581  	NumberOfUpdatesDownloaded *int32 `json:"numberOfUpdatesDownloaded,omitempty"`
  4582  }
  4583  
  4584  // UpdateInstallProgress class representing the progress during installation of updates
  4585  type UpdateInstallProgress struct {
  4586  	// PercentComplete - Percentage of completion.
  4587  	PercentComplete *int32 `json:"percentComplete,omitempty"`
  4588  	// NumberOfUpdatesToInstall - Number of updates to install.
  4589  	NumberOfUpdatesToInstall *int32 `json:"numberOfUpdatesToInstall,omitempty"`
  4590  	// NumberOfUpdatesInstalled - Number of updates installed.
  4591  	NumberOfUpdatesInstalled *int32 `json:"numberOfUpdatesInstalled,omitempty"`
  4592  }
  4593  
  4594  // Updates the updates profile
  4595  type Updates struct {
  4596  	autorest.Response `json:"-"`
  4597  	// UpdatesProperties - Update properties.
  4598  	*UpdatesProperties `json:"properties,omitempty"`
  4599  	// ID - READ-ONLY; The identifier.
  4600  	ID *string `json:"id,omitempty"`
  4601  	// Name - READ-ONLY; The name.
  4602  	Name *string `json:"name,omitempty"`
  4603  	// Type - READ-ONLY; The type.
  4604  	Type *string `json:"type,omitempty"`
  4605  }
  4606  
  4607  // MarshalJSON is the custom marshaler for Updates.
  4608  func (u Updates) MarshalJSON() ([]byte, error) {
  4609  	objectMap := make(map[string]interface{})
  4610  	if u.UpdatesProperties != nil {
  4611  		objectMap["properties"] = u.UpdatesProperties
  4612  	}
  4613  	return json.Marshal(objectMap)
  4614  }
  4615  
  4616  // UnmarshalJSON is the custom unmarshaler for Updates struct.
  4617  func (u *Updates) UnmarshalJSON(body []byte) error {
  4618  	var m map[string]*json.RawMessage
  4619  	err := json.Unmarshal(body, &m)
  4620  	if err != nil {
  4621  		return err
  4622  	}
  4623  	for k, v := range m {
  4624  		switch k {
  4625  		case "properties":
  4626  			if v != nil {
  4627  				var updatesProperties UpdatesProperties
  4628  				err = json.Unmarshal(*v, &updatesProperties)
  4629  				if err != nil {
  4630  					return err
  4631  				}
  4632  				u.UpdatesProperties = &updatesProperties
  4633  			}
  4634  		case "id":
  4635  			if v != nil {
  4636  				var ID string
  4637  				err = json.Unmarshal(*v, &ID)
  4638  				if err != nil {
  4639  					return err
  4640  				}
  4641  				u.ID = &ID
  4642  			}
  4643  		case "name":
  4644  			if v != nil {
  4645  				var name string
  4646  				err = json.Unmarshal(*v, &name)
  4647  				if err != nil {
  4648  					return err
  4649  				}
  4650  				u.Name = &name
  4651  			}
  4652  		case "type":
  4653  			if v != nil {
  4654  				var typeVar string
  4655  				err = json.Unmarshal(*v, &typeVar)
  4656  				if err != nil {
  4657  					return err
  4658  				}
  4659  				u.Type = &typeVar
  4660  			}
  4661  		}
  4662  	}
  4663  
  4664  	return nil
  4665  }
  4666  
  4667  // UpdatesProperties properties of the update profile
  4668  type UpdatesProperties struct {
  4669  	// DeviceVersion - The current Device version.
  4670  	DeviceVersion *string `json:"deviceVersion,omitempty"`
  4671  	// DeviceLastScannedTime - The last time when the device did an update scan.
  4672  	DeviceLastScannedTime *date.Time `json:"deviceLastScannedTime,omitempty"`
  4673  	// RegularUpdatesAvailable - Set to true if regular updates were detected for the current version of the device.
  4674  	RegularUpdatesAvailable *bool `json:"regularUpdatesAvailable,omitempty"`
  4675  	// RebootRequiredForInstall - Set to true if RegularUpdatesAvailable is true and if at least one of the updateItems detected has needs a reboot to install.
  4676  	RebootRequiredForInstall *bool `json:"rebootRequiredForInstall,omitempty"`
  4677  	// TotalItemsPendingForDownload - The total number of items pending for download.
  4678  	TotalItemsPendingForDownload *int32 `json:"totalItemsPendingForDownload,omitempty"`
  4679  	// TotalItemsPendingForInstall - The total number of items pending for install.
  4680  	TotalItemsPendingForInstall *int32 `json:"totalItemsPendingForInstall,omitempty"`
  4681  	// Status - The current update operation. Possible values include: 'Idle', 'Scanning', 'Downloading', 'Installing'
  4682  	Status UpdateOperation `json:"status,omitempty"`
  4683  	// LastCompletedScanTime - The time when the last scan job was completed (success|cancelled|failed) on the device.
  4684  	LastCompletedScanTime *date.Time `json:"lastCompletedScanTime,omitempty"`
  4685  	// LastCompletedDownloadJobTime - The time when the last Download job was completed (success|cancelled|failed) on the device.
  4686  	LastCompletedDownloadJobTime *date.Time `json:"lastCompletedDownloadJobTime,omitempty"`
  4687  	// LastCompletedInstallJobTime - The time when the last Install job was completed (success|cancelled|failed) on the device.
  4688  	LastCompletedInstallJobTime *date.Time `json:"lastCompletedInstallJobTime,omitempty"`
  4689  	// InProgressDownloadJobID - If a download is in progress, this field contains the JobId of that particular download job
  4690  	InProgressDownloadJobID *string `json:"inProgressDownloadJobId,omitempty"`
  4691  	// InProgressInstallJobID - If an install is in progress, this field contains the JobId of that particular install job
  4692  	InProgressInstallJobID *string `json:"inProgressInstallJobId,omitempty"`
  4693  	// InProgressScanStartedTime - The time when the currently running scan (if any) started
  4694  	InProgressScanStartedTime *date.Time `json:"inProgressScanStartedTime,omitempty"`
  4695  	// InProgressDownloadJobStartedTime - The time when the currently running download (if any) started
  4696  	InProgressDownloadJobStartedTime *date.Time `json:"inProgressDownloadJobStartedTime,omitempty"`
  4697  	// InProgressInstallJobStartedTime - The time when the currently running install (if any) started
  4698  	InProgressInstallJobStartedTime *date.Time `json:"inProgressInstallJobStartedTime,omitempty"`
  4699  }
  4700  
  4701  // UploadCertificateRequest upload Certificate Request to IDM
  4702  type UploadCertificateRequest struct {
  4703  	*RawCertificateData `json:"properties,omitempty"`
  4704  	// ContractVersion - READ-ONLY; Gets ContractVersion. Possible values include: 'InvalidVersion', 'V201109', 'V201202', 'V201205', 'V201212', 'V201304', 'V201310', 'V201311', 'V201404', 'V201406', 'V201407', 'V201409', 'V201410', 'V201412', 'V201501', 'V201502', 'V201504', 'V201505', 'V201506', 'V201507', 'V201508', 'V201510', 'V201512', 'V201601', 'V201602', 'V201604', 'V201605', 'V201607', 'V201608'
  4705  	ContractVersion ContractVersions `json:"contractVersion,omitempty"`
  4706  }
  4707  
  4708  // MarshalJSON is the custom marshaler for UploadCertificateRequest.
  4709  func (ucr UploadCertificateRequest) MarshalJSON() ([]byte, error) {
  4710  	objectMap := make(map[string]interface{})
  4711  	if ucr.RawCertificateData != nil {
  4712  		objectMap["properties"] = ucr.RawCertificateData
  4713  	}
  4714  	return json.Marshal(objectMap)
  4715  }
  4716  
  4717  // UnmarshalJSON is the custom unmarshaler for UploadCertificateRequest struct.
  4718  func (ucr *UploadCertificateRequest) UnmarshalJSON(body []byte) error {
  4719  	var m map[string]*json.RawMessage
  4720  	err := json.Unmarshal(body, &m)
  4721  	if err != nil {
  4722  		return err
  4723  	}
  4724  	for k, v := range m {
  4725  		switch k {
  4726  		case "properties":
  4727  			if v != nil {
  4728  				var rawCertificateData RawCertificateData
  4729  				err = json.Unmarshal(*v, &rawCertificateData)
  4730  				if err != nil {
  4731  					return err
  4732  				}
  4733  				ucr.RawCertificateData = &rawCertificateData
  4734  			}
  4735  		case "contractVersion":
  4736  			if v != nil {
  4737  				var contractVersion ContractVersions
  4738  				err = json.Unmarshal(*v, &contractVersion)
  4739  				if err != nil {
  4740  					return err
  4741  				}
  4742  				ucr.ContractVersion = contractVersion
  4743  			}
  4744  		}
  4745  	}
  4746  
  4747  	return nil
  4748  }
  4749  
  4750  // UploadCertificateResponse upload Certificate Response from IDM
  4751  type UploadCertificateResponse struct {
  4752  	autorest.Response                 `json:"-"`
  4753  	*ResourceCertificateAndAADDetails `json:"properties,omitempty"`
  4754  	// ID - READ-ONLY; The identifier.
  4755  	ID *string `json:"id,omitempty"`
  4756  	// Name - READ-ONLY; The name.
  4757  	Name *string `json:"name,omitempty"`
  4758  	// Type - READ-ONLY; The type.
  4759  	Type *string `json:"type,omitempty"`
  4760  }
  4761  
  4762  // MarshalJSON is the custom marshaler for UploadCertificateResponse.
  4763  func (ucr UploadCertificateResponse) MarshalJSON() ([]byte, error) {
  4764  	objectMap := make(map[string]interface{})
  4765  	if ucr.ResourceCertificateAndAADDetails != nil {
  4766  		objectMap["properties"] = ucr.ResourceCertificateAndAADDetails
  4767  	}
  4768  	return json.Marshal(objectMap)
  4769  }
  4770  
  4771  // UnmarshalJSON is the custom unmarshaler for UploadCertificateResponse struct.
  4772  func (ucr *UploadCertificateResponse) UnmarshalJSON(body []byte) error {
  4773  	var m map[string]*json.RawMessage
  4774  	err := json.Unmarshal(body, &m)
  4775  	if err != nil {
  4776  		return err
  4777  	}
  4778  	for k, v := range m {
  4779  		switch k {
  4780  		case "properties":
  4781  			if v != nil {
  4782  				var resourceCertificateAndAADDetails ResourceCertificateAndAADDetails
  4783  				err = json.Unmarshal(*v, &resourceCertificateAndAADDetails)
  4784  				if err != nil {
  4785  					return err
  4786  				}
  4787  				ucr.ResourceCertificateAndAADDetails = &resourceCertificateAndAADDetails
  4788  			}
  4789  		case "id":
  4790  			if v != nil {
  4791  				var ID string
  4792  				err = json.Unmarshal(*v, &ID)
  4793  				if err != nil {
  4794  					return err
  4795  				}
  4796  				ucr.ID = &ID
  4797  			}
  4798  		case "name":
  4799  			if v != nil {
  4800  				var name string
  4801  				err = json.Unmarshal(*v, &name)
  4802  				if err != nil {
  4803  					return err
  4804  				}
  4805  				ucr.Name = &name
  4806  			}
  4807  		case "type":
  4808  			if v != nil {
  4809  				var typeVar string
  4810  				err = json.Unmarshal(*v, &typeVar)
  4811  				if err != nil {
  4812  					return err
  4813  				}
  4814  				ucr.Type = &typeVar
  4815  			}
  4816  		}
  4817  	}
  4818  
  4819  	return nil
  4820  }
  4821  

View as plain text