...

Source file src/github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2020-01-01/aad/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/domainservices/mgmt/2020-01-01/aad

     1  package aad
     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/domainservices/mgmt/2020-01-01/aad"
    22  
    23  // CloudError an error response from the Domain Services.
    24  type CloudError struct {
    25  	// Error - An error response from the Domain Services.
    26  	Error *CloudErrorBody `json:"error,omitempty"`
    27  }
    28  
    29  // CloudErrorBody an error response from the Domain Services.
    30  type CloudErrorBody struct {
    31  	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
    32  	Code *string `json:"code,omitempty"`
    33  	// Message - A message describing the error, intended to be suitable for display in a user interface.
    34  	Message *string `json:"message,omitempty"`
    35  	// Target - The target of the particular error. For example, the name of the property in error.
    36  	Target *string `json:"target,omitempty"`
    37  	// Details - A list of additional details about the error.
    38  	Details *[]CloudErrorBody `json:"details,omitempty"`
    39  }
    40  
    41  // ContainerAccount container Account Description
    42  type ContainerAccount struct {
    43  	// AccountName - The account name
    44  	AccountName *string `json:"accountName,omitempty"`
    45  	// Spn - The account spn
    46  	Spn *string `json:"spn,omitempty"`
    47  	// Password - The account password
    48  	Password *string `json:"password,omitempty"`
    49  }
    50  
    51  // DomainSecuritySettings domain Security Settings
    52  type DomainSecuritySettings struct {
    53  	// NtlmV1 - A flag to determine whether or not NtlmV1 is enabled or disabled. Possible values include: 'NtlmV1Enabled', 'NtlmV1Disabled'
    54  	NtlmV1 NtlmV1 `json:"ntlmV1,omitempty"`
    55  	// TLSV1 - A flag to determine whether or not TlsV1 is enabled or disabled. Possible values include: 'TLSV1Enabled', 'TLSV1Disabled'
    56  	TLSV1 TLSV1 `json:"tlsV1,omitempty"`
    57  	// SyncNtlmPasswords - A flag to determine whether or not SyncNtlmPasswords is enabled or disabled. Possible values include: 'SyncNtlmPasswordsEnabled', 'SyncNtlmPasswordsDisabled'
    58  	SyncNtlmPasswords SyncNtlmPasswords `json:"syncNtlmPasswords,omitempty"`
    59  	// SyncKerberosPasswords - A flag to determine whether or not SyncKerberosPasswords is enabled or disabled. Possible values include: 'SyncKerberosPasswordsEnabled', 'SyncKerberosPasswordsDisabled'
    60  	SyncKerberosPasswords SyncKerberosPasswords `json:"syncKerberosPasswords,omitempty"`
    61  	// SyncOnPremPasswords - A flag to determine whether or not SyncOnPremPasswords is enabled or disabled. Possible values include: 'SyncOnPremPasswordsEnabled', 'SyncOnPremPasswordsDisabled'
    62  	SyncOnPremPasswords SyncOnPremPasswords `json:"syncOnPremPasswords,omitempty"`
    63  }
    64  
    65  // DomainService domain service.
    66  type DomainService struct {
    67  	autorest.Response `json:"-"`
    68  	// DomainServiceProperties - Domain service properties
    69  	*DomainServiceProperties `json:"properties,omitempty"`
    70  	// ID - READ-ONLY; Resource Id
    71  	ID *string `json:"id,omitempty"`
    72  	// Name - READ-ONLY; Resource name
    73  	Name *string `json:"name,omitempty"`
    74  	// Type - READ-ONLY; Resource type
    75  	Type *string `json:"type,omitempty"`
    76  	// Location - Resource location
    77  	Location *string `json:"location,omitempty"`
    78  	// Tags - Resource tags
    79  	Tags map[string]*string `json:"tags"`
    80  	// Etag - Resource etag
    81  	Etag *string `json:"etag,omitempty"`
    82  }
    83  
    84  // MarshalJSON is the custom marshaler for DomainService.
    85  func (ds DomainService) MarshalJSON() ([]byte, error) {
    86  	objectMap := make(map[string]interface{})
    87  	if ds.DomainServiceProperties != nil {
    88  		objectMap["properties"] = ds.DomainServiceProperties
    89  	}
    90  	if ds.Location != nil {
    91  		objectMap["location"] = ds.Location
    92  	}
    93  	if ds.Tags != nil {
    94  		objectMap["tags"] = ds.Tags
    95  	}
    96  	if ds.Etag != nil {
    97  		objectMap["etag"] = ds.Etag
    98  	}
    99  	return json.Marshal(objectMap)
   100  }
   101  
   102  // UnmarshalJSON is the custom unmarshaler for DomainService struct.
   103  func (ds *DomainService) UnmarshalJSON(body []byte) error {
   104  	var m map[string]*json.RawMessage
   105  	err := json.Unmarshal(body, &m)
   106  	if err != nil {
   107  		return err
   108  	}
   109  	for k, v := range m {
   110  		switch k {
   111  		case "properties":
   112  			if v != nil {
   113  				var domainServiceProperties DomainServiceProperties
   114  				err = json.Unmarshal(*v, &domainServiceProperties)
   115  				if err != nil {
   116  					return err
   117  				}
   118  				ds.DomainServiceProperties = &domainServiceProperties
   119  			}
   120  		case "id":
   121  			if v != nil {
   122  				var ID string
   123  				err = json.Unmarshal(*v, &ID)
   124  				if err != nil {
   125  					return err
   126  				}
   127  				ds.ID = &ID
   128  			}
   129  		case "name":
   130  			if v != nil {
   131  				var name string
   132  				err = json.Unmarshal(*v, &name)
   133  				if err != nil {
   134  					return err
   135  				}
   136  				ds.Name = &name
   137  			}
   138  		case "type":
   139  			if v != nil {
   140  				var typeVar string
   141  				err = json.Unmarshal(*v, &typeVar)
   142  				if err != nil {
   143  					return err
   144  				}
   145  				ds.Type = &typeVar
   146  			}
   147  		case "location":
   148  			if v != nil {
   149  				var location string
   150  				err = json.Unmarshal(*v, &location)
   151  				if err != nil {
   152  					return err
   153  				}
   154  				ds.Location = &location
   155  			}
   156  		case "tags":
   157  			if v != nil {
   158  				var tags map[string]*string
   159  				err = json.Unmarshal(*v, &tags)
   160  				if err != nil {
   161  					return err
   162  				}
   163  				ds.Tags = tags
   164  			}
   165  		case "etag":
   166  			if v != nil {
   167  				var etag string
   168  				err = json.Unmarshal(*v, &etag)
   169  				if err != nil {
   170  					return err
   171  				}
   172  				ds.Etag = &etag
   173  			}
   174  		}
   175  	}
   176  
   177  	return nil
   178  }
   179  
   180  // DomainServiceListResult the response from the List Domain Services operation.
   181  type DomainServiceListResult struct {
   182  	autorest.Response `json:"-"`
   183  	// Value - the list of domain services.
   184  	Value *[]DomainService `json:"value,omitempty"`
   185  	// NextLink - READ-ONLY; The continuation token for the next page of results.
   186  	NextLink *string `json:"nextLink,omitempty"`
   187  }
   188  
   189  // MarshalJSON is the custom marshaler for DomainServiceListResult.
   190  func (dslr DomainServiceListResult) MarshalJSON() ([]byte, error) {
   191  	objectMap := make(map[string]interface{})
   192  	if dslr.Value != nil {
   193  		objectMap["value"] = dslr.Value
   194  	}
   195  	return json.Marshal(objectMap)
   196  }
   197  
   198  // DomainServiceListResultIterator provides access to a complete listing of DomainService values.
   199  type DomainServiceListResultIterator struct {
   200  	i    int
   201  	page DomainServiceListResultPage
   202  }
   203  
   204  // NextWithContext advances to the next value.  If there was an error making
   205  // the request the iterator does not advance and the error is returned.
   206  func (iter *DomainServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
   207  	if tracing.IsEnabled() {
   208  		ctx = tracing.StartSpan(ctx, fqdn+"/DomainServiceListResultIterator.NextWithContext")
   209  		defer func() {
   210  			sc := -1
   211  			if iter.Response().Response.Response != nil {
   212  				sc = iter.Response().Response.Response.StatusCode
   213  			}
   214  			tracing.EndSpan(ctx, sc, err)
   215  		}()
   216  	}
   217  	iter.i++
   218  	if iter.i < len(iter.page.Values()) {
   219  		return nil
   220  	}
   221  	err = iter.page.NextWithContext(ctx)
   222  	if err != nil {
   223  		iter.i--
   224  		return err
   225  	}
   226  	iter.i = 0
   227  	return nil
   228  }
   229  
   230  // Next advances to the next value.  If there was an error making
   231  // the request the iterator does not advance and the error is returned.
   232  // Deprecated: Use NextWithContext() instead.
   233  func (iter *DomainServiceListResultIterator) Next() error {
   234  	return iter.NextWithContext(context.Background())
   235  }
   236  
   237  // NotDone returns true if the enumeration should be started or is not yet complete.
   238  func (iter DomainServiceListResultIterator) NotDone() bool {
   239  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   240  }
   241  
   242  // Response returns the raw server response from the last page request.
   243  func (iter DomainServiceListResultIterator) Response() DomainServiceListResult {
   244  	return iter.page.Response()
   245  }
   246  
   247  // Value returns the current value or a zero-initialized value if the
   248  // iterator has advanced beyond the end of the collection.
   249  func (iter DomainServiceListResultIterator) Value() DomainService {
   250  	if !iter.page.NotDone() {
   251  		return DomainService{}
   252  	}
   253  	return iter.page.Values()[iter.i]
   254  }
   255  
   256  // Creates a new instance of the DomainServiceListResultIterator type.
   257  func NewDomainServiceListResultIterator(page DomainServiceListResultPage) DomainServiceListResultIterator {
   258  	return DomainServiceListResultIterator{page: page}
   259  }
   260  
   261  // IsEmpty returns true if the ListResult contains no values.
   262  func (dslr DomainServiceListResult) IsEmpty() bool {
   263  	return dslr.Value == nil || len(*dslr.Value) == 0
   264  }
   265  
   266  // hasNextLink returns true if the NextLink is not empty.
   267  func (dslr DomainServiceListResult) hasNextLink() bool {
   268  	return dslr.NextLink != nil && len(*dslr.NextLink) != 0
   269  }
   270  
   271  // domainServiceListResultPreparer prepares a request to retrieve the next set of results.
   272  // It returns nil if no more results exist.
   273  func (dslr DomainServiceListResult) domainServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
   274  	if !dslr.hasNextLink() {
   275  		return nil, nil
   276  	}
   277  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   278  		autorest.AsJSON(),
   279  		autorest.AsGet(),
   280  		autorest.WithBaseURL(to.String(dslr.NextLink)))
   281  }
   282  
   283  // DomainServiceListResultPage contains a page of DomainService values.
   284  type DomainServiceListResultPage struct {
   285  	fn   func(context.Context, DomainServiceListResult) (DomainServiceListResult, error)
   286  	dslr DomainServiceListResult
   287  }
   288  
   289  // NextWithContext advances to the next page of values.  If there was an error making
   290  // the request the page does not advance and the error is returned.
   291  func (page *DomainServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
   292  	if tracing.IsEnabled() {
   293  		ctx = tracing.StartSpan(ctx, fqdn+"/DomainServiceListResultPage.NextWithContext")
   294  		defer func() {
   295  			sc := -1
   296  			if page.Response().Response.Response != nil {
   297  				sc = page.Response().Response.Response.StatusCode
   298  			}
   299  			tracing.EndSpan(ctx, sc, err)
   300  		}()
   301  	}
   302  	for {
   303  		next, err := page.fn(ctx, page.dslr)
   304  		if err != nil {
   305  			return err
   306  		}
   307  		page.dslr = next
   308  		if !next.hasNextLink() || !next.IsEmpty() {
   309  			break
   310  		}
   311  	}
   312  	return nil
   313  }
   314  
   315  // Next advances to the next page of values.  If there was an error making
   316  // the request the page does not advance and the error is returned.
   317  // Deprecated: Use NextWithContext() instead.
   318  func (page *DomainServiceListResultPage) Next() error {
   319  	return page.NextWithContext(context.Background())
   320  }
   321  
   322  // NotDone returns true if the page enumeration should be started or is not yet complete.
   323  func (page DomainServiceListResultPage) NotDone() bool {
   324  	return !page.dslr.IsEmpty()
   325  }
   326  
   327  // Response returns the raw server response from the last page request.
   328  func (page DomainServiceListResultPage) Response() DomainServiceListResult {
   329  	return page.dslr
   330  }
   331  
   332  // Values returns the slice of values for the current page or nil if there are no values.
   333  func (page DomainServiceListResultPage) Values() []DomainService {
   334  	if page.dslr.IsEmpty() {
   335  		return nil
   336  	}
   337  	return *page.dslr.Value
   338  }
   339  
   340  // Creates a new instance of the DomainServiceListResultPage type.
   341  func NewDomainServiceListResultPage(cur DomainServiceListResult, getNextPage func(context.Context, DomainServiceListResult) (DomainServiceListResult, error)) DomainServiceListResultPage {
   342  	return DomainServiceListResultPage{
   343  		fn:   getNextPage,
   344  		dslr: cur,
   345  	}
   346  }
   347  
   348  // DomainServiceProperties properties of the Domain Service.
   349  type DomainServiceProperties struct {
   350  	// Version - READ-ONLY; Data Model Version
   351  	Version *int32 `json:"version,omitempty"`
   352  	// TenantID - READ-ONLY; Azure Active Directory Tenant Id
   353  	TenantID *string `json:"tenantId,omitempty"`
   354  	// DomainName - The name of the Azure domain that the user would like to deploy Domain Services to.
   355  	DomainName *string `json:"domainName,omitempty"`
   356  	// DeploymentID - READ-ONLY; Deployment Id
   357  	DeploymentID *string `json:"deploymentId,omitempty"`
   358  	// SyncOwner - READ-ONLY; SyncOwner ReplicaSet Id
   359  	SyncOwner *string `json:"syncOwner,omitempty"`
   360  	// ReplicaSets - List of ReplicaSets
   361  	ReplicaSets *[]ReplicaSet `json:"replicaSets,omitempty"`
   362  	// LdapsSettings - Secure LDAP Settings
   363  	LdapsSettings *LdapsSettings `json:"ldapsSettings,omitempty"`
   364  	// ResourceForestSettings - Resource Forest Settings
   365  	ResourceForestSettings *ResourceForestSettings `json:"resourceForestSettings,omitempty"`
   366  	// DomainSecuritySettings - DomainSecurity Settings
   367  	DomainSecuritySettings *DomainSecuritySettings `json:"domainSecuritySettings,omitempty"`
   368  	// DomainConfigurationType - Domain Configuration Type
   369  	DomainConfigurationType *string `json:"domainConfigurationType,omitempty"`
   370  	// Sku - Sku Type
   371  	Sku *string `json:"sku,omitempty"`
   372  	// FilteredSync - Enabled or Disabled flag to turn on Group-based filtered sync. Possible values include: 'FilteredSyncEnabled', 'FilteredSyncDisabled'
   373  	FilteredSync FilteredSync `json:"filteredSync,omitempty"`
   374  	// NotificationSettings - Notification Settings
   375  	NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"`
   376  	// ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response.
   377  	ProvisioningState *string `json:"provisioningState,omitempty"`
   378  }
   379  
   380  // MarshalJSON is the custom marshaler for DomainServiceProperties.
   381  func (dsp DomainServiceProperties) MarshalJSON() ([]byte, error) {
   382  	objectMap := make(map[string]interface{})
   383  	if dsp.DomainName != nil {
   384  		objectMap["domainName"] = dsp.DomainName
   385  	}
   386  	if dsp.ReplicaSets != nil {
   387  		objectMap["replicaSets"] = dsp.ReplicaSets
   388  	}
   389  	if dsp.LdapsSettings != nil {
   390  		objectMap["ldapsSettings"] = dsp.LdapsSettings
   391  	}
   392  	if dsp.ResourceForestSettings != nil {
   393  		objectMap["resourceForestSettings"] = dsp.ResourceForestSettings
   394  	}
   395  	if dsp.DomainSecuritySettings != nil {
   396  		objectMap["domainSecuritySettings"] = dsp.DomainSecuritySettings
   397  	}
   398  	if dsp.DomainConfigurationType != nil {
   399  		objectMap["domainConfigurationType"] = dsp.DomainConfigurationType
   400  	}
   401  	if dsp.Sku != nil {
   402  		objectMap["sku"] = dsp.Sku
   403  	}
   404  	if dsp.FilteredSync != "" {
   405  		objectMap["filteredSync"] = dsp.FilteredSync
   406  	}
   407  	if dsp.NotificationSettings != nil {
   408  		objectMap["notificationSettings"] = dsp.NotificationSettings
   409  	}
   410  	return json.Marshal(objectMap)
   411  }
   412  
   413  // DomainServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
   414  // long-running operation.
   415  type DomainServicesCreateOrUpdateFuture struct {
   416  	azure.FutureAPI
   417  	// Result returns the result of the asynchronous operation.
   418  	// If the operation has not completed it will return an error.
   419  	Result func(DomainServicesClient) (DomainService, error)
   420  }
   421  
   422  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   423  func (future *DomainServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
   424  	var azFuture azure.Future
   425  	if err := json.Unmarshal(body, &azFuture); err != nil {
   426  		return err
   427  	}
   428  	future.FutureAPI = &azFuture
   429  	future.Result = future.result
   430  	return nil
   431  }
   432  
   433  // result is the default implementation for DomainServicesCreateOrUpdateFuture.Result.
   434  func (future *DomainServicesCreateOrUpdateFuture) result(client DomainServicesClient) (ds DomainService, err error) {
   435  	var done bool
   436  	done, err = future.DoneWithContext(context.Background(), client)
   437  	if err != nil {
   438  		err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
   439  		return
   440  	}
   441  	if !done {
   442  		ds.Response.Response = future.Response()
   443  		err = azure.NewAsyncOpIncompleteError("aad.DomainServicesCreateOrUpdateFuture")
   444  		return
   445  	}
   446  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   447  	if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
   448  		ds, err = client.CreateOrUpdateResponder(ds.Response.Response)
   449  		if err != nil {
   450  			err = autorest.NewErrorWithError(err, "aad.DomainServicesCreateOrUpdateFuture", "Result", ds.Response.Response, "Failure responding to request")
   451  		}
   452  	}
   453  	return
   454  }
   455  
   456  // DomainServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
   457  // operation.
   458  type DomainServicesDeleteFuture struct {
   459  	azure.FutureAPI
   460  	// Result returns the result of the asynchronous operation.
   461  	// If the operation has not completed it will return an error.
   462  	Result func(DomainServicesClient) (autorest.Response, error)
   463  }
   464  
   465  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   466  func (future *DomainServicesDeleteFuture) UnmarshalJSON(body []byte) error {
   467  	var azFuture azure.Future
   468  	if err := json.Unmarshal(body, &azFuture); err != nil {
   469  		return err
   470  	}
   471  	future.FutureAPI = &azFuture
   472  	future.Result = future.result
   473  	return nil
   474  }
   475  
   476  // result is the default implementation for DomainServicesDeleteFuture.Result.
   477  func (future *DomainServicesDeleteFuture) result(client DomainServicesClient) (ar autorest.Response, err error) {
   478  	var done bool
   479  	done, err = future.DoneWithContext(context.Background(), client)
   480  	if err != nil {
   481  		err = autorest.NewErrorWithError(err, "aad.DomainServicesDeleteFuture", "Result", future.Response(), "Polling failure")
   482  		return
   483  	}
   484  	if !done {
   485  		ar.Response = future.Response()
   486  		err = azure.NewAsyncOpIncompleteError("aad.DomainServicesDeleteFuture")
   487  		return
   488  	}
   489  	ar.Response = future.Response()
   490  	return
   491  }
   492  
   493  // DomainServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
   494  // operation.
   495  type DomainServicesUpdateFuture struct {
   496  	azure.FutureAPI
   497  	// Result returns the result of the asynchronous operation.
   498  	// If the operation has not completed it will return an error.
   499  	Result func(DomainServicesClient) (DomainService, error)
   500  }
   501  
   502  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   503  func (future *DomainServicesUpdateFuture) UnmarshalJSON(body []byte) error {
   504  	var azFuture azure.Future
   505  	if err := json.Unmarshal(body, &azFuture); err != nil {
   506  		return err
   507  	}
   508  	future.FutureAPI = &azFuture
   509  	future.Result = future.result
   510  	return nil
   511  }
   512  
   513  // result is the default implementation for DomainServicesUpdateFuture.Result.
   514  func (future *DomainServicesUpdateFuture) result(client DomainServicesClient) (ds DomainService, err error) {
   515  	var done bool
   516  	done, err = future.DoneWithContext(context.Background(), client)
   517  	if err != nil {
   518  		err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", future.Response(), "Polling failure")
   519  		return
   520  	}
   521  	if !done {
   522  		ds.Response.Response = future.Response()
   523  		err = azure.NewAsyncOpIncompleteError("aad.DomainServicesUpdateFuture")
   524  		return
   525  	}
   526  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   527  	if ds.Response.Response, err = future.GetResult(sender); err == nil && ds.Response.Response.StatusCode != http.StatusNoContent {
   528  		ds, err = client.UpdateResponder(ds.Response.Response)
   529  		if err != nil {
   530  			err = autorest.NewErrorWithError(err, "aad.DomainServicesUpdateFuture", "Result", ds.Response.Response, "Failure responding to request")
   531  		}
   532  	}
   533  	return
   534  }
   535  
   536  // ForestTrust forest Trust Setting
   537  type ForestTrust struct {
   538  	// TrustedDomainFqdn - Trusted Domain FQDN
   539  	TrustedDomainFqdn *string `json:"trustedDomainFqdn,omitempty"`
   540  	// TrustDirection - Trust Direction
   541  	TrustDirection *string `json:"trustDirection,omitempty"`
   542  	// FriendlyName - Friendly Name
   543  	FriendlyName *string `json:"friendlyName,omitempty"`
   544  	// RemoteDNSIps - Remote Dns ips
   545  	RemoteDNSIps *string `json:"remoteDnsIps,omitempty"`
   546  	// TrustPassword - Trust Password
   547  	TrustPassword *string `json:"trustPassword,omitempty"`
   548  }
   549  
   550  // HealthAlert health Alert Description
   551  type HealthAlert struct {
   552  	// ID - READ-ONLY; Health Alert Id
   553  	ID *string `json:"id,omitempty"`
   554  	// Name - READ-ONLY; Health Alert Name
   555  	Name *string `json:"name,omitempty"`
   556  	// Issue - READ-ONLY; Health Alert Issue
   557  	Issue *string `json:"issue,omitempty"`
   558  	// Severity - READ-ONLY; Health Alert Severity
   559  	Severity *string `json:"severity,omitempty"`
   560  	// Raised - READ-ONLY; Health Alert Raised DateTime
   561  	Raised *date.Time `json:"raised,omitempty"`
   562  	// LastDetected - READ-ONLY; Health Alert Last Detected DateTime
   563  	LastDetected *date.Time `json:"lastDetected,omitempty"`
   564  	// ResolutionURI - READ-ONLY; Health Alert TSG Link
   565  	ResolutionURI *string `json:"resolutionUri,omitempty"`
   566  }
   567  
   568  // MarshalJSON is the custom marshaler for HealthAlert.
   569  func (ha HealthAlert) MarshalJSON() ([]byte, error) {
   570  	objectMap := make(map[string]interface{})
   571  	return json.Marshal(objectMap)
   572  }
   573  
   574  // HealthMonitor health Monitor Description
   575  type HealthMonitor struct {
   576  	// ID - READ-ONLY; Health Monitor Id
   577  	ID *string `json:"id,omitempty"`
   578  	// Name - READ-ONLY; Health Monitor Name
   579  	Name *string `json:"name,omitempty"`
   580  	// Details - READ-ONLY; Health Monitor Details
   581  	Details *string `json:"details,omitempty"`
   582  }
   583  
   584  // MarshalJSON is the custom marshaler for HealthMonitor.
   585  func (hm HealthMonitor) MarshalJSON() ([]byte, error) {
   586  	objectMap := make(map[string]interface{})
   587  	return json.Marshal(objectMap)
   588  }
   589  
   590  // LdapsSettings secure LDAP Settings
   591  type LdapsSettings struct {
   592  	// Ldaps - A flag to determine whether or not Secure LDAP is enabled or disabled. Possible values include: 'LdapsEnabled', 'LdapsDisabled'
   593  	Ldaps Ldaps `json:"ldaps,omitempty"`
   594  	// PfxCertificate - The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of the certificate pfx file.
   595  	PfxCertificate *string `json:"pfxCertificate,omitempty"`
   596  	// PfxCertificatePassword - The password to decrypt the provided Secure LDAP certificate pfx file.
   597  	PfxCertificatePassword *string `json:"pfxCertificatePassword,omitempty"`
   598  	// PublicCertificate - READ-ONLY; Public certificate used to configure secure ldap.
   599  	PublicCertificate *string `json:"publicCertificate,omitempty"`
   600  	// CertificateThumbprint - READ-ONLY; Thumbprint of configure ldaps certificate.
   601  	CertificateThumbprint *string `json:"certificateThumbprint,omitempty"`
   602  	// CertificateNotAfter - READ-ONLY; NotAfter DateTime of configure ldaps certificate.
   603  	CertificateNotAfter *date.Time `json:"certificateNotAfter,omitempty"`
   604  	// ExternalAccess - A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled'
   605  	ExternalAccess ExternalAccess `json:"externalAccess,omitempty"`
   606  }
   607  
   608  // MarshalJSON is the custom marshaler for LdapsSettings.
   609  func (ls LdapsSettings) MarshalJSON() ([]byte, error) {
   610  	objectMap := make(map[string]interface{})
   611  	if ls.Ldaps != "" {
   612  		objectMap["ldaps"] = ls.Ldaps
   613  	}
   614  	if ls.PfxCertificate != nil {
   615  		objectMap["pfxCertificate"] = ls.PfxCertificate
   616  	}
   617  	if ls.PfxCertificatePassword != nil {
   618  		objectMap["pfxCertificatePassword"] = ls.PfxCertificatePassword
   619  	}
   620  	if ls.ExternalAccess != "" {
   621  		objectMap["externalAccess"] = ls.ExternalAccess
   622  	}
   623  	return json.Marshal(objectMap)
   624  }
   625  
   626  // NotificationSettings settings for notification
   627  type NotificationSettings struct {
   628  	// NotifyGlobalAdmins - Should global admins be notified. Possible values include: 'NotifyGlobalAdminsEnabled', 'NotifyGlobalAdminsDisabled'
   629  	NotifyGlobalAdmins NotifyGlobalAdmins `json:"notifyGlobalAdmins,omitempty"`
   630  	// NotifyDcAdmins - Should domain controller admins be notified. Possible values include: 'NotifyDcAdminsEnabled', 'NotifyDcAdminsDisabled'
   631  	NotifyDcAdmins NotifyDcAdmins `json:"notifyDcAdmins,omitempty"`
   632  	// AdditionalRecipients - The list of additional recipients
   633  	AdditionalRecipients *[]string `json:"additionalRecipients,omitempty"`
   634  }
   635  
   636  // OperationDisplayInfo the operation supported by Domain Services.
   637  type OperationDisplayInfo struct {
   638  	// Description - The description of the operation.
   639  	Description *string `json:"description,omitempty"`
   640  	// Operation - The action that users can perform, based on their permission level.
   641  	Operation *string `json:"operation,omitempty"`
   642  	// Provider - Service provider: Domain Services.
   643  	Provider *string `json:"provider,omitempty"`
   644  	// Resource - Resource on which the operation is performed.
   645  	Resource *string `json:"resource,omitempty"`
   646  }
   647  
   648  // OperationEntity the operation supported by Domain Services.
   649  type OperationEntity struct {
   650  	// Name - Operation name: {provider}/{resource}/{operation}.
   651  	Name *string `json:"name,omitempty"`
   652  	// Display - The operation supported by Domain Services.
   653  	Display *OperationDisplayInfo `json:"display,omitempty"`
   654  	// Origin - The origin of the operation.
   655  	Origin *string `json:"origin,omitempty"`
   656  }
   657  
   658  // OperationEntityListResult the list of domain service operation response.
   659  type OperationEntityListResult struct {
   660  	autorest.Response `json:"-"`
   661  	// Value - The list of operations.
   662  	Value *[]OperationEntity `json:"value,omitempty"`
   663  	// NextLink - READ-ONLY; The continuation token for the next page of results.
   664  	NextLink *string `json:"nextLink,omitempty"`
   665  }
   666  
   667  // MarshalJSON is the custom marshaler for OperationEntityListResult.
   668  func (oelr OperationEntityListResult) MarshalJSON() ([]byte, error) {
   669  	objectMap := make(map[string]interface{})
   670  	if oelr.Value != nil {
   671  		objectMap["value"] = oelr.Value
   672  	}
   673  	return json.Marshal(objectMap)
   674  }
   675  
   676  // OperationEntityListResultIterator provides access to a complete listing of OperationEntity values.
   677  type OperationEntityListResultIterator struct {
   678  	i    int
   679  	page OperationEntityListResultPage
   680  }
   681  
   682  // NextWithContext advances to the next value.  If there was an error making
   683  // the request the iterator does not advance and the error is returned.
   684  func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error) {
   685  	if tracing.IsEnabled() {
   686  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultIterator.NextWithContext")
   687  		defer func() {
   688  			sc := -1
   689  			if iter.Response().Response.Response != nil {
   690  				sc = iter.Response().Response.Response.StatusCode
   691  			}
   692  			tracing.EndSpan(ctx, sc, err)
   693  		}()
   694  	}
   695  	iter.i++
   696  	if iter.i < len(iter.page.Values()) {
   697  		return nil
   698  	}
   699  	err = iter.page.NextWithContext(ctx)
   700  	if err != nil {
   701  		iter.i--
   702  		return err
   703  	}
   704  	iter.i = 0
   705  	return nil
   706  }
   707  
   708  // Next advances to the next value.  If there was an error making
   709  // the request the iterator does not advance and the error is returned.
   710  // Deprecated: Use NextWithContext() instead.
   711  func (iter *OperationEntityListResultIterator) Next() error {
   712  	return iter.NextWithContext(context.Background())
   713  }
   714  
   715  // NotDone returns true if the enumeration should be started or is not yet complete.
   716  func (iter OperationEntityListResultIterator) NotDone() bool {
   717  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   718  }
   719  
   720  // Response returns the raw server response from the last page request.
   721  func (iter OperationEntityListResultIterator) Response() OperationEntityListResult {
   722  	return iter.page.Response()
   723  }
   724  
   725  // Value returns the current value or a zero-initialized value if the
   726  // iterator has advanced beyond the end of the collection.
   727  func (iter OperationEntityListResultIterator) Value() OperationEntity {
   728  	if !iter.page.NotDone() {
   729  		return OperationEntity{}
   730  	}
   731  	return iter.page.Values()[iter.i]
   732  }
   733  
   734  // Creates a new instance of the OperationEntityListResultIterator type.
   735  func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator {
   736  	return OperationEntityListResultIterator{page: page}
   737  }
   738  
   739  // IsEmpty returns true if the ListResult contains no values.
   740  func (oelr OperationEntityListResult) IsEmpty() bool {
   741  	return oelr.Value == nil || len(*oelr.Value) == 0
   742  }
   743  
   744  // hasNextLink returns true if the NextLink is not empty.
   745  func (oelr OperationEntityListResult) hasNextLink() bool {
   746  	return oelr.NextLink != nil && len(*oelr.NextLink) != 0
   747  }
   748  
   749  // operationEntityListResultPreparer prepares a request to retrieve the next set of results.
   750  // It returns nil if no more results exist.
   751  func (oelr OperationEntityListResult) operationEntityListResultPreparer(ctx context.Context) (*http.Request, error) {
   752  	if !oelr.hasNextLink() {
   753  		return nil, nil
   754  	}
   755  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   756  		autorest.AsJSON(),
   757  		autorest.AsGet(),
   758  		autorest.WithBaseURL(to.String(oelr.NextLink)))
   759  }
   760  
   761  // OperationEntityListResultPage contains a page of OperationEntity values.
   762  type OperationEntityListResultPage struct {
   763  	fn   func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)
   764  	oelr OperationEntityListResult
   765  }
   766  
   767  // NextWithContext advances to the next page of values.  If there was an error making
   768  // the request the page does not advance and the error is returned.
   769  func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error) {
   770  	if tracing.IsEnabled() {
   771  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultPage.NextWithContext")
   772  		defer func() {
   773  			sc := -1
   774  			if page.Response().Response.Response != nil {
   775  				sc = page.Response().Response.Response.StatusCode
   776  			}
   777  			tracing.EndSpan(ctx, sc, err)
   778  		}()
   779  	}
   780  	for {
   781  		next, err := page.fn(ctx, page.oelr)
   782  		if err != nil {
   783  			return err
   784  		}
   785  		page.oelr = next
   786  		if !next.hasNextLink() || !next.IsEmpty() {
   787  			break
   788  		}
   789  	}
   790  	return nil
   791  }
   792  
   793  // Next advances to the next page of values.  If there was an error making
   794  // the request the page does not advance and the error is returned.
   795  // Deprecated: Use NextWithContext() instead.
   796  func (page *OperationEntityListResultPage) Next() error {
   797  	return page.NextWithContext(context.Background())
   798  }
   799  
   800  // NotDone returns true if the page enumeration should be started or is not yet complete.
   801  func (page OperationEntityListResultPage) NotDone() bool {
   802  	return !page.oelr.IsEmpty()
   803  }
   804  
   805  // Response returns the raw server response from the last page request.
   806  func (page OperationEntityListResultPage) Response() OperationEntityListResult {
   807  	return page.oelr
   808  }
   809  
   810  // Values returns the slice of values for the current page or nil if there are no values.
   811  func (page OperationEntityListResultPage) Values() []OperationEntity {
   812  	if page.oelr.IsEmpty() {
   813  		return nil
   814  	}
   815  	return *page.oelr.Value
   816  }
   817  
   818  // Creates a new instance of the OperationEntityListResultPage type.
   819  func NewOperationEntityListResultPage(cur OperationEntityListResult, getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage {
   820  	return OperationEntityListResultPage{
   821  		fn:   getNextPage,
   822  		oelr: cur,
   823  	}
   824  }
   825  
   826  // OuContainer resource for OuContainer.
   827  type OuContainer struct {
   828  	autorest.Response `json:"-"`
   829  	// OuContainerProperties - OuContainer properties
   830  	*OuContainerProperties `json:"properties,omitempty"`
   831  	// ID - READ-ONLY; Resource Id
   832  	ID *string `json:"id,omitempty"`
   833  	// Name - READ-ONLY; Resource name
   834  	Name *string `json:"name,omitempty"`
   835  	// Type - READ-ONLY; Resource type
   836  	Type *string `json:"type,omitempty"`
   837  	// Location - Resource location
   838  	Location *string `json:"location,omitempty"`
   839  	// Tags - Resource tags
   840  	Tags map[string]*string `json:"tags"`
   841  	// Etag - Resource etag
   842  	Etag *string `json:"etag,omitempty"`
   843  }
   844  
   845  // MarshalJSON is the custom marshaler for OuContainer.
   846  func (oc OuContainer) MarshalJSON() ([]byte, error) {
   847  	objectMap := make(map[string]interface{})
   848  	if oc.OuContainerProperties != nil {
   849  		objectMap["properties"] = oc.OuContainerProperties
   850  	}
   851  	if oc.Location != nil {
   852  		objectMap["location"] = oc.Location
   853  	}
   854  	if oc.Tags != nil {
   855  		objectMap["tags"] = oc.Tags
   856  	}
   857  	if oc.Etag != nil {
   858  		objectMap["etag"] = oc.Etag
   859  	}
   860  	return json.Marshal(objectMap)
   861  }
   862  
   863  // UnmarshalJSON is the custom unmarshaler for OuContainer struct.
   864  func (oc *OuContainer) UnmarshalJSON(body []byte) error {
   865  	var m map[string]*json.RawMessage
   866  	err := json.Unmarshal(body, &m)
   867  	if err != nil {
   868  		return err
   869  	}
   870  	for k, v := range m {
   871  		switch k {
   872  		case "properties":
   873  			if v != nil {
   874  				var ouContainerProperties OuContainerProperties
   875  				err = json.Unmarshal(*v, &ouContainerProperties)
   876  				if err != nil {
   877  					return err
   878  				}
   879  				oc.OuContainerProperties = &ouContainerProperties
   880  			}
   881  		case "id":
   882  			if v != nil {
   883  				var ID string
   884  				err = json.Unmarshal(*v, &ID)
   885  				if err != nil {
   886  					return err
   887  				}
   888  				oc.ID = &ID
   889  			}
   890  		case "name":
   891  			if v != nil {
   892  				var name string
   893  				err = json.Unmarshal(*v, &name)
   894  				if err != nil {
   895  					return err
   896  				}
   897  				oc.Name = &name
   898  			}
   899  		case "type":
   900  			if v != nil {
   901  				var typeVar string
   902  				err = json.Unmarshal(*v, &typeVar)
   903  				if err != nil {
   904  					return err
   905  				}
   906  				oc.Type = &typeVar
   907  			}
   908  		case "location":
   909  			if v != nil {
   910  				var location string
   911  				err = json.Unmarshal(*v, &location)
   912  				if err != nil {
   913  					return err
   914  				}
   915  				oc.Location = &location
   916  			}
   917  		case "tags":
   918  			if v != nil {
   919  				var tags map[string]*string
   920  				err = json.Unmarshal(*v, &tags)
   921  				if err != nil {
   922  					return err
   923  				}
   924  				oc.Tags = tags
   925  			}
   926  		case "etag":
   927  			if v != nil {
   928  				var etag string
   929  				err = json.Unmarshal(*v, &etag)
   930  				if err != nil {
   931  					return err
   932  				}
   933  				oc.Etag = &etag
   934  			}
   935  		}
   936  	}
   937  
   938  	return nil
   939  }
   940  
   941  // OuContainerCreateFuture an abstraction for monitoring and retrieving the results of a long-running
   942  // operation.
   943  type OuContainerCreateFuture struct {
   944  	azure.FutureAPI
   945  	// Result returns the result of the asynchronous operation.
   946  	// If the operation has not completed it will return an error.
   947  	Result func(OuContainerClient) (OuContainer, error)
   948  }
   949  
   950  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   951  func (future *OuContainerCreateFuture) UnmarshalJSON(body []byte) error {
   952  	var azFuture azure.Future
   953  	if err := json.Unmarshal(body, &azFuture); err != nil {
   954  		return err
   955  	}
   956  	future.FutureAPI = &azFuture
   957  	future.Result = future.result
   958  	return nil
   959  }
   960  
   961  // result is the default implementation for OuContainerCreateFuture.Result.
   962  func (future *OuContainerCreateFuture) result(client OuContainerClient) (oc OuContainer, err error) {
   963  	var done bool
   964  	done, err = future.DoneWithContext(context.Background(), client)
   965  	if err != nil {
   966  		err = autorest.NewErrorWithError(err, "aad.OuContainerCreateFuture", "Result", future.Response(), "Polling failure")
   967  		return
   968  	}
   969  	if !done {
   970  		oc.Response.Response = future.Response()
   971  		err = azure.NewAsyncOpIncompleteError("aad.OuContainerCreateFuture")
   972  		return
   973  	}
   974  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   975  	if oc.Response.Response, err = future.GetResult(sender); err == nil && oc.Response.Response.StatusCode != http.StatusNoContent {
   976  		oc, err = client.CreateResponder(oc.Response.Response)
   977  		if err != nil {
   978  			err = autorest.NewErrorWithError(err, "aad.OuContainerCreateFuture", "Result", oc.Response.Response, "Failure responding to request")
   979  		}
   980  	}
   981  	return
   982  }
   983  
   984  // OuContainerDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
   985  // operation.
   986  type OuContainerDeleteFuture struct {
   987  	azure.FutureAPI
   988  	// Result returns the result of the asynchronous operation.
   989  	// If the operation has not completed it will return an error.
   990  	Result func(OuContainerClient) (autorest.Response, error)
   991  }
   992  
   993  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   994  func (future *OuContainerDeleteFuture) UnmarshalJSON(body []byte) error {
   995  	var azFuture azure.Future
   996  	if err := json.Unmarshal(body, &azFuture); err != nil {
   997  		return err
   998  	}
   999  	future.FutureAPI = &azFuture
  1000  	future.Result = future.result
  1001  	return nil
  1002  }
  1003  
  1004  // result is the default implementation for OuContainerDeleteFuture.Result.
  1005  func (future *OuContainerDeleteFuture) result(client OuContainerClient) (ar autorest.Response, err error) {
  1006  	var done bool
  1007  	done, err = future.DoneWithContext(context.Background(), client)
  1008  	if err != nil {
  1009  		err = autorest.NewErrorWithError(err, "aad.OuContainerDeleteFuture", "Result", future.Response(), "Polling failure")
  1010  		return
  1011  	}
  1012  	if !done {
  1013  		ar.Response = future.Response()
  1014  		err = azure.NewAsyncOpIncompleteError("aad.OuContainerDeleteFuture")
  1015  		return
  1016  	}
  1017  	ar.Response = future.Response()
  1018  	return
  1019  }
  1020  
  1021  // OuContainerListResult the response from the List OuContainer operation.
  1022  type OuContainerListResult struct {
  1023  	autorest.Response `json:"-"`
  1024  	// Value - The list of OuContainer.
  1025  	Value *[]OuContainer `json:"value,omitempty"`
  1026  	// NextLink - READ-ONLY; The continuation token for the next page of results.
  1027  	NextLink *string `json:"nextLink,omitempty"`
  1028  }
  1029  
  1030  // MarshalJSON is the custom marshaler for OuContainerListResult.
  1031  func (oclr OuContainerListResult) MarshalJSON() ([]byte, error) {
  1032  	objectMap := make(map[string]interface{})
  1033  	if oclr.Value != nil {
  1034  		objectMap["value"] = oclr.Value
  1035  	}
  1036  	return json.Marshal(objectMap)
  1037  }
  1038  
  1039  // OuContainerListResultIterator provides access to a complete listing of OuContainer values.
  1040  type OuContainerListResultIterator struct {
  1041  	i    int
  1042  	page OuContainerListResultPage
  1043  }
  1044  
  1045  // NextWithContext advances to the next value.  If there was an error making
  1046  // the request the iterator does not advance and the error is returned.
  1047  func (iter *OuContainerListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1048  	if tracing.IsEnabled() {
  1049  		ctx = tracing.StartSpan(ctx, fqdn+"/OuContainerListResultIterator.NextWithContext")
  1050  		defer func() {
  1051  			sc := -1
  1052  			if iter.Response().Response.Response != nil {
  1053  				sc = iter.Response().Response.Response.StatusCode
  1054  			}
  1055  			tracing.EndSpan(ctx, sc, err)
  1056  		}()
  1057  	}
  1058  	iter.i++
  1059  	if iter.i < len(iter.page.Values()) {
  1060  		return nil
  1061  	}
  1062  	err = iter.page.NextWithContext(ctx)
  1063  	if err != nil {
  1064  		iter.i--
  1065  		return err
  1066  	}
  1067  	iter.i = 0
  1068  	return nil
  1069  }
  1070  
  1071  // Next advances to the next value.  If there was an error making
  1072  // the request the iterator does not advance and the error is returned.
  1073  // Deprecated: Use NextWithContext() instead.
  1074  func (iter *OuContainerListResultIterator) Next() error {
  1075  	return iter.NextWithContext(context.Background())
  1076  }
  1077  
  1078  // NotDone returns true if the enumeration should be started or is not yet complete.
  1079  func (iter OuContainerListResultIterator) NotDone() bool {
  1080  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1081  }
  1082  
  1083  // Response returns the raw server response from the last page request.
  1084  func (iter OuContainerListResultIterator) Response() OuContainerListResult {
  1085  	return iter.page.Response()
  1086  }
  1087  
  1088  // Value returns the current value or a zero-initialized value if the
  1089  // iterator has advanced beyond the end of the collection.
  1090  func (iter OuContainerListResultIterator) Value() OuContainer {
  1091  	if !iter.page.NotDone() {
  1092  		return OuContainer{}
  1093  	}
  1094  	return iter.page.Values()[iter.i]
  1095  }
  1096  
  1097  // Creates a new instance of the OuContainerListResultIterator type.
  1098  func NewOuContainerListResultIterator(page OuContainerListResultPage) OuContainerListResultIterator {
  1099  	return OuContainerListResultIterator{page: page}
  1100  }
  1101  
  1102  // IsEmpty returns true if the ListResult contains no values.
  1103  func (oclr OuContainerListResult) IsEmpty() bool {
  1104  	return oclr.Value == nil || len(*oclr.Value) == 0
  1105  }
  1106  
  1107  // hasNextLink returns true if the NextLink is not empty.
  1108  func (oclr OuContainerListResult) hasNextLink() bool {
  1109  	return oclr.NextLink != nil && len(*oclr.NextLink) != 0
  1110  }
  1111  
  1112  // ouContainerListResultPreparer prepares a request to retrieve the next set of results.
  1113  // It returns nil if no more results exist.
  1114  func (oclr OuContainerListResult) ouContainerListResultPreparer(ctx context.Context) (*http.Request, error) {
  1115  	if !oclr.hasNextLink() {
  1116  		return nil, nil
  1117  	}
  1118  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1119  		autorest.AsJSON(),
  1120  		autorest.AsGet(),
  1121  		autorest.WithBaseURL(to.String(oclr.NextLink)))
  1122  }
  1123  
  1124  // OuContainerListResultPage contains a page of OuContainer values.
  1125  type OuContainerListResultPage struct {
  1126  	fn   func(context.Context, OuContainerListResult) (OuContainerListResult, error)
  1127  	oclr OuContainerListResult
  1128  }
  1129  
  1130  // NextWithContext advances to the next page of values.  If there was an error making
  1131  // the request the page does not advance and the error is returned.
  1132  func (page *OuContainerListResultPage) NextWithContext(ctx context.Context) (err error) {
  1133  	if tracing.IsEnabled() {
  1134  		ctx = tracing.StartSpan(ctx, fqdn+"/OuContainerListResultPage.NextWithContext")
  1135  		defer func() {
  1136  			sc := -1
  1137  			if page.Response().Response.Response != nil {
  1138  				sc = page.Response().Response.Response.StatusCode
  1139  			}
  1140  			tracing.EndSpan(ctx, sc, err)
  1141  		}()
  1142  	}
  1143  	for {
  1144  		next, err := page.fn(ctx, page.oclr)
  1145  		if err != nil {
  1146  			return err
  1147  		}
  1148  		page.oclr = next
  1149  		if !next.hasNextLink() || !next.IsEmpty() {
  1150  			break
  1151  		}
  1152  	}
  1153  	return nil
  1154  }
  1155  
  1156  // Next advances to the next page of values.  If there was an error making
  1157  // the request the page does not advance and the error is returned.
  1158  // Deprecated: Use NextWithContext() instead.
  1159  func (page *OuContainerListResultPage) Next() error {
  1160  	return page.NextWithContext(context.Background())
  1161  }
  1162  
  1163  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1164  func (page OuContainerListResultPage) NotDone() bool {
  1165  	return !page.oclr.IsEmpty()
  1166  }
  1167  
  1168  // Response returns the raw server response from the last page request.
  1169  func (page OuContainerListResultPage) Response() OuContainerListResult {
  1170  	return page.oclr
  1171  }
  1172  
  1173  // Values returns the slice of values for the current page or nil if there are no values.
  1174  func (page OuContainerListResultPage) Values() []OuContainer {
  1175  	if page.oclr.IsEmpty() {
  1176  		return nil
  1177  	}
  1178  	return *page.oclr.Value
  1179  }
  1180  
  1181  // Creates a new instance of the OuContainerListResultPage type.
  1182  func NewOuContainerListResultPage(cur OuContainerListResult, getNextPage func(context.Context, OuContainerListResult) (OuContainerListResult, error)) OuContainerListResultPage {
  1183  	return OuContainerListResultPage{
  1184  		fn:   getNextPage,
  1185  		oclr: cur,
  1186  	}
  1187  }
  1188  
  1189  // OuContainerProperties properties of the OuContainer.
  1190  type OuContainerProperties struct {
  1191  	// TenantID - READ-ONLY; Azure Active Directory tenant id
  1192  	TenantID *string `json:"tenantId,omitempty"`
  1193  	// DomainName - READ-ONLY; The domain name of Domain Services.
  1194  	DomainName *string `json:"domainName,omitempty"`
  1195  	// DeploymentID - READ-ONLY; The Deployment id
  1196  	DeploymentID *string `json:"deploymentId,omitempty"`
  1197  	// ContainerID - READ-ONLY; The OuContainer name
  1198  	ContainerID *string `json:"containerId,omitempty"`
  1199  	// Accounts - The list of container accounts
  1200  	Accounts *[]ContainerAccount `json:"accounts,omitempty"`
  1201  	// ServiceStatus - READ-ONLY; Status of OuContainer instance
  1202  	ServiceStatus *string `json:"serviceStatus,omitempty"`
  1203  	// DistinguishedName - READ-ONLY; Distinguished Name of OuContainer instance
  1204  	DistinguishedName *string `json:"distinguishedName,omitempty"`
  1205  	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
  1206  	ProvisioningState *string `json:"provisioningState,omitempty"`
  1207  }
  1208  
  1209  // MarshalJSON is the custom marshaler for OuContainerProperties.
  1210  func (ocp OuContainerProperties) MarshalJSON() ([]byte, error) {
  1211  	objectMap := make(map[string]interface{})
  1212  	if ocp.Accounts != nil {
  1213  		objectMap["accounts"] = ocp.Accounts
  1214  	}
  1215  	return json.Marshal(objectMap)
  1216  }
  1217  
  1218  // OuContainerUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  1219  // operation.
  1220  type OuContainerUpdateFuture struct {
  1221  	azure.FutureAPI
  1222  	// Result returns the result of the asynchronous operation.
  1223  	// If the operation has not completed it will return an error.
  1224  	Result func(OuContainerClient) (OuContainer, error)
  1225  }
  1226  
  1227  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1228  func (future *OuContainerUpdateFuture) UnmarshalJSON(body []byte) error {
  1229  	var azFuture azure.Future
  1230  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1231  		return err
  1232  	}
  1233  	future.FutureAPI = &azFuture
  1234  	future.Result = future.result
  1235  	return nil
  1236  }
  1237  
  1238  // result is the default implementation for OuContainerUpdateFuture.Result.
  1239  func (future *OuContainerUpdateFuture) result(client OuContainerClient) (oc OuContainer, err error) {
  1240  	var done bool
  1241  	done, err = future.DoneWithContext(context.Background(), client)
  1242  	if err != nil {
  1243  		err = autorest.NewErrorWithError(err, "aad.OuContainerUpdateFuture", "Result", future.Response(), "Polling failure")
  1244  		return
  1245  	}
  1246  	if !done {
  1247  		oc.Response.Response = future.Response()
  1248  		err = azure.NewAsyncOpIncompleteError("aad.OuContainerUpdateFuture")
  1249  		return
  1250  	}
  1251  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1252  	if oc.Response.Response, err = future.GetResult(sender); err == nil && oc.Response.Response.StatusCode != http.StatusNoContent {
  1253  		oc, err = client.UpdateResponder(oc.Response.Response)
  1254  		if err != nil {
  1255  			err = autorest.NewErrorWithError(err, "aad.OuContainerUpdateFuture", "Result", oc.Response.Response, "Failure responding to request")
  1256  		}
  1257  	}
  1258  	return
  1259  }
  1260  
  1261  // ReplicaSet replica Set Definition
  1262  type ReplicaSet struct {
  1263  	// ReplicaSetID - READ-ONLY; ReplicaSet Id
  1264  	ReplicaSetID *string `json:"replicaSetId,omitempty"`
  1265  	// Location - Virtual network location
  1266  	Location *string `json:"location,omitempty"`
  1267  	// VnetSiteID - READ-ONLY; Virtual network site id
  1268  	VnetSiteID *string `json:"vnetSiteId,omitempty"`
  1269  	// SubnetID - The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
  1270  	SubnetID *string `json:"subnetId,omitempty"`
  1271  	// DomainControllerIPAddress - READ-ONLY; List of Domain Controller IP Address
  1272  	DomainControllerIPAddress *[]string `json:"domainControllerIpAddress,omitempty"`
  1273  	// ExternalAccessIPAddress - READ-ONLY; External access ip address.
  1274  	ExternalAccessIPAddress *string `json:"externalAccessIpAddress,omitempty"`
  1275  	// ServiceStatus - READ-ONLY; Status of Domain Service instance
  1276  	ServiceStatus *string `json:"serviceStatus,omitempty"`
  1277  	// HealthLastEvaluated - READ-ONLY; Last domain evaluation run DateTime
  1278  	HealthLastEvaluated *date.TimeRFC1123 `json:"healthLastEvaluated,omitempty"`
  1279  	// HealthMonitors - READ-ONLY; List of Domain Health Monitors
  1280  	HealthMonitors *[]HealthMonitor `json:"healthMonitors,omitempty"`
  1281  	// HealthAlerts - READ-ONLY; List of Domain Health Alerts
  1282  	HealthAlerts *[]HealthAlert `json:"healthAlerts,omitempty"`
  1283  }
  1284  
  1285  // MarshalJSON is the custom marshaler for ReplicaSet.
  1286  func (rs ReplicaSet) MarshalJSON() ([]byte, error) {
  1287  	objectMap := make(map[string]interface{})
  1288  	if rs.Location != nil {
  1289  		objectMap["location"] = rs.Location
  1290  	}
  1291  	if rs.SubnetID != nil {
  1292  		objectMap["subnetId"] = rs.SubnetID
  1293  	}
  1294  	return json.Marshal(objectMap)
  1295  }
  1296  
  1297  // Resource the Resource model definition.
  1298  type Resource struct {
  1299  	// ID - READ-ONLY; Resource Id
  1300  	ID *string `json:"id,omitempty"`
  1301  	// Name - READ-ONLY; Resource name
  1302  	Name *string `json:"name,omitempty"`
  1303  	// Type - READ-ONLY; Resource type
  1304  	Type *string `json:"type,omitempty"`
  1305  	// Location - Resource location
  1306  	Location *string `json:"location,omitempty"`
  1307  	// Tags - Resource tags
  1308  	Tags map[string]*string `json:"tags"`
  1309  	// Etag - Resource etag
  1310  	Etag *string `json:"etag,omitempty"`
  1311  }
  1312  
  1313  // MarshalJSON is the custom marshaler for Resource.
  1314  func (r Resource) MarshalJSON() ([]byte, error) {
  1315  	objectMap := make(map[string]interface{})
  1316  	if r.Location != nil {
  1317  		objectMap["location"] = r.Location
  1318  	}
  1319  	if r.Tags != nil {
  1320  		objectMap["tags"] = r.Tags
  1321  	}
  1322  	if r.Etag != nil {
  1323  		objectMap["etag"] = r.Etag
  1324  	}
  1325  	return json.Marshal(objectMap)
  1326  }
  1327  
  1328  // ResourceForestSettings settings for Resource Forest
  1329  type ResourceForestSettings struct {
  1330  	// Settings - List of settings for Resource Forest
  1331  	Settings *[]ForestTrust `json:"settings,omitempty"`
  1332  	// ResourceForest - Resource Forest
  1333  	ResourceForest *string `json:"resourceForest,omitempty"`
  1334  }
  1335  

View as plain text