...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-05-01-preview/diagnostics/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-05-01-preview/diagnostics

     1  package diagnostics
     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/monitor/mgmt/2021-05-01-preview/diagnostics"
    22  
    23  // AccessModeSettings properties that define the scope private link mode settings.
    24  type AccessModeSettings struct {
    25  	// QueryAccessMode - Specifies the default access mode of queries through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Possible values include: 'Open', 'PrivateOnly'
    26  	QueryAccessMode AccessMode `json:"queryAccessMode,omitempty"`
    27  	// IngestionAccessMode - Specifies the default access mode of ingestion through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Possible values include: 'Open', 'PrivateOnly'
    28  	IngestionAccessMode AccessMode `json:"ingestionAccessMode,omitempty"`
    29  	// Exclusions - List of exclusions that override the default access mode settings for specific private endpoint connections.
    30  	Exclusions *[]AccessModeSettingsExclusion `json:"exclusions,omitempty"`
    31  }
    32  
    33  // AccessModeSettingsExclusion properties that define the scope private link mode settings exclusion item.
    34  // This setting applies to a specific private endpoint connection and overrides the default settings for
    35  // that private endpoint connection.
    36  type AccessModeSettingsExclusion struct {
    37  	// PrivateEndpointConnectionName - The private endpoint connection name associated to the private endpoint on which we want to apply the specific access mode settings.
    38  	PrivateEndpointConnectionName *string `json:"privateEndpointConnectionName,omitempty"`
    39  	// QueryAccessMode - Specifies the access mode of queries through the specified private endpoint connection in the exclusion. Possible values include: 'Open', 'PrivateOnly'
    40  	QueryAccessMode AccessMode `json:"queryAccessMode,omitempty"`
    41  	// IngestionAccessMode - Specifies the access mode of ingestion through the specified private endpoint connection in the exclusion. Possible values include: 'Open', 'PrivateOnly'
    42  	IngestionAccessMode AccessMode `json:"ingestionAccessMode,omitempty"`
    43  }
    44  
    45  // ActionDetail the action detail
    46  type ActionDetail struct {
    47  	// MechanismType - The mechanism type
    48  	MechanismType *string `json:"MechanismType,omitempty"`
    49  	// Name - The name of the action
    50  	Name *string `json:"Name,omitempty"`
    51  	// Status - The status of the action
    52  	Status *string `json:"Status,omitempty"`
    53  	// SubState - The substatus of the action
    54  	SubState *string `json:"SubState,omitempty"`
    55  	// SendTime - The send time
    56  	SendTime *string `json:"SendTime,omitempty"`
    57  	// Detail - The detail of the friendly error message
    58  	Detail *string `json:"Detail,omitempty"`
    59  }
    60  
    61  // ActionGroup an Azure action group.
    62  type ActionGroup struct {
    63  	// GroupShortName - The short name of the action group. This will be used in SMS messages.
    64  	GroupShortName *string `json:"groupShortName,omitempty"`
    65  	// Enabled - Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications.
    66  	Enabled *bool `json:"enabled,omitempty"`
    67  	// EmailReceivers - The list of email receivers that are part of this action group.
    68  	EmailReceivers *[]EmailReceiver `json:"emailReceivers,omitempty"`
    69  	// SmsReceivers - The list of SMS receivers that are part of this action group.
    70  	SmsReceivers *[]SmsReceiver `json:"smsReceivers,omitempty"`
    71  	// WebhookReceivers - The list of webhook receivers that are part of this action group.
    72  	WebhookReceivers *[]WebhookReceiver `json:"webhookReceivers,omitempty"`
    73  	// ItsmReceivers - The list of ITSM receivers that are part of this action group.
    74  	ItsmReceivers *[]ItsmReceiver `json:"itsmReceivers,omitempty"`
    75  	// AzureAppPushReceivers - The list of AzureAppPush receivers that are part of this action group.
    76  	AzureAppPushReceivers *[]AzureAppPushReceiver `json:"azureAppPushReceivers,omitempty"`
    77  	// AutomationRunbookReceivers - The list of AutomationRunbook receivers that are part of this action group.
    78  	AutomationRunbookReceivers *[]AutomationRunbookReceiver `json:"automationRunbookReceivers,omitempty"`
    79  	// VoiceReceivers - The list of voice receivers that are part of this action group.
    80  	VoiceReceivers *[]VoiceReceiver `json:"voiceReceivers,omitempty"`
    81  	// LogicAppReceivers - The list of logic app receivers that are part of this action group.
    82  	LogicAppReceivers *[]LogicAppReceiver `json:"logicAppReceivers,omitempty"`
    83  	// AzureFunctionReceivers - The list of azure function receivers that are part of this action group.
    84  	AzureFunctionReceivers *[]AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"`
    85  	// ArmRoleReceivers - The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.
    86  	ArmRoleReceivers *[]ArmRoleReceiver `json:"armRoleReceivers,omitempty"`
    87  	// EventHubReceivers - The list of event hub receivers that are part of this action group.
    88  	EventHubReceivers *[]EventHubReceiver `json:"eventHubReceivers,omitempty"`
    89  }
    90  
    91  // ActionGroupList a list of action groups.
    92  type ActionGroupList struct {
    93  	autorest.Response `json:"-"`
    94  	// Value - The list of action groups.
    95  	Value *[]ActionGroupResource `json:"value,omitempty"`
    96  	// NextLink - Provides the link to retrieve the next set of elements.
    97  	NextLink *string `json:"nextLink,omitempty"`
    98  }
    99  
   100  // ActionGroupPatch an Azure action group for patch operations.
   101  type ActionGroupPatch struct {
   102  	// Enabled - Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will be activated.
   103  	Enabled *bool `json:"enabled,omitempty"`
   104  }
   105  
   106  // ActionGroupPatchBody an action group object for the body of patch operations.
   107  type ActionGroupPatchBody struct {
   108  	// Tags - Resource tags
   109  	Tags map[string]*string `json:"tags"`
   110  	// ActionGroupPatch - The action group settings for an update operation.
   111  	*ActionGroupPatch `json:"properties,omitempty"`
   112  }
   113  
   114  // MarshalJSON is the custom marshaler for ActionGroupPatchBody.
   115  func (agpb ActionGroupPatchBody) MarshalJSON() ([]byte, error) {
   116  	objectMap := make(map[string]interface{})
   117  	if agpb.Tags != nil {
   118  		objectMap["tags"] = agpb.Tags
   119  	}
   120  	if agpb.ActionGroupPatch != nil {
   121  		objectMap["properties"] = agpb.ActionGroupPatch
   122  	}
   123  	return json.Marshal(objectMap)
   124  }
   125  
   126  // UnmarshalJSON is the custom unmarshaler for ActionGroupPatchBody struct.
   127  func (agpb *ActionGroupPatchBody) UnmarshalJSON(body []byte) error {
   128  	var m map[string]*json.RawMessage
   129  	err := json.Unmarshal(body, &m)
   130  	if err != nil {
   131  		return err
   132  	}
   133  	for k, v := range m {
   134  		switch k {
   135  		case "tags":
   136  			if v != nil {
   137  				var tags map[string]*string
   138  				err = json.Unmarshal(*v, &tags)
   139  				if err != nil {
   140  					return err
   141  				}
   142  				agpb.Tags = tags
   143  			}
   144  		case "properties":
   145  			if v != nil {
   146  				var actionGroupPatch ActionGroupPatch
   147  				err = json.Unmarshal(*v, &actionGroupPatch)
   148  				if err != nil {
   149  					return err
   150  				}
   151  				agpb.ActionGroupPatch = &actionGroupPatch
   152  			}
   153  		}
   154  	}
   155  
   156  	return nil
   157  }
   158  
   159  // ActionGroupResource an action group resource.
   160  type ActionGroupResource struct {
   161  	autorest.Response `json:"-"`
   162  	// ActionGroup - The action groups properties of the resource.
   163  	*ActionGroup `json:"properties,omitempty"`
   164  	// ID - READ-ONLY; Azure resource Id
   165  	ID *string `json:"id,omitempty"`
   166  	// Name - READ-ONLY; Azure resource name
   167  	Name *string `json:"name,omitempty"`
   168  	// Type - READ-ONLY; Azure resource type
   169  	Type *string `json:"type,omitempty"`
   170  	// Location - Resource location
   171  	Location *string `json:"location,omitempty"`
   172  	// Tags - Resource tags
   173  	Tags map[string]*string `json:"tags"`
   174  }
   175  
   176  // MarshalJSON is the custom marshaler for ActionGroupResource.
   177  func (agr ActionGroupResource) MarshalJSON() ([]byte, error) {
   178  	objectMap := make(map[string]interface{})
   179  	if agr.ActionGroup != nil {
   180  		objectMap["properties"] = agr.ActionGroup
   181  	}
   182  	if agr.Location != nil {
   183  		objectMap["location"] = agr.Location
   184  	}
   185  	if agr.Tags != nil {
   186  		objectMap["tags"] = agr.Tags
   187  	}
   188  	return json.Marshal(objectMap)
   189  }
   190  
   191  // UnmarshalJSON is the custom unmarshaler for ActionGroupResource struct.
   192  func (agr *ActionGroupResource) UnmarshalJSON(body []byte) error {
   193  	var m map[string]*json.RawMessage
   194  	err := json.Unmarshal(body, &m)
   195  	if err != nil {
   196  		return err
   197  	}
   198  	for k, v := range m {
   199  		switch k {
   200  		case "properties":
   201  			if v != nil {
   202  				var actionGroup ActionGroup
   203  				err = json.Unmarshal(*v, &actionGroup)
   204  				if err != nil {
   205  					return err
   206  				}
   207  				agr.ActionGroup = &actionGroup
   208  			}
   209  		case "id":
   210  			if v != nil {
   211  				var ID string
   212  				err = json.Unmarshal(*v, &ID)
   213  				if err != nil {
   214  					return err
   215  				}
   216  				agr.ID = &ID
   217  			}
   218  		case "name":
   219  			if v != nil {
   220  				var name string
   221  				err = json.Unmarshal(*v, &name)
   222  				if err != nil {
   223  					return err
   224  				}
   225  				agr.Name = &name
   226  			}
   227  		case "type":
   228  			if v != nil {
   229  				var typeVar string
   230  				err = json.Unmarshal(*v, &typeVar)
   231  				if err != nil {
   232  					return err
   233  				}
   234  				agr.Type = &typeVar
   235  			}
   236  		case "location":
   237  			if v != nil {
   238  				var location string
   239  				err = json.Unmarshal(*v, &location)
   240  				if err != nil {
   241  					return err
   242  				}
   243  				agr.Location = &location
   244  			}
   245  		case "tags":
   246  			if v != nil {
   247  				var tags map[string]*string
   248  				err = json.Unmarshal(*v, &tags)
   249  				if err != nil {
   250  					return err
   251  				}
   252  				agr.Tags = tags
   253  			}
   254  		}
   255  	}
   256  
   257  	return nil
   258  }
   259  
   260  // ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture an abstraction for monitoring and
   261  // retrieving the results of a long-running operation.
   262  type ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture struct {
   263  	azure.FutureAPI
   264  	// Result returns the result of the asynchronous operation.
   265  	// If the operation has not completed it will return an error.
   266  	Result func(ActionGroupsClient) (TestNotificationDetailsResponse, error)
   267  }
   268  
   269  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   270  func (future *ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture) UnmarshalJSON(body []byte) error {
   271  	var azFuture azure.Future
   272  	if err := json.Unmarshal(body, &azFuture); err != nil {
   273  		return err
   274  	}
   275  	future.FutureAPI = &azFuture
   276  	future.Result = future.result
   277  	return nil
   278  }
   279  
   280  // result is the default implementation for ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture.Result.
   281  func (future *ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture) result(client ActionGroupsClient) (tndr TestNotificationDetailsResponse, err error) {
   282  	var done bool
   283  	done, err = future.DoneWithContext(context.Background(), client)
   284  	if err != nil {
   285  		err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture", "Result", future.Response(), "Polling failure")
   286  		return
   287  	}
   288  	if !done {
   289  		tndr.Response.Response = future.Response()
   290  		err = azure.NewAsyncOpIncompleteError("diagnostics.ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture")
   291  		return
   292  	}
   293  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   294  	if tndr.Response.Response, err = future.GetResult(sender); err == nil && tndr.Response.Response.StatusCode != http.StatusNoContent {
   295  		tndr, err = client.CreateNotificationsAtActionGroupResourceLevelResponder(tndr.Response.Response)
   296  		if err != nil {
   297  			err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture", "Result", tndr.Response.Response, "Failure responding to request")
   298  		}
   299  	}
   300  	return
   301  }
   302  
   303  // ActionGroupsCreateNotificationsAtResourceGroupLevelFuture an abstraction for monitoring and retrieving
   304  // the results of a long-running operation.
   305  type ActionGroupsCreateNotificationsAtResourceGroupLevelFuture struct {
   306  	azure.FutureAPI
   307  	// Result returns the result of the asynchronous operation.
   308  	// If the operation has not completed it will return an error.
   309  	Result func(ActionGroupsClient) (TestNotificationDetailsResponse, error)
   310  }
   311  
   312  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   313  func (future *ActionGroupsCreateNotificationsAtResourceGroupLevelFuture) UnmarshalJSON(body []byte) error {
   314  	var azFuture azure.Future
   315  	if err := json.Unmarshal(body, &azFuture); err != nil {
   316  		return err
   317  	}
   318  	future.FutureAPI = &azFuture
   319  	future.Result = future.result
   320  	return nil
   321  }
   322  
   323  // result is the default implementation for ActionGroupsCreateNotificationsAtResourceGroupLevelFuture.Result.
   324  func (future *ActionGroupsCreateNotificationsAtResourceGroupLevelFuture) result(client ActionGroupsClient) (tndr TestNotificationDetailsResponse, err error) {
   325  	var done bool
   326  	done, err = future.DoneWithContext(context.Background(), client)
   327  	if err != nil {
   328  		err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtResourceGroupLevelFuture", "Result", future.Response(), "Polling failure")
   329  		return
   330  	}
   331  	if !done {
   332  		tndr.Response.Response = future.Response()
   333  		err = azure.NewAsyncOpIncompleteError("diagnostics.ActionGroupsCreateNotificationsAtResourceGroupLevelFuture")
   334  		return
   335  	}
   336  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   337  	if tndr.Response.Response, err = future.GetResult(sender); err == nil && tndr.Response.Response.StatusCode != http.StatusNoContent {
   338  		tndr, err = client.CreateNotificationsAtResourceGroupLevelResponder(tndr.Response.Response)
   339  		if err != nil {
   340  			err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtResourceGroupLevelFuture", "Result", tndr.Response.Response, "Failure responding to request")
   341  		}
   342  	}
   343  	return
   344  }
   345  
   346  // ActionGroupsPostTestNotificationsFuture an abstraction for monitoring and retrieving the results of a
   347  // long-running operation.
   348  type ActionGroupsPostTestNotificationsFuture struct {
   349  	azure.FutureAPI
   350  	// Result returns the result of the asynchronous operation.
   351  	// If the operation has not completed it will return an error.
   352  	Result func(ActionGroupsClient) (TestNotificationDetailsResponse, error)
   353  }
   354  
   355  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
   356  func (future *ActionGroupsPostTestNotificationsFuture) UnmarshalJSON(body []byte) error {
   357  	var azFuture azure.Future
   358  	if err := json.Unmarshal(body, &azFuture); err != nil {
   359  		return err
   360  	}
   361  	future.FutureAPI = &azFuture
   362  	future.Result = future.result
   363  	return nil
   364  }
   365  
   366  // result is the default implementation for ActionGroupsPostTestNotificationsFuture.Result.
   367  func (future *ActionGroupsPostTestNotificationsFuture) result(client ActionGroupsClient) (tndr TestNotificationDetailsResponse, err error) {
   368  	var done bool
   369  	done, err = future.DoneWithContext(context.Background(), client)
   370  	if err != nil {
   371  		err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsPostTestNotificationsFuture", "Result", future.Response(), "Polling failure")
   372  		return
   373  	}
   374  	if !done {
   375  		tndr.Response.Response = future.Response()
   376  		err = azure.NewAsyncOpIncompleteError("diagnostics.ActionGroupsPostTestNotificationsFuture")
   377  		return
   378  	}
   379  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   380  	if tndr.Response.Response, err = future.GetResult(sender); err == nil && tndr.Response.Response.StatusCode != http.StatusNoContent {
   381  		tndr, err = client.PostTestNotificationsResponder(tndr.Response.Response)
   382  		if err != nil {
   383  			err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsPostTestNotificationsFuture", "Result", tndr.Response.Response, "Failure responding to request")
   384  		}
   385  	}
   386  	return
   387  }
   388  
   389  // ArmRoleReceiver an arm role receiver.
   390  type ArmRoleReceiver struct {
   391  	// Name - The name of the arm role receiver. Names must be unique across all receivers within an action group.
   392  	Name *string `json:"name,omitempty"`
   393  	// RoleID - The arm role id.
   394  	RoleID *string `json:"roleId,omitempty"`
   395  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
   396  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
   397  }
   398  
   399  // AutomationRunbookReceiver the Azure Automation Runbook notification receiver.
   400  type AutomationRunbookReceiver struct {
   401  	// AutomationAccountID - The Azure automation account Id which holds this runbook and authenticate to Azure resource.
   402  	AutomationAccountID *string `json:"automationAccountId,omitempty"`
   403  	// RunbookName - The name for this runbook.
   404  	RunbookName *string `json:"runbookName,omitempty"`
   405  	// WebhookResourceID - The resource id for webhook linked to this runbook.
   406  	WebhookResourceID *string `json:"webhookResourceId,omitempty"`
   407  	// IsGlobalRunbook - Indicates whether this instance is global runbook.
   408  	IsGlobalRunbook *bool `json:"isGlobalRunbook,omitempty"`
   409  	// Name - Indicates name of the webhook.
   410  	Name *string `json:"name,omitempty"`
   411  	// ServiceURI - The URI where webhooks should be sent.
   412  	ServiceURI *string `json:"serviceUri,omitempty"`
   413  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
   414  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
   415  }
   416  
   417  // AutoscaleErrorResponse describes the format of Error response.
   418  type AutoscaleErrorResponse struct {
   419  	// Error - The error object.
   420  	Error *AutoscaleErrorResponseError `json:"error,omitempty"`
   421  	// SystemData - READ-ONLY; The system metadata related to the response.
   422  	SystemData *SystemData `json:"systemData,omitempty"`
   423  }
   424  
   425  // MarshalJSON is the custom marshaler for AutoscaleErrorResponse.
   426  func (aer AutoscaleErrorResponse) MarshalJSON() ([]byte, error) {
   427  	objectMap := make(map[string]interface{})
   428  	if aer.Error != nil {
   429  		objectMap["error"] = aer.Error
   430  	}
   431  	return json.Marshal(objectMap)
   432  }
   433  
   434  // AutoscaleErrorResponseError the error object.
   435  type AutoscaleErrorResponseError struct {
   436  	// Code - One of a server-defined set of error codes.
   437  	Code *string `json:"code,omitempty"`
   438  	// Message - A human-readable representation of the error.
   439  	Message *string `json:"message,omitempty"`
   440  	// Target - The target of the particular error.
   441  	Target *string `json:"target,omitempty"`
   442  	// Details - A human-readable representation of the error's details.
   443  	Details *string `json:"details,omitempty"`
   444  }
   445  
   446  // AutoscaleNotification autoscale notification.
   447  type AutoscaleNotification struct {
   448  	// Operation - the operation associated with the notification and its value must be "scale"
   449  	Operation *string `json:"operation,omitempty"`
   450  	// Email - the email notification.
   451  	Email *EmailNotification `json:"email,omitempty"`
   452  	// Webhooks - the collection of webhook notifications.
   453  	Webhooks *[]WebhookNotification `json:"webhooks,omitempty"`
   454  }
   455  
   456  // AutoscaleProfile autoscale profile.
   457  type AutoscaleProfile struct {
   458  	// Name - the name of the profile.
   459  	Name *string `json:"name,omitempty"`
   460  	// Capacity - the number of instances that can be used during this profile.
   461  	Capacity *ScaleCapacity `json:"capacity,omitempty"`
   462  	// Rules - the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.
   463  	Rules *[]ScaleRule `json:"rules,omitempty"`
   464  	// FixedDate - the specific date-time for the profile. This element is not used if the Recurrence element is used.
   465  	FixedDate *TimeWindow `json:"fixedDate,omitempty"`
   466  	// Recurrence - the repeating times at which this profile begins. This element is not used if the FixedDate element is used.
   467  	Recurrence *Recurrence `json:"recurrence,omitempty"`
   468  }
   469  
   470  // AutoscaleSetting a setting that contains all of the configuration for the automatic scaling of a
   471  // resource.
   472  type AutoscaleSetting struct {
   473  	// Profiles - the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified.
   474  	Profiles *[]AutoscaleProfile `json:"profiles,omitempty"`
   475  	// Notifications - the collection of notifications.
   476  	Notifications *[]AutoscaleNotification `json:"notifications,omitempty"`
   477  	// Enabled - the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.
   478  	Enabled *bool `json:"enabled,omitempty"`
   479  	// PredictiveAutoscalePolicy - the predictive autoscale policy mode.
   480  	PredictiveAutoscalePolicy *PredictiveAutoscalePolicy `json:"predictiveAutoscalePolicy,omitempty"`
   481  	// Name - the name of the autoscale setting.
   482  	Name *string `json:"name,omitempty"`
   483  	// TargetResourceURI - the resource identifier of the resource that the autoscale setting should be added to.
   484  	TargetResourceURI *string `json:"targetResourceUri,omitempty"`
   485  	// TargetResourceLocation - the location of the resource that the autoscale setting should be added to.
   486  	TargetResourceLocation *string `json:"targetResourceLocation,omitempty"`
   487  }
   488  
   489  // AutoscaleSettingResource the autoscale setting resource.
   490  type AutoscaleSettingResource struct {
   491  	autorest.Response `json:"-"`
   492  	// ID - READ-ONLY; Azure resource Id
   493  	ID *string `json:"id,omitempty"`
   494  	// Name - READ-ONLY; Azure resource name
   495  	Name *string `json:"name,omitempty"`
   496  	// Type - READ-ONLY; Azure resource type
   497  	Type *string `json:"type,omitempty"`
   498  	// Location - Resource location
   499  	Location *string `json:"location,omitempty"`
   500  	// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.
   501  	Tags map[string]*string `json:"tags"`
   502  	// AutoscaleSetting - The autoscale setting of the resource.
   503  	*AutoscaleSetting `json:"properties,omitempty"`
   504  	// SystemData - READ-ONLY; The system metadata related to the response.
   505  	SystemData *SystemData `json:"systemData,omitempty"`
   506  }
   507  
   508  // MarshalJSON is the custom marshaler for AutoscaleSettingResource.
   509  func (asr AutoscaleSettingResource) MarshalJSON() ([]byte, error) {
   510  	objectMap := make(map[string]interface{})
   511  	if asr.Location != nil {
   512  		objectMap["location"] = asr.Location
   513  	}
   514  	if asr.Tags != nil {
   515  		objectMap["tags"] = asr.Tags
   516  	}
   517  	if asr.AutoscaleSetting != nil {
   518  		objectMap["properties"] = asr.AutoscaleSetting
   519  	}
   520  	return json.Marshal(objectMap)
   521  }
   522  
   523  // UnmarshalJSON is the custom unmarshaler for AutoscaleSettingResource struct.
   524  func (asr *AutoscaleSettingResource) UnmarshalJSON(body []byte) error {
   525  	var m map[string]*json.RawMessage
   526  	err := json.Unmarshal(body, &m)
   527  	if err != nil {
   528  		return err
   529  	}
   530  	for k, v := range m {
   531  		switch k {
   532  		case "id":
   533  			if v != nil {
   534  				var ID string
   535  				err = json.Unmarshal(*v, &ID)
   536  				if err != nil {
   537  					return err
   538  				}
   539  				asr.ID = &ID
   540  			}
   541  		case "name":
   542  			if v != nil {
   543  				var name string
   544  				err = json.Unmarshal(*v, &name)
   545  				if err != nil {
   546  					return err
   547  				}
   548  				asr.Name = &name
   549  			}
   550  		case "type":
   551  			if v != nil {
   552  				var typeVar string
   553  				err = json.Unmarshal(*v, &typeVar)
   554  				if err != nil {
   555  					return err
   556  				}
   557  				asr.Type = &typeVar
   558  			}
   559  		case "location":
   560  			if v != nil {
   561  				var location string
   562  				err = json.Unmarshal(*v, &location)
   563  				if err != nil {
   564  					return err
   565  				}
   566  				asr.Location = &location
   567  			}
   568  		case "tags":
   569  			if v != nil {
   570  				var tags map[string]*string
   571  				err = json.Unmarshal(*v, &tags)
   572  				if err != nil {
   573  					return err
   574  				}
   575  				asr.Tags = tags
   576  			}
   577  		case "properties":
   578  			if v != nil {
   579  				var autoscaleSetting AutoscaleSetting
   580  				err = json.Unmarshal(*v, &autoscaleSetting)
   581  				if err != nil {
   582  					return err
   583  				}
   584  				asr.AutoscaleSetting = &autoscaleSetting
   585  			}
   586  		case "systemData":
   587  			if v != nil {
   588  				var systemData SystemData
   589  				err = json.Unmarshal(*v, &systemData)
   590  				if err != nil {
   591  					return err
   592  				}
   593  				asr.SystemData = &systemData
   594  			}
   595  		}
   596  	}
   597  
   598  	return nil
   599  }
   600  
   601  // AutoscaleSettingResourceCollection represents a collection of autoscale setting resources.
   602  type AutoscaleSettingResourceCollection struct {
   603  	autorest.Response `json:"-"`
   604  	// Value - the values for the autoscale setting resources.
   605  	Value *[]AutoscaleSettingResource `json:"value,omitempty"`
   606  	// NextLink - URL to get the next set of results.
   607  	NextLink *string `json:"nextLink,omitempty"`
   608  }
   609  
   610  // AutoscaleSettingResourceCollectionIterator provides access to a complete listing of
   611  // AutoscaleSettingResource values.
   612  type AutoscaleSettingResourceCollectionIterator struct {
   613  	i    int
   614  	page AutoscaleSettingResourceCollectionPage
   615  }
   616  
   617  // NextWithContext advances to the next value.  If there was an error making
   618  // the request the iterator does not advance and the error is returned.
   619  func (iter *AutoscaleSettingResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
   620  	if tracing.IsEnabled() {
   621  		ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingResourceCollectionIterator.NextWithContext")
   622  		defer func() {
   623  			sc := -1
   624  			if iter.Response().Response.Response != nil {
   625  				sc = iter.Response().Response.Response.StatusCode
   626  			}
   627  			tracing.EndSpan(ctx, sc, err)
   628  		}()
   629  	}
   630  	iter.i++
   631  	if iter.i < len(iter.page.Values()) {
   632  		return nil
   633  	}
   634  	err = iter.page.NextWithContext(ctx)
   635  	if err != nil {
   636  		iter.i--
   637  		return err
   638  	}
   639  	iter.i = 0
   640  	return nil
   641  }
   642  
   643  // Next advances to the next value.  If there was an error making
   644  // the request the iterator does not advance and the error is returned.
   645  // Deprecated: Use NextWithContext() instead.
   646  func (iter *AutoscaleSettingResourceCollectionIterator) Next() error {
   647  	return iter.NextWithContext(context.Background())
   648  }
   649  
   650  // NotDone returns true if the enumeration should be started or is not yet complete.
   651  func (iter AutoscaleSettingResourceCollectionIterator) NotDone() bool {
   652  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   653  }
   654  
   655  // Response returns the raw server response from the last page request.
   656  func (iter AutoscaleSettingResourceCollectionIterator) Response() AutoscaleSettingResourceCollection {
   657  	return iter.page.Response()
   658  }
   659  
   660  // Value returns the current value or a zero-initialized value if the
   661  // iterator has advanced beyond the end of the collection.
   662  func (iter AutoscaleSettingResourceCollectionIterator) Value() AutoscaleSettingResource {
   663  	if !iter.page.NotDone() {
   664  		return AutoscaleSettingResource{}
   665  	}
   666  	return iter.page.Values()[iter.i]
   667  }
   668  
   669  // Creates a new instance of the AutoscaleSettingResourceCollectionIterator type.
   670  func NewAutoscaleSettingResourceCollectionIterator(page AutoscaleSettingResourceCollectionPage) AutoscaleSettingResourceCollectionIterator {
   671  	return AutoscaleSettingResourceCollectionIterator{page: page}
   672  }
   673  
   674  // IsEmpty returns true if the ListResult contains no values.
   675  func (asrc AutoscaleSettingResourceCollection) IsEmpty() bool {
   676  	return asrc.Value == nil || len(*asrc.Value) == 0
   677  }
   678  
   679  // hasNextLink returns true if the NextLink is not empty.
   680  func (asrc AutoscaleSettingResourceCollection) hasNextLink() bool {
   681  	return asrc.NextLink != nil && len(*asrc.NextLink) != 0
   682  }
   683  
   684  // autoscaleSettingResourceCollectionPreparer prepares a request to retrieve the next set of results.
   685  // It returns nil if no more results exist.
   686  func (asrc AutoscaleSettingResourceCollection) autoscaleSettingResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
   687  	if !asrc.hasNextLink() {
   688  		return nil, nil
   689  	}
   690  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   691  		autorest.AsJSON(),
   692  		autorest.AsGet(),
   693  		autorest.WithBaseURL(to.String(asrc.NextLink)))
   694  }
   695  
   696  // AutoscaleSettingResourceCollectionPage contains a page of AutoscaleSettingResource values.
   697  type AutoscaleSettingResourceCollectionPage struct {
   698  	fn   func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)
   699  	asrc AutoscaleSettingResourceCollection
   700  }
   701  
   702  // NextWithContext advances to the next page of values.  If there was an error making
   703  // the request the page does not advance and the error is returned.
   704  func (page *AutoscaleSettingResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
   705  	if tracing.IsEnabled() {
   706  		ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingResourceCollectionPage.NextWithContext")
   707  		defer func() {
   708  			sc := -1
   709  			if page.Response().Response.Response != nil {
   710  				sc = page.Response().Response.Response.StatusCode
   711  			}
   712  			tracing.EndSpan(ctx, sc, err)
   713  		}()
   714  	}
   715  	for {
   716  		next, err := page.fn(ctx, page.asrc)
   717  		if err != nil {
   718  			return err
   719  		}
   720  		page.asrc = next
   721  		if !next.hasNextLink() || !next.IsEmpty() {
   722  			break
   723  		}
   724  	}
   725  	return nil
   726  }
   727  
   728  // Next advances to the next page of values.  If there was an error making
   729  // the request the page does not advance and the error is returned.
   730  // Deprecated: Use NextWithContext() instead.
   731  func (page *AutoscaleSettingResourceCollectionPage) Next() error {
   732  	return page.NextWithContext(context.Background())
   733  }
   734  
   735  // NotDone returns true if the page enumeration should be started or is not yet complete.
   736  func (page AutoscaleSettingResourceCollectionPage) NotDone() bool {
   737  	return !page.asrc.IsEmpty()
   738  }
   739  
   740  // Response returns the raw server response from the last page request.
   741  func (page AutoscaleSettingResourceCollectionPage) Response() AutoscaleSettingResourceCollection {
   742  	return page.asrc
   743  }
   744  
   745  // Values returns the slice of values for the current page or nil if there are no values.
   746  func (page AutoscaleSettingResourceCollectionPage) Values() []AutoscaleSettingResource {
   747  	if page.asrc.IsEmpty() {
   748  		return nil
   749  	}
   750  	return *page.asrc.Value
   751  }
   752  
   753  // Creates a new instance of the AutoscaleSettingResourceCollectionPage type.
   754  func NewAutoscaleSettingResourceCollectionPage(cur AutoscaleSettingResourceCollection, getNextPage func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)) AutoscaleSettingResourceCollectionPage {
   755  	return AutoscaleSettingResourceCollectionPage{
   756  		fn:   getNextPage,
   757  		asrc: cur,
   758  	}
   759  }
   760  
   761  // AutoscaleSettingResourcePatch the autoscale setting object for patch operations.
   762  type AutoscaleSettingResourcePatch struct {
   763  	// Tags - Resource tags
   764  	Tags map[string]*string `json:"tags"`
   765  	// AutoscaleSetting - The autoscale setting properties of the update operation.
   766  	*AutoscaleSetting `json:"properties,omitempty"`
   767  }
   768  
   769  // MarshalJSON is the custom marshaler for AutoscaleSettingResourcePatch.
   770  func (asrp AutoscaleSettingResourcePatch) MarshalJSON() ([]byte, error) {
   771  	objectMap := make(map[string]interface{})
   772  	if asrp.Tags != nil {
   773  		objectMap["tags"] = asrp.Tags
   774  	}
   775  	if asrp.AutoscaleSetting != nil {
   776  		objectMap["properties"] = asrp.AutoscaleSetting
   777  	}
   778  	return json.Marshal(objectMap)
   779  }
   780  
   781  // UnmarshalJSON is the custom unmarshaler for AutoscaleSettingResourcePatch struct.
   782  func (asrp *AutoscaleSettingResourcePatch) UnmarshalJSON(body []byte) error {
   783  	var m map[string]*json.RawMessage
   784  	err := json.Unmarshal(body, &m)
   785  	if err != nil {
   786  		return err
   787  	}
   788  	for k, v := range m {
   789  		switch k {
   790  		case "tags":
   791  			if v != nil {
   792  				var tags map[string]*string
   793  				err = json.Unmarshal(*v, &tags)
   794  				if err != nil {
   795  					return err
   796  				}
   797  				asrp.Tags = tags
   798  			}
   799  		case "properties":
   800  			if v != nil {
   801  				var autoscaleSetting AutoscaleSetting
   802  				err = json.Unmarshal(*v, &autoscaleSetting)
   803  				if err != nil {
   804  					return err
   805  				}
   806  				asrp.AutoscaleSetting = &autoscaleSetting
   807  			}
   808  		}
   809  	}
   810  
   811  	return nil
   812  }
   813  
   814  // AzureAppPushReceiver the Azure mobile App push notification receiver.
   815  type AzureAppPushReceiver struct {
   816  	// Name - The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group.
   817  	Name *string `json:"name,omitempty"`
   818  	// EmailAddress - The email address registered for the Azure mobile app.
   819  	EmailAddress *string `json:"emailAddress,omitempty"`
   820  }
   821  
   822  // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
   823  type AzureEntityResource struct {
   824  	// Etag - READ-ONLY; Resource Etag.
   825  	Etag *string `json:"etag,omitempty"`
   826  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   827  	ID *string `json:"id,omitempty"`
   828  	// Name - READ-ONLY; The name of the resource
   829  	Name *string `json:"name,omitempty"`
   830  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   831  	Type *string `json:"type,omitempty"`
   832  }
   833  
   834  // MarshalJSON is the custom marshaler for AzureEntityResource.
   835  func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
   836  	objectMap := make(map[string]interface{})
   837  	return json.Marshal(objectMap)
   838  }
   839  
   840  // AzureFunctionReceiver an azure function receiver.
   841  type AzureFunctionReceiver struct {
   842  	// Name - The name of the azure function receiver. Names must be unique across all receivers within an action group.
   843  	Name *string `json:"name,omitempty"`
   844  	// FunctionAppResourceID - The azure resource id of the function app.
   845  	FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"`
   846  	// FunctionName - The function name in the function app.
   847  	FunctionName *string `json:"functionName,omitempty"`
   848  	// HTTPTriggerURL - The http trigger url where http request sent to.
   849  	HTTPTriggerURL *string `json:"httpTriggerUrl,omitempty"`
   850  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
   851  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
   852  }
   853  
   854  // AzureMonitorPrivateLinkScope an Azure Monitor PrivateLinkScope definition.
   855  type AzureMonitorPrivateLinkScope struct {
   856  	autorest.Response `json:"-"`
   857  	// AzureMonitorPrivateLinkScopeProperties - Properties that define a Azure Monitor PrivateLinkScope resource.
   858  	*AzureMonitorPrivateLinkScopeProperties `json:"properties,omitempty"`
   859  	// SystemData - READ-ONLY; System data
   860  	SystemData *SystemData `json:"systemData,omitempty"`
   861  	// Tags - Resource tags.
   862  	Tags map[string]*string `json:"tags"`
   863  	// Location - The geo-location where the resource lives
   864  	Location *string `json:"location,omitempty"`
   865  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   866  	ID *string `json:"id,omitempty"`
   867  	// Name - READ-ONLY; The name of the resource
   868  	Name *string `json:"name,omitempty"`
   869  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   870  	Type *string `json:"type,omitempty"`
   871  }
   872  
   873  // MarshalJSON is the custom marshaler for AzureMonitorPrivateLinkScope.
   874  func (ampls AzureMonitorPrivateLinkScope) MarshalJSON() ([]byte, error) {
   875  	objectMap := make(map[string]interface{})
   876  	if ampls.AzureMonitorPrivateLinkScopeProperties != nil {
   877  		objectMap["properties"] = ampls.AzureMonitorPrivateLinkScopeProperties
   878  	}
   879  	if ampls.Tags != nil {
   880  		objectMap["tags"] = ampls.Tags
   881  	}
   882  	if ampls.Location != nil {
   883  		objectMap["location"] = ampls.Location
   884  	}
   885  	return json.Marshal(objectMap)
   886  }
   887  
   888  // UnmarshalJSON is the custom unmarshaler for AzureMonitorPrivateLinkScope struct.
   889  func (ampls *AzureMonitorPrivateLinkScope) UnmarshalJSON(body []byte) error {
   890  	var m map[string]*json.RawMessage
   891  	err := json.Unmarshal(body, &m)
   892  	if err != nil {
   893  		return err
   894  	}
   895  	for k, v := range m {
   896  		switch k {
   897  		case "properties":
   898  			if v != nil {
   899  				var azureMonitorPrivateLinkScopeProperties AzureMonitorPrivateLinkScopeProperties
   900  				err = json.Unmarshal(*v, &azureMonitorPrivateLinkScopeProperties)
   901  				if err != nil {
   902  					return err
   903  				}
   904  				ampls.AzureMonitorPrivateLinkScopeProperties = &azureMonitorPrivateLinkScopeProperties
   905  			}
   906  		case "systemData":
   907  			if v != nil {
   908  				var systemData SystemData
   909  				err = json.Unmarshal(*v, &systemData)
   910  				if err != nil {
   911  					return err
   912  				}
   913  				ampls.SystemData = &systemData
   914  			}
   915  		case "tags":
   916  			if v != nil {
   917  				var tags map[string]*string
   918  				err = json.Unmarshal(*v, &tags)
   919  				if err != nil {
   920  					return err
   921  				}
   922  				ampls.Tags = tags
   923  			}
   924  		case "location":
   925  			if v != nil {
   926  				var location string
   927  				err = json.Unmarshal(*v, &location)
   928  				if err != nil {
   929  					return err
   930  				}
   931  				ampls.Location = &location
   932  			}
   933  		case "id":
   934  			if v != nil {
   935  				var ID string
   936  				err = json.Unmarshal(*v, &ID)
   937  				if err != nil {
   938  					return err
   939  				}
   940  				ampls.ID = &ID
   941  			}
   942  		case "name":
   943  			if v != nil {
   944  				var name string
   945  				err = json.Unmarshal(*v, &name)
   946  				if err != nil {
   947  					return err
   948  				}
   949  				ampls.Name = &name
   950  			}
   951  		case "type":
   952  			if v != nil {
   953  				var typeVar string
   954  				err = json.Unmarshal(*v, &typeVar)
   955  				if err != nil {
   956  					return err
   957  				}
   958  				ampls.Type = &typeVar
   959  			}
   960  		}
   961  	}
   962  
   963  	return nil
   964  }
   965  
   966  // AzureMonitorPrivateLinkScopeListResult describes the list of Azure Monitor PrivateLinkScope resources.
   967  type AzureMonitorPrivateLinkScopeListResult struct {
   968  	autorest.Response `json:"-"`
   969  	// Value - List of Azure Monitor PrivateLinkScope definitions.
   970  	Value *[]AzureMonitorPrivateLinkScope `json:"value,omitempty"`
   971  	// NextLink - The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set.
   972  	NextLink *string `json:"nextLink,omitempty"`
   973  }
   974  
   975  // AzureMonitorPrivateLinkScopeListResultIterator provides access to a complete listing of
   976  // AzureMonitorPrivateLinkScope values.
   977  type AzureMonitorPrivateLinkScopeListResultIterator struct {
   978  	i    int
   979  	page AzureMonitorPrivateLinkScopeListResultPage
   980  }
   981  
   982  // NextWithContext advances to the next value.  If there was an error making
   983  // the request the iterator does not advance and the error is returned.
   984  func (iter *AzureMonitorPrivateLinkScopeListResultIterator) NextWithContext(ctx context.Context) (err error) {
   985  	if tracing.IsEnabled() {
   986  		ctx = tracing.StartSpan(ctx, fqdn+"/AzureMonitorPrivateLinkScopeListResultIterator.NextWithContext")
   987  		defer func() {
   988  			sc := -1
   989  			if iter.Response().Response.Response != nil {
   990  				sc = iter.Response().Response.Response.StatusCode
   991  			}
   992  			tracing.EndSpan(ctx, sc, err)
   993  		}()
   994  	}
   995  	iter.i++
   996  	if iter.i < len(iter.page.Values()) {
   997  		return nil
   998  	}
   999  	err = iter.page.NextWithContext(ctx)
  1000  	if err != nil {
  1001  		iter.i--
  1002  		return err
  1003  	}
  1004  	iter.i = 0
  1005  	return nil
  1006  }
  1007  
  1008  // Next advances to the next value.  If there was an error making
  1009  // the request the iterator does not advance and the error is returned.
  1010  // Deprecated: Use NextWithContext() instead.
  1011  func (iter *AzureMonitorPrivateLinkScopeListResultIterator) Next() error {
  1012  	return iter.NextWithContext(context.Background())
  1013  }
  1014  
  1015  // NotDone returns true if the enumeration should be started or is not yet complete.
  1016  func (iter AzureMonitorPrivateLinkScopeListResultIterator) NotDone() bool {
  1017  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1018  }
  1019  
  1020  // Response returns the raw server response from the last page request.
  1021  func (iter AzureMonitorPrivateLinkScopeListResultIterator) Response() AzureMonitorPrivateLinkScopeListResult {
  1022  	return iter.page.Response()
  1023  }
  1024  
  1025  // Value returns the current value or a zero-initialized value if the
  1026  // iterator has advanced beyond the end of the collection.
  1027  func (iter AzureMonitorPrivateLinkScopeListResultIterator) Value() AzureMonitorPrivateLinkScope {
  1028  	if !iter.page.NotDone() {
  1029  		return AzureMonitorPrivateLinkScope{}
  1030  	}
  1031  	return iter.page.Values()[iter.i]
  1032  }
  1033  
  1034  // Creates a new instance of the AzureMonitorPrivateLinkScopeListResultIterator type.
  1035  func NewAzureMonitorPrivateLinkScopeListResultIterator(page AzureMonitorPrivateLinkScopeListResultPage) AzureMonitorPrivateLinkScopeListResultIterator {
  1036  	return AzureMonitorPrivateLinkScopeListResultIterator{page: page}
  1037  }
  1038  
  1039  // IsEmpty returns true if the ListResult contains no values.
  1040  func (amplslr AzureMonitorPrivateLinkScopeListResult) IsEmpty() bool {
  1041  	return amplslr.Value == nil || len(*amplslr.Value) == 0
  1042  }
  1043  
  1044  // hasNextLink returns true if the NextLink is not empty.
  1045  func (amplslr AzureMonitorPrivateLinkScopeListResult) hasNextLink() bool {
  1046  	return amplslr.NextLink != nil && len(*amplslr.NextLink) != 0
  1047  }
  1048  
  1049  // azureMonitorPrivateLinkScopeListResultPreparer prepares a request to retrieve the next set of results.
  1050  // It returns nil if no more results exist.
  1051  func (amplslr AzureMonitorPrivateLinkScopeListResult) azureMonitorPrivateLinkScopeListResultPreparer(ctx context.Context) (*http.Request, error) {
  1052  	if !amplslr.hasNextLink() {
  1053  		return nil, nil
  1054  	}
  1055  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1056  		autorest.AsJSON(),
  1057  		autorest.AsGet(),
  1058  		autorest.WithBaseURL(to.String(amplslr.NextLink)))
  1059  }
  1060  
  1061  // AzureMonitorPrivateLinkScopeListResultPage contains a page of AzureMonitorPrivateLinkScope values.
  1062  type AzureMonitorPrivateLinkScopeListResultPage struct {
  1063  	fn      func(context.Context, AzureMonitorPrivateLinkScopeListResult) (AzureMonitorPrivateLinkScopeListResult, error)
  1064  	amplslr AzureMonitorPrivateLinkScopeListResult
  1065  }
  1066  
  1067  // NextWithContext advances to the next page of values.  If there was an error making
  1068  // the request the page does not advance and the error is returned.
  1069  func (page *AzureMonitorPrivateLinkScopeListResultPage) NextWithContext(ctx context.Context) (err error) {
  1070  	if tracing.IsEnabled() {
  1071  		ctx = tracing.StartSpan(ctx, fqdn+"/AzureMonitorPrivateLinkScopeListResultPage.NextWithContext")
  1072  		defer func() {
  1073  			sc := -1
  1074  			if page.Response().Response.Response != nil {
  1075  				sc = page.Response().Response.Response.StatusCode
  1076  			}
  1077  			tracing.EndSpan(ctx, sc, err)
  1078  		}()
  1079  	}
  1080  	for {
  1081  		next, err := page.fn(ctx, page.amplslr)
  1082  		if err != nil {
  1083  			return err
  1084  		}
  1085  		page.amplslr = next
  1086  		if !next.hasNextLink() || !next.IsEmpty() {
  1087  			break
  1088  		}
  1089  	}
  1090  	return nil
  1091  }
  1092  
  1093  // Next advances to the next page of values.  If there was an error making
  1094  // the request the page does not advance and the error is returned.
  1095  // Deprecated: Use NextWithContext() instead.
  1096  func (page *AzureMonitorPrivateLinkScopeListResultPage) Next() error {
  1097  	return page.NextWithContext(context.Background())
  1098  }
  1099  
  1100  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1101  func (page AzureMonitorPrivateLinkScopeListResultPage) NotDone() bool {
  1102  	return !page.amplslr.IsEmpty()
  1103  }
  1104  
  1105  // Response returns the raw server response from the last page request.
  1106  func (page AzureMonitorPrivateLinkScopeListResultPage) Response() AzureMonitorPrivateLinkScopeListResult {
  1107  	return page.amplslr
  1108  }
  1109  
  1110  // Values returns the slice of values for the current page or nil if there are no values.
  1111  func (page AzureMonitorPrivateLinkScopeListResultPage) Values() []AzureMonitorPrivateLinkScope {
  1112  	if page.amplslr.IsEmpty() {
  1113  		return nil
  1114  	}
  1115  	return *page.amplslr.Value
  1116  }
  1117  
  1118  // Creates a new instance of the AzureMonitorPrivateLinkScopeListResultPage type.
  1119  func NewAzureMonitorPrivateLinkScopeListResultPage(cur AzureMonitorPrivateLinkScopeListResult, getNextPage func(context.Context, AzureMonitorPrivateLinkScopeListResult) (AzureMonitorPrivateLinkScopeListResult, error)) AzureMonitorPrivateLinkScopeListResultPage {
  1120  	return AzureMonitorPrivateLinkScopeListResultPage{
  1121  		fn:      getNextPage,
  1122  		amplslr: cur,
  1123  	}
  1124  }
  1125  
  1126  // AzureMonitorPrivateLinkScopeProperties properties that define a Azure Monitor PrivateLinkScope resource.
  1127  type AzureMonitorPrivateLinkScopeProperties struct {
  1128  	// ProvisioningState - READ-ONLY; Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed.
  1129  	ProvisioningState *string `json:"provisioningState,omitempty"`
  1130  	// PrivateEndpointConnections - READ-ONLY; List of private endpoint connections.
  1131  	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
  1132  	// AccessModeSettings - Access mode settings
  1133  	AccessModeSettings *AccessModeSettings `json:"accessModeSettings,omitempty"`
  1134  }
  1135  
  1136  // MarshalJSON is the custom marshaler for AzureMonitorPrivateLinkScopeProperties.
  1137  func (amplsp AzureMonitorPrivateLinkScopeProperties) MarshalJSON() ([]byte, error) {
  1138  	objectMap := make(map[string]interface{})
  1139  	if amplsp.AccessModeSettings != nil {
  1140  		objectMap["accessModeSettings"] = amplsp.AccessModeSettings
  1141  	}
  1142  	return json.Marshal(objectMap)
  1143  }
  1144  
  1145  // AzureResource an azure resource object
  1146  type AzureResource struct {
  1147  	// ID - READ-ONLY; Azure resource Id
  1148  	ID *string `json:"id,omitempty"`
  1149  	// Name - READ-ONLY; Azure resource name
  1150  	Name *string `json:"name,omitempty"`
  1151  	// Type - READ-ONLY; Azure resource type
  1152  	Type *string `json:"type,omitempty"`
  1153  	// Location - Resource location
  1154  	Location *string `json:"location,omitempty"`
  1155  	// Tags - Resource tags
  1156  	Tags map[string]*string `json:"tags"`
  1157  }
  1158  
  1159  // MarshalJSON is the custom marshaler for AzureResource.
  1160  func (ar AzureResource) MarshalJSON() ([]byte, error) {
  1161  	objectMap := make(map[string]interface{})
  1162  	if ar.Location != nil {
  1163  		objectMap["location"] = ar.Location
  1164  	}
  1165  	if ar.Tags != nil {
  1166  		objectMap["tags"] = ar.Tags
  1167  	}
  1168  	return json.Marshal(objectMap)
  1169  }
  1170  
  1171  // Context the context info
  1172  type Context struct {
  1173  	// NotificationSource - The source of the notification request
  1174  	NotificationSource *string `json:"notificationSource,omitempty"`
  1175  	// ContextType - The context id type
  1176  	ContextType *string `json:"contextType,omitempty"`
  1177  }
  1178  
  1179  // DefaultErrorResponse common error response for all Azure Resource Manager APIs to return error details
  1180  // for failed operations. (This also follows the OData error response format.).
  1181  type DefaultErrorResponse struct {
  1182  	// Error - The error object.
  1183  	Error *ErrorDetail `json:"error,omitempty"`
  1184  }
  1185  
  1186  // EmailNotification email notification of an autoscale event.
  1187  type EmailNotification struct {
  1188  	// SendToSubscriptionAdministrator - a value indicating whether to send email to subscription administrator.
  1189  	SendToSubscriptionAdministrator *bool `json:"sendToSubscriptionAdministrator,omitempty"`
  1190  	// SendToSubscriptionCoAdministrators - a value indicating whether to send email to subscription co-administrators.
  1191  	SendToSubscriptionCoAdministrators *bool `json:"sendToSubscriptionCoAdministrators,omitempty"`
  1192  	// CustomEmails - the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored.
  1193  	CustomEmails *[]string `json:"customEmails,omitempty"`
  1194  }
  1195  
  1196  // EmailReceiver an email receiver.
  1197  type EmailReceiver struct {
  1198  	// Name - The name of the email receiver. Names must be unique across all receivers within an action group.
  1199  	Name *string `json:"name,omitempty"`
  1200  	// EmailAddress - The email address of this receiver.
  1201  	EmailAddress *string `json:"emailAddress,omitempty"`
  1202  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
  1203  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
  1204  	// Status - READ-ONLY; The receiver status of the e-mail. Possible values include: 'ReceiverStatusNotSpecified', 'ReceiverStatusEnabled', 'ReceiverStatusDisabled'
  1205  	Status ReceiverStatus `json:"status,omitempty"`
  1206  }
  1207  
  1208  // MarshalJSON is the custom marshaler for EmailReceiver.
  1209  func (er EmailReceiver) MarshalJSON() ([]byte, error) {
  1210  	objectMap := make(map[string]interface{})
  1211  	if er.Name != nil {
  1212  		objectMap["name"] = er.Name
  1213  	}
  1214  	if er.EmailAddress != nil {
  1215  		objectMap["emailAddress"] = er.EmailAddress
  1216  	}
  1217  	if er.UseCommonAlertSchema != nil {
  1218  		objectMap["useCommonAlertSchema"] = er.UseCommonAlertSchema
  1219  	}
  1220  	return json.Marshal(objectMap)
  1221  }
  1222  
  1223  // EnableRequest describes a receiver that should be resubscribed.
  1224  type EnableRequest struct {
  1225  	// ReceiverName - The name of the receiver to resubscribe.
  1226  	ReceiverName *string `json:"receiverName,omitempty"`
  1227  }
  1228  
  1229  // ErrorAdditionalInfo the resource management error additional info.
  1230  type ErrorAdditionalInfo struct {
  1231  	// Type - READ-ONLY; The additional info type.
  1232  	Type *string `json:"type,omitempty"`
  1233  	// Info - READ-ONLY; The additional info.
  1234  	Info interface{} `json:"info,omitempty"`
  1235  }
  1236  
  1237  // MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
  1238  func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
  1239  	objectMap := make(map[string]interface{})
  1240  	return json.Marshal(objectMap)
  1241  }
  1242  
  1243  // ErrorDetail the error detail.
  1244  type ErrorDetail struct {
  1245  	// Code - READ-ONLY; The error code.
  1246  	Code *string `json:"code,omitempty"`
  1247  	// Message - READ-ONLY; The error message.
  1248  	Message *string `json:"message,omitempty"`
  1249  	// Target - READ-ONLY; The error target.
  1250  	Target *string `json:"target,omitempty"`
  1251  	// Details - READ-ONLY; The error details.
  1252  	Details *[]ErrorDetail `json:"details,omitempty"`
  1253  	// AdditionalInfo - READ-ONLY; The error additional info.
  1254  	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
  1255  }
  1256  
  1257  // MarshalJSON is the custom marshaler for ErrorDetail.
  1258  func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
  1259  	objectMap := make(map[string]interface{})
  1260  	return json.Marshal(objectMap)
  1261  }
  1262  
  1263  // ErrorResponse describes the format of Error response.
  1264  type ErrorResponse struct {
  1265  	// Code - Error code
  1266  	Code *string `json:"code,omitempty"`
  1267  	// Message - Error message indicating why the operation failed.
  1268  	Message *string `json:"message,omitempty"`
  1269  }
  1270  
  1271  // EventHubReceiver an Event hub receiver.
  1272  type EventHubReceiver struct {
  1273  	// Name - The name of the Event hub receiver. Names must be unique across all receivers within an action group.
  1274  	Name *string `json:"name,omitempty"`
  1275  	// EventHubNameSpace - The Event Hub namespace
  1276  	EventHubNameSpace *string `json:"eventHubNameSpace,omitempty"`
  1277  	// EventHubName - The name of the specific Event Hub queue
  1278  	EventHubName *string `json:"eventHubName,omitempty"`
  1279  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
  1280  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
  1281  	// TenantID - The tenant Id for the subscription containing this event hub
  1282  	TenantID *string `json:"tenantId,omitempty"`
  1283  	// SubscriptionID - The Id for the subscription containing this event hub
  1284  	SubscriptionID *string `json:"subscriptionId,omitempty"`
  1285  }
  1286  
  1287  // ItsmReceiver an Itsm receiver.
  1288  type ItsmReceiver struct {
  1289  	// Name - The name of the Itsm receiver. Names must be unique across all receivers within an action group.
  1290  	Name *string `json:"name,omitempty"`
  1291  	// WorkspaceID - OMS LA instance identifier.
  1292  	WorkspaceID *string `json:"workspaceId,omitempty"`
  1293  	// ConnectionID - Unique identification of ITSM connection among multiple defined in above workspace.
  1294  	ConnectionID *string `json:"connectionId,omitempty"`
  1295  	// TicketConfiguration - JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well.
  1296  	TicketConfiguration *string `json:"ticketConfiguration,omitempty"`
  1297  	// Region - Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'
  1298  	Region *string `json:"region,omitempty"`
  1299  }
  1300  
  1301  // LogicAppReceiver a logic app receiver.
  1302  type LogicAppReceiver struct {
  1303  	// Name - The name of the logic app receiver. Names must be unique across all receivers within an action group.
  1304  	Name *string `json:"name,omitempty"`
  1305  	// ResourceID - The azure resource id of the logic app receiver.
  1306  	ResourceID *string `json:"resourceId,omitempty"`
  1307  	// CallbackURL - The callback url where http request sent to.
  1308  	CallbackURL *string `json:"callbackUrl,omitempty"`
  1309  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
  1310  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
  1311  }
  1312  
  1313  // LogSettings part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
  1314  type LogSettings struct {
  1315  	// Category - Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
  1316  	Category *string `json:"category,omitempty"`
  1317  	// CategoryGroup - Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
  1318  	CategoryGroup *string `json:"categoryGroup,omitempty"`
  1319  	// Enabled - a value indicating whether this log is enabled.
  1320  	Enabled *bool `json:"enabled,omitempty"`
  1321  	// RetentionPolicy - the retention policy for this log.
  1322  	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
  1323  }
  1324  
  1325  // ManagementGroupDiagnosticSettings the management group diagnostic settings.
  1326  type ManagementGroupDiagnosticSettings struct {
  1327  	// StorageAccountID - The resource ID of the storage account to which you would like to send Diagnostic Logs.
  1328  	StorageAccountID *string `json:"storageAccountId,omitempty"`
  1329  	// ServiceBusRuleID - The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
  1330  	ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
  1331  	// EventHubAuthorizationRuleID - The resource Id for the event hub authorization rule.
  1332  	EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"`
  1333  	// EventHubName - The name of the event hub. If none is specified, the default event hub will be selected.
  1334  	EventHubName *string `json:"eventHubName,omitempty"`
  1335  	// Logs - The list of logs settings.
  1336  	Logs *[]ManagementGroupLogSettings `json:"logs,omitempty"`
  1337  	// WorkspaceID - The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
  1338  	WorkspaceID *string `json:"workspaceId,omitempty"`
  1339  	// MarketplacePartnerID - The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
  1340  	MarketplacePartnerID *string `json:"marketplacePartnerId,omitempty"`
  1341  }
  1342  
  1343  // ManagementGroupDiagnosticSettingsResource the management group diagnostic setting resource.
  1344  type ManagementGroupDiagnosticSettingsResource struct {
  1345  	autorest.Response `json:"-"`
  1346  	// ManagementGroupDiagnosticSettings - Properties of a Management Group Diagnostic Settings Resource.
  1347  	*ManagementGroupDiagnosticSettings `json:"properties,omitempty"`
  1348  	// SystemData - READ-ONLY; The system metadata related to this resource.
  1349  	SystemData *SystemData `json:"systemData,omitempty"`
  1350  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1351  	ID *string `json:"id,omitempty"`
  1352  	// Name - READ-ONLY; The name of the resource
  1353  	Name *string `json:"name,omitempty"`
  1354  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1355  	Type *string `json:"type,omitempty"`
  1356  }
  1357  
  1358  // MarshalJSON is the custom marshaler for ManagementGroupDiagnosticSettingsResource.
  1359  func (mgdsr ManagementGroupDiagnosticSettingsResource) MarshalJSON() ([]byte, error) {
  1360  	objectMap := make(map[string]interface{})
  1361  	if mgdsr.ManagementGroupDiagnosticSettings != nil {
  1362  		objectMap["properties"] = mgdsr.ManagementGroupDiagnosticSettings
  1363  	}
  1364  	return json.Marshal(objectMap)
  1365  }
  1366  
  1367  // UnmarshalJSON is the custom unmarshaler for ManagementGroupDiagnosticSettingsResource struct.
  1368  func (mgdsr *ManagementGroupDiagnosticSettingsResource) UnmarshalJSON(body []byte) error {
  1369  	var m map[string]*json.RawMessage
  1370  	err := json.Unmarshal(body, &m)
  1371  	if err != nil {
  1372  		return err
  1373  	}
  1374  	for k, v := range m {
  1375  		switch k {
  1376  		case "properties":
  1377  			if v != nil {
  1378  				var managementGroupDiagnosticSettings ManagementGroupDiagnosticSettings
  1379  				err = json.Unmarshal(*v, &managementGroupDiagnosticSettings)
  1380  				if err != nil {
  1381  					return err
  1382  				}
  1383  				mgdsr.ManagementGroupDiagnosticSettings = &managementGroupDiagnosticSettings
  1384  			}
  1385  		case "systemData":
  1386  			if v != nil {
  1387  				var systemData SystemData
  1388  				err = json.Unmarshal(*v, &systemData)
  1389  				if err != nil {
  1390  					return err
  1391  				}
  1392  				mgdsr.SystemData = &systemData
  1393  			}
  1394  		case "id":
  1395  			if v != nil {
  1396  				var ID string
  1397  				err = json.Unmarshal(*v, &ID)
  1398  				if err != nil {
  1399  					return err
  1400  				}
  1401  				mgdsr.ID = &ID
  1402  			}
  1403  		case "name":
  1404  			if v != nil {
  1405  				var name string
  1406  				err = json.Unmarshal(*v, &name)
  1407  				if err != nil {
  1408  					return err
  1409  				}
  1410  				mgdsr.Name = &name
  1411  			}
  1412  		case "type":
  1413  			if v != nil {
  1414  				var typeVar string
  1415  				err = json.Unmarshal(*v, &typeVar)
  1416  				if err != nil {
  1417  					return err
  1418  				}
  1419  				mgdsr.Type = &typeVar
  1420  			}
  1421  		}
  1422  	}
  1423  
  1424  	return nil
  1425  }
  1426  
  1427  // ManagementGroupDiagnosticSettingsResourceCollection represents a collection of management group
  1428  // diagnostic settings resources.
  1429  type ManagementGroupDiagnosticSettingsResourceCollection struct {
  1430  	autorest.Response `json:"-"`
  1431  	// Value - The collection of management group diagnostic settings resources.
  1432  	Value *[]ManagementGroupDiagnosticSettingsResource `json:"value,omitempty"`
  1433  }
  1434  
  1435  // ManagementGroupLogSettings part of Management Group diagnostic setting. Specifies the settings for a
  1436  // particular log.
  1437  type ManagementGroupLogSettings struct {
  1438  	// Category - Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
  1439  	Category *string `json:"category,omitempty"`
  1440  	// CategoryGroup - Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
  1441  	CategoryGroup *string `json:"categoryGroup,omitempty"`
  1442  	// Enabled - a value indicating whether this log is enabled.
  1443  	Enabled *bool `json:"enabled,omitempty"`
  1444  }
  1445  
  1446  // MetricSettings part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.
  1447  type MetricSettings struct {
  1448  	// TimeGrain - the timegrain of the metric in ISO8601 format.
  1449  	TimeGrain *string `json:"timeGrain,omitempty"`
  1450  	// Category - Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
  1451  	Category *string `json:"category,omitempty"`
  1452  	// Enabled - a value indicating whether this category is enabled.
  1453  	Enabled *bool `json:"enabled,omitempty"`
  1454  	// RetentionPolicy - the retention policy for this category.
  1455  	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
  1456  }
  1457  
  1458  // MetricTrigger the trigger that results in a scaling action.
  1459  type MetricTrigger struct {
  1460  	// MetricName - the name of the metric that defines what the rule monitors.
  1461  	MetricName *string `json:"metricName,omitempty"`
  1462  	// MetricNamespace - the namespace of the metric that defines what the rule monitors.
  1463  	MetricNamespace *string `json:"metricNamespace,omitempty"`
  1464  	// MetricResourceURI - the resource identifier of the resource the rule monitors.
  1465  	MetricResourceURI *string `json:"metricResourceUri,omitempty"`
  1466  	// MetricResourceLocation - the location of the resource the rule monitors.
  1467  	MetricResourceLocation *string `json:"metricResourceLocation,omitempty"`
  1468  	// TimeGrain - the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.
  1469  	TimeGrain *string `json:"timeGrain,omitempty"`
  1470  	// Statistic - the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum', 'Count'
  1471  	Statistic MetricStatisticType `json:"statistic,omitempty"`
  1472  	// TimeWindow - the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.
  1473  	TimeWindow *string `json:"timeWindow,omitempty"`
  1474  	// TimeAggregation - time aggregation type. How the data that is collected should be combined over time. The default value is Average. Possible values include: 'TimeAggregationTypeAverage', 'TimeAggregationTypeMinimum', 'TimeAggregationTypeMaximum', 'TimeAggregationTypeTotal', 'TimeAggregationTypeCount', 'TimeAggregationTypeLast'
  1475  	TimeAggregation TimeAggregationType `json:"timeAggregation,omitempty"`
  1476  	// Operator - the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'
  1477  	Operator ComparisonOperationType `json:"operator,omitempty"`
  1478  	// Threshold - the threshold of the metric that triggers the scale action.
  1479  	Threshold *float64 `json:"threshold,omitempty"`
  1480  	// Dimensions - List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].
  1481  	Dimensions *[]ScaleRuleMetricDimension `json:"dimensions,omitempty"`
  1482  	// DividePerInstance - a value indicating whether metric should divide per instance.
  1483  	DividePerInstance *bool `json:"dividePerInstance,omitempty"`
  1484  }
  1485  
  1486  // NotificationRequestBody the request body which contain contact detail metadata
  1487  type NotificationRequestBody struct {
  1488  	// AlertType - The name of the supported alert type.
  1489  	AlertType *string `json:"alertType,omitempty"`
  1490  	// EmailReceivers - The list of email receivers that are part of this action group.
  1491  	EmailReceivers *[]EmailReceiver `json:"emailReceivers,omitempty"`
  1492  	// SmsReceivers - The list of SMS receivers that are part of this action group.
  1493  	SmsReceivers *[]SmsReceiver `json:"smsReceivers,omitempty"`
  1494  	// WebhookReceivers - The list of webhook receivers that are part of this action group.
  1495  	WebhookReceivers *[]WebhookReceiver `json:"webhookReceivers,omitempty"`
  1496  	// ItsmReceivers - The list of ITSM receivers that are part of this action group.
  1497  	ItsmReceivers *[]ItsmReceiver `json:"itsmReceivers,omitempty"`
  1498  	// AzureAppPushReceivers - The list of AzureAppPush receivers that are part of this action group.
  1499  	AzureAppPushReceivers *[]AzureAppPushReceiver `json:"azureAppPushReceivers,omitempty"`
  1500  	// AutomationRunbookReceivers - The list of AutomationRunbook receivers that are part of this action group.
  1501  	AutomationRunbookReceivers *[]AutomationRunbookReceiver `json:"automationRunbookReceivers,omitempty"`
  1502  	// VoiceReceivers - The list of voice receivers that are part of this action group.
  1503  	VoiceReceivers *[]VoiceReceiver `json:"voiceReceivers,omitempty"`
  1504  	// LogicAppReceivers - The list of logic app receivers that are part of this action group.
  1505  	LogicAppReceivers *[]LogicAppReceiver `json:"logicAppReceivers,omitempty"`
  1506  	// AzureFunctionReceivers - The list of azure function receivers that are part of this action group.
  1507  	AzureFunctionReceivers *[]AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"`
  1508  	// ArmRoleReceivers - The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.
  1509  	ArmRoleReceivers *[]ArmRoleReceiver `json:"armRoleReceivers,omitempty"`
  1510  	// EventHubReceivers - The list of event hub receivers that are part of this action group.
  1511  	EventHubReceivers *[]EventHubReceiver `json:"eventHubReceivers,omitempty"`
  1512  }
  1513  
  1514  // OperationStatus the status of operation.
  1515  type OperationStatus struct {
  1516  	autorest.Response `json:"-"`
  1517  	// ID - The operation Id.
  1518  	ID *string `json:"id,omitempty"`
  1519  	// Name - The operation name.
  1520  	Name *string `json:"name,omitempty"`
  1521  	// StartTime - Start time of the job in standard ISO8601 format.
  1522  	StartTime *date.Time `json:"startTime,omitempty"`
  1523  	// EndTime - End time of the job in standard ISO8601 format.
  1524  	EndTime *date.Time `json:"endTime,omitempty"`
  1525  	// Status - The status of the operation.
  1526  	Status *string `json:"status,omitempty"`
  1527  	// Error - The error detail of the operation if any.
  1528  	Error *ErrorDetail `json:"error,omitempty"`
  1529  }
  1530  
  1531  // PredictiveAutoscalePolicy the parameters for enabling predictive autoscale.
  1532  type PredictiveAutoscalePolicy struct {
  1533  	// ScaleMode - the predictive autoscale mode. Possible values include: 'Disabled', 'ForecastOnly', 'Enabled'
  1534  	ScaleMode PredictiveAutoscalePolicyScaleMode `json:"scaleMode,omitempty"`
  1535  	// ScaleLookAheadTime - the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.
  1536  	ScaleLookAheadTime *string `json:"scaleLookAheadTime,omitempty"`
  1537  }
  1538  
  1539  // PredictiveResponse the response to a metrics query.
  1540  type PredictiveResponse struct {
  1541  	autorest.Response `json:"-"`
  1542  	// Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'.  This may be adjusted in the future and returned back from what was originally requested.
  1543  	Timespan *string `json:"timespan,omitempty"`
  1544  	// Interval - The interval (window size) for which the metric data was returned in.  This may be adjusted in the future and returned back from what was originally requested.  This is not present if a metadata request was made.
  1545  	Interval *string `json:"interval,omitempty"`
  1546  	// MetricName - The metrics being queried
  1547  	MetricName *string `json:"metricName,omitempty"`
  1548  	// TargetResourceID - resource of the predictive metric.
  1549  	TargetResourceID *string `json:"targetResourceId,omitempty"`
  1550  	// Data - the value of the collection.
  1551  	Data *[]PredictiveValue `json:"data,omitempty"`
  1552  }
  1553  
  1554  // PredictiveValue represents a predictive metric value in the given bucket.
  1555  type PredictiveValue struct {
  1556  	// TimeStamp - the timestamp for the metric value in ISO 8601 format.
  1557  	TimeStamp *date.Time `json:"timeStamp,omitempty"`
  1558  	// Value - Predictive value in this time bucket.
  1559  	Value *float64 `json:"value,omitempty"`
  1560  }
  1561  
  1562  // PrivateEndpoint the Private Endpoint resource.
  1563  type PrivateEndpoint struct {
  1564  	// ID - READ-ONLY; The ARM identifier for Private Endpoint
  1565  	ID *string `json:"id,omitempty"`
  1566  }
  1567  
  1568  // MarshalJSON is the custom marshaler for PrivateEndpoint.
  1569  func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
  1570  	objectMap := make(map[string]interface{})
  1571  	return json.Marshal(objectMap)
  1572  }
  1573  
  1574  // PrivateEndpointConnection the Private Endpoint Connection resource.
  1575  type PrivateEndpointConnection struct {
  1576  	autorest.Response `json:"-"`
  1577  	// PrivateEndpointConnectionProperties - Resource properties.
  1578  	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
  1579  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1580  	ID *string `json:"id,omitempty"`
  1581  	// Name - READ-ONLY; The name of the resource
  1582  	Name *string `json:"name,omitempty"`
  1583  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1584  	Type *string `json:"type,omitempty"`
  1585  }
  1586  
  1587  // MarshalJSON is the custom marshaler for PrivateEndpointConnection.
  1588  func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
  1589  	objectMap := make(map[string]interface{})
  1590  	if pec.PrivateEndpointConnectionProperties != nil {
  1591  		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
  1592  	}
  1593  	return json.Marshal(objectMap)
  1594  }
  1595  
  1596  // UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
  1597  func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
  1598  	var m map[string]*json.RawMessage
  1599  	err := json.Unmarshal(body, &m)
  1600  	if err != nil {
  1601  		return err
  1602  	}
  1603  	for k, v := range m {
  1604  		switch k {
  1605  		case "properties":
  1606  			if v != nil {
  1607  				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
  1608  				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
  1609  				if err != nil {
  1610  					return err
  1611  				}
  1612  				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
  1613  			}
  1614  		case "id":
  1615  			if v != nil {
  1616  				var ID string
  1617  				err = json.Unmarshal(*v, &ID)
  1618  				if err != nil {
  1619  					return err
  1620  				}
  1621  				pec.ID = &ID
  1622  			}
  1623  		case "name":
  1624  			if v != nil {
  1625  				var name string
  1626  				err = json.Unmarshal(*v, &name)
  1627  				if err != nil {
  1628  					return err
  1629  				}
  1630  				pec.Name = &name
  1631  			}
  1632  		case "type":
  1633  			if v != nil {
  1634  				var typeVar string
  1635  				err = json.Unmarshal(*v, &typeVar)
  1636  				if err != nil {
  1637  					return err
  1638  				}
  1639  				pec.Type = &typeVar
  1640  			}
  1641  		}
  1642  	}
  1643  
  1644  	return nil
  1645  }
  1646  
  1647  // PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified
  1648  // storage account
  1649  type PrivateEndpointConnectionListResult struct {
  1650  	autorest.Response `json:"-"`
  1651  	// Value - Array of private endpoint connections
  1652  	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
  1653  }
  1654  
  1655  // PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
  1656  type PrivateEndpointConnectionProperties struct {
  1657  	// PrivateEndpoint - The resource of private end point.
  1658  	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
  1659  	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
  1660  	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
  1661  	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
  1662  	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
  1663  }
  1664  
  1665  // PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
  1666  // of a long-running operation.
  1667  type PrivateEndpointConnectionsCreateOrUpdateFuture struct {
  1668  	azure.FutureAPI
  1669  	// Result returns the result of the asynchronous operation.
  1670  	// If the operation has not completed it will return an error.
  1671  	Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error)
  1672  }
  1673  
  1674  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1675  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1676  	var azFuture azure.Future
  1677  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1678  		return err
  1679  	}
  1680  	future.FutureAPI = &azFuture
  1681  	future.Result = future.result
  1682  	return nil
  1683  }
  1684  
  1685  // result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result.
  1686  func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) {
  1687  	var done bool
  1688  	done, err = future.DoneWithContext(context.Background(), client)
  1689  	if err != nil {
  1690  		err = autorest.NewErrorWithError(err, "diagnostics.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1691  		return
  1692  	}
  1693  	if !done {
  1694  		pec.Response.Response = future.Response()
  1695  		err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateEndpointConnectionsCreateOrUpdateFuture")
  1696  		return
  1697  	}
  1698  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1699  	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
  1700  		pec, err = client.CreateOrUpdateResponder(pec.Response.Response)
  1701  		if err != nil {
  1702  			err = autorest.NewErrorWithError(err, "diagnostics.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request")
  1703  		}
  1704  	}
  1705  	return
  1706  }
  1707  
  1708  // PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
  1709  // long-running operation.
  1710  type PrivateEndpointConnectionsDeleteFuture struct {
  1711  	azure.FutureAPI
  1712  	// Result returns the result of the asynchronous operation.
  1713  	// If the operation has not completed it will return an error.
  1714  	Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
  1715  }
  1716  
  1717  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1718  func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
  1719  	var azFuture azure.Future
  1720  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1721  		return err
  1722  	}
  1723  	future.FutureAPI = &azFuture
  1724  	future.Result = future.result
  1725  	return nil
  1726  }
  1727  
  1728  // result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
  1729  func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
  1730  	var done bool
  1731  	done, err = future.DoneWithContext(context.Background(), client)
  1732  	if err != nil {
  1733  		err = autorest.NewErrorWithError(err, "diagnostics.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
  1734  		return
  1735  	}
  1736  	if !done {
  1737  		ar.Response = future.Response()
  1738  		err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateEndpointConnectionsDeleteFuture")
  1739  		return
  1740  	}
  1741  	ar.Response = future.Response()
  1742  	return
  1743  }
  1744  
  1745  // PrivateLinkResource a private link resource
  1746  type PrivateLinkResource struct {
  1747  	autorest.Response `json:"-"`
  1748  	// PrivateLinkResourceProperties - Resource properties.
  1749  	*PrivateLinkResourceProperties `json:"properties,omitempty"`
  1750  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1751  	ID *string `json:"id,omitempty"`
  1752  	// Name - READ-ONLY; The name of the resource
  1753  	Name *string `json:"name,omitempty"`
  1754  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1755  	Type *string `json:"type,omitempty"`
  1756  }
  1757  
  1758  // MarshalJSON is the custom marshaler for PrivateLinkResource.
  1759  func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
  1760  	objectMap := make(map[string]interface{})
  1761  	if plr.PrivateLinkResourceProperties != nil {
  1762  		objectMap["properties"] = plr.PrivateLinkResourceProperties
  1763  	}
  1764  	return json.Marshal(objectMap)
  1765  }
  1766  
  1767  // UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
  1768  func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
  1769  	var m map[string]*json.RawMessage
  1770  	err := json.Unmarshal(body, &m)
  1771  	if err != nil {
  1772  		return err
  1773  	}
  1774  	for k, v := range m {
  1775  		switch k {
  1776  		case "properties":
  1777  			if v != nil {
  1778  				var privateLinkResourceProperties PrivateLinkResourceProperties
  1779  				err = json.Unmarshal(*v, &privateLinkResourceProperties)
  1780  				if err != nil {
  1781  					return err
  1782  				}
  1783  				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
  1784  			}
  1785  		case "id":
  1786  			if v != nil {
  1787  				var ID string
  1788  				err = json.Unmarshal(*v, &ID)
  1789  				if err != nil {
  1790  					return err
  1791  				}
  1792  				plr.ID = &ID
  1793  			}
  1794  		case "name":
  1795  			if v != nil {
  1796  				var name string
  1797  				err = json.Unmarshal(*v, &name)
  1798  				if err != nil {
  1799  					return err
  1800  				}
  1801  				plr.Name = &name
  1802  			}
  1803  		case "type":
  1804  			if v != nil {
  1805  				var typeVar string
  1806  				err = json.Unmarshal(*v, &typeVar)
  1807  				if err != nil {
  1808  					return err
  1809  				}
  1810  				plr.Type = &typeVar
  1811  			}
  1812  		}
  1813  	}
  1814  
  1815  	return nil
  1816  }
  1817  
  1818  // PrivateLinkResourceListResult a list of private link resources
  1819  type PrivateLinkResourceListResult struct {
  1820  	autorest.Response `json:"-"`
  1821  	// Value - Array of private link resources
  1822  	Value *[]PrivateLinkResource `json:"value,omitempty"`
  1823  }
  1824  
  1825  // PrivateLinkResourceProperties properties of a private link resource.
  1826  type PrivateLinkResourceProperties struct {
  1827  	// GroupID - READ-ONLY; The private link resource group id.
  1828  	GroupID *string `json:"groupId,omitempty"`
  1829  	// RequiredMembers - READ-ONLY; The private link resource required member names.
  1830  	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
  1831  	// RequiredZoneNames - The private link resource Private link DNS zone name.
  1832  	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
  1833  }
  1834  
  1835  // MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
  1836  func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
  1837  	objectMap := make(map[string]interface{})
  1838  	if plrp.RequiredZoneNames != nil {
  1839  		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
  1840  	}
  1841  	return json.Marshal(objectMap)
  1842  }
  1843  
  1844  // PrivateLinkScopedResourcesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
  1845  // of a long-running operation.
  1846  type PrivateLinkScopedResourcesCreateOrUpdateFuture struct {
  1847  	azure.FutureAPI
  1848  	// Result returns the result of the asynchronous operation.
  1849  	// If the operation has not completed it will return an error.
  1850  	Result func(PrivateLinkScopedResourcesClient) (ScopedResource, error)
  1851  }
  1852  
  1853  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1854  func (future *PrivateLinkScopedResourcesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1855  	var azFuture azure.Future
  1856  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1857  		return err
  1858  	}
  1859  	future.FutureAPI = &azFuture
  1860  	future.Result = future.result
  1861  	return nil
  1862  }
  1863  
  1864  // result is the default implementation for PrivateLinkScopedResourcesCreateOrUpdateFuture.Result.
  1865  func (future *PrivateLinkScopedResourcesCreateOrUpdateFuture) result(client PrivateLinkScopedResourcesClient) (sr ScopedResource, err error) {
  1866  	var done bool
  1867  	done, err = future.DoneWithContext(context.Background(), client)
  1868  	if err != nil {
  1869  		err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopedResourcesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1870  		return
  1871  	}
  1872  	if !done {
  1873  		sr.Response.Response = future.Response()
  1874  		err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateLinkScopedResourcesCreateOrUpdateFuture")
  1875  		return
  1876  	}
  1877  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1878  	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
  1879  		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
  1880  		if err != nil {
  1881  			err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopedResourcesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
  1882  		}
  1883  	}
  1884  	return
  1885  }
  1886  
  1887  // PrivateLinkScopedResourcesDeleteFuture an abstraction for monitoring and retrieving the results of a
  1888  // long-running operation.
  1889  type PrivateLinkScopedResourcesDeleteFuture struct {
  1890  	azure.FutureAPI
  1891  	// Result returns the result of the asynchronous operation.
  1892  	// If the operation has not completed it will return an error.
  1893  	Result func(PrivateLinkScopedResourcesClient) (autorest.Response, error)
  1894  }
  1895  
  1896  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1897  func (future *PrivateLinkScopedResourcesDeleteFuture) UnmarshalJSON(body []byte) error {
  1898  	var azFuture azure.Future
  1899  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1900  		return err
  1901  	}
  1902  	future.FutureAPI = &azFuture
  1903  	future.Result = future.result
  1904  	return nil
  1905  }
  1906  
  1907  // result is the default implementation for PrivateLinkScopedResourcesDeleteFuture.Result.
  1908  func (future *PrivateLinkScopedResourcesDeleteFuture) result(client PrivateLinkScopedResourcesClient) (ar autorest.Response, err error) {
  1909  	var done bool
  1910  	done, err = future.DoneWithContext(context.Background(), client)
  1911  	if err != nil {
  1912  		err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopedResourcesDeleteFuture", "Result", future.Response(), "Polling failure")
  1913  		return
  1914  	}
  1915  	if !done {
  1916  		ar.Response = future.Response()
  1917  		err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateLinkScopedResourcesDeleteFuture")
  1918  		return
  1919  	}
  1920  	ar.Response = future.Response()
  1921  	return
  1922  }
  1923  
  1924  // PrivateLinkScopesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1925  // operation.
  1926  type PrivateLinkScopesDeleteFuture struct {
  1927  	azure.FutureAPI
  1928  	// Result returns the result of the asynchronous operation.
  1929  	// If the operation has not completed it will return an error.
  1930  	Result func(PrivateLinkScopesClient) (autorest.Response, error)
  1931  }
  1932  
  1933  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1934  func (future *PrivateLinkScopesDeleteFuture) UnmarshalJSON(body []byte) error {
  1935  	var azFuture azure.Future
  1936  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1937  		return err
  1938  	}
  1939  	future.FutureAPI = &azFuture
  1940  	future.Result = future.result
  1941  	return nil
  1942  }
  1943  
  1944  // result is the default implementation for PrivateLinkScopesDeleteFuture.Result.
  1945  func (future *PrivateLinkScopesDeleteFuture) result(client PrivateLinkScopesClient) (ar autorest.Response, err error) {
  1946  	var done bool
  1947  	done, err = future.DoneWithContext(context.Background(), client)
  1948  	if err != nil {
  1949  		err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopesDeleteFuture", "Result", future.Response(), "Polling failure")
  1950  		return
  1951  	}
  1952  	if !done {
  1953  		ar.Response = future.Response()
  1954  		err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateLinkScopesDeleteFuture")
  1955  		return
  1956  	}
  1957  	ar.Response = future.Response()
  1958  	return
  1959  }
  1960  
  1961  // PrivateLinkServiceConnectionState a collection of information about the state of the connection between
  1962  // service consumer and provider.
  1963  type PrivateLinkServiceConnectionState struct {
  1964  	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
  1965  	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
  1966  	// Description - The reason for approval/rejection of the connection.
  1967  	Description *string `json:"description,omitempty"`
  1968  	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
  1969  	ActionsRequired *string `json:"actionsRequired,omitempty"`
  1970  }
  1971  
  1972  // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
  1973  // have tags and a location
  1974  type ProxyResource struct {
  1975  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1976  	ID *string `json:"id,omitempty"`
  1977  	// Name - READ-ONLY; The name of the resource
  1978  	Name *string `json:"name,omitempty"`
  1979  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1980  	Type *string `json:"type,omitempty"`
  1981  }
  1982  
  1983  // MarshalJSON is the custom marshaler for ProxyResource.
  1984  func (pr ProxyResource) MarshalJSON() ([]byte, error) {
  1985  	objectMap := make(map[string]interface{})
  1986  	return json.Marshal(objectMap)
  1987  }
  1988  
  1989  // Recurrence the repeating times at which this profile begins. This element is not used if the FixedDate
  1990  // element is used.
  1991  type Recurrence struct {
  1992  	// Frequency - the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Possible values include: 'None', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year'
  1993  	Frequency RecurrenceFrequency `json:"frequency,omitempty"`
  1994  	// Schedule - the scheduling constraints for when the profile begins.
  1995  	Schedule *RecurrentSchedule `json:"schedule,omitempty"`
  1996  }
  1997  
  1998  // RecurrentSchedule the scheduling constraints for when the profile begins.
  1999  type RecurrentSchedule struct {
  2000  	// TimeZone - the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
  2001  	TimeZone *string `json:"timeZone,omitempty"`
  2002  	// Days - the collection of days that the profile takes effect on. Possible values are Sunday through Saturday.
  2003  	Days *[]string `json:"days,omitempty"`
  2004  	// Hours - A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported).
  2005  	Hours *[]int32 `json:"hours,omitempty"`
  2006  	// Minutes - A collection of minutes at which the profile takes effect at.
  2007  	Minutes *[]int32 `json:"minutes,omitempty"`
  2008  }
  2009  
  2010  // Resource common fields that are returned in the response for all Azure Resource Manager resources
  2011  type Resource struct {
  2012  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2013  	ID *string `json:"id,omitempty"`
  2014  	// Name - READ-ONLY; The name of the resource
  2015  	Name *string `json:"name,omitempty"`
  2016  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2017  	Type *string `json:"type,omitempty"`
  2018  }
  2019  
  2020  // MarshalJSON is the custom marshaler for Resource.
  2021  func (r Resource) MarshalJSON() ([]byte, error) {
  2022  	objectMap := make(map[string]interface{})
  2023  	return json.Marshal(objectMap)
  2024  }
  2025  
  2026  // RetentionPolicy specifies the retention policy for the log.
  2027  type RetentionPolicy struct {
  2028  	// Enabled - a value indicating whether the retention policy is enabled.
  2029  	Enabled *bool `json:"enabled,omitempty"`
  2030  	// Days - the number of days for the retention in days. A value of 0 will retain the events indefinitely.
  2031  	Days *int32 `json:"days,omitempty"`
  2032  }
  2033  
  2034  // ScaleAction the parameters for the scaling action.
  2035  type ScaleAction struct {
  2036  	// Direction - the scale direction. Whether the scaling action increases or decreases the number of instances. Possible values include: 'ScaleDirectionNone', 'ScaleDirectionIncrease', 'ScaleDirectionDecrease'
  2037  	Direction ScaleDirection `json:"direction,omitempty"`
  2038  	// Type - the type of action that should occur when the scale rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount', 'ServiceAllowedNextValue'
  2039  	Type ScaleType `json:"type,omitempty"`
  2040  	// Value - the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.
  2041  	Value *string `json:"value,omitempty"`
  2042  	// Cooldown - the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format.
  2043  	Cooldown *string `json:"cooldown,omitempty"`
  2044  }
  2045  
  2046  // ScaleCapacity the number of instances that can be used during this profile.
  2047  type ScaleCapacity struct {
  2048  	// Minimum - the minimum number of instances for the resource.
  2049  	Minimum *string `json:"minimum,omitempty"`
  2050  	// Maximum - the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription.
  2051  	Maximum *string `json:"maximum,omitempty"`
  2052  	// Default - the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default.
  2053  	Default *string `json:"default,omitempty"`
  2054  }
  2055  
  2056  // ScaleRule a rule that provide the triggers and parameters for the scaling action.
  2057  type ScaleRule struct {
  2058  	// MetricTrigger - the trigger that results in a scaling action.
  2059  	MetricTrigger *MetricTrigger `json:"metricTrigger,omitempty"`
  2060  	// ScaleAction - the parameters for the scaling action.
  2061  	ScaleAction *ScaleAction `json:"scaleAction,omitempty"`
  2062  }
  2063  
  2064  // ScaleRuleMetricDimension specifies an auto scale rule metric dimension.
  2065  type ScaleRuleMetricDimension struct {
  2066  	// DimensionName - Name of the dimension.
  2067  	DimensionName *string `json:"DimensionName,omitempty"`
  2068  	// Operator - the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Possible values include: 'ScaleRuleMetricDimensionOperationTypeEquals', 'ScaleRuleMetricDimensionOperationTypeNotEquals'
  2069  	Operator ScaleRuleMetricDimensionOperationType `json:"Operator,omitempty"`
  2070  	// Values - list of dimension values. For example: ["App1","App2"].
  2071  	Values *[]string `json:"Values,omitempty"`
  2072  }
  2073  
  2074  // ScopedResource a private link scoped resource
  2075  type ScopedResource struct {
  2076  	autorest.Response `json:"-"`
  2077  	// ScopedResourceProperties - Resource properties.
  2078  	*ScopedResourceProperties `json:"properties,omitempty"`
  2079  	// SystemData - READ-ONLY; System data
  2080  	SystemData *SystemData `json:"systemData,omitempty"`
  2081  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2082  	ID *string `json:"id,omitempty"`
  2083  	// Name - READ-ONLY; The name of the resource
  2084  	Name *string `json:"name,omitempty"`
  2085  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2086  	Type *string `json:"type,omitempty"`
  2087  }
  2088  
  2089  // MarshalJSON is the custom marshaler for ScopedResource.
  2090  func (sr ScopedResource) MarshalJSON() ([]byte, error) {
  2091  	objectMap := make(map[string]interface{})
  2092  	if sr.ScopedResourceProperties != nil {
  2093  		objectMap["properties"] = sr.ScopedResourceProperties
  2094  	}
  2095  	return json.Marshal(objectMap)
  2096  }
  2097  
  2098  // UnmarshalJSON is the custom unmarshaler for ScopedResource struct.
  2099  func (sr *ScopedResource) UnmarshalJSON(body []byte) error {
  2100  	var m map[string]*json.RawMessage
  2101  	err := json.Unmarshal(body, &m)
  2102  	if err != nil {
  2103  		return err
  2104  	}
  2105  	for k, v := range m {
  2106  		switch k {
  2107  		case "properties":
  2108  			if v != nil {
  2109  				var scopedResourceProperties ScopedResourceProperties
  2110  				err = json.Unmarshal(*v, &scopedResourceProperties)
  2111  				if err != nil {
  2112  					return err
  2113  				}
  2114  				sr.ScopedResourceProperties = &scopedResourceProperties
  2115  			}
  2116  		case "systemData":
  2117  			if v != nil {
  2118  				var systemData SystemData
  2119  				err = json.Unmarshal(*v, &systemData)
  2120  				if err != nil {
  2121  					return err
  2122  				}
  2123  				sr.SystemData = &systemData
  2124  			}
  2125  		case "id":
  2126  			if v != nil {
  2127  				var ID string
  2128  				err = json.Unmarshal(*v, &ID)
  2129  				if err != nil {
  2130  					return err
  2131  				}
  2132  				sr.ID = &ID
  2133  			}
  2134  		case "name":
  2135  			if v != nil {
  2136  				var name string
  2137  				err = json.Unmarshal(*v, &name)
  2138  				if err != nil {
  2139  					return err
  2140  				}
  2141  				sr.Name = &name
  2142  			}
  2143  		case "type":
  2144  			if v != nil {
  2145  				var typeVar string
  2146  				err = json.Unmarshal(*v, &typeVar)
  2147  				if err != nil {
  2148  					return err
  2149  				}
  2150  				sr.Type = &typeVar
  2151  			}
  2152  		}
  2153  	}
  2154  
  2155  	return nil
  2156  }
  2157  
  2158  // ScopedResourceListResult a list of scoped resources in a private link scope.
  2159  type ScopedResourceListResult struct {
  2160  	autorest.Response `json:"-"`
  2161  	// Value - READ-ONLY; Array of results.
  2162  	Value *[]ScopedResource `json:"value,omitempty"`
  2163  	// NextLink - READ-ONLY; Link to retrieve next page of results.
  2164  	NextLink *string `json:"nextLink,omitempty"`
  2165  }
  2166  
  2167  // MarshalJSON is the custom marshaler for ScopedResourceListResult.
  2168  func (srlr ScopedResourceListResult) MarshalJSON() ([]byte, error) {
  2169  	objectMap := make(map[string]interface{})
  2170  	return json.Marshal(objectMap)
  2171  }
  2172  
  2173  // ScopedResourceListResultIterator provides access to a complete listing of ScopedResource values.
  2174  type ScopedResourceListResultIterator struct {
  2175  	i    int
  2176  	page ScopedResourceListResultPage
  2177  }
  2178  
  2179  // NextWithContext advances to the next value.  If there was an error making
  2180  // the request the iterator does not advance and the error is returned.
  2181  func (iter *ScopedResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
  2182  	if tracing.IsEnabled() {
  2183  		ctx = tracing.StartSpan(ctx, fqdn+"/ScopedResourceListResultIterator.NextWithContext")
  2184  		defer func() {
  2185  			sc := -1
  2186  			if iter.Response().Response.Response != nil {
  2187  				sc = iter.Response().Response.Response.StatusCode
  2188  			}
  2189  			tracing.EndSpan(ctx, sc, err)
  2190  		}()
  2191  	}
  2192  	iter.i++
  2193  	if iter.i < len(iter.page.Values()) {
  2194  		return nil
  2195  	}
  2196  	err = iter.page.NextWithContext(ctx)
  2197  	if err != nil {
  2198  		iter.i--
  2199  		return err
  2200  	}
  2201  	iter.i = 0
  2202  	return nil
  2203  }
  2204  
  2205  // Next advances to the next value.  If there was an error making
  2206  // the request the iterator does not advance and the error is returned.
  2207  // Deprecated: Use NextWithContext() instead.
  2208  func (iter *ScopedResourceListResultIterator) Next() error {
  2209  	return iter.NextWithContext(context.Background())
  2210  }
  2211  
  2212  // NotDone returns true if the enumeration should be started or is not yet complete.
  2213  func (iter ScopedResourceListResultIterator) NotDone() bool {
  2214  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  2215  }
  2216  
  2217  // Response returns the raw server response from the last page request.
  2218  func (iter ScopedResourceListResultIterator) Response() ScopedResourceListResult {
  2219  	return iter.page.Response()
  2220  }
  2221  
  2222  // Value returns the current value or a zero-initialized value if the
  2223  // iterator has advanced beyond the end of the collection.
  2224  func (iter ScopedResourceListResultIterator) Value() ScopedResource {
  2225  	if !iter.page.NotDone() {
  2226  		return ScopedResource{}
  2227  	}
  2228  	return iter.page.Values()[iter.i]
  2229  }
  2230  
  2231  // Creates a new instance of the ScopedResourceListResultIterator type.
  2232  func NewScopedResourceListResultIterator(page ScopedResourceListResultPage) ScopedResourceListResultIterator {
  2233  	return ScopedResourceListResultIterator{page: page}
  2234  }
  2235  
  2236  // IsEmpty returns true if the ListResult contains no values.
  2237  func (srlr ScopedResourceListResult) IsEmpty() bool {
  2238  	return srlr.Value == nil || len(*srlr.Value) == 0
  2239  }
  2240  
  2241  // hasNextLink returns true if the NextLink is not empty.
  2242  func (srlr ScopedResourceListResult) hasNextLink() bool {
  2243  	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
  2244  }
  2245  
  2246  // scopedResourceListResultPreparer prepares a request to retrieve the next set of results.
  2247  // It returns nil if no more results exist.
  2248  func (srlr ScopedResourceListResult) scopedResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
  2249  	if !srlr.hasNextLink() {
  2250  		return nil, nil
  2251  	}
  2252  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  2253  		autorest.AsJSON(),
  2254  		autorest.AsGet(),
  2255  		autorest.WithBaseURL(to.String(srlr.NextLink)))
  2256  }
  2257  
  2258  // ScopedResourceListResultPage contains a page of ScopedResource values.
  2259  type ScopedResourceListResultPage struct {
  2260  	fn   func(context.Context, ScopedResourceListResult) (ScopedResourceListResult, error)
  2261  	srlr ScopedResourceListResult
  2262  }
  2263  
  2264  // NextWithContext advances to the next page of values.  If there was an error making
  2265  // the request the page does not advance and the error is returned.
  2266  func (page *ScopedResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
  2267  	if tracing.IsEnabled() {
  2268  		ctx = tracing.StartSpan(ctx, fqdn+"/ScopedResourceListResultPage.NextWithContext")
  2269  		defer func() {
  2270  			sc := -1
  2271  			if page.Response().Response.Response != nil {
  2272  				sc = page.Response().Response.Response.StatusCode
  2273  			}
  2274  			tracing.EndSpan(ctx, sc, err)
  2275  		}()
  2276  	}
  2277  	for {
  2278  		next, err := page.fn(ctx, page.srlr)
  2279  		if err != nil {
  2280  			return err
  2281  		}
  2282  		page.srlr = next
  2283  		if !next.hasNextLink() || !next.IsEmpty() {
  2284  			break
  2285  		}
  2286  	}
  2287  	return nil
  2288  }
  2289  
  2290  // Next advances to the next page of values.  If there was an error making
  2291  // the request the page does not advance and the error is returned.
  2292  // Deprecated: Use NextWithContext() instead.
  2293  func (page *ScopedResourceListResultPage) Next() error {
  2294  	return page.NextWithContext(context.Background())
  2295  }
  2296  
  2297  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2298  func (page ScopedResourceListResultPage) NotDone() bool {
  2299  	return !page.srlr.IsEmpty()
  2300  }
  2301  
  2302  // Response returns the raw server response from the last page request.
  2303  func (page ScopedResourceListResultPage) Response() ScopedResourceListResult {
  2304  	return page.srlr
  2305  }
  2306  
  2307  // Values returns the slice of values for the current page or nil if there are no values.
  2308  func (page ScopedResourceListResultPage) Values() []ScopedResource {
  2309  	if page.srlr.IsEmpty() {
  2310  		return nil
  2311  	}
  2312  	return *page.srlr.Value
  2313  }
  2314  
  2315  // Creates a new instance of the ScopedResourceListResultPage type.
  2316  func NewScopedResourceListResultPage(cur ScopedResourceListResult, getNextPage func(context.Context, ScopedResourceListResult) (ScopedResourceListResult, error)) ScopedResourceListResultPage {
  2317  	return ScopedResourceListResultPage{
  2318  		fn:   getNextPage,
  2319  		srlr: cur,
  2320  	}
  2321  }
  2322  
  2323  // ScopedResourceProperties properties of a private link scoped resource.
  2324  type ScopedResourceProperties struct {
  2325  	// LinkedResourceID - The resource id of the scoped Azure monitor resource.
  2326  	LinkedResourceID *string `json:"linkedResourceId,omitempty"`
  2327  	// ProvisioningState - READ-ONLY; State of the private endpoint connection.
  2328  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2329  }
  2330  
  2331  // MarshalJSON is the custom marshaler for ScopedResourceProperties.
  2332  func (srp ScopedResourceProperties) MarshalJSON() ([]byte, error) {
  2333  	objectMap := make(map[string]interface{})
  2334  	if srp.LinkedResourceID != nil {
  2335  		objectMap["linkedResourceId"] = srp.LinkedResourceID
  2336  	}
  2337  	return json.Marshal(objectMap)
  2338  }
  2339  
  2340  // Settings the diagnostic settings.
  2341  type Settings struct {
  2342  	// StorageAccountID - The resource ID of the storage account to which you would like to send Diagnostic Logs.
  2343  	StorageAccountID *string `json:"storageAccountId,omitempty"`
  2344  	// ServiceBusRuleID - The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
  2345  	ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
  2346  	// EventHubAuthorizationRuleID - The resource Id for the event hub authorization rule.
  2347  	EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"`
  2348  	// EventHubName - The name of the event hub. If none is specified, the default event hub will be selected.
  2349  	EventHubName *string `json:"eventHubName,omitempty"`
  2350  	// Metrics - The list of metric settings.
  2351  	Metrics *[]MetricSettings `json:"metrics,omitempty"`
  2352  	// Logs - The list of logs settings.
  2353  	Logs *[]LogSettings `json:"logs,omitempty"`
  2354  	// WorkspaceID - The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
  2355  	WorkspaceID *string `json:"workspaceId,omitempty"`
  2356  	// MarketplacePartnerID - The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
  2357  	MarketplacePartnerID *string `json:"marketplacePartnerId,omitempty"`
  2358  	// LogAnalyticsDestinationType - A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: <normalized service identity>_<normalized category name>. Possible values are: Dedicated and null (null is default.)
  2359  	LogAnalyticsDestinationType *string `json:"logAnalyticsDestinationType,omitempty"`
  2360  }
  2361  
  2362  // SettingsCategory the diagnostic settings Category.
  2363  type SettingsCategory struct {
  2364  	// CategoryType - The type of the diagnostic settings category. Possible values include: 'Metrics', 'Logs'
  2365  	CategoryType CategoryType `json:"categoryType,omitempty"`
  2366  	// CategoryGroups - the collection of what category groups are supported.
  2367  	CategoryGroups *[]string `json:"categoryGroups,omitempty"`
  2368  }
  2369  
  2370  // SettingsCategoryResource the diagnostic settings category resource.
  2371  type SettingsCategoryResource struct {
  2372  	autorest.Response `json:"-"`
  2373  	// SettingsCategory - The properties of a Diagnostic Settings Category.
  2374  	*SettingsCategory `json:"properties,omitempty"`
  2375  	// SystemData - READ-ONLY; The system metadata related to this resource.
  2376  	SystemData *SystemData `json:"systemData,omitempty"`
  2377  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2378  	ID *string `json:"id,omitempty"`
  2379  	// Name - READ-ONLY; The name of the resource
  2380  	Name *string `json:"name,omitempty"`
  2381  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2382  	Type *string `json:"type,omitempty"`
  2383  }
  2384  
  2385  // MarshalJSON is the custom marshaler for SettingsCategoryResource.
  2386  func (scr SettingsCategoryResource) MarshalJSON() ([]byte, error) {
  2387  	objectMap := make(map[string]interface{})
  2388  	if scr.SettingsCategory != nil {
  2389  		objectMap["properties"] = scr.SettingsCategory
  2390  	}
  2391  	return json.Marshal(objectMap)
  2392  }
  2393  
  2394  // UnmarshalJSON is the custom unmarshaler for SettingsCategoryResource struct.
  2395  func (scr *SettingsCategoryResource) UnmarshalJSON(body []byte) error {
  2396  	var m map[string]*json.RawMessage
  2397  	err := json.Unmarshal(body, &m)
  2398  	if err != nil {
  2399  		return err
  2400  	}
  2401  	for k, v := range m {
  2402  		switch k {
  2403  		case "properties":
  2404  			if v != nil {
  2405  				var settingsCategory SettingsCategory
  2406  				err = json.Unmarshal(*v, &settingsCategory)
  2407  				if err != nil {
  2408  					return err
  2409  				}
  2410  				scr.SettingsCategory = &settingsCategory
  2411  			}
  2412  		case "systemData":
  2413  			if v != nil {
  2414  				var systemData SystemData
  2415  				err = json.Unmarshal(*v, &systemData)
  2416  				if err != nil {
  2417  					return err
  2418  				}
  2419  				scr.SystemData = &systemData
  2420  			}
  2421  		case "id":
  2422  			if v != nil {
  2423  				var ID string
  2424  				err = json.Unmarshal(*v, &ID)
  2425  				if err != nil {
  2426  					return err
  2427  				}
  2428  				scr.ID = &ID
  2429  			}
  2430  		case "name":
  2431  			if v != nil {
  2432  				var name string
  2433  				err = json.Unmarshal(*v, &name)
  2434  				if err != nil {
  2435  					return err
  2436  				}
  2437  				scr.Name = &name
  2438  			}
  2439  		case "type":
  2440  			if v != nil {
  2441  				var typeVar string
  2442  				err = json.Unmarshal(*v, &typeVar)
  2443  				if err != nil {
  2444  					return err
  2445  				}
  2446  				scr.Type = &typeVar
  2447  			}
  2448  		}
  2449  	}
  2450  
  2451  	return nil
  2452  }
  2453  
  2454  // SettingsCategoryResourceCollection represents a collection of diagnostic setting category resources.
  2455  type SettingsCategoryResourceCollection struct {
  2456  	autorest.Response `json:"-"`
  2457  	// Value - The collection of diagnostic settings category resources.
  2458  	Value *[]SettingsCategoryResource `json:"value,omitempty"`
  2459  }
  2460  
  2461  // SettingsResource the diagnostic setting resource.
  2462  type SettingsResource struct {
  2463  	autorest.Response `json:"-"`
  2464  	// Settings - Properties of a Diagnostic Settings Resource.
  2465  	*Settings `json:"properties,omitempty"`
  2466  	// SystemData - READ-ONLY; The system metadata related to this resource.
  2467  	SystemData *SystemData `json:"systemData,omitempty"`
  2468  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2469  	ID *string `json:"id,omitempty"`
  2470  	// Name - READ-ONLY; The name of the resource
  2471  	Name *string `json:"name,omitempty"`
  2472  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2473  	Type *string `json:"type,omitempty"`
  2474  }
  2475  
  2476  // MarshalJSON is the custom marshaler for SettingsResource.
  2477  func (sr SettingsResource) MarshalJSON() ([]byte, error) {
  2478  	objectMap := make(map[string]interface{})
  2479  	if sr.Settings != nil {
  2480  		objectMap["properties"] = sr.Settings
  2481  	}
  2482  	return json.Marshal(objectMap)
  2483  }
  2484  
  2485  // UnmarshalJSON is the custom unmarshaler for SettingsResource struct.
  2486  func (sr *SettingsResource) UnmarshalJSON(body []byte) error {
  2487  	var m map[string]*json.RawMessage
  2488  	err := json.Unmarshal(body, &m)
  2489  	if err != nil {
  2490  		return err
  2491  	}
  2492  	for k, v := range m {
  2493  		switch k {
  2494  		case "properties":
  2495  			if v != nil {
  2496  				var settings Settings
  2497  				err = json.Unmarshal(*v, &settings)
  2498  				if err != nil {
  2499  					return err
  2500  				}
  2501  				sr.Settings = &settings
  2502  			}
  2503  		case "systemData":
  2504  			if v != nil {
  2505  				var systemData SystemData
  2506  				err = json.Unmarshal(*v, &systemData)
  2507  				if err != nil {
  2508  					return err
  2509  				}
  2510  				sr.SystemData = &systemData
  2511  			}
  2512  		case "id":
  2513  			if v != nil {
  2514  				var ID string
  2515  				err = json.Unmarshal(*v, &ID)
  2516  				if err != nil {
  2517  					return err
  2518  				}
  2519  				sr.ID = &ID
  2520  			}
  2521  		case "name":
  2522  			if v != nil {
  2523  				var name string
  2524  				err = json.Unmarshal(*v, &name)
  2525  				if err != nil {
  2526  					return err
  2527  				}
  2528  				sr.Name = &name
  2529  			}
  2530  		case "type":
  2531  			if v != nil {
  2532  				var typeVar string
  2533  				err = json.Unmarshal(*v, &typeVar)
  2534  				if err != nil {
  2535  					return err
  2536  				}
  2537  				sr.Type = &typeVar
  2538  			}
  2539  		}
  2540  	}
  2541  
  2542  	return nil
  2543  }
  2544  
  2545  // SettingsResourceCollection represents a collection of alert rule resources.
  2546  type SettingsResourceCollection struct {
  2547  	autorest.Response `json:"-"`
  2548  	// Value - The collection of diagnostic settings resources;.
  2549  	Value *[]SettingsResource `json:"value,omitempty"`
  2550  }
  2551  
  2552  // SmsReceiver an SMS receiver.
  2553  type SmsReceiver struct {
  2554  	// Name - The name of the SMS receiver. Names must be unique across all receivers within an action group.
  2555  	Name *string `json:"name,omitempty"`
  2556  	// CountryCode - The country code of the SMS receiver.
  2557  	CountryCode *string `json:"countryCode,omitempty"`
  2558  	// PhoneNumber - The phone number of the SMS receiver.
  2559  	PhoneNumber *string `json:"phoneNumber,omitempty"`
  2560  	// Status - READ-ONLY; The status of the receiver. Possible values include: 'ReceiverStatusNotSpecified', 'ReceiverStatusEnabled', 'ReceiverStatusDisabled'
  2561  	Status ReceiverStatus `json:"status,omitempty"`
  2562  }
  2563  
  2564  // MarshalJSON is the custom marshaler for SmsReceiver.
  2565  func (sr SmsReceiver) MarshalJSON() ([]byte, error) {
  2566  	objectMap := make(map[string]interface{})
  2567  	if sr.Name != nil {
  2568  		objectMap["name"] = sr.Name
  2569  	}
  2570  	if sr.CountryCode != nil {
  2571  		objectMap["countryCode"] = sr.CountryCode
  2572  	}
  2573  	if sr.PhoneNumber != nil {
  2574  		objectMap["phoneNumber"] = sr.PhoneNumber
  2575  	}
  2576  	return json.Marshal(objectMap)
  2577  }
  2578  
  2579  // SubscriptionDiagnosticSettings the subscription diagnostic settings.
  2580  type SubscriptionDiagnosticSettings struct {
  2581  	// StorageAccountID - The resource ID of the storage account to which you would like to send Diagnostic Logs.
  2582  	StorageAccountID *string `json:"storageAccountId,omitempty"`
  2583  	// ServiceBusRuleID - The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
  2584  	ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
  2585  	// EventHubAuthorizationRuleID - The resource Id for the event hub authorization rule.
  2586  	EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"`
  2587  	// EventHubName - The name of the event hub. If none is specified, the default event hub will be selected.
  2588  	EventHubName *string `json:"eventHubName,omitempty"`
  2589  	// Logs - The list of logs settings.
  2590  	Logs *[]SubscriptionLogSettings `json:"logs,omitempty"`
  2591  	// WorkspaceID - The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
  2592  	WorkspaceID *string `json:"workspaceId,omitempty"`
  2593  	// MarketplacePartnerID - The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
  2594  	MarketplacePartnerID *string `json:"marketplacePartnerId,omitempty"`
  2595  }
  2596  
  2597  // SubscriptionDiagnosticSettingsResource the subscription diagnostic setting resource.
  2598  type SubscriptionDiagnosticSettingsResource struct {
  2599  	autorest.Response `json:"-"`
  2600  	// SubscriptionDiagnosticSettings - Properties of a Subscription Diagnostic Settings Resource.
  2601  	*SubscriptionDiagnosticSettings `json:"properties,omitempty"`
  2602  	// SystemData - READ-ONLY; The system metadata related to this resource.
  2603  	SystemData *SystemData `json:"systemData,omitempty"`
  2604  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2605  	ID *string `json:"id,omitempty"`
  2606  	// Name - READ-ONLY; The name of the resource
  2607  	Name *string `json:"name,omitempty"`
  2608  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2609  	Type *string `json:"type,omitempty"`
  2610  }
  2611  
  2612  // MarshalJSON is the custom marshaler for SubscriptionDiagnosticSettingsResource.
  2613  func (sdsr SubscriptionDiagnosticSettingsResource) MarshalJSON() ([]byte, error) {
  2614  	objectMap := make(map[string]interface{})
  2615  	if sdsr.SubscriptionDiagnosticSettings != nil {
  2616  		objectMap["properties"] = sdsr.SubscriptionDiagnosticSettings
  2617  	}
  2618  	return json.Marshal(objectMap)
  2619  }
  2620  
  2621  // UnmarshalJSON is the custom unmarshaler for SubscriptionDiagnosticSettingsResource struct.
  2622  func (sdsr *SubscriptionDiagnosticSettingsResource) UnmarshalJSON(body []byte) error {
  2623  	var m map[string]*json.RawMessage
  2624  	err := json.Unmarshal(body, &m)
  2625  	if err != nil {
  2626  		return err
  2627  	}
  2628  	for k, v := range m {
  2629  		switch k {
  2630  		case "properties":
  2631  			if v != nil {
  2632  				var subscriptionDiagnosticSettings SubscriptionDiagnosticSettings
  2633  				err = json.Unmarshal(*v, &subscriptionDiagnosticSettings)
  2634  				if err != nil {
  2635  					return err
  2636  				}
  2637  				sdsr.SubscriptionDiagnosticSettings = &subscriptionDiagnosticSettings
  2638  			}
  2639  		case "systemData":
  2640  			if v != nil {
  2641  				var systemData SystemData
  2642  				err = json.Unmarshal(*v, &systemData)
  2643  				if err != nil {
  2644  					return err
  2645  				}
  2646  				sdsr.SystemData = &systemData
  2647  			}
  2648  		case "id":
  2649  			if v != nil {
  2650  				var ID string
  2651  				err = json.Unmarshal(*v, &ID)
  2652  				if err != nil {
  2653  					return err
  2654  				}
  2655  				sdsr.ID = &ID
  2656  			}
  2657  		case "name":
  2658  			if v != nil {
  2659  				var name string
  2660  				err = json.Unmarshal(*v, &name)
  2661  				if err != nil {
  2662  					return err
  2663  				}
  2664  				sdsr.Name = &name
  2665  			}
  2666  		case "type":
  2667  			if v != nil {
  2668  				var typeVar string
  2669  				err = json.Unmarshal(*v, &typeVar)
  2670  				if err != nil {
  2671  					return err
  2672  				}
  2673  				sdsr.Type = &typeVar
  2674  			}
  2675  		}
  2676  	}
  2677  
  2678  	return nil
  2679  }
  2680  
  2681  // SubscriptionDiagnosticSettingsResourceCollection represents a collection of subscription diagnostic
  2682  // settings resources.
  2683  type SubscriptionDiagnosticSettingsResourceCollection struct {
  2684  	autorest.Response `json:"-"`
  2685  	// Value - The collection of subscription diagnostic settings resources.
  2686  	Value *[]SubscriptionDiagnosticSettingsResource `json:"value,omitempty"`
  2687  }
  2688  
  2689  // SubscriptionLogSettings part of Subscription diagnostic setting. Specifies the settings for a particular
  2690  // log.
  2691  type SubscriptionLogSettings struct {
  2692  	// Category - Name of a Subscription Diagnostic Log category for a resource type this setting is applied to.
  2693  	Category *string `json:"category,omitempty"`
  2694  	// CategoryGroup - Name of a Subscription Diagnostic Log category group for a resource type this setting is applied to.
  2695  	CategoryGroup *string `json:"categoryGroup,omitempty"`
  2696  	// Enabled - a value indicating whether this log is enabled.
  2697  	Enabled *bool `json:"enabled,omitempty"`
  2698  }
  2699  
  2700  // SystemData metadata pertaining to creation and last modification of the resource.
  2701  type SystemData struct {
  2702  	// CreatedBy - The identity that created the resource.
  2703  	CreatedBy *string `json:"createdBy,omitempty"`
  2704  	// CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
  2705  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
  2706  	// CreatedAt - The timestamp of resource creation (UTC).
  2707  	CreatedAt *date.Time `json:"createdAt,omitempty"`
  2708  	// LastModifiedBy - The identity that last modified the resource.
  2709  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
  2710  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
  2711  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
  2712  	// LastModifiedAt - The timestamp of resource last modification (UTC)
  2713  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
  2714  }
  2715  
  2716  // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a
  2717  // PrivateLinkScope instance.
  2718  type TagsResource struct {
  2719  	// Tags - Resource tags
  2720  	Tags map[string]*string `json:"tags"`
  2721  }
  2722  
  2723  // MarshalJSON is the custom marshaler for TagsResource.
  2724  func (tr TagsResource) MarshalJSON() ([]byte, error) {
  2725  	objectMap := make(map[string]interface{})
  2726  	if tr.Tags != nil {
  2727  		objectMap["tags"] = tr.Tags
  2728  	}
  2729  	return json.Marshal(objectMap)
  2730  }
  2731  
  2732  // TestNotificationDetailsResponse the details of the test notification results.
  2733  type TestNotificationDetailsResponse struct {
  2734  	autorest.Response `json:"-"`
  2735  	Context           *Context `json:"context,omitempty"`
  2736  	// State - The overall state
  2737  	State *string `json:"state,omitempty"`
  2738  	// CompletedTime - The completed time
  2739  	CompletedTime *string `json:"completedTime,omitempty"`
  2740  	// CreatedTime - The created time
  2741  	CreatedTime *string `json:"createdTime,omitempty"`
  2742  	// ActionDetails - The list of action detail
  2743  	ActionDetails *[]ActionDetail `json:"actionDetails,omitempty"`
  2744  }
  2745  
  2746  // TimeWindow a specific date-time for the profile.
  2747  type TimeWindow struct {
  2748  	// TimeZone - the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
  2749  	TimeZone *string `json:"timeZone,omitempty"`
  2750  	// Start - the start time for the profile in ISO 8601 format.
  2751  	Start *date.Time `json:"start,omitempty"`
  2752  	// End - the end time for the profile in ISO 8601 format.
  2753  	End *date.Time `json:"end,omitempty"`
  2754  }
  2755  
  2756  // TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
  2757  // which has 'tags' and a 'location'
  2758  type TrackedResource struct {
  2759  	// Tags - Resource tags.
  2760  	Tags map[string]*string `json:"tags"`
  2761  	// Location - The geo-location where the resource lives
  2762  	Location *string `json:"location,omitempty"`
  2763  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2764  	ID *string `json:"id,omitempty"`
  2765  	// Name - READ-ONLY; The name of the resource
  2766  	Name *string `json:"name,omitempty"`
  2767  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2768  	Type *string `json:"type,omitempty"`
  2769  }
  2770  
  2771  // MarshalJSON is the custom marshaler for TrackedResource.
  2772  func (tr TrackedResource) MarshalJSON() ([]byte, error) {
  2773  	objectMap := make(map[string]interface{})
  2774  	if tr.Tags != nil {
  2775  		objectMap["tags"] = tr.Tags
  2776  	}
  2777  	if tr.Location != nil {
  2778  		objectMap["location"] = tr.Location
  2779  	}
  2780  	return json.Marshal(objectMap)
  2781  }
  2782  
  2783  // VoiceReceiver a voice receiver.
  2784  type VoiceReceiver struct {
  2785  	// Name - The name of the voice receiver. Names must be unique across all receivers within an action group.
  2786  	Name *string `json:"name,omitempty"`
  2787  	// CountryCode - The country code of the voice receiver.
  2788  	CountryCode *string `json:"countryCode,omitempty"`
  2789  	// PhoneNumber - The phone number of the voice receiver.
  2790  	PhoneNumber *string `json:"phoneNumber,omitempty"`
  2791  }
  2792  
  2793  // WebhookNotification webhook notification of an autoscale event.
  2794  type WebhookNotification struct {
  2795  	// ServiceURI - the service address to receive the notification.
  2796  	ServiceURI *string `json:"serviceUri,omitempty"`
  2797  	// Properties - a property bag of settings. This value can be empty.
  2798  	Properties map[string]*string `json:"properties"`
  2799  }
  2800  
  2801  // MarshalJSON is the custom marshaler for WebhookNotification.
  2802  func (wn WebhookNotification) MarshalJSON() ([]byte, error) {
  2803  	objectMap := make(map[string]interface{})
  2804  	if wn.ServiceURI != nil {
  2805  		objectMap["serviceUri"] = wn.ServiceURI
  2806  	}
  2807  	if wn.Properties != nil {
  2808  		objectMap["properties"] = wn.Properties
  2809  	}
  2810  	return json.Marshal(objectMap)
  2811  }
  2812  
  2813  // WebhookReceiver a webhook receiver.
  2814  type WebhookReceiver struct {
  2815  	// Name - The name of the webhook receiver. Names must be unique across all receivers within an action group.
  2816  	Name *string `json:"name,omitempty"`
  2817  	// ServiceURI - The URI where webhooks should be sent.
  2818  	ServiceURI *string `json:"serviceUri,omitempty"`
  2819  	// UseCommonAlertSchema - Indicates whether to use common alert schema.
  2820  	UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
  2821  	// UseAadAuth - Indicates whether or not use AAD authentication.
  2822  	UseAadAuth *bool `json:"useAadAuth,omitempty"`
  2823  	// ObjectID - Indicates the webhook app object Id for aad auth.
  2824  	ObjectID *string `json:"objectId,omitempty"`
  2825  	// IdentifierURI - Indicates the identifier uri for aad auth.
  2826  	IdentifierURI *string `json:"identifierUri,omitempty"`
  2827  	// TenantID - Indicates the tenant id for aad auth.
  2828  	TenantID *string `json:"tenantId,omitempty"`
  2829  }
  2830  

View as plain text