...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/solutions/mgmt/2021-02-01-preview/managedapplications/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/solutions/mgmt/2021-02-01-preview/managedapplications

     1  package managedapplications
     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/preview/solutions/mgmt/2021-02-01-preview/managedapplications"
    22  
    23  // AllowedUpgradePlansResult the array of plan.
    24  type AllowedUpgradePlansResult struct {
    25  	autorest.Response `json:"-"`
    26  	// Value - The array of plans.
    27  	Value *[]Plan `json:"value,omitempty"`
    28  }
    29  
    30  // Application information about managed application.
    31  type Application struct {
    32  	autorest.Response `json:"-"`
    33  	// ApplicationProperties - The managed application properties.
    34  	*ApplicationProperties `json:"properties,omitempty"`
    35  	// Plan - The plan information.
    36  	Plan *Plan `json:"plan,omitempty"`
    37  	// Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
    38  	Kind *string `json:"kind,omitempty"`
    39  	// Identity - The identity of the resource.
    40  	Identity *Identity `json:"identity,omitempty"`
    41  	// ManagedBy - ID of the resource that manages this resource.
    42  	ManagedBy *string `json:"managedBy,omitempty"`
    43  	// Sku - The SKU of the resource.
    44  	Sku *Sku `json:"sku,omitempty"`
    45  	// ID - READ-ONLY; Resource ID
    46  	ID *string `json:"id,omitempty"`
    47  	// Name - READ-ONLY; Resource name
    48  	Name *string `json:"name,omitempty"`
    49  	// Type - READ-ONLY; Resource type
    50  	Type *string `json:"type,omitempty"`
    51  	// Location - Resource location
    52  	Location *string `json:"location,omitempty"`
    53  	// Tags - Resource tags
    54  	Tags map[string]*string `json:"tags"`
    55  	// SystemData - READ-ONLY
    56  	SystemData *SystemData `json:"systemData,omitempty"`
    57  }
    58  
    59  // MarshalJSON is the custom marshaler for Application.
    60  func (a Application) MarshalJSON() ([]byte, error) {
    61  	objectMap := make(map[string]interface{})
    62  	if a.ApplicationProperties != nil {
    63  		objectMap["properties"] = a.ApplicationProperties
    64  	}
    65  	if a.Plan != nil {
    66  		objectMap["plan"] = a.Plan
    67  	}
    68  	if a.Kind != nil {
    69  		objectMap["kind"] = a.Kind
    70  	}
    71  	if a.Identity != nil {
    72  		objectMap["identity"] = a.Identity
    73  	}
    74  	if a.ManagedBy != nil {
    75  		objectMap["managedBy"] = a.ManagedBy
    76  	}
    77  	if a.Sku != nil {
    78  		objectMap["sku"] = a.Sku
    79  	}
    80  	if a.Location != nil {
    81  		objectMap["location"] = a.Location
    82  	}
    83  	if a.Tags != nil {
    84  		objectMap["tags"] = a.Tags
    85  	}
    86  	return json.Marshal(objectMap)
    87  }
    88  
    89  // UnmarshalJSON is the custom unmarshaler for Application struct.
    90  func (a *Application) UnmarshalJSON(body []byte) error {
    91  	var m map[string]*json.RawMessage
    92  	err := json.Unmarshal(body, &m)
    93  	if err != nil {
    94  		return err
    95  	}
    96  	for k, v := range m {
    97  		switch k {
    98  		case "properties":
    99  			if v != nil {
   100  				var applicationProperties ApplicationProperties
   101  				err = json.Unmarshal(*v, &applicationProperties)
   102  				if err != nil {
   103  					return err
   104  				}
   105  				a.ApplicationProperties = &applicationProperties
   106  			}
   107  		case "plan":
   108  			if v != nil {
   109  				var plan Plan
   110  				err = json.Unmarshal(*v, &plan)
   111  				if err != nil {
   112  					return err
   113  				}
   114  				a.Plan = &plan
   115  			}
   116  		case "kind":
   117  			if v != nil {
   118  				var kind string
   119  				err = json.Unmarshal(*v, &kind)
   120  				if err != nil {
   121  					return err
   122  				}
   123  				a.Kind = &kind
   124  			}
   125  		case "identity":
   126  			if v != nil {
   127  				var identity Identity
   128  				err = json.Unmarshal(*v, &identity)
   129  				if err != nil {
   130  					return err
   131  				}
   132  				a.Identity = &identity
   133  			}
   134  		case "managedBy":
   135  			if v != nil {
   136  				var managedBy string
   137  				err = json.Unmarshal(*v, &managedBy)
   138  				if err != nil {
   139  					return err
   140  				}
   141  				a.ManagedBy = &managedBy
   142  			}
   143  		case "sku":
   144  			if v != nil {
   145  				var sku Sku
   146  				err = json.Unmarshal(*v, &sku)
   147  				if err != nil {
   148  					return err
   149  				}
   150  				a.Sku = &sku
   151  			}
   152  		case "id":
   153  			if v != nil {
   154  				var ID string
   155  				err = json.Unmarshal(*v, &ID)
   156  				if err != nil {
   157  					return err
   158  				}
   159  				a.ID = &ID
   160  			}
   161  		case "name":
   162  			if v != nil {
   163  				var name string
   164  				err = json.Unmarshal(*v, &name)
   165  				if err != nil {
   166  					return err
   167  				}
   168  				a.Name = &name
   169  			}
   170  		case "type":
   171  			if v != nil {
   172  				var typeVar string
   173  				err = json.Unmarshal(*v, &typeVar)
   174  				if err != nil {
   175  					return err
   176  				}
   177  				a.Type = &typeVar
   178  			}
   179  		case "location":
   180  			if v != nil {
   181  				var location string
   182  				err = json.Unmarshal(*v, &location)
   183  				if err != nil {
   184  					return err
   185  				}
   186  				a.Location = &location
   187  			}
   188  		case "tags":
   189  			if v != nil {
   190  				var tags map[string]*string
   191  				err = json.Unmarshal(*v, &tags)
   192  				if err != nil {
   193  					return err
   194  				}
   195  				a.Tags = tags
   196  			}
   197  		case "systemData":
   198  			if v != nil {
   199  				var systemData SystemData
   200  				err = json.Unmarshal(*v, &systemData)
   201  				if err != nil {
   202  					return err
   203  				}
   204  				a.SystemData = &systemData
   205  			}
   206  		}
   207  	}
   208  
   209  	return nil
   210  }
   211  
   212  // ApplicationArtifact managed application artifact.
   213  type ApplicationArtifact struct {
   214  	// Name - The managed application artifact name. Possible values include: 'NotSpecified', 'ViewDefinition', 'Authorizations', 'CustomRoleDefinition'
   215  	Name ApplicationArtifactName `json:"name,omitempty"`
   216  	// URI - The managed application artifact blob uri.
   217  	URI *string `json:"uri,omitempty"`
   218  	// Type - The managed application artifact type. Possible values include: 'ApplicationArtifactTypeNotSpecified', 'ApplicationArtifactTypeTemplate', 'ApplicationArtifactTypeCustom'
   219  	Type ApplicationArtifactType `json:"type,omitempty"`
   220  }
   221  
   222  // ApplicationAuthorization the managed application provider authorization.
   223  type ApplicationAuthorization struct {
   224  	// PrincipalID - The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources.
   225  	PrincipalID *string `json:"principalId,omitempty"`
   226  	// RoleDefinitionID - The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.
   227  	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
   228  }
   229  
   230  // ApplicationBillingDetailsDefinition managed application billing details definition.
   231  type ApplicationBillingDetailsDefinition struct {
   232  	// ResourceUsageID - The managed application resource usage Id.
   233  	ResourceUsageID *string `json:"resourceUsageId,omitempty"`
   234  }
   235  
   236  // ApplicationClientDetails the application client details to track the entity creating/updating the
   237  // managed app resource.
   238  type ApplicationClientDetails struct {
   239  	// Oid - The client Oid.
   240  	Oid *string `json:"oid,omitempty"`
   241  	// Puid - The client Puid
   242  	Puid *string `json:"puid,omitempty"`
   243  	// ApplicationID - The client application Id.
   244  	ApplicationID *string `json:"applicationId,omitempty"`
   245  }
   246  
   247  // ApplicationDefinition information about managed application definition.
   248  type ApplicationDefinition struct {
   249  	autorest.Response `json:"-"`
   250  	// ApplicationDefinitionProperties - The managed application definition properties.
   251  	*ApplicationDefinitionProperties `json:"properties,omitempty"`
   252  	// ManagedBy - ID of the resource that manages this resource.
   253  	ManagedBy *string `json:"managedBy,omitempty"`
   254  	// Sku - The SKU of the resource.
   255  	Sku *Sku `json:"sku,omitempty"`
   256  	// ID - READ-ONLY; Resource ID
   257  	ID *string `json:"id,omitempty"`
   258  	// Name - READ-ONLY; Resource name
   259  	Name *string `json:"name,omitempty"`
   260  	// Type - READ-ONLY; Resource type
   261  	Type *string `json:"type,omitempty"`
   262  	// Location - Resource location
   263  	Location *string `json:"location,omitempty"`
   264  	// Tags - Resource tags
   265  	Tags map[string]*string `json:"tags"`
   266  	// SystemData - READ-ONLY
   267  	SystemData *SystemData `json:"systemData,omitempty"`
   268  }
   269  
   270  // MarshalJSON is the custom marshaler for ApplicationDefinition.
   271  func (ad ApplicationDefinition) MarshalJSON() ([]byte, error) {
   272  	objectMap := make(map[string]interface{})
   273  	if ad.ApplicationDefinitionProperties != nil {
   274  		objectMap["properties"] = ad.ApplicationDefinitionProperties
   275  	}
   276  	if ad.ManagedBy != nil {
   277  		objectMap["managedBy"] = ad.ManagedBy
   278  	}
   279  	if ad.Sku != nil {
   280  		objectMap["sku"] = ad.Sku
   281  	}
   282  	if ad.Location != nil {
   283  		objectMap["location"] = ad.Location
   284  	}
   285  	if ad.Tags != nil {
   286  		objectMap["tags"] = ad.Tags
   287  	}
   288  	return json.Marshal(objectMap)
   289  }
   290  
   291  // UnmarshalJSON is the custom unmarshaler for ApplicationDefinition struct.
   292  func (ad *ApplicationDefinition) UnmarshalJSON(body []byte) error {
   293  	var m map[string]*json.RawMessage
   294  	err := json.Unmarshal(body, &m)
   295  	if err != nil {
   296  		return err
   297  	}
   298  	for k, v := range m {
   299  		switch k {
   300  		case "properties":
   301  			if v != nil {
   302  				var applicationDefinitionProperties ApplicationDefinitionProperties
   303  				err = json.Unmarshal(*v, &applicationDefinitionProperties)
   304  				if err != nil {
   305  					return err
   306  				}
   307  				ad.ApplicationDefinitionProperties = &applicationDefinitionProperties
   308  			}
   309  		case "managedBy":
   310  			if v != nil {
   311  				var managedBy string
   312  				err = json.Unmarshal(*v, &managedBy)
   313  				if err != nil {
   314  					return err
   315  				}
   316  				ad.ManagedBy = &managedBy
   317  			}
   318  		case "sku":
   319  			if v != nil {
   320  				var sku Sku
   321  				err = json.Unmarshal(*v, &sku)
   322  				if err != nil {
   323  					return err
   324  				}
   325  				ad.Sku = &sku
   326  			}
   327  		case "id":
   328  			if v != nil {
   329  				var ID string
   330  				err = json.Unmarshal(*v, &ID)
   331  				if err != nil {
   332  					return err
   333  				}
   334  				ad.ID = &ID
   335  			}
   336  		case "name":
   337  			if v != nil {
   338  				var name string
   339  				err = json.Unmarshal(*v, &name)
   340  				if err != nil {
   341  					return err
   342  				}
   343  				ad.Name = &name
   344  			}
   345  		case "type":
   346  			if v != nil {
   347  				var typeVar string
   348  				err = json.Unmarshal(*v, &typeVar)
   349  				if err != nil {
   350  					return err
   351  				}
   352  				ad.Type = &typeVar
   353  			}
   354  		case "location":
   355  			if v != nil {
   356  				var location string
   357  				err = json.Unmarshal(*v, &location)
   358  				if err != nil {
   359  					return err
   360  				}
   361  				ad.Location = &location
   362  			}
   363  		case "tags":
   364  			if v != nil {
   365  				var tags map[string]*string
   366  				err = json.Unmarshal(*v, &tags)
   367  				if err != nil {
   368  					return err
   369  				}
   370  				ad.Tags = tags
   371  			}
   372  		case "systemData":
   373  			if v != nil {
   374  				var systemData SystemData
   375  				err = json.Unmarshal(*v, &systemData)
   376  				if err != nil {
   377  					return err
   378  				}
   379  				ad.SystemData = &systemData
   380  			}
   381  		}
   382  	}
   383  
   384  	return nil
   385  }
   386  
   387  // ApplicationDefinitionArtifact application definition artifact.
   388  type ApplicationDefinitionArtifact struct {
   389  	// Name - The managed application definition artifact name. Possible values include: 'ApplicationDefinitionArtifactNameNotSpecified', 'ApplicationDefinitionArtifactNameApplicationResourceTemplate', 'ApplicationDefinitionArtifactNameCreateUIDefinition', 'ApplicationDefinitionArtifactNameMainTemplateParameters'
   390  	Name ApplicationDefinitionArtifactName `json:"name,omitempty"`
   391  	// URI - The managed application definition artifact blob uri.
   392  	URI *string `json:"uri,omitempty"`
   393  	// Type - The managed application definition artifact type. Possible values include: 'ApplicationArtifactTypeNotSpecified', 'ApplicationArtifactTypeTemplate', 'ApplicationArtifactTypeCustom'
   394  	Type ApplicationArtifactType `json:"type,omitempty"`
   395  }
   396  
   397  // ApplicationDefinitionListResult list of managed application definitions.
   398  type ApplicationDefinitionListResult struct {
   399  	autorest.Response `json:"-"`
   400  	// Value - The array of managed application definitions.
   401  	Value *[]ApplicationDefinition `json:"value,omitempty"`
   402  	// NextLink - The URL to use for getting the next set of results.
   403  	NextLink *string `json:"nextLink,omitempty"`
   404  }
   405  
   406  // ApplicationDefinitionListResultIterator provides access to a complete listing of ApplicationDefinition
   407  // values.
   408  type ApplicationDefinitionListResultIterator struct {
   409  	i    int
   410  	page ApplicationDefinitionListResultPage
   411  }
   412  
   413  // NextWithContext advances to the next value.  If there was an error making
   414  // the request the iterator does not advance and the error is returned.
   415  func (iter *ApplicationDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
   416  	if tracing.IsEnabled() {
   417  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionListResultIterator.NextWithContext")
   418  		defer func() {
   419  			sc := -1
   420  			if iter.Response().Response.Response != nil {
   421  				sc = iter.Response().Response.Response.StatusCode
   422  			}
   423  			tracing.EndSpan(ctx, sc, err)
   424  		}()
   425  	}
   426  	iter.i++
   427  	if iter.i < len(iter.page.Values()) {
   428  		return nil
   429  	}
   430  	err = iter.page.NextWithContext(ctx)
   431  	if err != nil {
   432  		iter.i--
   433  		return err
   434  	}
   435  	iter.i = 0
   436  	return nil
   437  }
   438  
   439  // Next advances to the next value.  If there was an error making
   440  // the request the iterator does not advance and the error is returned.
   441  // Deprecated: Use NextWithContext() instead.
   442  func (iter *ApplicationDefinitionListResultIterator) Next() error {
   443  	return iter.NextWithContext(context.Background())
   444  }
   445  
   446  // NotDone returns true if the enumeration should be started or is not yet complete.
   447  func (iter ApplicationDefinitionListResultIterator) NotDone() bool {
   448  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   449  }
   450  
   451  // Response returns the raw server response from the last page request.
   452  func (iter ApplicationDefinitionListResultIterator) Response() ApplicationDefinitionListResult {
   453  	return iter.page.Response()
   454  }
   455  
   456  // Value returns the current value or a zero-initialized value if the
   457  // iterator has advanced beyond the end of the collection.
   458  func (iter ApplicationDefinitionListResultIterator) Value() ApplicationDefinition {
   459  	if !iter.page.NotDone() {
   460  		return ApplicationDefinition{}
   461  	}
   462  	return iter.page.Values()[iter.i]
   463  }
   464  
   465  // Creates a new instance of the ApplicationDefinitionListResultIterator type.
   466  func NewApplicationDefinitionListResultIterator(page ApplicationDefinitionListResultPage) ApplicationDefinitionListResultIterator {
   467  	return ApplicationDefinitionListResultIterator{page: page}
   468  }
   469  
   470  // IsEmpty returns true if the ListResult contains no values.
   471  func (adlr ApplicationDefinitionListResult) IsEmpty() bool {
   472  	return adlr.Value == nil || len(*adlr.Value) == 0
   473  }
   474  
   475  // hasNextLink returns true if the NextLink is not empty.
   476  func (adlr ApplicationDefinitionListResult) hasNextLink() bool {
   477  	return adlr.NextLink != nil && len(*adlr.NextLink) != 0
   478  }
   479  
   480  // applicationDefinitionListResultPreparer prepares a request to retrieve the next set of results.
   481  // It returns nil if no more results exist.
   482  func (adlr ApplicationDefinitionListResult) applicationDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
   483  	if !adlr.hasNextLink() {
   484  		return nil, nil
   485  	}
   486  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   487  		autorest.AsJSON(),
   488  		autorest.AsGet(),
   489  		autorest.WithBaseURL(to.String(adlr.NextLink)))
   490  }
   491  
   492  // ApplicationDefinitionListResultPage contains a page of ApplicationDefinition values.
   493  type ApplicationDefinitionListResultPage struct {
   494  	fn   func(context.Context, ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error)
   495  	adlr ApplicationDefinitionListResult
   496  }
   497  
   498  // NextWithContext advances to the next page of values.  If there was an error making
   499  // the request the page does not advance and the error is returned.
   500  func (page *ApplicationDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
   501  	if tracing.IsEnabled() {
   502  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionListResultPage.NextWithContext")
   503  		defer func() {
   504  			sc := -1
   505  			if page.Response().Response.Response != nil {
   506  				sc = page.Response().Response.Response.StatusCode
   507  			}
   508  			tracing.EndSpan(ctx, sc, err)
   509  		}()
   510  	}
   511  	for {
   512  		next, err := page.fn(ctx, page.adlr)
   513  		if err != nil {
   514  			return err
   515  		}
   516  		page.adlr = next
   517  		if !next.hasNextLink() || !next.IsEmpty() {
   518  			break
   519  		}
   520  	}
   521  	return nil
   522  }
   523  
   524  // Next advances to the next page of values.  If there was an error making
   525  // the request the page does not advance and the error is returned.
   526  // Deprecated: Use NextWithContext() instead.
   527  func (page *ApplicationDefinitionListResultPage) Next() error {
   528  	return page.NextWithContext(context.Background())
   529  }
   530  
   531  // NotDone returns true if the page enumeration should be started or is not yet complete.
   532  func (page ApplicationDefinitionListResultPage) NotDone() bool {
   533  	return !page.adlr.IsEmpty()
   534  }
   535  
   536  // Response returns the raw server response from the last page request.
   537  func (page ApplicationDefinitionListResultPage) Response() ApplicationDefinitionListResult {
   538  	return page.adlr
   539  }
   540  
   541  // Values returns the slice of values for the current page or nil if there are no values.
   542  func (page ApplicationDefinitionListResultPage) Values() []ApplicationDefinition {
   543  	if page.adlr.IsEmpty() {
   544  		return nil
   545  	}
   546  	return *page.adlr.Value
   547  }
   548  
   549  // Creates a new instance of the ApplicationDefinitionListResultPage type.
   550  func NewApplicationDefinitionListResultPage(cur ApplicationDefinitionListResult, getNextPage func(context.Context, ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error)) ApplicationDefinitionListResultPage {
   551  	return ApplicationDefinitionListResultPage{
   552  		fn:   getNextPage,
   553  		adlr: cur,
   554  	}
   555  }
   556  
   557  // ApplicationDefinitionPatchable information about an application definition request.
   558  type ApplicationDefinitionPatchable struct {
   559  	// Tags - Application definition tags
   560  	Tags map[string]*string `json:"tags"`
   561  }
   562  
   563  // MarshalJSON is the custom marshaler for ApplicationDefinitionPatchable.
   564  func (adp ApplicationDefinitionPatchable) MarshalJSON() ([]byte, error) {
   565  	objectMap := make(map[string]interface{})
   566  	if adp.Tags != nil {
   567  		objectMap["tags"] = adp.Tags
   568  	}
   569  	return json.Marshal(objectMap)
   570  }
   571  
   572  // ApplicationDefinitionProperties the managed application definition properties.
   573  type ApplicationDefinitionProperties struct {
   574  	// LockLevel - The managed application lock level. Possible values include: 'CanNotDelete', 'ReadOnly', 'None'
   575  	LockLevel ApplicationLockLevel `json:"lockLevel,omitempty"`
   576  	// DisplayName - The managed application definition display name.
   577  	DisplayName *string `json:"displayName,omitempty"`
   578  	// IsEnabled - A value indicating whether the package is enabled or not.
   579  	IsEnabled *bool `json:"isEnabled,omitempty"`
   580  	// Authorizations - The managed application provider authorizations.
   581  	Authorizations *[]ApplicationAuthorization `json:"authorizations,omitempty"`
   582  	// Artifacts - The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition.
   583  	Artifacts *[]ApplicationDefinitionArtifact `json:"artifacts,omitempty"`
   584  	// Description - The managed application definition description.
   585  	Description *string `json:"description,omitempty"`
   586  	// PackageFileURI - The managed application definition package file Uri. Use this element
   587  	PackageFileURI *string `json:"packageFileUri,omitempty"`
   588  	// StorageAccountID - The storage account id for bring your own storage scenario.
   589  	StorageAccountID *string `json:"storageAccountId,omitempty"`
   590  	// MainTemplate - The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string.
   591  	MainTemplate interface{} `json:"mainTemplate,omitempty"`
   592  	// CreateUIDefinition - The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string.
   593  	CreateUIDefinition interface{} `json:"createUiDefinition,omitempty"`
   594  	// NotificationPolicy - The managed application notification policy.
   595  	NotificationPolicy *ApplicationNotificationPolicy `json:"notificationPolicy,omitempty"`
   596  	// LockingPolicy - The managed application locking policy.
   597  	LockingPolicy *ApplicationPackageLockingPolicyDefinition `json:"lockingPolicy,omitempty"`
   598  	// DeploymentPolicy - The managed application deployment policy.
   599  	DeploymentPolicy *ApplicationDeploymentPolicy `json:"deploymentPolicy,omitempty"`
   600  	// ManagementPolicy - The managed application management policy that determines publisher's access to the managed resource group.
   601  	ManagementPolicy *ApplicationManagementPolicy `json:"managementPolicy,omitempty"`
   602  	// Policies - The managed application provider policies.
   603  	Policies *[]ApplicationPolicy `json:"policies,omitempty"`
   604  }
   605  
   606  // ApplicationDeploymentPolicy managed application deployment policy.
   607  type ApplicationDeploymentPolicy struct {
   608  	// DeploymentMode - The managed application deployment mode. Possible values include: 'DeploymentModeNotSpecified', 'DeploymentModeIncremental', 'DeploymentModeComplete'
   609  	DeploymentMode DeploymentMode `json:"deploymentMode,omitempty"`
   610  }
   611  
   612  // ApplicationJitAccessPolicy managed application Jit access policy.
   613  type ApplicationJitAccessPolicy struct {
   614  	// JitAccessEnabled - Whether the JIT access is enabled.
   615  	JitAccessEnabled *bool `json:"jitAccessEnabled,omitempty"`
   616  	// JitApprovalMode - JIT approval mode. Possible values include: 'JitApprovalModeNotSpecified', 'JitApprovalModeAutoApprove', 'JitApprovalModeManualApprove'
   617  	JitApprovalMode JitApprovalMode `json:"jitApprovalMode,omitempty"`
   618  	// JitApprovers - The JIT approvers
   619  	JitApprovers *[]JitApproverDefinition `json:"jitApprovers,omitempty"`
   620  	// MaximumJitAccessDuration - The maximum duration JIT access is granted. This is an ISO8601 time period value.
   621  	MaximumJitAccessDuration *string `json:"maximumJitAccessDuration,omitempty"`
   622  }
   623  
   624  // ApplicationListResult list of managed applications.
   625  type ApplicationListResult struct {
   626  	autorest.Response `json:"-"`
   627  	// Value - The array of managed applications.
   628  	Value *[]Application `json:"value,omitempty"`
   629  	// NextLink - The URL to use for getting the next set of results.
   630  	NextLink *string `json:"nextLink,omitempty"`
   631  }
   632  
   633  // ApplicationListResultIterator provides access to a complete listing of Application values.
   634  type ApplicationListResultIterator struct {
   635  	i    int
   636  	page ApplicationListResultPage
   637  }
   638  
   639  // NextWithContext advances to the next value.  If there was an error making
   640  // the request the iterator does not advance and the error is returned.
   641  func (iter *ApplicationListResultIterator) NextWithContext(ctx context.Context) (err error) {
   642  	if tracing.IsEnabled() {
   643  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultIterator.NextWithContext")
   644  		defer func() {
   645  			sc := -1
   646  			if iter.Response().Response.Response != nil {
   647  				sc = iter.Response().Response.Response.StatusCode
   648  			}
   649  			tracing.EndSpan(ctx, sc, err)
   650  		}()
   651  	}
   652  	iter.i++
   653  	if iter.i < len(iter.page.Values()) {
   654  		return nil
   655  	}
   656  	err = iter.page.NextWithContext(ctx)
   657  	if err != nil {
   658  		iter.i--
   659  		return err
   660  	}
   661  	iter.i = 0
   662  	return nil
   663  }
   664  
   665  // Next advances to the next value.  If there was an error making
   666  // the request the iterator does not advance and the error is returned.
   667  // Deprecated: Use NextWithContext() instead.
   668  func (iter *ApplicationListResultIterator) Next() error {
   669  	return iter.NextWithContext(context.Background())
   670  }
   671  
   672  // NotDone returns true if the enumeration should be started or is not yet complete.
   673  func (iter ApplicationListResultIterator) NotDone() bool {
   674  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   675  }
   676  
   677  // Response returns the raw server response from the last page request.
   678  func (iter ApplicationListResultIterator) Response() ApplicationListResult {
   679  	return iter.page.Response()
   680  }
   681  
   682  // Value returns the current value or a zero-initialized value if the
   683  // iterator has advanced beyond the end of the collection.
   684  func (iter ApplicationListResultIterator) Value() Application {
   685  	if !iter.page.NotDone() {
   686  		return Application{}
   687  	}
   688  	return iter.page.Values()[iter.i]
   689  }
   690  
   691  // Creates a new instance of the ApplicationListResultIterator type.
   692  func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator {
   693  	return ApplicationListResultIterator{page: page}
   694  }
   695  
   696  // IsEmpty returns true if the ListResult contains no values.
   697  func (alr ApplicationListResult) IsEmpty() bool {
   698  	return alr.Value == nil || len(*alr.Value) == 0
   699  }
   700  
   701  // hasNextLink returns true if the NextLink is not empty.
   702  func (alr ApplicationListResult) hasNextLink() bool {
   703  	return alr.NextLink != nil && len(*alr.NextLink) != 0
   704  }
   705  
   706  // applicationListResultPreparer prepares a request to retrieve the next set of results.
   707  // It returns nil if no more results exist.
   708  func (alr ApplicationListResult) applicationListResultPreparer(ctx context.Context) (*http.Request, error) {
   709  	if !alr.hasNextLink() {
   710  		return nil, nil
   711  	}
   712  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   713  		autorest.AsJSON(),
   714  		autorest.AsGet(),
   715  		autorest.WithBaseURL(to.String(alr.NextLink)))
   716  }
   717  
   718  // ApplicationListResultPage contains a page of Application values.
   719  type ApplicationListResultPage struct {
   720  	fn  func(context.Context, ApplicationListResult) (ApplicationListResult, error)
   721  	alr ApplicationListResult
   722  }
   723  
   724  // NextWithContext advances to the next page of values.  If there was an error making
   725  // the request the page does not advance and the error is returned.
   726  func (page *ApplicationListResultPage) NextWithContext(ctx context.Context) (err error) {
   727  	if tracing.IsEnabled() {
   728  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultPage.NextWithContext")
   729  		defer func() {
   730  			sc := -1
   731  			if page.Response().Response.Response != nil {
   732  				sc = page.Response().Response.Response.StatusCode
   733  			}
   734  			tracing.EndSpan(ctx, sc, err)
   735  		}()
   736  	}
   737  	for {
   738  		next, err := page.fn(ctx, page.alr)
   739  		if err != nil {
   740  			return err
   741  		}
   742  		page.alr = next
   743  		if !next.hasNextLink() || !next.IsEmpty() {
   744  			break
   745  		}
   746  	}
   747  	return nil
   748  }
   749  
   750  // Next advances to the next page of values.  If there was an error making
   751  // the request the page does not advance and the error is returned.
   752  // Deprecated: Use NextWithContext() instead.
   753  func (page *ApplicationListResultPage) Next() error {
   754  	return page.NextWithContext(context.Background())
   755  }
   756  
   757  // NotDone returns true if the page enumeration should be started or is not yet complete.
   758  func (page ApplicationListResultPage) NotDone() bool {
   759  	return !page.alr.IsEmpty()
   760  }
   761  
   762  // Response returns the raw server response from the last page request.
   763  func (page ApplicationListResultPage) Response() ApplicationListResult {
   764  	return page.alr
   765  }
   766  
   767  // Values returns the slice of values for the current page or nil if there are no values.
   768  func (page ApplicationListResultPage) Values() []Application {
   769  	if page.alr.IsEmpty() {
   770  		return nil
   771  	}
   772  	return *page.alr.Value
   773  }
   774  
   775  // Creates a new instance of the ApplicationListResultPage type.
   776  func NewApplicationListResultPage(cur ApplicationListResult, getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage {
   777  	return ApplicationListResultPage{
   778  		fn:  getNextPage,
   779  		alr: cur,
   780  	}
   781  }
   782  
   783  // ApplicationManagementPolicy managed application management policy.
   784  type ApplicationManagementPolicy struct {
   785  	// Mode - The managed application management mode. Possible values include: 'ApplicationManagementModeNotSpecified', 'ApplicationManagementModeUnmanaged', 'ApplicationManagementModeManaged'
   786  	Mode ApplicationManagementMode `json:"mode,omitempty"`
   787  }
   788  
   789  // ApplicationNotificationEndpoint managed application notification endpoint.
   790  type ApplicationNotificationEndpoint struct {
   791  	// URI - The managed application notification endpoint uri.
   792  	URI *string `json:"uri,omitempty"`
   793  }
   794  
   795  // ApplicationNotificationPolicy managed application notification policy.
   796  type ApplicationNotificationPolicy struct {
   797  	// NotificationEndpoints - The managed application notification endpoint.
   798  	NotificationEndpoints *[]ApplicationNotificationEndpoint `json:"notificationEndpoints,omitempty"`
   799  }
   800  
   801  // ApplicationPackageContact the application package contact information.
   802  type ApplicationPackageContact struct {
   803  	// ContactName - The contact name.
   804  	ContactName *string `json:"contactName,omitempty"`
   805  	// Email - The contact email.
   806  	Email *string `json:"email,omitempty"`
   807  	// Phone - The contact phone number.
   808  	Phone *string `json:"phone,omitempty"`
   809  }
   810  
   811  // ApplicationPackageLockingPolicyDefinition managed application locking policy.
   812  type ApplicationPackageLockingPolicyDefinition struct {
   813  	// AllowedActions - The deny assignment excluded actions.
   814  	AllowedActions *[]string `json:"allowedActions,omitempty"`
   815  	// AllowedDataActions - The deny assignment excluded data actions.
   816  	AllowedDataActions *[]string `json:"allowedDataActions,omitempty"`
   817  }
   818  
   819  // ApplicationPackageSupportUrls the appliance package support URLs.
   820  type ApplicationPackageSupportUrls struct {
   821  	// PublicAzure - The public azure support URL.
   822  	PublicAzure *string `json:"publicAzure,omitempty"`
   823  	// GovernmentCloud - The government cloud support URL.
   824  	GovernmentCloud *string `json:"governmentCloud,omitempty"`
   825  }
   826  
   827  // ApplicationPatchable information about managed application.
   828  type ApplicationPatchable struct {
   829  	autorest.Response `json:"-"`
   830  	// ApplicationProperties - The managed application properties.
   831  	*ApplicationProperties `json:"properties,omitempty"`
   832  	// Plan - The plan information.
   833  	Plan *PlanPatchable `json:"plan,omitempty"`
   834  	// Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
   835  	Kind *string `json:"kind,omitempty"`
   836  	// Identity - The identity of the resource.
   837  	Identity *Identity `json:"identity,omitempty"`
   838  	// ManagedBy - ID of the resource that manages this resource.
   839  	ManagedBy *string `json:"managedBy,omitempty"`
   840  	// Sku - The SKU of the resource.
   841  	Sku *Sku `json:"sku,omitempty"`
   842  	// ID - READ-ONLY; Resource ID
   843  	ID *string `json:"id,omitempty"`
   844  	// Name - READ-ONLY; Resource name
   845  	Name *string `json:"name,omitempty"`
   846  	// Type - READ-ONLY; Resource type
   847  	Type *string `json:"type,omitempty"`
   848  	// Location - Resource location
   849  	Location *string `json:"location,omitempty"`
   850  	// Tags - Resource tags
   851  	Tags map[string]*string `json:"tags"`
   852  	// SystemData - READ-ONLY
   853  	SystemData *SystemData `json:"systemData,omitempty"`
   854  }
   855  
   856  // MarshalJSON is the custom marshaler for ApplicationPatchable.
   857  func (ap ApplicationPatchable) MarshalJSON() ([]byte, error) {
   858  	objectMap := make(map[string]interface{})
   859  	if ap.ApplicationProperties != nil {
   860  		objectMap["properties"] = ap.ApplicationProperties
   861  	}
   862  	if ap.Plan != nil {
   863  		objectMap["plan"] = ap.Plan
   864  	}
   865  	if ap.Kind != nil {
   866  		objectMap["kind"] = ap.Kind
   867  	}
   868  	if ap.Identity != nil {
   869  		objectMap["identity"] = ap.Identity
   870  	}
   871  	if ap.ManagedBy != nil {
   872  		objectMap["managedBy"] = ap.ManagedBy
   873  	}
   874  	if ap.Sku != nil {
   875  		objectMap["sku"] = ap.Sku
   876  	}
   877  	if ap.Location != nil {
   878  		objectMap["location"] = ap.Location
   879  	}
   880  	if ap.Tags != nil {
   881  		objectMap["tags"] = ap.Tags
   882  	}
   883  	return json.Marshal(objectMap)
   884  }
   885  
   886  // UnmarshalJSON is the custom unmarshaler for ApplicationPatchable struct.
   887  func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error {
   888  	var m map[string]*json.RawMessage
   889  	err := json.Unmarshal(body, &m)
   890  	if err != nil {
   891  		return err
   892  	}
   893  	for k, v := range m {
   894  		switch k {
   895  		case "properties":
   896  			if v != nil {
   897  				var applicationProperties ApplicationProperties
   898  				err = json.Unmarshal(*v, &applicationProperties)
   899  				if err != nil {
   900  					return err
   901  				}
   902  				ap.ApplicationProperties = &applicationProperties
   903  			}
   904  		case "plan":
   905  			if v != nil {
   906  				var plan PlanPatchable
   907  				err = json.Unmarshal(*v, &plan)
   908  				if err != nil {
   909  					return err
   910  				}
   911  				ap.Plan = &plan
   912  			}
   913  		case "kind":
   914  			if v != nil {
   915  				var kind string
   916  				err = json.Unmarshal(*v, &kind)
   917  				if err != nil {
   918  					return err
   919  				}
   920  				ap.Kind = &kind
   921  			}
   922  		case "identity":
   923  			if v != nil {
   924  				var identity Identity
   925  				err = json.Unmarshal(*v, &identity)
   926  				if err != nil {
   927  					return err
   928  				}
   929  				ap.Identity = &identity
   930  			}
   931  		case "managedBy":
   932  			if v != nil {
   933  				var managedBy string
   934  				err = json.Unmarshal(*v, &managedBy)
   935  				if err != nil {
   936  					return err
   937  				}
   938  				ap.ManagedBy = &managedBy
   939  			}
   940  		case "sku":
   941  			if v != nil {
   942  				var sku Sku
   943  				err = json.Unmarshal(*v, &sku)
   944  				if err != nil {
   945  					return err
   946  				}
   947  				ap.Sku = &sku
   948  			}
   949  		case "id":
   950  			if v != nil {
   951  				var ID string
   952  				err = json.Unmarshal(*v, &ID)
   953  				if err != nil {
   954  					return err
   955  				}
   956  				ap.ID = &ID
   957  			}
   958  		case "name":
   959  			if v != nil {
   960  				var name string
   961  				err = json.Unmarshal(*v, &name)
   962  				if err != nil {
   963  					return err
   964  				}
   965  				ap.Name = &name
   966  			}
   967  		case "type":
   968  			if v != nil {
   969  				var typeVar string
   970  				err = json.Unmarshal(*v, &typeVar)
   971  				if err != nil {
   972  					return err
   973  				}
   974  				ap.Type = &typeVar
   975  			}
   976  		case "location":
   977  			if v != nil {
   978  				var location string
   979  				err = json.Unmarshal(*v, &location)
   980  				if err != nil {
   981  					return err
   982  				}
   983  				ap.Location = &location
   984  			}
   985  		case "tags":
   986  			if v != nil {
   987  				var tags map[string]*string
   988  				err = json.Unmarshal(*v, &tags)
   989  				if err != nil {
   990  					return err
   991  				}
   992  				ap.Tags = tags
   993  			}
   994  		case "systemData":
   995  			if v != nil {
   996  				var systemData SystemData
   997  				err = json.Unmarshal(*v, &systemData)
   998  				if err != nil {
   999  					return err
  1000  				}
  1001  				ap.SystemData = &systemData
  1002  			}
  1003  		}
  1004  	}
  1005  
  1006  	return nil
  1007  }
  1008  
  1009  // ApplicationPolicy managed application policy.
  1010  type ApplicationPolicy struct {
  1011  	// Name - The policy name
  1012  	Name *string `json:"name,omitempty"`
  1013  	// PolicyDefinitionID - The policy definition Id.
  1014  	PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
  1015  	// Parameters - The policy parameters.
  1016  	Parameters *string `json:"parameters,omitempty"`
  1017  }
  1018  
  1019  // ApplicationProperties the managed application properties.
  1020  type ApplicationProperties struct {
  1021  	// ManagedResourceGroupID - The managed resource group Id.
  1022  	ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"`
  1023  	// ApplicationDefinitionID - The fully qualified path of managed application definition Id.
  1024  	ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"`
  1025  	// Parameters - Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
  1026  	Parameters interface{} `json:"parameters,omitempty"`
  1027  	// Outputs - READ-ONLY; Name and value pairs that define the managed application outputs.
  1028  	Outputs interface{} `json:"outputs,omitempty"`
  1029  	// ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateNotSpecified', 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating'
  1030  	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
  1031  	// BillingDetails - READ-ONLY; The managed application billing details.
  1032  	BillingDetails *ApplicationBillingDetailsDefinition `json:"billingDetails,omitempty"`
  1033  	// JitAccessPolicy - The managed application Jit access policy.
  1034  	JitAccessPolicy *ApplicationJitAccessPolicy `json:"jitAccessPolicy,omitempty"`
  1035  	// PublisherTenantID - READ-ONLY; The publisher tenant Id.
  1036  	PublisherTenantID *string `json:"publisherTenantId,omitempty"`
  1037  	// Authorizations - READ-ONLY; The  read-only authorizations property that is retrieved from the application package.
  1038  	Authorizations *[]ApplicationAuthorization `json:"authorizations,omitempty"`
  1039  	// ManagementMode - READ-ONLY; The managed application management mode. Possible values include: 'ApplicationManagementModeNotSpecified', 'ApplicationManagementModeUnmanaged', 'ApplicationManagementModeManaged'
  1040  	ManagementMode ApplicationManagementMode `json:"managementMode,omitempty"`
  1041  	// CustomerSupport - READ-ONLY; The read-only customer support property that is retrieved from the application package.
  1042  	CustomerSupport *ApplicationPackageContact `json:"customerSupport,omitempty"`
  1043  	// SupportUrls - READ-ONLY; The read-only support URLs property that is retrieved from the application package.
  1044  	SupportUrls *ApplicationPackageSupportUrls `json:"supportUrls,omitempty"`
  1045  	// Artifacts - READ-ONLY; The collection of managed application artifacts.
  1046  	Artifacts *[]ApplicationArtifact `json:"artifacts,omitempty"`
  1047  	// CreatedBy - READ-ONLY; The client entity that created the JIT request.
  1048  	CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty"`
  1049  	// UpdatedBy - READ-ONLY; The client entity that last updated the JIT request.
  1050  	UpdatedBy *ApplicationClientDetails `json:"updatedBy,omitempty"`
  1051  }
  1052  
  1053  // MarshalJSON is the custom marshaler for ApplicationProperties.
  1054  func (ap ApplicationProperties) MarshalJSON() ([]byte, error) {
  1055  	objectMap := make(map[string]interface{})
  1056  	if ap.ManagedResourceGroupID != nil {
  1057  		objectMap["managedResourceGroupId"] = ap.ManagedResourceGroupID
  1058  	}
  1059  	if ap.ApplicationDefinitionID != nil {
  1060  		objectMap["applicationDefinitionId"] = ap.ApplicationDefinitionID
  1061  	}
  1062  	if ap.Parameters != nil {
  1063  		objectMap["parameters"] = ap.Parameters
  1064  	}
  1065  	if ap.JitAccessPolicy != nil {
  1066  		objectMap["jitAccessPolicy"] = ap.JitAccessPolicy
  1067  	}
  1068  	return json.Marshal(objectMap)
  1069  }
  1070  
  1071  // ApplicationPropertiesPatchable the managed application properties.
  1072  type ApplicationPropertiesPatchable struct {
  1073  	// ManagedResourceGroupID - The managed resource group Id.
  1074  	ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"`
  1075  	// ApplicationDefinitionID - The fully qualified path of managed application definition Id.
  1076  	ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"`
  1077  	// Parameters - Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
  1078  	Parameters interface{} `json:"parameters,omitempty"`
  1079  	// Outputs - READ-ONLY; Name and value pairs that define the managed application outputs.
  1080  	Outputs interface{} `json:"outputs,omitempty"`
  1081  	// ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateNotSpecified', 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating'
  1082  	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
  1083  }
  1084  
  1085  // MarshalJSON is the custom marshaler for ApplicationPropertiesPatchable.
  1086  func (app ApplicationPropertiesPatchable) MarshalJSON() ([]byte, error) {
  1087  	objectMap := make(map[string]interface{})
  1088  	if app.ManagedResourceGroupID != nil {
  1089  		objectMap["managedResourceGroupId"] = app.ManagedResourceGroupID
  1090  	}
  1091  	if app.ApplicationDefinitionID != nil {
  1092  		objectMap["applicationDefinitionId"] = app.ApplicationDefinitionID
  1093  	}
  1094  	if app.Parameters != nil {
  1095  		objectMap["parameters"] = app.Parameters
  1096  	}
  1097  	return json.Marshal(objectMap)
  1098  }
  1099  
  1100  // ApplicationsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a
  1101  // long-running operation.
  1102  type ApplicationsCreateOrUpdateByIDFuture struct {
  1103  	azure.FutureAPI
  1104  	// Result returns the result of the asynchronous operation.
  1105  	// If the operation has not completed it will return an error.
  1106  	Result func(ApplicationsClient) (Application, error)
  1107  }
  1108  
  1109  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1110  func (future *ApplicationsCreateOrUpdateByIDFuture) UnmarshalJSON(body []byte) error {
  1111  	var azFuture azure.Future
  1112  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1113  		return err
  1114  	}
  1115  	future.FutureAPI = &azFuture
  1116  	future.Result = future.result
  1117  	return nil
  1118  }
  1119  
  1120  // result is the default implementation for ApplicationsCreateOrUpdateByIDFuture.Result.
  1121  func (future *ApplicationsCreateOrUpdateByIDFuture) result(client ApplicationsClient) (a Application, err error) {
  1122  	var done bool
  1123  	done, err = future.DoneWithContext(context.Background(), client)
  1124  	if err != nil {
  1125  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
  1126  		return
  1127  	}
  1128  	if !done {
  1129  		a.Response.Response = future.Response()
  1130  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateByIDFuture")
  1131  		return
  1132  	}
  1133  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1134  	if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
  1135  		a, err = client.CreateOrUpdateByIDResponder(a.Response.Response)
  1136  		if err != nil {
  1137  			err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", a.Response.Response, "Failure responding to request")
  1138  		}
  1139  	}
  1140  	return
  1141  }
  1142  
  1143  // ApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  1144  // long-running operation.
  1145  type ApplicationsCreateOrUpdateFuture struct {
  1146  	azure.FutureAPI
  1147  	// Result returns the result of the asynchronous operation.
  1148  	// If the operation has not completed it will return an error.
  1149  	Result func(ApplicationsClient) (Application, error)
  1150  }
  1151  
  1152  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1153  func (future *ApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1154  	var azFuture azure.Future
  1155  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1156  		return err
  1157  	}
  1158  	future.FutureAPI = &azFuture
  1159  	future.Result = future.result
  1160  	return nil
  1161  }
  1162  
  1163  // result is the default implementation for ApplicationsCreateOrUpdateFuture.Result.
  1164  func (future *ApplicationsCreateOrUpdateFuture) result(client ApplicationsClient) (a Application, err error) {
  1165  	var done bool
  1166  	done, err = future.DoneWithContext(context.Background(), client)
  1167  	if err != nil {
  1168  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1169  		return
  1170  	}
  1171  	if !done {
  1172  		a.Response.Response = future.Response()
  1173  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateFuture")
  1174  		return
  1175  	}
  1176  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1177  	if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
  1178  		a, err = client.CreateOrUpdateResponder(a.Response.Response)
  1179  		if err != nil {
  1180  			err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request")
  1181  		}
  1182  	}
  1183  	return
  1184  }
  1185  
  1186  // ApplicationsDeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running
  1187  // operation.
  1188  type ApplicationsDeleteByIDFuture struct {
  1189  	azure.FutureAPI
  1190  	// Result returns the result of the asynchronous operation.
  1191  	// If the operation has not completed it will return an error.
  1192  	Result func(ApplicationsClient) (autorest.Response, error)
  1193  }
  1194  
  1195  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1196  func (future *ApplicationsDeleteByIDFuture) UnmarshalJSON(body []byte) error {
  1197  	var azFuture azure.Future
  1198  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1199  		return err
  1200  	}
  1201  	future.FutureAPI = &azFuture
  1202  	future.Result = future.result
  1203  	return nil
  1204  }
  1205  
  1206  // result is the default implementation for ApplicationsDeleteByIDFuture.Result.
  1207  func (future *ApplicationsDeleteByIDFuture) result(client ApplicationsClient) (ar autorest.Response, err error) {
  1208  	var done bool
  1209  	done, err = future.DoneWithContext(context.Background(), client)
  1210  	if err != nil {
  1211  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteByIDFuture", "Result", future.Response(), "Polling failure")
  1212  		return
  1213  	}
  1214  	if !done {
  1215  		ar.Response = future.Response()
  1216  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteByIDFuture")
  1217  		return
  1218  	}
  1219  	ar.Response = future.Response()
  1220  	return
  1221  }
  1222  
  1223  // ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1224  // operation.
  1225  type ApplicationsDeleteFuture struct {
  1226  	azure.FutureAPI
  1227  	// Result returns the result of the asynchronous operation.
  1228  	// If the operation has not completed it will return an error.
  1229  	Result func(ApplicationsClient) (autorest.Response, error)
  1230  }
  1231  
  1232  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1233  func (future *ApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
  1234  	var azFuture azure.Future
  1235  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1236  		return err
  1237  	}
  1238  	future.FutureAPI = &azFuture
  1239  	future.Result = future.result
  1240  	return nil
  1241  }
  1242  
  1243  // result is the default implementation for ApplicationsDeleteFuture.Result.
  1244  func (future *ApplicationsDeleteFuture) result(client ApplicationsClient) (ar autorest.Response, err error) {
  1245  	var done bool
  1246  	done, err = future.DoneWithContext(context.Background(), client)
  1247  	if err != nil {
  1248  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
  1249  		return
  1250  	}
  1251  	if !done {
  1252  		ar.Response = future.Response()
  1253  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteFuture")
  1254  		return
  1255  	}
  1256  	ar.Response = future.Response()
  1257  	return
  1258  }
  1259  
  1260  // ApplicationsRefreshPermissionsFuture an abstraction for monitoring and retrieving the results of a
  1261  // long-running operation.
  1262  type ApplicationsRefreshPermissionsFuture struct {
  1263  	azure.FutureAPI
  1264  	// Result returns the result of the asynchronous operation.
  1265  	// If the operation has not completed it will return an error.
  1266  	Result func(ApplicationsClient) (autorest.Response, error)
  1267  }
  1268  
  1269  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1270  func (future *ApplicationsRefreshPermissionsFuture) UnmarshalJSON(body []byte) error {
  1271  	var azFuture azure.Future
  1272  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1273  		return err
  1274  	}
  1275  	future.FutureAPI = &azFuture
  1276  	future.Result = future.result
  1277  	return nil
  1278  }
  1279  
  1280  // result is the default implementation for ApplicationsRefreshPermissionsFuture.Result.
  1281  func (future *ApplicationsRefreshPermissionsFuture) result(client ApplicationsClient) (ar autorest.Response, err error) {
  1282  	var done bool
  1283  	done, err = future.DoneWithContext(context.Background(), client)
  1284  	if err != nil {
  1285  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsRefreshPermissionsFuture", "Result", future.Response(), "Polling failure")
  1286  		return
  1287  	}
  1288  	if !done {
  1289  		ar.Response = future.Response()
  1290  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsRefreshPermissionsFuture")
  1291  		return
  1292  	}
  1293  	ar.Response = future.Response()
  1294  	return
  1295  }
  1296  
  1297  // ApplicationsUpdateAccessFuture an abstraction for monitoring and retrieving the results of a
  1298  // long-running operation.
  1299  type ApplicationsUpdateAccessFuture struct {
  1300  	azure.FutureAPI
  1301  	// Result returns the result of the asynchronous operation.
  1302  	// If the operation has not completed it will return an error.
  1303  	Result func(ApplicationsClient) (UpdateAccessDefinition, error)
  1304  }
  1305  
  1306  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1307  func (future *ApplicationsUpdateAccessFuture) UnmarshalJSON(body []byte) error {
  1308  	var azFuture azure.Future
  1309  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1310  		return err
  1311  	}
  1312  	future.FutureAPI = &azFuture
  1313  	future.Result = future.result
  1314  	return nil
  1315  }
  1316  
  1317  // result is the default implementation for ApplicationsUpdateAccessFuture.Result.
  1318  func (future *ApplicationsUpdateAccessFuture) result(client ApplicationsClient) (uad UpdateAccessDefinition, err error) {
  1319  	var done bool
  1320  	done, err = future.DoneWithContext(context.Background(), client)
  1321  	if err != nil {
  1322  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsUpdateAccessFuture", "Result", future.Response(), "Polling failure")
  1323  		return
  1324  	}
  1325  	if !done {
  1326  		uad.Response.Response = future.Response()
  1327  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsUpdateAccessFuture")
  1328  		return
  1329  	}
  1330  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1331  	if uad.Response.Response, err = future.GetResult(sender); err == nil && uad.Response.Response.StatusCode != http.StatusNoContent {
  1332  		uad, err = client.UpdateAccessResponder(uad.Response.Response)
  1333  		if err != nil {
  1334  			err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsUpdateAccessFuture", "Result", uad.Response.Response, "Failure responding to request")
  1335  		}
  1336  	}
  1337  	return
  1338  }
  1339  
  1340  // ApplicationsUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running
  1341  // operation.
  1342  type ApplicationsUpdateByIDFuture struct {
  1343  	azure.FutureAPI
  1344  	// Result returns the result of the asynchronous operation.
  1345  	// If the operation has not completed it will return an error.
  1346  	Result func(ApplicationsClient) (ApplicationPatchable, error)
  1347  }
  1348  
  1349  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1350  func (future *ApplicationsUpdateByIDFuture) UnmarshalJSON(body []byte) error {
  1351  	var azFuture azure.Future
  1352  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1353  		return err
  1354  	}
  1355  	future.FutureAPI = &azFuture
  1356  	future.Result = future.result
  1357  	return nil
  1358  }
  1359  
  1360  // result is the default implementation for ApplicationsUpdateByIDFuture.Result.
  1361  func (future *ApplicationsUpdateByIDFuture) result(client ApplicationsClient) (ap ApplicationPatchable, err error) {
  1362  	var done bool
  1363  	done, err = future.DoneWithContext(context.Background(), client)
  1364  	if err != nil {
  1365  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsUpdateByIDFuture", "Result", future.Response(), "Polling failure")
  1366  		return
  1367  	}
  1368  	if !done {
  1369  		ap.Response.Response = future.Response()
  1370  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsUpdateByIDFuture")
  1371  		return
  1372  	}
  1373  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1374  	if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
  1375  		ap, err = client.UpdateByIDResponder(ap.Response.Response)
  1376  		if err != nil {
  1377  			err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsUpdateByIDFuture", "Result", ap.Response.Response, "Failure responding to request")
  1378  		}
  1379  	}
  1380  	return
  1381  }
  1382  
  1383  // ApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  1384  // operation.
  1385  type ApplicationsUpdateFuture struct {
  1386  	azure.FutureAPI
  1387  	// Result returns the result of the asynchronous operation.
  1388  	// If the operation has not completed it will return an error.
  1389  	Result func(ApplicationsClient) (ApplicationPatchable, error)
  1390  }
  1391  
  1392  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1393  func (future *ApplicationsUpdateFuture) UnmarshalJSON(body []byte) error {
  1394  	var azFuture azure.Future
  1395  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1396  		return err
  1397  	}
  1398  	future.FutureAPI = &azFuture
  1399  	future.Result = future.result
  1400  	return nil
  1401  }
  1402  
  1403  // result is the default implementation for ApplicationsUpdateFuture.Result.
  1404  func (future *ApplicationsUpdateFuture) result(client ApplicationsClient) (ap ApplicationPatchable, err error) {
  1405  	var done bool
  1406  	done, err = future.DoneWithContext(context.Background(), client)
  1407  	if err != nil {
  1408  		err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
  1409  		return
  1410  	}
  1411  	if !done {
  1412  		ap.Response.Response = future.Response()
  1413  		err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsUpdateFuture")
  1414  		return
  1415  	}
  1416  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1417  	if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
  1418  		ap, err = client.UpdateResponder(ap.Response.Response)
  1419  		if err != nil {
  1420  			err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsUpdateFuture", "Result", ap.Response.Response, "Failure responding to request")
  1421  		}
  1422  	}
  1423  	return
  1424  }
  1425  
  1426  // ErrorAdditionalInfo the resource management error additional info.
  1427  type ErrorAdditionalInfo struct {
  1428  	// Type - READ-ONLY; The additional info type.
  1429  	Type *string `json:"type,omitempty"`
  1430  	// Info - READ-ONLY; The additional info.
  1431  	Info interface{} `json:"info,omitempty"`
  1432  }
  1433  
  1434  // MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
  1435  func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
  1436  	objectMap := make(map[string]interface{})
  1437  	return json.Marshal(objectMap)
  1438  }
  1439  
  1440  // ErrorDetail the error detail.
  1441  type ErrorDetail struct {
  1442  	// Code - READ-ONLY; The error code.
  1443  	Code *string `json:"code,omitempty"`
  1444  	// Message - READ-ONLY; The error message.
  1445  	Message *string `json:"message,omitempty"`
  1446  	// Target - READ-ONLY; The error target.
  1447  	Target *string `json:"target,omitempty"`
  1448  	// Details - READ-ONLY; The error details.
  1449  	Details *[]ErrorDetail `json:"details,omitempty"`
  1450  	// AdditionalInfo - READ-ONLY; The error additional info.
  1451  	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
  1452  }
  1453  
  1454  // MarshalJSON is the custom marshaler for ErrorDetail.
  1455  func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
  1456  	objectMap := make(map[string]interface{})
  1457  	return json.Marshal(objectMap)
  1458  }
  1459  
  1460  // ErrorResponse common error response for all Azure Resource Manager APIs to return error details for
  1461  // failed operations. (This also follows the OData error response format.).
  1462  type ErrorResponse struct {
  1463  	// Error - The error object.
  1464  	Error *ErrorDetail `json:"error,omitempty"`
  1465  }
  1466  
  1467  // GenericResource resource information.
  1468  type GenericResource struct {
  1469  	// ManagedBy - ID of the resource that manages this resource.
  1470  	ManagedBy *string `json:"managedBy,omitempty"`
  1471  	// Sku - The SKU of the resource.
  1472  	Sku *Sku `json:"sku,omitempty"`
  1473  	// ID - READ-ONLY; Resource ID
  1474  	ID *string `json:"id,omitempty"`
  1475  	// Name - READ-ONLY; Resource name
  1476  	Name *string `json:"name,omitempty"`
  1477  	// Type - READ-ONLY; Resource type
  1478  	Type *string `json:"type,omitempty"`
  1479  	// Location - Resource location
  1480  	Location *string `json:"location,omitempty"`
  1481  	// Tags - Resource tags
  1482  	Tags map[string]*string `json:"tags"`
  1483  	// SystemData - READ-ONLY
  1484  	SystemData *SystemData `json:"systemData,omitempty"`
  1485  }
  1486  
  1487  // MarshalJSON is the custom marshaler for GenericResource.
  1488  func (gr GenericResource) MarshalJSON() ([]byte, error) {
  1489  	objectMap := make(map[string]interface{})
  1490  	if gr.ManagedBy != nil {
  1491  		objectMap["managedBy"] = gr.ManagedBy
  1492  	}
  1493  	if gr.Sku != nil {
  1494  		objectMap["sku"] = gr.Sku
  1495  	}
  1496  	if gr.Location != nil {
  1497  		objectMap["location"] = gr.Location
  1498  	}
  1499  	if gr.Tags != nil {
  1500  		objectMap["tags"] = gr.Tags
  1501  	}
  1502  	return json.Marshal(objectMap)
  1503  }
  1504  
  1505  // Identity identity for the resource.
  1506  type Identity struct {
  1507  	// PrincipalID - READ-ONLY; The principal ID of resource identity.
  1508  	PrincipalID *string `json:"principalId,omitempty"`
  1509  	// TenantID - READ-ONLY; The tenant ID of resource.
  1510  	TenantID *string `json:"tenantId,omitempty"`
  1511  	// Type - The identity type. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
  1512  	Type ResourceIdentityType `json:"type,omitempty"`
  1513  	// UserAssignedIdentities - The list of user identities associated with the resource. The user identity dictionary key references will be resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
  1514  	UserAssignedIdentities map[string]*UserAssignedResourceIdentity `json:"userAssignedIdentities"`
  1515  }
  1516  
  1517  // MarshalJSON is the custom marshaler for Identity.
  1518  func (i Identity) MarshalJSON() ([]byte, error) {
  1519  	objectMap := make(map[string]interface{})
  1520  	if i.Type != "" {
  1521  		objectMap["type"] = i.Type
  1522  	}
  1523  	if i.UserAssignedIdentities != nil {
  1524  		objectMap["userAssignedIdentities"] = i.UserAssignedIdentities
  1525  	}
  1526  	return json.Marshal(objectMap)
  1527  }
  1528  
  1529  // JitApproverDefinition JIT approver definition.
  1530  type JitApproverDefinition struct {
  1531  	// ID - The approver service principal Id.
  1532  	ID *string `json:"id,omitempty"`
  1533  	// Type - The approver type. Possible values include: 'User', 'Group'
  1534  	Type JitApproverType `json:"type,omitempty"`
  1535  	// DisplayName - The approver display name.
  1536  	DisplayName *string `json:"displayName,omitempty"`
  1537  }
  1538  
  1539  // JitAuthorizationPolicies the JIT authorization policies.
  1540  type JitAuthorizationPolicies struct {
  1541  	// PrincipalID - The the principal id that will be granted JIT access.
  1542  	PrincipalID *string `json:"principalId,omitempty"`
  1543  	// RoleDefinitionID - The role definition id that will be granted to the Principal.
  1544  	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
  1545  }
  1546  
  1547  // JitRequestDefinition information about JIT request definition.
  1548  type JitRequestDefinition struct {
  1549  	autorest.Response `json:"-"`
  1550  	// JitRequestProperties - The JIT request properties.
  1551  	*JitRequestProperties `json:"properties,omitempty"`
  1552  	// ID - READ-ONLY; Resource ID
  1553  	ID *string `json:"id,omitempty"`
  1554  	// Name - READ-ONLY; Resource name
  1555  	Name *string `json:"name,omitempty"`
  1556  	// Type - READ-ONLY; Resource type
  1557  	Type *string `json:"type,omitempty"`
  1558  	// Location - Resource location
  1559  	Location *string `json:"location,omitempty"`
  1560  	// Tags - Resource tags
  1561  	Tags map[string]*string `json:"tags"`
  1562  	// SystemData - READ-ONLY
  1563  	SystemData *SystemData `json:"systemData,omitempty"`
  1564  }
  1565  
  1566  // MarshalJSON is the custom marshaler for JitRequestDefinition.
  1567  func (jrd JitRequestDefinition) MarshalJSON() ([]byte, error) {
  1568  	objectMap := make(map[string]interface{})
  1569  	if jrd.JitRequestProperties != nil {
  1570  		objectMap["properties"] = jrd.JitRequestProperties
  1571  	}
  1572  	if jrd.Location != nil {
  1573  		objectMap["location"] = jrd.Location
  1574  	}
  1575  	if jrd.Tags != nil {
  1576  		objectMap["tags"] = jrd.Tags
  1577  	}
  1578  	return json.Marshal(objectMap)
  1579  }
  1580  
  1581  // UnmarshalJSON is the custom unmarshaler for JitRequestDefinition struct.
  1582  func (jrd *JitRequestDefinition) UnmarshalJSON(body []byte) error {
  1583  	var m map[string]*json.RawMessage
  1584  	err := json.Unmarshal(body, &m)
  1585  	if err != nil {
  1586  		return err
  1587  	}
  1588  	for k, v := range m {
  1589  		switch k {
  1590  		case "properties":
  1591  			if v != nil {
  1592  				var jitRequestProperties JitRequestProperties
  1593  				err = json.Unmarshal(*v, &jitRequestProperties)
  1594  				if err != nil {
  1595  					return err
  1596  				}
  1597  				jrd.JitRequestProperties = &jitRequestProperties
  1598  			}
  1599  		case "id":
  1600  			if v != nil {
  1601  				var ID string
  1602  				err = json.Unmarshal(*v, &ID)
  1603  				if err != nil {
  1604  					return err
  1605  				}
  1606  				jrd.ID = &ID
  1607  			}
  1608  		case "name":
  1609  			if v != nil {
  1610  				var name string
  1611  				err = json.Unmarshal(*v, &name)
  1612  				if err != nil {
  1613  					return err
  1614  				}
  1615  				jrd.Name = &name
  1616  			}
  1617  		case "type":
  1618  			if v != nil {
  1619  				var typeVar string
  1620  				err = json.Unmarshal(*v, &typeVar)
  1621  				if err != nil {
  1622  					return err
  1623  				}
  1624  				jrd.Type = &typeVar
  1625  			}
  1626  		case "location":
  1627  			if v != nil {
  1628  				var location string
  1629  				err = json.Unmarshal(*v, &location)
  1630  				if err != nil {
  1631  					return err
  1632  				}
  1633  				jrd.Location = &location
  1634  			}
  1635  		case "tags":
  1636  			if v != nil {
  1637  				var tags map[string]*string
  1638  				err = json.Unmarshal(*v, &tags)
  1639  				if err != nil {
  1640  					return err
  1641  				}
  1642  				jrd.Tags = tags
  1643  			}
  1644  		case "systemData":
  1645  			if v != nil {
  1646  				var systemData SystemData
  1647  				err = json.Unmarshal(*v, &systemData)
  1648  				if err != nil {
  1649  					return err
  1650  				}
  1651  				jrd.SystemData = &systemData
  1652  			}
  1653  		}
  1654  	}
  1655  
  1656  	return nil
  1657  }
  1658  
  1659  // JitRequestDefinitionListResult list of JIT requests.
  1660  type JitRequestDefinitionListResult struct {
  1661  	autorest.Response `json:"-"`
  1662  	// Value - The array of Jit request definition.
  1663  	Value *[]JitRequestDefinition `json:"value,omitempty"`
  1664  	// NextLink - The URL to use for getting the next set of results.
  1665  	NextLink *string `json:"nextLink,omitempty"`
  1666  }
  1667  
  1668  // JitRequestMetadata the JIT request metadata.
  1669  type JitRequestMetadata struct {
  1670  	// OriginRequestID - The origin request id.
  1671  	OriginRequestID *string `json:"originRequestId,omitempty"`
  1672  	// RequestorID - The requestor id.
  1673  	RequestorID *string `json:"requestorId,omitempty"`
  1674  	// TenantDisplayName - The publisher's tenant name.
  1675  	TenantDisplayName *string `json:"tenantDisplayName,omitempty"`
  1676  	// SubjectDisplayName - The subject display name.
  1677  	SubjectDisplayName *string `json:"subjectDisplayName,omitempty"`
  1678  }
  1679  
  1680  // JitRequestPatchable information about JIT request.
  1681  type JitRequestPatchable struct {
  1682  	// Tags - Jit request tags
  1683  	Tags map[string]*string `json:"tags"`
  1684  }
  1685  
  1686  // MarshalJSON is the custom marshaler for JitRequestPatchable.
  1687  func (jrp JitRequestPatchable) MarshalJSON() ([]byte, error) {
  1688  	objectMap := make(map[string]interface{})
  1689  	if jrp.Tags != nil {
  1690  		objectMap["tags"] = jrp.Tags
  1691  	}
  1692  	return json.Marshal(objectMap)
  1693  }
  1694  
  1695  // JitRequestProperties information about JIT request properties
  1696  type JitRequestProperties struct {
  1697  	// ApplicationResourceID - The parent application id.
  1698  	ApplicationResourceID *string `json:"applicationResourceId,omitempty"`
  1699  	// PublisherTenantID - READ-ONLY; The publisher tenant id.
  1700  	PublisherTenantID *string `json:"publisherTenantId,omitempty"`
  1701  	// JitAuthorizationPolicies - The JIT authorization policies.
  1702  	JitAuthorizationPolicies *[]JitAuthorizationPolicies `json:"jitAuthorizationPolicies,omitempty"`
  1703  	// JitSchedulingPolicy - The JIT request properties.
  1704  	JitSchedulingPolicy *JitSchedulingPolicy `json:"jitSchedulingPolicy,omitempty"`
  1705  	// ProvisioningState - READ-ONLY; The JIT request provisioning state. Possible values include: 'ProvisioningStateNotSpecified', 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating'
  1706  	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
  1707  	// JitRequestState - READ-ONLY; The JIT request state. Possible values include: 'JitRequestStateNotSpecified', 'JitRequestStatePending', 'JitRequestStateApproved', 'JitRequestStateDenied', 'JitRequestStateFailed', 'JitRequestStateCanceled', 'JitRequestStateExpired', 'JitRequestStateTimeout'
  1708  	JitRequestState JitRequestState `json:"jitRequestState,omitempty"`
  1709  	// CreatedBy - READ-ONLY; The client entity that created the JIT request.
  1710  	CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty"`
  1711  	// UpdatedBy - READ-ONLY; The client entity that last updated the JIT request.
  1712  	UpdatedBy *ApplicationClientDetails `json:"updatedBy,omitempty"`
  1713  }
  1714  
  1715  // MarshalJSON is the custom marshaler for JitRequestProperties.
  1716  func (jrp JitRequestProperties) MarshalJSON() ([]byte, error) {
  1717  	objectMap := make(map[string]interface{})
  1718  	if jrp.ApplicationResourceID != nil {
  1719  		objectMap["applicationResourceId"] = jrp.ApplicationResourceID
  1720  	}
  1721  	if jrp.JitAuthorizationPolicies != nil {
  1722  		objectMap["jitAuthorizationPolicies"] = jrp.JitAuthorizationPolicies
  1723  	}
  1724  	if jrp.JitSchedulingPolicy != nil {
  1725  		objectMap["jitSchedulingPolicy"] = jrp.JitSchedulingPolicy
  1726  	}
  1727  	return json.Marshal(objectMap)
  1728  }
  1729  
  1730  // JitRequestsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  1731  // long-running operation.
  1732  type JitRequestsCreateOrUpdateFuture struct {
  1733  	azure.FutureAPI
  1734  	// Result returns the result of the asynchronous operation.
  1735  	// If the operation has not completed it will return an error.
  1736  	Result func(JitRequestsClient) (JitRequestDefinition, error)
  1737  }
  1738  
  1739  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1740  func (future *JitRequestsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1741  	var azFuture azure.Future
  1742  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1743  		return err
  1744  	}
  1745  	future.FutureAPI = &azFuture
  1746  	future.Result = future.result
  1747  	return nil
  1748  }
  1749  
  1750  // result is the default implementation for JitRequestsCreateOrUpdateFuture.Result.
  1751  func (future *JitRequestsCreateOrUpdateFuture) result(client JitRequestsClient) (jrd JitRequestDefinition, err error) {
  1752  	var done bool
  1753  	done, err = future.DoneWithContext(context.Background(), client)
  1754  	if err != nil {
  1755  		err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1756  		return
  1757  	}
  1758  	if !done {
  1759  		jrd.Response.Response = future.Response()
  1760  		err = azure.NewAsyncOpIncompleteError("managedapplications.JitRequestsCreateOrUpdateFuture")
  1761  		return
  1762  	}
  1763  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1764  	if jrd.Response.Response, err = future.GetResult(sender); err == nil && jrd.Response.Response.StatusCode != http.StatusNoContent {
  1765  		jrd, err = client.CreateOrUpdateResponder(jrd.Response.Response)
  1766  		if err != nil {
  1767  			err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsCreateOrUpdateFuture", "Result", jrd.Response.Response, "Failure responding to request")
  1768  		}
  1769  	}
  1770  	return
  1771  }
  1772  
  1773  // JitSchedulingPolicy the JIT scheduling policies.
  1774  type JitSchedulingPolicy struct {
  1775  	// Type - The type of JIT schedule. Possible values include: 'JitSchedulingTypeNotSpecified', 'JitSchedulingTypeOnce', 'JitSchedulingTypeRecurring'
  1776  	Type     JitSchedulingType `json:"type,omitempty"`
  1777  	Duration *string           `json:"duration,omitempty"`
  1778  	// StartTime - The start time of the request.
  1779  	StartTime *date.Time `json:"startTime,omitempty"`
  1780  }
  1781  
  1782  // ListTokenRequest list token request body.
  1783  type ListTokenRequest struct {
  1784  	// AuthorizationAudience - The authorization audience.
  1785  	AuthorizationAudience *string `json:"authorizationAudience,omitempty"`
  1786  	// UserAssignedIdentities - The user assigned identities.
  1787  	UserAssignedIdentities *[]string `json:"userAssignedIdentities,omitempty"`
  1788  }
  1789  
  1790  // ManagedIdentityToken the managed identity token for the managed app resource.
  1791  type ManagedIdentityToken struct {
  1792  	// AccessToken - The requested access token.
  1793  	AccessToken *string `json:"accessToken,omitempty"`
  1794  	// ExpiresIn - The number of seconds the access token will be valid.
  1795  	ExpiresIn *string `json:"expiresIn,omitempty"`
  1796  	// ExpiresOn - The timespan when the access token expires. This is represented as the number of seconds from epoch.
  1797  	ExpiresOn *string `json:"expiresOn,omitempty"`
  1798  	// NotBefore - The timespan when the access token takes effect. This is represented as the number of seconds from epoch.
  1799  	NotBefore *string `json:"notBefore,omitempty"`
  1800  	// AuthorizationAudience - The aud (audience) the access token was request for. This is the same as what was provided in the listTokens request.
  1801  	AuthorizationAudience *string `json:"authorizationAudience,omitempty"`
  1802  	// ResourceID - The Azure resource ID for the issued token. This is either the managed application ID or the user-assigned identity ID.
  1803  	ResourceID *string `json:"resourceId,omitempty"`
  1804  	// TokenType - The type of the token.
  1805  	TokenType *string `json:"tokenType,omitempty"`
  1806  }
  1807  
  1808  // ManagedIdentityTokenResult the array of managed identity tokens.
  1809  type ManagedIdentityTokenResult struct {
  1810  	autorest.Response `json:"-"`
  1811  	// Value - The array of managed identity tokens.
  1812  	Value *[]ManagedIdentityToken `json:"value,omitempty"`
  1813  }
  1814  
  1815  // Operation microsoft.Solutions operation
  1816  type Operation struct {
  1817  	// Name - Operation name: {provider}/{resource}/{operation}
  1818  	Name *string `json:"name,omitempty"`
  1819  	// IsDataAction - Indicates whether the operation is a data action
  1820  	IsDataAction *bool `json:"isDataAction,omitempty"`
  1821  	// Display - The object that represents the operation.
  1822  	Display *OperationDisplay `json:"display,omitempty"`
  1823  }
  1824  
  1825  // OperationDisplay the object that represents the operation.
  1826  type OperationDisplay struct {
  1827  	// Provider - Service provider: Microsoft.Solutions
  1828  	Provider *string `json:"provider,omitempty"`
  1829  	// Resource - Resource on which the operation is performed: Application, JitRequest, etc.
  1830  	Resource *string `json:"resource,omitempty"`
  1831  	// Operation - Operation type: Read, write, delete, etc.
  1832  	Operation *string `json:"operation,omitempty"`
  1833  	// Description - READ-ONLY; Localized friendly description for the operation
  1834  	Description *string `json:"description,omitempty"`
  1835  }
  1836  
  1837  // MarshalJSON is the custom marshaler for OperationDisplay.
  1838  func (o OperationDisplay) MarshalJSON() ([]byte, error) {
  1839  	objectMap := make(map[string]interface{})
  1840  	if o.Provider != nil {
  1841  		objectMap["provider"] = o.Provider
  1842  	}
  1843  	if o.Resource != nil {
  1844  		objectMap["resource"] = o.Resource
  1845  	}
  1846  	if o.Operation != nil {
  1847  		objectMap["operation"] = o.Operation
  1848  	}
  1849  	return json.Marshal(objectMap)
  1850  }
  1851  
  1852  // OperationListResult result of the request to list Microsoft.Solutions operations. It contains a list of
  1853  // operations and a URL link to get the next set of results.
  1854  type OperationListResult struct {
  1855  	autorest.Response `json:"-"`
  1856  	// Value - List of Microsoft.Solutions operations.
  1857  	Value *[]Operation `json:"value,omitempty"`
  1858  	// NextLink - URL to get the next set of operation list results if there are any.
  1859  	NextLink *string `json:"nextLink,omitempty"`
  1860  }
  1861  
  1862  // OperationListResultIterator provides access to a complete listing of Operation values.
  1863  type OperationListResultIterator struct {
  1864  	i    int
  1865  	page OperationListResultPage
  1866  }
  1867  
  1868  // NextWithContext advances to the next value.  If there was an error making
  1869  // the request the iterator does not advance and the error is returned.
  1870  func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1871  	if tracing.IsEnabled() {
  1872  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
  1873  		defer func() {
  1874  			sc := -1
  1875  			if iter.Response().Response.Response != nil {
  1876  				sc = iter.Response().Response.Response.StatusCode
  1877  			}
  1878  			tracing.EndSpan(ctx, sc, err)
  1879  		}()
  1880  	}
  1881  	iter.i++
  1882  	if iter.i < len(iter.page.Values()) {
  1883  		return nil
  1884  	}
  1885  	err = iter.page.NextWithContext(ctx)
  1886  	if err != nil {
  1887  		iter.i--
  1888  		return err
  1889  	}
  1890  	iter.i = 0
  1891  	return nil
  1892  }
  1893  
  1894  // Next advances to the next value.  If there was an error making
  1895  // the request the iterator does not advance and the error is returned.
  1896  // Deprecated: Use NextWithContext() instead.
  1897  func (iter *OperationListResultIterator) Next() error {
  1898  	return iter.NextWithContext(context.Background())
  1899  }
  1900  
  1901  // NotDone returns true if the enumeration should be started or is not yet complete.
  1902  func (iter OperationListResultIterator) NotDone() bool {
  1903  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1904  }
  1905  
  1906  // Response returns the raw server response from the last page request.
  1907  func (iter OperationListResultIterator) Response() OperationListResult {
  1908  	return iter.page.Response()
  1909  }
  1910  
  1911  // Value returns the current value or a zero-initialized value if the
  1912  // iterator has advanced beyond the end of the collection.
  1913  func (iter OperationListResultIterator) Value() Operation {
  1914  	if !iter.page.NotDone() {
  1915  		return Operation{}
  1916  	}
  1917  	return iter.page.Values()[iter.i]
  1918  }
  1919  
  1920  // Creates a new instance of the OperationListResultIterator type.
  1921  func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
  1922  	return OperationListResultIterator{page: page}
  1923  }
  1924  
  1925  // IsEmpty returns true if the ListResult contains no values.
  1926  func (olr OperationListResult) IsEmpty() bool {
  1927  	return olr.Value == nil || len(*olr.Value) == 0
  1928  }
  1929  
  1930  // hasNextLink returns true if the NextLink is not empty.
  1931  func (olr OperationListResult) hasNextLink() bool {
  1932  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  1933  }
  1934  
  1935  // operationListResultPreparer prepares a request to retrieve the next set of results.
  1936  // It returns nil if no more results exist.
  1937  func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
  1938  	if !olr.hasNextLink() {
  1939  		return nil, nil
  1940  	}
  1941  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1942  		autorest.AsJSON(),
  1943  		autorest.AsGet(),
  1944  		autorest.WithBaseURL(to.String(olr.NextLink)))
  1945  }
  1946  
  1947  // OperationListResultPage contains a page of Operation values.
  1948  type OperationListResultPage struct {
  1949  	fn  func(context.Context, OperationListResult) (OperationListResult, error)
  1950  	olr OperationListResult
  1951  }
  1952  
  1953  // NextWithContext advances to the next page of values.  If there was an error making
  1954  // the request the page does not advance and the error is returned.
  1955  func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
  1956  	if tracing.IsEnabled() {
  1957  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
  1958  		defer func() {
  1959  			sc := -1
  1960  			if page.Response().Response.Response != nil {
  1961  				sc = page.Response().Response.Response.StatusCode
  1962  			}
  1963  			tracing.EndSpan(ctx, sc, err)
  1964  		}()
  1965  	}
  1966  	for {
  1967  		next, err := page.fn(ctx, page.olr)
  1968  		if err != nil {
  1969  			return err
  1970  		}
  1971  		page.olr = next
  1972  		if !next.hasNextLink() || !next.IsEmpty() {
  1973  			break
  1974  		}
  1975  	}
  1976  	return nil
  1977  }
  1978  
  1979  // Next advances to the next page of values.  If there was an error making
  1980  // the request the page does not advance and the error is returned.
  1981  // Deprecated: Use NextWithContext() instead.
  1982  func (page *OperationListResultPage) Next() error {
  1983  	return page.NextWithContext(context.Background())
  1984  }
  1985  
  1986  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1987  func (page OperationListResultPage) NotDone() bool {
  1988  	return !page.olr.IsEmpty()
  1989  }
  1990  
  1991  // Response returns the raw server response from the last page request.
  1992  func (page OperationListResultPage) Response() OperationListResult {
  1993  	return page.olr
  1994  }
  1995  
  1996  // Values returns the slice of values for the current page or nil if there are no values.
  1997  func (page OperationListResultPage) Values() []Operation {
  1998  	if page.olr.IsEmpty() {
  1999  		return nil
  2000  	}
  2001  	return *page.olr.Value
  2002  }
  2003  
  2004  // Creates a new instance of the OperationListResultPage type.
  2005  func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
  2006  	return OperationListResultPage{
  2007  		fn:  getNextPage,
  2008  		olr: cur,
  2009  	}
  2010  }
  2011  
  2012  // Plan plan for the managed application.
  2013  type Plan struct {
  2014  	// Name - The plan name.
  2015  	Name *string `json:"name,omitempty"`
  2016  	// Publisher - The publisher ID.
  2017  	Publisher *string `json:"publisher,omitempty"`
  2018  	// Product - The product code.
  2019  	Product *string `json:"product,omitempty"`
  2020  	// PromotionCode - The promotion code.
  2021  	PromotionCode *string `json:"promotionCode,omitempty"`
  2022  	// Version - The plan's version.
  2023  	Version *string `json:"version,omitempty"`
  2024  }
  2025  
  2026  // PlanPatchable plan for the managed application.
  2027  type PlanPatchable struct {
  2028  	// Name - The plan name.
  2029  	Name *string `json:"name,omitempty"`
  2030  	// Publisher - The publisher ID.
  2031  	Publisher *string `json:"publisher,omitempty"`
  2032  	// Product - The product code.
  2033  	Product *string `json:"product,omitempty"`
  2034  	// PromotionCode - The promotion code.
  2035  	PromotionCode *string `json:"promotionCode,omitempty"`
  2036  	// Version - The plan's version.
  2037  	Version *string `json:"version,omitempty"`
  2038  }
  2039  
  2040  // Resource resource information.
  2041  type Resource struct {
  2042  	// ID - READ-ONLY; Resource ID
  2043  	ID *string `json:"id,omitempty"`
  2044  	// Name - READ-ONLY; Resource name
  2045  	Name *string `json:"name,omitempty"`
  2046  	// Type - READ-ONLY; Resource type
  2047  	Type *string `json:"type,omitempty"`
  2048  	// Location - Resource location
  2049  	Location *string `json:"location,omitempty"`
  2050  	// Tags - Resource tags
  2051  	Tags map[string]*string `json:"tags"`
  2052  	// SystemData - READ-ONLY
  2053  	SystemData *SystemData `json:"systemData,omitempty"`
  2054  }
  2055  
  2056  // MarshalJSON is the custom marshaler for Resource.
  2057  func (r Resource) MarshalJSON() ([]byte, error) {
  2058  	objectMap := make(map[string]interface{})
  2059  	if r.Location != nil {
  2060  		objectMap["location"] = r.Location
  2061  	}
  2062  	if r.Tags != nil {
  2063  		objectMap["tags"] = r.Tags
  2064  	}
  2065  	return json.Marshal(objectMap)
  2066  }
  2067  
  2068  // Sku SKU for the resource.
  2069  type Sku struct {
  2070  	// Name - The SKU name.
  2071  	Name *string `json:"name,omitempty"`
  2072  	// Tier - The SKU tier.
  2073  	Tier *string `json:"tier,omitempty"`
  2074  	// Size - The SKU size.
  2075  	Size *string `json:"size,omitempty"`
  2076  	// Family - The SKU family.
  2077  	Family *string `json:"family,omitempty"`
  2078  	// Model - The SKU model.
  2079  	Model *string `json:"model,omitempty"`
  2080  	// Capacity - The SKU capacity.
  2081  	Capacity *int32 `json:"capacity,omitempty"`
  2082  }
  2083  
  2084  // SystemData metadata pertaining to creation and last modification of the resource.
  2085  type SystemData struct {
  2086  	// CreatedBy - The identity that created the resource.
  2087  	CreatedBy *string `json:"createdBy,omitempty"`
  2088  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  2089  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
  2090  	// CreatedAt - The timestamp of resource creation (UTC).
  2091  	CreatedAt *date.Time `json:"createdAt,omitempty"`
  2092  	// LastModifiedBy - The identity that last modified the resource.
  2093  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
  2094  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  2095  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
  2096  	// LastModifiedAt - The timestamp of resource last modification (UTC)
  2097  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
  2098  }
  2099  
  2100  // UpdateAccessDefinition update access request definition.
  2101  type UpdateAccessDefinition struct {
  2102  	autorest.Response `json:"-"`
  2103  	// Approver - The approver name.
  2104  	Approver *string `json:"approver,omitempty"`
  2105  	// Metadata - The JIT request metadata.
  2106  	Metadata *JitRequestMetadata `json:"metadata,omitempty"`
  2107  	// Status - The JIT status. Possible values include: 'StatusNotSpecified', 'StatusElevate', 'StatusRemove'
  2108  	Status Status `json:"status,omitempty"`
  2109  	// SubStatus - The JIT status. Possible values include: 'SubstatusNotSpecified', 'SubstatusApproved', 'SubstatusDenied', 'SubstatusFailed', 'SubstatusExpired', 'SubstatusTimeout'
  2110  	SubStatus Substatus `json:"subStatus,omitempty"`
  2111  }
  2112  
  2113  // UserAssignedResourceIdentity represents the user assigned identity that is contained within the
  2114  // UserAssignedIdentities dictionary on ResourceIdentity
  2115  type UserAssignedResourceIdentity struct {
  2116  	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
  2117  	PrincipalID *string `json:"principalId,omitempty"`
  2118  	// TenantID - READ-ONLY; The tenant id of user assigned identity.
  2119  	TenantID *string `json:"tenantId,omitempty"`
  2120  }
  2121  
  2122  // MarshalJSON is the custom marshaler for UserAssignedResourceIdentity.
  2123  func (uari UserAssignedResourceIdentity) MarshalJSON() ([]byte, error) {
  2124  	objectMap := make(map[string]interface{})
  2125  	return json.Marshal(objectMap)
  2126  }
  2127  

View as plain text