...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2020-02-02-preview/insights/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2020-02-02-preview/insights

     1  package insights
     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/date"
    14  	"github.com/Azure/go-autorest/autorest/to"
    15  	"github.com/Azure/go-autorest/tracing"
    16  	"net/http"
    17  )
    18  
    19  // The package's fully qualified name.
    20  const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2020-02-02-preview/insights"
    21  
    22  // Annotation annotation associated with an application insights resource.
    23  type Annotation struct {
    24  	// AnnotationName - Name of annotation
    25  	AnnotationName *string `json:"AnnotationName,omitempty"`
    26  	// Category - Category of annotation, free form
    27  	Category *string `json:"Category,omitempty"`
    28  	// EventTime - Time when event occurred
    29  	EventTime *date.Time `json:"EventTime,omitempty"`
    30  	// ID - Unique Id for annotation
    31  	ID *string `json:"Id,omitempty"`
    32  	// Properties - Serialized JSON object for detailed properties
    33  	Properties *string `json:"Properties,omitempty"`
    34  	// RelatedAnnotation - Related parent annotation if any
    35  	RelatedAnnotation *string `json:"RelatedAnnotation,omitempty"`
    36  }
    37  
    38  // AnnotationError error associated with trying to create annotation with Id that already exist
    39  type AnnotationError struct {
    40  	// Code - Error detail code and explanation
    41  	Code *string `json:"code,omitempty"`
    42  	// Message - Error message
    43  	Message    *string     `json:"message,omitempty"`
    44  	Innererror *InnerError `json:"innererror,omitempty"`
    45  }
    46  
    47  // AnnotationsListResult annotations list result.
    48  type AnnotationsListResult struct {
    49  	autorest.Response `json:"-"`
    50  	// Value - READ-ONLY; An array of annotations.
    51  	Value *[]Annotation `json:"value,omitempty"`
    52  }
    53  
    54  // MarshalJSON is the custom marshaler for AnnotationsListResult.
    55  func (alr AnnotationsListResult) MarshalJSON() ([]byte, error) {
    56  	objectMap := make(map[string]interface{})
    57  	return json.Marshal(objectMap)
    58  }
    59  
    60  // APIKeyRequest an Application Insights component API Key creation request definition.
    61  type APIKeyRequest struct {
    62  	// Name - The name of the API Key.
    63  	Name *string `json:"name,omitempty"`
    64  	// LinkedReadProperties - The read access rights of this API Key.
    65  	LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
    66  	// LinkedWriteProperties - The write access rights of this API Key.
    67  	LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
    68  }
    69  
    70  // ApplicationInsightsComponent an Application Insights component definition.
    71  type ApplicationInsightsComponent struct {
    72  	autorest.Response `json:"-"`
    73  	// Kind - The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone.
    74  	Kind *string `json:"kind,omitempty"`
    75  	// Etag - Resource etag
    76  	Etag *string `json:"etag,omitempty"`
    77  	// ApplicationInsightsComponentProperties - Properties that define an Application Insights component resource.
    78  	*ApplicationInsightsComponentProperties `json:"properties,omitempty"`
    79  	// ID - READ-ONLY; Azure resource Id
    80  	ID *string `json:"id,omitempty"`
    81  	// Name - READ-ONLY; Azure resource name
    82  	Name *string `json:"name,omitempty"`
    83  	// Type - READ-ONLY; Azure resource type
    84  	Type *string `json:"type,omitempty"`
    85  	// Location - Resource location
    86  	Location *string `json:"location,omitempty"`
    87  	// Tags - Resource tags
    88  	Tags map[string]*string `json:"tags"`
    89  }
    90  
    91  // MarshalJSON is the custom marshaler for ApplicationInsightsComponent.
    92  func (aic ApplicationInsightsComponent) MarshalJSON() ([]byte, error) {
    93  	objectMap := make(map[string]interface{})
    94  	if aic.Kind != nil {
    95  		objectMap["kind"] = aic.Kind
    96  	}
    97  	if aic.Etag != nil {
    98  		objectMap["etag"] = aic.Etag
    99  	}
   100  	if aic.ApplicationInsightsComponentProperties != nil {
   101  		objectMap["properties"] = aic.ApplicationInsightsComponentProperties
   102  	}
   103  	if aic.Location != nil {
   104  		objectMap["location"] = aic.Location
   105  	}
   106  	if aic.Tags != nil {
   107  		objectMap["tags"] = aic.Tags
   108  	}
   109  	return json.Marshal(objectMap)
   110  }
   111  
   112  // UnmarshalJSON is the custom unmarshaler for ApplicationInsightsComponent struct.
   113  func (aic *ApplicationInsightsComponent) UnmarshalJSON(body []byte) error {
   114  	var m map[string]*json.RawMessage
   115  	err := json.Unmarshal(body, &m)
   116  	if err != nil {
   117  		return err
   118  	}
   119  	for k, v := range m {
   120  		switch k {
   121  		case "kind":
   122  			if v != nil {
   123  				var kind string
   124  				err = json.Unmarshal(*v, &kind)
   125  				if err != nil {
   126  					return err
   127  				}
   128  				aic.Kind = &kind
   129  			}
   130  		case "etag":
   131  			if v != nil {
   132  				var etag string
   133  				err = json.Unmarshal(*v, &etag)
   134  				if err != nil {
   135  					return err
   136  				}
   137  				aic.Etag = &etag
   138  			}
   139  		case "properties":
   140  			if v != nil {
   141  				var applicationInsightsComponentProperties ApplicationInsightsComponentProperties
   142  				err = json.Unmarshal(*v, &applicationInsightsComponentProperties)
   143  				if err != nil {
   144  					return err
   145  				}
   146  				aic.ApplicationInsightsComponentProperties = &applicationInsightsComponentProperties
   147  			}
   148  		case "id":
   149  			if v != nil {
   150  				var ID string
   151  				err = json.Unmarshal(*v, &ID)
   152  				if err != nil {
   153  					return err
   154  				}
   155  				aic.ID = &ID
   156  			}
   157  		case "name":
   158  			if v != nil {
   159  				var name string
   160  				err = json.Unmarshal(*v, &name)
   161  				if err != nil {
   162  					return err
   163  				}
   164  				aic.Name = &name
   165  			}
   166  		case "type":
   167  			if v != nil {
   168  				var typeVar string
   169  				err = json.Unmarshal(*v, &typeVar)
   170  				if err != nil {
   171  					return err
   172  				}
   173  				aic.Type = &typeVar
   174  			}
   175  		case "location":
   176  			if v != nil {
   177  				var location string
   178  				err = json.Unmarshal(*v, &location)
   179  				if err != nil {
   180  					return err
   181  				}
   182  				aic.Location = &location
   183  			}
   184  		case "tags":
   185  			if v != nil {
   186  				var tags map[string]*string
   187  				err = json.Unmarshal(*v, &tags)
   188  				if err != nil {
   189  					return err
   190  				}
   191  				aic.Tags = tags
   192  			}
   193  		}
   194  	}
   195  
   196  	return nil
   197  }
   198  
   199  // ApplicationInsightsComponentAnalyticsItem properties that define an Analytics item that is associated to
   200  // an Application Insights component.
   201  type ApplicationInsightsComponentAnalyticsItem struct {
   202  	autorest.Response `json:"-"`
   203  	// ID - Internally assigned unique id of the item definition.
   204  	ID *string `json:"Id,omitempty"`
   205  	// Name - The user-defined name of the item.
   206  	Name *string `json:"Name,omitempty"`
   207  	// Content - The content of this item
   208  	Content *string `json:"Content,omitempty"`
   209  	// Version - READ-ONLY; This instance's version of the data model. This can change as new features are added.
   210  	Version *string `json:"Version,omitempty"`
   211  	// Scope - Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. Possible values include: 'ItemScopeShared', 'ItemScopeUser'
   212  	Scope ItemScope `json:"Scope,omitempty"`
   213  	// Type - Enum indicating the type of the Analytics item. Possible values include: 'ItemTypeQuery', 'ItemTypeFunction', 'ItemTypeFolder', 'ItemTypeRecent'
   214  	Type ItemType `json:"Type,omitempty"`
   215  	// TimeCreated - READ-ONLY; Date and time in UTC when this item was created.
   216  	TimeCreated *string `json:"TimeCreated,omitempty"`
   217  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this item.
   218  	TimeModified *string                                              `json:"TimeModified,omitempty"`
   219  	Properties   *ApplicationInsightsComponentAnalyticsItemProperties `json:"Properties,omitempty"`
   220  }
   221  
   222  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentAnalyticsItem.
   223  func (aicai ApplicationInsightsComponentAnalyticsItem) MarshalJSON() ([]byte, error) {
   224  	objectMap := make(map[string]interface{})
   225  	if aicai.ID != nil {
   226  		objectMap["Id"] = aicai.ID
   227  	}
   228  	if aicai.Name != nil {
   229  		objectMap["Name"] = aicai.Name
   230  	}
   231  	if aicai.Content != nil {
   232  		objectMap["Content"] = aicai.Content
   233  	}
   234  	if aicai.Scope != "" {
   235  		objectMap["Scope"] = aicai.Scope
   236  	}
   237  	if aicai.Type != "" {
   238  		objectMap["Type"] = aicai.Type
   239  	}
   240  	if aicai.Properties != nil {
   241  		objectMap["Properties"] = aicai.Properties
   242  	}
   243  	return json.Marshal(objectMap)
   244  }
   245  
   246  // ApplicationInsightsComponentAnalyticsItemProperties a set of properties that can be defined in the
   247  // context of a specific item type. Each type may have its own properties.
   248  type ApplicationInsightsComponentAnalyticsItemProperties struct {
   249  	// FunctionAlias - A function alias, used when the type of the item is Function
   250  	FunctionAlias *string `json:"functionAlias,omitempty"`
   251  }
   252  
   253  // ApplicationInsightsComponentAPIKey properties that define an API key of an Application Insights
   254  // Component.
   255  type ApplicationInsightsComponentAPIKey struct {
   256  	autorest.Response `json:"-"`
   257  	// ID - READ-ONLY; The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is created.
   258  	ID *string `json:"id,omitempty"`
   259  	// APIKey - READ-ONLY; The API key value. It will be only return once when the API Key was created.
   260  	APIKey *string `json:"apiKey,omitempty"`
   261  	// CreatedDate - The create date of this API key.
   262  	CreatedDate *string `json:"createdDate,omitempty"`
   263  	// Name - The name of the API key.
   264  	Name *string `json:"name,omitempty"`
   265  	// LinkedReadProperties - The read access rights of this API Key.
   266  	LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
   267  	// LinkedWriteProperties - The write access rights of this API Key.
   268  	LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
   269  }
   270  
   271  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentAPIKey.
   272  func (aicak ApplicationInsightsComponentAPIKey) MarshalJSON() ([]byte, error) {
   273  	objectMap := make(map[string]interface{})
   274  	if aicak.CreatedDate != nil {
   275  		objectMap["createdDate"] = aicak.CreatedDate
   276  	}
   277  	if aicak.Name != nil {
   278  		objectMap["name"] = aicak.Name
   279  	}
   280  	if aicak.LinkedReadProperties != nil {
   281  		objectMap["linkedReadProperties"] = aicak.LinkedReadProperties
   282  	}
   283  	if aicak.LinkedWriteProperties != nil {
   284  		objectMap["linkedWriteProperties"] = aicak.LinkedWriteProperties
   285  	}
   286  	return json.Marshal(objectMap)
   287  }
   288  
   289  // ApplicationInsightsComponentAPIKeyListResult describes the list of API Keys of an Application Insights
   290  // Component.
   291  type ApplicationInsightsComponentAPIKeyListResult struct {
   292  	autorest.Response `json:"-"`
   293  	// Value - List of API Key definitions.
   294  	Value *[]ApplicationInsightsComponentAPIKey `json:"value,omitempty"`
   295  }
   296  
   297  // ApplicationInsightsComponentAvailableFeatures an Application Insights component available features.
   298  type ApplicationInsightsComponentAvailableFeatures struct {
   299  	autorest.Response `json:"-"`
   300  	// Result - READ-ONLY; A list of Application Insights component feature.
   301  	Result *[]ApplicationInsightsComponentFeature `json:"Result,omitempty"`
   302  }
   303  
   304  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentAvailableFeatures.
   305  func (aicaf ApplicationInsightsComponentAvailableFeatures) MarshalJSON() ([]byte, error) {
   306  	objectMap := make(map[string]interface{})
   307  	return json.Marshal(objectMap)
   308  }
   309  
   310  // ApplicationInsightsComponentBillingFeatures an Application Insights component billing features
   311  type ApplicationInsightsComponentBillingFeatures struct {
   312  	autorest.Response `json:"-"`
   313  	// DataVolumeCap - An Application Insights component daily data volume cap
   314  	DataVolumeCap *ApplicationInsightsComponentDataVolumeCap `json:"DataVolumeCap,omitempty"`
   315  	// CurrentBillingFeatures - Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and 'Application Insights Enterprise'.
   316  	CurrentBillingFeatures *[]string `json:"CurrentBillingFeatures,omitempty"`
   317  }
   318  
   319  // ApplicationInsightsComponentDataVolumeCap an Application Insights component daily data volume cap
   320  type ApplicationInsightsComponentDataVolumeCap struct {
   321  	// Cap - Daily data volume cap in GB.
   322  	Cap *float64 `json:"Cap,omitempty"`
   323  	// ResetTime - READ-ONLY; Daily data volume cap UTC reset hour.
   324  	ResetTime *int32 `json:"ResetTime,omitempty"`
   325  	// WarningThreshold - Reserved, not used for now.
   326  	WarningThreshold *int32 `json:"WarningThreshold,omitempty"`
   327  	// StopSendNotificationWhenHitThreshold - Reserved, not used for now.
   328  	StopSendNotificationWhenHitThreshold *bool `json:"StopSendNotificationWhenHitThreshold,omitempty"`
   329  	// StopSendNotificationWhenHitCap - Do not send a notification email when the daily data volume cap is met.
   330  	StopSendNotificationWhenHitCap *bool `json:"StopSendNotificationWhenHitCap,omitempty"`
   331  	// MaxHistoryCap - READ-ONLY; Maximum daily data volume cap that the user can set for this component.
   332  	MaxHistoryCap *float64 `json:"MaxHistoryCap,omitempty"`
   333  }
   334  
   335  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentDataVolumeCap.
   336  func (aicdvc ApplicationInsightsComponentDataVolumeCap) MarshalJSON() ([]byte, error) {
   337  	objectMap := make(map[string]interface{})
   338  	if aicdvc.Cap != nil {
   339  		objectMap["Cap"] = aicdvc.Cap
   340  	}
   341  	if aicdvc.WarningThreshold != nil {
   342  		objectMap["WarningThreshold"] = aicdvc.WarningThreshold
   343  	}
   344  	if aicdvc.StopSendNotificationWhenHitThreshold != nil {
   345  		objectMap["StopSendNotificationWhenHitThreshold"] = aicdvc.StopSendNotificationWhenHitThreshold
   346  	}
   347  	if aicdvc.StopSendNotificationWhenHitCap != nil {
   348  		objectMap["StopSendNotificationWhenHitCap"] = aicdvc.StopSendNotificationWhenHitCap
   349  	}
   350  	return json.Marshal(objectMap)
   351  }
   352  
   353  // ApplicationInsightsComponentExportConfiguration properties that define a Continuous Export
   354  // configuration.
   355  type ApplicationInsightsComponentExportConfiguration struct {
   356  	autorest.Response `json:"-"`
   357  	// ExportID - READ-ONLY; The unique ID of the export configuration inside an Application Insights component. It is auto generated when the Continuous Export configuration is created.
   358  	ExportID *string `json:"ExportId,omitempty"`
   359  	// InstrumentationKey - READ-ONLY; The instrumentation key of the Application Insights component.
   360  	InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
   361  	// RecordTypes - This comma separated list of document types that will be exported. The possible values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'.
   362  	RecordTypes *string `json:"RecordTypes,omitempty"`
   363  	// ApplicationName - READ-ONLY; The name of the Application Insights component.
   364  	ApplicationName *string `json:"ApplicationName,omitempty"`
   365  	// SubscriptionID - READ-ONLY; The subscription of the Application Insights component.
   366  	SubscriptionID *string `json:"SubscriptionId,omitempty"`
   367  	// ResourceGroup - READ-ONLY; The resource group of the Application Insights component.
   368  	ResourceGroup *string `json:"ResourceGroup,omitempty"`
   369  	// DestinationStorageSubscriptionID - READ-ONLY; The destination storage account subscription ID.
   370  	DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
   371  	// DestinationStorageLocationID - READ-ONLY; The destination account location ID.
   372  	DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
   373  	// DestinationAccountID - READ-ONLY; The name of destination account.
   374  	DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
   375  	// DestinationType - READ-ONLY; The destination type.
   376  	DestinationType *string `json:"DestinationType,omitempty"`
   377  	// IsUserEnabled - READ-ONLY; This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be 'false'.
   378  	IsUserEnabled *string `json:"IsUserEnabled,omitempty"`
   379  	// LastUserUpdate - READ-ONLY; Last time the Continuous Export configuration was updated.
   380  	LastUserUpdate *string `json:"LastUserUpdate,omitempty"`
   381  	// NotificationQueueEnabled - Deprecated
   382  	NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
   383  	// ExportStatus - READ-ONLY; This indicates current Continuous Export configuration status. The possible values are 'Preparing', 'Success', 'Failure'.
   384  	ExportStatus *string `json:"ExportStatus,omitempty"`
   385  	// LastSuccessTime - READ-ONLY; The last time data was successfully delivered to the destination storage container for this Continuous Export configuration.
   386  	LastSuccessTime *string `json:"LastSuccessTime,omitempty"`
   387  	// LastGapTime - READ-ONLY; The last time the Continuous Export configuration started failing.
   388  	LastGapTime *string `json:"LastGapTime,omitempty"`
   389  	// PermanentErrorReason - READ-ONLY; This is the reason the Continuous Export configuration started failing. It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'.
   390  	PermanentErrorReason *string `json:"PermanentErrorReason,omitempty"`
   391  	// StorageName - READ-ONLY; The name of the destination storage account.
   392  	StorageName *string `json:"StorageName,omitempty"`
   393  	// ContainerName - READ-ONLY; The name of the destination storage container.
   394  	ContainerName *string `json:"ContainerName,omitempty"`
   395  }
   396  
   397  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentExportConfiguration.
   398  func (aicec ApplicationInsightsComponentExportConfiguration) MarshalJSON() ([]byte, error) {
   399  	objectMap := make(map[string]interface{})
   400  	if aicec.RecordTypes != nil {
   401  		objectMap["RecordTypes"] = aicec.RecordTypes
   402  	}
   403  	if aicec.NotificationQueueEnabled != nil {
   404  		objectMap["NotificationQueueEnabled"] = aicec.NotificationQueueEnabled
   405  	}
   406  	return json.Marshal(objectMap)
   407  }
   408  
   409  // ApplicationInsightsComponentExportRequest an Application Insights component Continuous Export
   410  // configuration request definition.
   411  type ApplicationInsightsComponentExportRequest struct {
   412  	// RecordTypes - The document types to be exported, as comma separated values. Allowed values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'.
   413  	RecordTypes *string `json:"RecordTypes,omitempty"`
   414  	// DestinationType - The Continuous Export destination type. This has to be 'Blob'.
   415  	DestinationType *string `json:"DestinationType,omitempty"`
   416  	// DestinationAddress - The SAS URL for the destination storage container. It must grant write permission.
   417  	DestinationAddress *string `json:"DestinationAddress,omitempty"`
   418  	// IsEnabled - Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to 'false'.
   419  	IsEnabled *string `json:"IsEnabled,omitempty"`
   420  	// NotificationQueueEnabled - Deprecated
   421  	NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
   422  	// NotificationQueueURI - Deprecated
   423  	NotificationQueueURI *string `json:"NotificationQueueUri,omitempty"`
   424  	// DestinationStorageSubscriptionID - The subscription ID of the destination storage container.
   425  	DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
   426  	// DestinationStorageLocationID - The location ID of the destination storage container.
   427  	DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
   428  	// DestinationAccountID - The name of destination storage account.
   429  	DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
   430  }
   431  
   432  // ApplicationInsightsComponentFavorite properties that define a favorite that is associated to an
   433  // Application Insights component.
   434  type ApplicationInsightsComponentFavorite struct {
   435  	autorest.Response `json:"-"`
   436  	// Name - The user-defined name of the favorite.
   437  	Name *string `json:"Name,omitempty"`
   438  	// Config - Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON
   439  	Config *string `json:"Config,omitempty"`
   440  	// Version - This instance's version of the data model. This can change as new features are added that can be marked favorite. Current examples include MetricsExplorer (ME) and Search.
   441  	Version *string `json:"Version,omitempty"`
   442  	// FavoriteID - READ-ONLY; Internally assigned unique id of the favorite definition.
   443  	FavoriteID *string `json:"FavoriteId,omitempty"`
   444  	// FavoriteType - Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component. Possible values include: 'FavoriteTypeShared', 'FavoriteTypeUser'
   445  	FavoriteType FavoriteType `json:"FavoriteType,omitempty"`
   446  	// SourceType - The source of the favorite definition.
   447  	SourceType *string `json:"SourceType,omitempty"`
   448  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this favorite definition.
   449  	TimeModified *string `json:"TimeModified,omitempty"`
   450  	// Tags - A list of 0 or more tags that are associated with this favorite definition
   451  	Tags *[]string `json:"Tags,omitempty"`
   452  	// Category - Favorite category, as defined by the user at creation time.
   453  	Category *string `json:"Category,omitempty"`
   454  	// IsGeneratedFromTemplate - Flag denoting wether or not this favorite was generated from a template.
   455  	IsGeneratedFromTemplate *bool `json:"IsGeneratedFromTemplate,omitempty"`
   456  	// UserID - READ-ONLY; Unique user id of the specific user that owns this favorite.
   457  	UserID *string `json:"UserId,omitempty"`
   458  }
   459  
   460  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFavorite.
   461  func (aicf ApplicationInsightsComponentFavorite) MarshalJSON() ([]byte, error) {
   462  	objectMap := make(map[string]interface{})
   463  	if aicf.Name != nil {
   464  		objectMap["Name"] = aicf.Name
   465  	}
   466  	if aicf.Config != nil {
   467  		objectMap["Config"] = aicf.Config
   468  	}
   469  	if aicf.Version != nil {
   470  		objectMap["Version"] = aicf.Version
   471  	}
   472  	if aicf.FavoriteType != "" {
   473  		objectMap["FavoriteType"] = aicf.FavoriteType
   474  	}
   475  	if aicf.SourceType != nil {
   476  		objectMap["SourceType"] = aicf.SourceType
   477  	}
   478  	if aicf.Tags != nil {
   479  		objectMap["Tags"] = aicf.Tags
   480  	}
   481  	if aicf.Category != nil {
   482  		objectMap["Category"] = aicf.Category
   483  	}
   484  	if aicf.IsGeneratedFromTemplate != nil {
   485  		objectMap["IsGeneratedFromTemplate"] = aicf.IsGeneratedFromTemplate
   486  	}
   487  	return json.Marshal(objectMap)
   488  }
   489  
   490  // ApplicationInsightsComponentFeature an Application Insights component daily data volume cap status
   491  type ApplicationInsightsComponentFeature struct {
   492  	// FeatureName - READ-ONLY; The pricing feature name.
   493  	FeatureName *string `json:"FeatureName,omitempty"`
   494  	// MeterID - READ-ONLY; The meter id used for the feature.
   495  	MeterID *string `json:"MeterId,omitempty"`
   496  	// MeterRateFrequency - READ-ONLY; The meter rate for the feature's meter.
   497  	MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
   498  	// ResouceID - READ-ONLY; Reserved, not used now.
   499  	ResouceID *string `json:"ResouceId,omitempty"`
   500  	// IsHidden - READ-ONLY; Reserved, not used now.
   501  	IsHidden *bool `json:"IsHidden,omitempty"`
   502  	// Capabilities - READ-ONLY; A list of Application Insights component feature capability.
   503  	Capabilities *[]ApplicationInsightsComponentFeatureCapability `json:"Capabilities,omitempty"`
   504  	// Title - READ-ONLY; Display name of the feature.
   505  	Title *string `json:"Title,omitempty"`
   506  	// IsMainFeature - READ-ONLY; Whether can apply addon feature on to it.
   507  	IsMainFeature *bool `json:"IsMainFeature,omitempty"`
   508  	// SupportedAddonFeatures - READ-ONLY; The add on features on main feature.
   509  	SupportedAddonFeatures *string `json:"SupportedAddonFeatures,omitempty"`
   510  }
   511  
   512  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFeature.
   513  func (aicf ApplicationInsightsComponentFeature) MarshalJSON() ([]byte, error) {
   514  	objectMap := make(map[string]interface{})
   515  	return json.Marshal(objectMap)
   516  }
   517  
   518  // ApplicationInsightsComponentFeatureCapabilities an Application Insights component feature capabilities
   519  type ApplicationInsightsComponentFeatureCapabilities struct {
   520  	autorest.Response `json:"-"`
   521  	// SupportExportData - READ-ONLY; Whether allow to use continuous export feature.
   522  	SupportExportData *bool `json:"SupportExportData,omitempty"`
   523  	// BurstThrottlePolicy - READ-ONLY; Reserved, not used now.
   524  	BurstThrottlePolicy *string `json:"BurstThrottlePolicy,omitempty"`
   525  	// MetadataClass - READ-ONLY; Reserved, not used now.
   526  	MetadataClass *string `json:"MetadataClass,omitempty"`
   527  	// LiveStreamMetrics - READ-ONLY; Reserved, not used now.
   528  	LiveStreamMetrics *bool `json:"LiveStreamMetrics,omitempty"`
   529  	// ApplicationMap - READ-ONLY; Reserved, not used now.
   530  	ApplicationMap *bool `json:"ApplicationMap,omitempty"`
   531  	// WorkItemIntegration - READ-ONLY; Whether allow to use work item integration feature.
   532  	WorkItemIntegration *bool `json:"WorkItemIntegration,omitempty"`
   533  	// PowerBIIntegration - READ-ONLY; Reserved, not used now.
   534  	PowerBIIntegration *bool `json:"PowerBIIntegration,omitempty"`
   535  	// OpenSchema - READ-ONLY; Reserved, not used now.
   536  	OpenSchema *bool `json:"OpenSchema,omitempty"`
   537  	// ProactiveDetection - READ-ONLY; Reserved, not used now.
   538  	ProactiveDetection *bool `json:"ProactiveDetection,omitempty"`
   539  	// AnalyticsIntegration - READ-ONLY; Reserved, not used now.
   540  	AnalyticsIntegration *bool `json:"AnalyticsIntegration,omitempty"`
   541  	// MultipleStepWebTest - READ-ONLY; Whether allow to use multiple steps web test feature.
   542  	MultipleStepWebTest *bool `json:"MultipleStepWebTest,omitempty"`
   543  	// APIAccessLevel - READ-ONLY; Reserved, not used now.
   544  	APIAccessLevel *string `json:"ApiAccessLevel,omitempty"`
   545  	// TrackingType - READ-ONLY; The application insights component used tracking type.
   546  	TrackingType *string `json:"TrackingType,omitempty"`
   547  	// DailyCap - READ-ONLY; Daily data volume cap in GB.
   548  	DailyCap *float64 `json:"DailyCap,omitempty"`
   549  	// DailyCapResetTime - READ-ONLY; Daily data volume cap UTC reset hour.
   550  	DailyCapResetTime *float64 `json:"DailyCapResetTime,omitempty"`
   551  	// ThrottleRate - READ-ONLY; Reserved, not used now.
   552  	ThrottleRate *float64 `json:"ThrottleRate,omitempty"`
   553  }
   554  
   555  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFeatureCapabilities.
   556  func (aicfc ApplicationInsightsComponentFeatureCapabilities) MarshalJSON() ([]byte, error) {
   557  	objectMap := make(map[string]interface{})
   558  	return json.Marshal(objectMap)
   559  }
   560  
   561  // ApplicationInsightsComponentFeatureCapability an Application Insights component feature capability
   562  type ApplicationInsightsComponentFeatureCapability struct {
   563  	// Name - READ-ONLY; The name of the capability.
   564  	Name *string `json:"Name,omitempty"`
   565  	// Description - READ-ONLY; The description of the capability.
   566  	Description *string `json:"Description,omitempty"`
   567  	// Value - READ-ONLY; The value of the capability.
   568  	Value *string `json:"Value,omitempty"`
   569  	// Unit - READ-ONLY; The unit of the capability.
   570  	Unit *string `json:"Unit,omitempty"`
   571  	// MeterID - READ-ONLY; The meter used for the capability.
   572  	MeterID *string `json:"MeterId,omitempty"`
   573  	// MeterRateFrequency - READ-ONLY; The meter rate of the meter.
   574  	MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
   575  }
   576  
   577  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFeatureCapability.
   578  func (aicfc ApplicationInsightsComponentFeatureCapability) MarshalJSON() ([]byte, error) {
   579  	objectMap := make(map[string]interface{})
   580  	return json.Marshal(objectMap)
   581  }
   582  
   583  // ApplicationInsightsComponentListResult describes the list of Application Insights Resources.
   584  type ApplicationInsightsComponentListResult struct {
   585  	autorest.Response `json:"-"`
   586  	// Value - List of Application Insights component definitions.
   587  	Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
   588  	// NextLink - The URI to get the next set of Application Insights component definitions if too many components where returned in the result set.
   589  	NextLink *string `json:"nextLink,omitempty"`
   590  }
   591  
   592  // ApplicationInsightsComponentListResultIterator provides access to a complete listing of
   593  // ApplicationInsightsComponent values.
   594  type ApplicationInsightsComponentListResultIterator struct {
   595  	i    int
   596  	page ApplicationInsightsComponentListResultPage
   597  }
   598  
   599  // NextWithContext advances to the next value.  If there was an error making
   600  // the request the iterator does not advance and the error is returned.
   601  func (iter *ApplicationInsightsComponentListResultIterator) NextWithContext(ctx context.Context) (err error) {
   602  	if tracing.IsEnabled() {
   603  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultIterator.NextWithContext")
   604  		defer func() {
   605  			sc := -1
   606  			if iter.Response().Response.Response != nil {
   607  				sc = iter.Response().Response.Response.StatusCode
   608  			}
   609  			tracing.EndSpan(ctx, sc, err)
   610  		}()
   611  	}
   612  	iter.i++
   613  	if iter.i < len(iter.page.Values()) {
   614  		return nil
   615  	}
   616  	err = iter.page.NextWithContext(ctx)
   617  	if err != nil {
   618  		iter.i--
   619  		return err
   620  	}
   621  	iter.i = 0
   622  	return nil
   623  }
   624  
   625  // Next advances to the next value.  If there was an error making
   626  // the request the iterator does not advance and the error is returned.
   627  // Deprecated: Use NextWithContext() instead.
   628  func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
   629  	return iter.NextWithContext(context.Background())
   630  }
   631  
   632  // NotDone returns true if the enumeration should be started or is not yet complete.
   633  func (iter ApplicationInsightsComponentListResultIterator) NotDone() bool {
   634  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   635  }
   636  
   637  // Response returns the raw server response from the last page request.
   638  func (iter ApplicationInsightsComponentListResultIterator) Response() ApplicationInsightsComponentListResult {
   639  	return iter.page.Response()
   640  }
   641  
   642  // Value returns the current value or a zero-initialized value if the
   643  // iterator has advanced beyond the end of the collection.
   644  func (iter ApplicationInsightsComponentListResultIterator) Value() ApplicationInsightsComponent {
   645  	if !iter.page.NotDone() {
   646  		return ApplicationInsightsComponent{}
   647  	}
   648  	return iter.page.Values()[iter.i]
   649  }
   650  
   651  // Creates a new instance of the ApplicationInsightsComponentListResultIterator type.
   652  func NewApplicationInsightsComponentListResultIterator(page ApplicationInsightsComponentListResultPage) ApplicationInsightsComponentListResultIterator {
   653  	return ApplicationInsightsComponentListResultIterator{page: page}
   654  }
   655  
   656  // IsEmpty returns true if the ListResult contains no values.
   657  func (aiclr ApplicationInsightsComponentListResult) IsEmpty() bool {
   658  	return aiclr.Value == nil || len(*aiclr.Value) == 0
   659  }
   660  
   661  // hasNextLink returns true if the NextLink is not empty.
   662  func (aiclr ApplicationInsightsComponentListResult) hasNextLink() bool {
   663  	return aiclr.NextLink != nil && len(*aiclr.NextLink) != 0
   664  }
   665  
   666  // applicationInsightsComponentListResultPreparer prepares a request to retrieve the next set of results.
   667  // It returns nil if no more results exist.
   668  func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponentListResultPreparer(ctx context.Context) (*http.Request, error) {
   669  	if !aiclr.hasNextLink() {
   670  		return nil, nil
   671  	}
   672  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   673  		autorest.AsJSON(),
   674  		autorest.AsGet(),
   675  		autorest.WithBaseURL(to.String(aiclr.NextLink)))
   676  }
   677  
   678  // ApplicationInsightsComponentListResultPage contains a page of ApplicationInsightsComponent values.
   679  type ApplicationInsightsComponentListResultPage struct {
   680  	fn    func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)
   681  	aiclr ApplicationInsightsComponentListResult
   682  }
   683  
   684  // NextWithContext advances to the next page of values.  If there was an error making
   685  // the request the page does not advance and the error is returned.
   686  func (page *ApplicationInsightsComponentListResultPage) NextWithContext(ctx context.Context) (err error) {
   687  	if tracing.IsEnabled() {
   688  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultPage.NextWithContext")
   689  		defer func() {
   690  			sc := -1
   691  			if page.Response().Response.Response != nil {
   692  				sc = page.Response().Response.Response.StatusCode
   693  			}
   694  			tracing.EndSpan(ctx, sc, err)
   695  		}()
   696  	}
   697  	for {
   698  		next, err := page.fn(ctx, page.aiclr)
   699  		if err != nil {
   700  			return err
   701  		}
   702  		page.aiclr = next
   703  		if !next.hasNextLink() || !next.IsEmpty() {
   704  			break
   705  		}
   706  	}
   707  	return nil
   708  }
   709  
   710  // Next advances to the next page of values.  If there was an error making
   711  // the request the page does not advance and the error is returned.
   712  // Deprecated: Use NextWithContext() instead.
   713  func (page *ApplicationInsightsComponentListResultPage) Next() error {
   714  	return page.NextWithContext(context.Background())
   715  }
   716  
   717  // NotDone returns true if the page enumeration should be started or is not yet complete.
   718  func (page ApplicationInsightsComponentListResultPage) NotDone() bool {
   719  	return !page.aiclr.IsEmpty()
   720  }
   721  
   722  // Response returns the raw server response from the last page request.
   723  func (page ApplicationInsightsComponentListResultPage) Response() ApplicationInsightsComponentListResult {
   724  	return page.aiclr
   725  }
   726  
   727  // Values returns the slice of values for the current page or nil if there are no values.
   728  func (page ApplicationInsightsComponentListResultPage) Values() []ApplicationInsightsComponent {
   729  	if page.aiclr.IsEmpty() {
   730  		return nil
   731  	}
   732  	return *page.aiclr.Value
   733  }
   734  
   735  // Creates a new instance of the ApplicationInsightsComponentListResultPage type.
   736  func NewApplicationInsightsComponentListResultPage(cur ApplicationInsightsComponentListResult, getNextPage func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)) ApplicationInsightsComponentListResultPage {
   737  	return ApplicationInsightsComponentListResultPage{
   738  		fn:    getNextPage,
   739  		aiclr: cur,
   740  	}
   741  }
   742  
   743  // ApplicationInsightsComponentProactiveDetectionConfiguration properties that define a ProactiveDetection
   744  // configuration.
   745  type ApplicationInsightsComponentProactiveDetectionConfiguration struct {
   746  	autorest.Response `json:"-"`
   747  	// Name - The rule name
   748  	Name *string `json:"Name,omitempty"`
   749  	// Enabled - A flag that indicates whether this rule is enabled by the user
   750  	Enabled *bool `json:"Enabled,omitempty"`
   751  	// SendEmailsToSubscriptionOwners - A flag that indicated whether notifications on this rule should be sent to subscription owners
   752  	SendEmailsToSubscriptionOwners *bool `json:"SendEmailsToSubscriptionOwners,omitempty"`
   753  	// CustomEmails - Custom email addresses for this rule notifications
   754  	CustomEmails *[]string `json:"CustomEmails,omitempty"`
   755  	// LastUpdatedTime - The last time this rule was updated
   756  	LastUpdatedTime *string `json:"LastUpdatedTime,omitempty"`
   757  	// RuleDefinitions - Static definitions of the ProactiveDetection configuration rule (same values for all components).
   758  	RuleDefinitions *ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions `json:"RuleDefinitions,omitempty"`
   759  }
   760  
   761  // ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions static definitions of the
   762  // ProactiveDetection configuration rule (same values for all components).
   763  type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions struct {
   764  	// Name - The rule name
   765  	Name *string `json:"Name,omitempty"`
   766  	// DisplayName - The rule name as it is displayed in UI
   767  	DisplayName *string `json:"DisplayName,omitempty"`
   768  	// Description - The rule description
   769  	Description *string `json:"Description,omitempty"`
   770  	// HelpURL - URL which displays additional info about the proactive detection rule
   771  	HelpURL *string `json:"HelpUrl,omitempty"`
   772  	// IsHidden - A flag indicating whether the rule is hidden (from the UI)
   773  	IsHidden *bool `json:"IsHidden,omitempty"`
   774  	// IsEnabledByDefault - A flag indicating whether the rule is enabled by default
   775  	IsEnabledByDefault *bool `json:"IsEnabledByDefault,omitempty"`
   776  	// IsInPreview - A flag indicating whether the rule is in preview
   777  	IsInPreview *bool `json:"IsInPreview,omitempty"`
   778  	// SupportsEmailNotifications - A flag indicating whether email notifications are supported for detections for this rule
   779  	SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
   780  }
   781  
   782  // ApplicationInsightsComponentProperties properties that define an Application Insights component
   783  // resource.
   784  type ApplicationInsightsComponentProperties struct {
   785  	// ApplicationID - READ-ONLY; The unique ID of your application. This field mirrors the 'Name' field and cannot be changed.
   786  	ApplicationID *string `json:"ApplicationId,omitempty"`
   787  	// AppID - READ-ONLY; Application Insights Unique ID for your Application.
   788  	AppID *string `json:"AppId,omitempty"`
   789  	// Name - READ-ONLY; Application name.
   790  	Name *string `json:"Name,omitempty"`
   791  	// ApplicationType - Type of application being monitored. Possible values include: 'ApplicationTypeWeb', 'ApplicationTypeOther'
   792  	ApplicationType ApplicationType `json:"Application_Type,omitempty"`
   793  	// FlowType - Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. Possible values include: 'FlowTypeBluefield'
   794  	FlowType FlowType `json:"Flow_Type,omitempty"`
   795  	// RequestSource - Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. Possible values include: 'RequestSourceRest'
   796  	RequestSource RequestSource `json:"Request_Source,omitempty"`
   797  	// InstrumentationKey - READ-ONLY; Application Insights Instrumentation key. A read-only value that applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction of each new Application Insights component.
   798  	InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
   799  	// CreationDate - READ-ONLY; Creation Date for the Application Insights component, in ISO 8601 format.
   800  	CreationDate *date.Time `json:"CreationDate,omitempty"`
   801  	// TenantID - READ-ONLY; Azure Tenant Id.
   802  	TenantID *string `json:"TenantId,omitempty"`
   803  	// HockeyAppID - The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp.
   804  	HockeyAppID *string `json:"HockeyAppId,omitempty"`
   805  	// HockeyAppToken - READ-ONLY; Token used to authenticate communications with between Application Insights and HockeyApp.
   806  	HockeyAppToken *string `json:"HockeyAppToken,omitempty"`
   807  	// ProvisioningState - READ-ONLY; Current state of this component: 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 Succeeded, Deploying, Canceled, and Failed.
   808  	ProvisioningState *string `json:"provisioningState,omitempty"`
   809  	// SamplingPercentage - Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry.
   810  	SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`
   811  	// ConnectionString - READ-ONLY; Application Insights component connection string.
   812  	ConnectionString *string `json:"ConnectionString,omitempty"`
   813  	// RetentionInDays - READ-ONLY; Retention period in days.
   814  	RetentionInDays *int32 `json:"RetentionInDays,omitempty"`
   815  	// DisableIPMasking - Disable IP masking.
   816  	DisableIPMasking *bool `json:"DisableIpMasking,omitempty"`
   817  	// ImmediatePurgeDataOn30Days - Purge data immediately after 30 days.
   818  	ImmediatePurgeDataOn30Days *bool `json:"ImmediatePurgeDataOn30Days,omitempty"`
   819  	// WorkspaceResourceID - Resource Id of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property.
   820  	WorkspaceResourceID *string `json:"WorkspaceResourceId,omitempty"`
   821  	// LaMigrationDate - READ-ONLY; The date which the component got migrated to LA, in ISO 8601 format.
   822  	LaMigrationDate *date.Time `json:"LaMigrationDate,omitempty"`
   823  	// PrivateLinkScopedResources - READ-ONLY; List of linked private link scope resources.
   824  	PrivateLinkScopedResources *[]PrivateLinkScopedResource `json:"PrivateLinkScopedResources,omitempty"`
   825  	// PublicNetworkAccessForIngestion - The network access type for accessing Application Insights ingestion. Possible values include: 'PublicNetworkAccessTypeEnabled', 'PublicNetworkAccessTypeDisabled'
   826  	PublicNetworkAccessForIngestion PublicNetworkAccessType `json:"publicNetworkAccessForIngestion,omitempty"`
   827  	// PublicNetworkAccessForQuery - The network access type for accessing Application Insights query. Possible values include: 'PublicNetworkAccessTypeEnabled', 'PublicNetworkAccessTypeDisabled'
   828  	PublicNetworkAccessForQuery PublicNetworkAccessType `json:"publicNetworkAccessForQuery,omitempty"`
   829  	// IngestionMode - Indicates the flow of the ingestion. Possible values include: 'IngestionModeApplicationInsights', 'IngestionModeApplicationInsightsWithDiagnosticSettings', 'IngestionModeLogAnalytics'
   830  	IngestionMode IngestionMode `json:"IngestionMode,omitempty"`
   831  	// DisableLocalAuth - Disable Non-AAD based Auth.
   832  	DisableLocalAuth *bool `json:"DisableLocalAuth,omitempty"`
   833  	// ForceCustomerStorageForProfiler - Force users to create their own storage account for profiler and debugger.
   834  	ForceCustomerStorageForProfiler *bool `json:"ForceCustomerStorageForProfiler,omitempty"`
   835  }
   836  
   837  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentProperties.
   838  func (aicp ApplicationInsightsComponentProperties) MarshalJSON() ([]byte, error) {
   839  	objectMap := make(map[string]interface{})
   840  	if aicp.ApplicationType != "" {
   841  		objectMap["Application_Type"] = aicp.ApplicationType
   842  	}
   843  	if aicp.FlowType != "" {
   844  		objectMap["Flow_Type"] = aicp.FlowType
   845  	}
   846  	if aicp.RequestSource != "" {
   847  		objectMap["Request_Source"] = aicp.RequestSource
   848  	}
   849  	if aicp.HockeyAppID != nil {
   850  		objectMap["HockeyAppId"] = aicp.HockeyAppID
   851  	}
   852  	if aicp.SamplingPercentage != nil {
   853  		objectMap["SamplingPercentage"] = aicp.SamplingPercentage
   854  	}
   855  	if aicp.DisableIPMasking != nil {
   856  		objectMap["DisableIpMasking"] = aicp.DisableIPMasking
   857  	}
   858  	if aicp.ImmediatePurgeDataOn30Days != nil {
   859  		objectMap["ImmediatePurgeDataOn30Days"] = aicp.ImmediatePurgeDataOn30Days
   860  	}
   861  	if aicp.WorkspaceResourceID != nil {
   862  		objectMap["WorkspaceResourceId"] = aicp.WorkspaceResourceID
   863  	}
   864  	if aicp.PublicNetworkAccessForIngestion != "" {
   865  		objectMap["publicNetworkAccessForIngestion"] = aicp.PublicNetworkAccessForIngestion
   866  	}
   867  	if aicp.PublicNetworkAccessForQuery != "" {
   868  		objectMap["publicNetworkAccessForQuery"] = aicp.PublicNetworkAccessForQuery
   869  	}
   870  	if aicp.IngestionMode != "" {
   871  		objectMap["IngestionMode"] = aicp.IngestionMode
   872  	}
   873  	if aicp.DisableLocalAuth != nil {
   874  		objectMap["DisableLocalAuth"] = aicp.DisableLocalAuth
   875  	}
   876  	if aicp.ForceCustomerStorageForProfiler != nil {
   877  		objectMap["ForceCustomerStorageForProfiler"] = aicp.ForceCustomerStorageForProfiler
   878  	}
   879  	return json.Marshal(objectMap)
   880  }
   881  
   882  // ApplicationInsightsComponentQuotaStatus an Application Insights component daily data volume cap status
   883  type ApplicationInsightsComponentQuotaStatus struct {
   884  	autorest.Response `json:"-"`
   885  	// AppID - READ-ONLY; The Application ID for the Application Insights component.
   886  	AppID *string `json:"AppId,omitempty"`
   887  	// ShouldBeThrottled - READ-ONLY; The daily data volume cap is met, and data ingestion will be stopped.
   888  	ShouldBeThrottled *bool `json:"ShouldBeThrottled,omitempty"`
   889  	// ExpirationTime - READ-ONLY; Date and time when the daily data volume cap will be reset, and data ingestion will resume.
   890  	ExpirationTime *string `json:"ExpirationTime,omitempty"`
   891  }
   892  
   893  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentQuotaStatus.
   894  func (aicqs ApplicationInsightsComponentQuotaStatus) MarshalJSON() ([]byte, error) {
   895  	objectMap := make(map[string]interface{})
   896  	return json.Marshal(objectMap)
   897  }
   898  
   899  // ApplicationInsightsComponentWebTestLocation properties that define a web test location available to an
   900  // Application Insights Component.
   901  type ApplicationInsightsComponentWebTestLocation struct {
   902  	// DisplayName - READ-ONLY; The display name of the web test location.
   903  	DisplayName *string `json:"DisplayName,omitempty"`
   904  	// Tag - READ-ONLY; Internally defined geographic location tag.
   905  	Tag *string `json:"Tag,omitempty"`
   906  }
   907  
   908  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentWebTestLocation.
   909  func (aicwtl ApplicationInsightsComponentWebTestLocation) MarshalJSON() ([]byte, error) {
   910  	objectMap := make(map[string]interface{})
   911  	return json.Marshal(objectMap)
   912  }
   913  
   914  // ApplicationInsightsWebTestLocationsListResult describes the list of web test locations available to an
   915  // Application Insights Component.
   916  type ApplicationInsightsWebTestLocationsListResult struct {
   917  	autorest.Response `json:"-"`
   918  	// Value - List of web test locations.
   919  	Value *[]ApplicationInsightsComponentWebTestLocation `json:"value,omitempty"`
   920  }
   921  
   922  // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
   923  type AzureEntityResource struct {
   924  	// Etag - READ-ONLY; Resource Etag.
   925  	Etag *string `json:"etag,omitempty"`
   926  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   927  	ID *string `json:"id,omitempty"`
   928  	// Name - READ-ONLY; The name of the resource
   929  	Name *string `json:"name,omitempty"`
   930  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   931  	Type *string `json:"type,omitempty"`
   932  }
   933  
   934  // MarshalJSON is the custom marshaler for AzureEntityResource.
   935  func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
   936  	objectMap := make(map[string]interface{})
   937  	return json.Marshal(objectMap)
   938  }
   939  
   940  // ComponentLinkedStorageAccounts an Application Insights component linked storage accounts
   941  type ComponentLinkedStorageAccounts struct {
   942  	autorest.Response `json:"-"`
   943  	// LinkedStorageAccountsProperties - The properties of the linked storage accounts.
   944  	*LinkedStorageAccountsProperties `json:"properties,omitempty"`
   945  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   946  	ID *string `json:"id,omitempty"`
   947  	// Name - READ-ONLY; The name of the resource
   948  	Name *string `json:"name,omitempty"`
   949  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   950  	Type *string `json:"type,omitempty"`
   951  }
   952  
   953  // MarshalJSON is the custom marshaler for ComponentLinkedStorageAccounts.
   954  func (clsa ComponentLinkedStorageAccounts) MarshalJSON() ([]byte, error) {
   955  	objectMap := make(map[string]interface{})
   956  	if clsa.LinkedStorageAccountsProperties != nil {
   957  		objectMap["properties"] = clsa.LinkedStorageAccountsProperties
   958  	}
   959  	return json.Marshal(objectMap)
   960  }
   961  
   962  // UnmarshalJSON is the custom unmarshaler for ComponentLinkedStorageAccounts struct.
   963  func (clsa *ComponentLinkedStorageAccounts) UnmarshalJSON(body []byte) error {
   964  	var m map[string]*json.RawMessage
   965  	err := json.Unmarshal(body, &m)
   966  	if err != nil {
   967  		return err
   968  	}
   969  	for k, v := range m {
   970  		switch k {
   971  		case "properties":
   972  			if v != nil {
   973  				var linkedStorageAccountsProperties LinkedStorageAccountsProperties
   974  				err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
   975  				if err != nil {
   976  					return err
   977  				}
   978  				clsa.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
   979  			}
   980  		case "id":
   981  			if v != nil {
   982  				var ID string
   983  				err = json.Unmarshal(*v, &ID)
   984  				if err != nil {
   985  					return err
   986  				}
   987  				clsa.ID = &ID
   988  			}
   989  		case "name":
   990  			if v != nil {
   991  				var name string
   992  				err = json.Unmarshal(*v, &name)
   993  				if err != nil {
   994  					return err
   995  				}
   996  				clsa.Name = &name
   997  			}
   998  		case "type":
   999  			if v != nil {
  1000  				var typeVar string
  1001  				err = json.Unmarshal(*v, &typeVar)
  1002  				if err != nil {
  1003  					return err
  1004  				}
  1005  				clsa.Type = &typeVar
  1006  			}
  1007  		}
  1008  	}
  1009  
  1010  	return nil
  1011  }
  1012  
  1013  // ComponentLinkedStorageAccountsPatch an Application Insights component linked storage accounts patch
  1014  type ComponentLinkedStorageAccountsPatch struct {
  1015  	// LinkedStorageAccountsProperties - The properties of the linked storage accounts.
  1016  	*LinkedStorageAccountsProperties `json:"properties,omitempty"`
  1017  }
  1018  
  1019  // MarshalJSON is the custom marshaler for ComponentLinkedStorageAccountsPatch.
  1020  func (clsap ComponentLinkedStorageAccountsPatch) MarshalJSON() ([]byte, error) {
  1021  	objectMap := make(map[string]interface{})
  1022  	if clsap.LinkedStorageAccountsProperties != nil {
  1023  		objectMap["properties"] = clsap.LinkedStorageAccountsProperties
  1024  	}
  1025  	return json.Marshal(objectMap)
  1026  }
  1027  
  1028  // UnmarshalJSON is the custom unmarshaler for ComponentLinkedStorageAccountsPatch struct.
  1029  func (clsap *ComponentLinkedStorageAccountsPatch) UnmarshalJSON(body []byte) error {
  1030  	var m map[string]*json.RawMessage
  1031  	err := json.Unmarshal(body, &m)
  1032  	if err != nil {
  1033  		return err
  1034  	}
  1035  	for k, v := range m {
  1036  		switch k {
  1037  		case "properties":
  1038  			if v != nil {
  1039  				var linkedStorageAccountsProperties LinkedStorageAccountsProperties
  1040  				err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
  1041  				if err != nil {
  1042  					return err
  1043  				}
  1044  				clsap.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
  1045  			}
  1046  		}
  1047  	}
  1048  
  1049  	return nil
  1050  }
  1051  
  1052  // ComponentPurgeBody describes the body of a purge request for an App Insights component
  1053  type ComponentPurgeBody struct {
  1054  	// Table - Table from which to purge data.
  1055  	Table *string `json:"table,omitempty"`
  1056  	// Filters - The set of columns and filters (queries) to run over them to purge the resulting data.
  1057  	Filters *[]ComponentPurgeBodyFilters `json:"filters,omitempty"`
  1058  }
  1059  
  1060  // ComponentPurgeBodyFilters user-defined filters to return data which will be purged from the table.
  1061  type ComponentPurgeBodyFilters struct {
  1062  	// Column - The column of the table over which the given query should run
  1063  	Column *string `json:"column,omitempty"`
  1064  	// Operator - A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL query.
  1065  	Operator *string `json:"operator,omitempty"`
  1066  	// Value - the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of values.
  1067  	Value interface{} `json:"value,omitempty"`
  1068  	// Key - When filtering over custom dimensions, this key will be used as the name of the custom dimension.
  1069  	Key *string `json:"key,omitempty"`
  1070  }
  1071  
  1072  // ComponentPurgeResponse response containing operationId for a specific purge action.
  1073  type ComponentPurgeResponse struct {
  1074  	autorest.Response `json:"-"`
  1075  	// OperationID - Id to use when querying for status for a particular purge operation.
  1076  	OperationID *string `json:"operationId,omitempty"`
  1077  }
  1078  
  1079  // ComponentPurgeStatusResponse response containing status for a specific purge operation.
  1080  type ComponentPurgeStatusResponse struct {
  1081  	autorest.Response `json:"-"`
  1082  	// Status - Status of the operation represented by the requested Id. Possible values include: 'PurgeStatePending', 'PurgeStateCompleted'
  1083  	Status PurgeState `json:"status,omitempty"`
  1084  }
  1085  
  1086  // ComponentsResource an azure resource object
  1087  type ComponentsResource struct {
  1088  	// ID - READ-ONLY; Azure resource Id
  1089  	ID *string `json:"id,omitempty"`
  1090  	// Name - READ-ONLY; Azure resource name
  1091  	Name *string `json:"name,omitempty"`
  1092  	// Type - READ-ONLY; Azure resource type
  1093  	Type *string `json:"type,omitempty"`
  1094  	// Location - Resource location
  1095  	Location *string `json:"location,omitempty"`
  1096  	// Tags - Resource tags
  1097  	Tags map[string]*string `json:"tags"`
  1098  }
  1099  
  1100  // MarshalJSON is the custom marshaler for ComponentsResource.
  1101  func (cr ComponentsResource) MarshalJSON() ([]byte, error) {
  1102  	objectMap := make(map[string]interface{})
  1103  	if cr.Location != nil {
  1104  		objectMap["location"] = cr.Location
  1105  	}
  1106  	if cr.Tags != nil {
  1107  		objectMap["tags"] = cr.Tags
  1108  	}
  1109  	return json.Marshal(objectMap)
  1110  }
  1111  
  1112  // ErrorFieldContract error Field contract.
  1113  type ErrorFieldContract struct {
  1114  	// Code - Property level error code.
  1115  	Code *string `json:"code,omitempty"`
  1116  	// Message - Human-readable representation of property-level error.
  1117  	Message *string `json:"message,omitempty"`
  1118  	// Target - Property name.
  1119  	Target *string `json:"target,omitempty"`
  1120  }
  1121  
  1122  // ErrorResponse error response indicates Insights service is not able to process the incoming request. The
  1123  // reason is provided in the error message.
  1124  type ErrorResponse struct {
  1125  	// Code - Error code.
  1126  	Code *string `json:"code,omitempty"`
  1127  	// Message - Error message indicating why the operation failed.
  1128  	Message *string `json:"message,omitempty"`
  1129  }
  1130  
  1131  // ErrorResponseComponents ...
  1132  type ErrorResponseComponents struct {
  1133  	// Error - Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.
  1134  	Error *ErrorResponseComponentsError `json:"error,omitempty"`
  1135  }
  1136  
  1137  // ErrorResponseComponentsError error response indicates Insights service is not able to process the
  1138  // incoming request. The reason is provided in the error message.
  1139  type ErrorResponseComponentsError struct {
  1140  	// Code - READ-ONLY; Error code.
  1141  	Code *string `json:"code,omitempty"`
  1142  	// Message - READ-ONLY; Error message indicating why the operation failed.
  1143  	Message *string `json:"message,omitempty"`
  1144  }
  1145  
  1146  // MarshalJSON is the custom marshaler for ErrorResponseComponentsError.
  1147  func (erc ErrorResponseComponentsError) MarshalJSON() ([]byte, error) {
  1148  	objectMap := make(map[string]interface{})
  1149  	return json.Marshal(objectMap)
  1150  }
  1151  
  1152  // ErrorResponseLinkedStorage ...
  1153  type ErrorResponseLinkedStorage struct {
  1154  	// Error - Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.
  1155  	Error *ErrorResponseLinkedStorageError `json:"error,omitempty"`
  1156  }
  1157  
  1158  // ErrorResponseLinkedStorageError error response indicates Insights service is not able to process the
  1159  // incoming request. The reason is provided in the error message.
  1160  type ErrorResponseLinkedStorageError struct {
  1161  	// Code - READ-ONLY; Error code.
  1162  	Code *string `json:"code,omitempty"`
  1163  	// Message - READ-ONLY; Error message indicating why the operation failed.
  1164  	Message *string `json:"message,omitempty"`
  1165  }
  1166  
  1167  // MarshalJSON is the custom marshaler for ErrorResponseLinkedStorageError.
  1168  func (erls ErrorResponseLinkedStorageError) MarshalJSON() ([]byte, error) {
  1169  	objectMap := make(map[string]interface{})
  1170  	return json.Marshal(objectMap)
  1171  }
  1172  
  1173  // InnerError inner error
  1174  type InnerError struct {
  1175  	// Diagnosticcontext - Provides correlation for request
  1176  	Diagnosticcontext *string `json:"diagnosticcontext,omitempty"`
  1177  	// Time - Request time
  1178  	Time *date.Time `json:"time,omitempty"`
  1179  }
  1180  
  1181  // LinkedStorageAccountsProperties an Application Insights component linked storage account
  1182  type LinkedStorageAccountsProperties struct {
  1183  	// LinkedStorageAccount - Linked storage account resource ID
  1184  	LinkedStorageAccount *string `json:"linkedStorageAccount,omitempty"`
  1185  }
  1186  
  1187  // LinkProperties contains a sourceId and workbook resource id to link two resources.
  1188  type LinkProperties struct {
  1189  	// SourceID - The source Azure resource id
  1190  	SourceID *string `json:"sourceId,omitempty"`
  1191  	// TargetID - The workbook Azure resource id
  1192  	TargetID *string `json:"targetId,omitempty"`
  1193  	// Category - The category of workbook
  1194  	Category *string `json:"category,omitempty"`
  1195  }
  1196  
  1197  // ListAnnotation ...
  1198  type ListAnnotation struct {
  1199  	autorest.Response `json:"-"`
  1200  	Value             *[]Annotation `json:"value,omitempty"`
  1201  }
  1202  
  1203  // ListApplicationInsightsComponentAnalyticsItem ...
  1204  type ListApplicationInsightsComponentAnalyticsItem struct {
  1205  	autorest.Response `json:"-"`
  1206  	Value             *[]ApplicationInsightsComponentAnalyticsItem `json:"value,omitempty"`
  1207  }
  1208  
  1209  // ListApplicationInsightsComponentExportConfiguration ...
  1210  type ListApplicationInsightsComponentExportConfiguration struct {
  1211  	autorest.Response `json:"-"`
  1212  	Value             *[]ApplicationInsightsComponentExportConfiguration `json:"value,omitempty"`
  1213  }
  1214  
  1215  // ListApplicationInsightsComponentFavorite ...
  1216  type ListApplicationInsightsComponentFavorite struct {
  1217  	autorest.Response `json:"-"`
  1218  	Value             *[]ApplicationInsightsComponentFavorite `json:"value,omitempty"`
  1219  }
  1220  
  1221  // ListApplicationInsightsComponentProactiveDetectionConfiguration ...
  1222  type ListApplicationInsightsComponentProactiveDetectionConfiguration struct {
  1223  	autorest.Response `json:"-"`
  1224  	Value             *[]ApplicationInsightsComponentProactiveDetectionConfiguration `json:"value,omitempty"`
  1225  }
  1226  
  1227  // MyWorkbook an Application Insights private workbook definition.
  1228  type MyWorkbook struct {
  1229  	autorest.Response `json:"-"`
  1230  	// Kind - The kind of workbook. Choices are user and shared. Possible values include: 'SharedTypeKindUser', 'SharedTypeKindShared'
  1231  	Kind SharedTypeKind `json:"kind,omitempty"`
  1232  	// MyWorkbookProperties - Metadata describing a workbook for an Azure resource.
  1233  	*MyWorkbookProperties `json:"properties,omitempty"`
  1234  	// ID - Azure resource Id
  1235  	ID *string `json:"id,omitempty"`
  1236  	// Name - Azure resource name
  1237  	Name *string `json:"name,omitempty"`
  1238  	// Type - Azure resource type
  1239  	Type *string `json:"type,omitempty"`
  1240  	// Location - Resource location
  1241  	Location *string `json:"location,omitempty"`
  1242  	// Tags - Resource tags
  1243  	Tags map[string]*string `json:"tags"`
  1244  }
  1245  
  1246  // MarshalJSON is the custom marshaler for MyWorkbook.
  1247  func (mw MyWorkbook) MarshalJSON() ([]byte, error) {
  1248  	objectMap := make(map[string]interface{})
  1249  	if mw.Kind != "" {
  1250  		objectMap["kind"] = mw.Kind
  1251  	}
  1252  	if mw.MyWorkbookProperties != nil {
  1253  		objectMap["properties"] = mw.MyWorkbookProperties
  1254  	}
  1255  	if mw.ID != nil {
  1256  		objectMap["id"] = mw.ID
  1257  	}
  1258  	if mw.Name != nil {
  1259  		objectMap["name"] = mw.Name
  1260  	}
  1261  	if mw.Type != nil {
  1262  		objectMap["type"] = mw.Type
  1263  	}
  1264  	if mw.Location != nil {
  1265  		objectMap["location"] = mw.Location
  1266  	}
  1267  	if mw.Tags != nil {
  1268  		objectMap["tags"] = mw.Tags
  1269  	}
  1270  	return json.Marshal(objectMap)
  1271  }
  1272  
  1273  // UnmarshalJSON is the custom unmarshaler for MyWorkbook struct.
  1274  func (mw *MyWorkbook) UnmarshalJSON(body []byte) error {
  1275  	var m map[string]*json.RawMessage
  1276  	err := json.Unmarshal(body, &m)
  1277  	if err != nil {
  1278  		return err
  1279  	}
  1280  	for k, v := range m {
  1281  		switch k {
  1282  		case "kind":
  1283  			if v != nil {
  1284  				var kind SharedTypeKind
  1285  				err = json.Unmarshal(*v, &kind)
  1286  				if err != nil {
  1287  					return err
  1288  				}
  1289  				mw.Kind = kind
  1290  			}
  1291  		case "properties":
  1292  			if v != nil {
  1293  				var myWorkbookProperties MyWorkbookProperties
  1294  				err = json.Unmarshal(*v, &myWorkbookProperties)
  1295  				if err != nil {
  1296  					return err
  1297  				}
  1298  				mw.MyWorkbookProperties = &myWorkbookProperties
  1299  			}
  1300  		case "id":
  1301  			if v != nil {
  1302  				var ID string
  1303  				err = json.Unmarshal(*v, &ID)
  1304  				if err != nil {
  1305  					return err
  1306  				}
  1307  				mw.ID = &ID
  1308  			}
  1309  		case "name":
  1310  			if v != nil {
  1311  				var name string
  1312  				err = json.Unmarshal(*v, &name)
  1313  				if err != nil {
  1314  					return err
  1315  				}
  1316  				mw.Name = &name
  1317  			}
  1318  		case "type":
  1319  			if v != nil {
  1320  				var typeVar string
  1321  				err = json.Unmarshal(*v, &typeVar)
  1322  				if err != nil {
  1323  					return err
  1324  				}
  1325  				mw.Type = &typeVar
  1326  			}
  1327  		case "location":
  1328  			if v != nil {
  1329  				var location string
  1330  				err = json.Unmarshal(*v, &location)
  1331  				if err != nil {
  1332  					return err
  1333  				}
  1334  				mw.Location = &location
  1335  			}
  1336  		case "tags":
  1337  			if v != nil {
  1338  				var tags map[string]*string
  1339  				err = json.Unmarshal(*v, &tags)
  1340  				if err != nil {
  1341  					return err
  1342  				}
  1343  				mw.Tags = tags
  1344  			}
  1345  		}
  1346  	}
  1347  
  1348  	return nil
  1349  }
  1350  
  1351  // MyWorkbookError error message body that will indicate why the operation failed.
  1352  type MyWorkbookError struct {
  1353  	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
  1354  	Code *string `json:"code,omitempty"`
  1355  	// Message - Human-readable representation of the error.
  1356  	Message *string `json:"message,omitempty"`
  1357  	// Details - The list of invalid fields send in request, in case of validation error.
  1358  	Details *[]ErrorFieldContract `json:"details,omitempty"`
  1359  }
  1360  
  1361  // MyWorkbookProperties properties that contain a private workbook.
  1362  type MyWorkbookProperties struct {
  1363  	// DisplayName - The user-defined name of the private workbook.
  1364  	DisplayName *string `json:"displayName,omitempty"`
  1365  	// SerializedData - Configuration of this particular private workbook. Configuration data is a string containing valid JSON
  1366  	SerializedData *string `json:"serializedData,omitempty"`
  1367  	// Version - This instance's version of the data model. This can change as new features are added that can be marked private workbook.
  1368  	Version *string `json:"version,omitempty"`
  1369  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this private workbook definition.
  1370  	TimeModified *string `json:"timeModified,omitempty"`
  1371  	// Category - Workbook category, as defined by the user at creation time.
  1372  	Category *string `json:"category,omitempty"`
  1373  	// Tags - A list of 0 or more tags that are associated with this private workbook definition
  1374  	Tags *[]string `json:"tags,omitempty"`
  1375  	// UserID - READ-ONLY; Unique user id of the specific user that owns this private workbook.
  1376  	UserID *string `json:"userId,omitempty"`
  1377  	// SourceID - Optional resourceId for a source resource.
  1378  	SourceID *string `json:"sourceId,omitempty"`
  1379  }
  1380  
  1381  // MarshalJSON is the custom marshaler for MyWorkbookProperties.
  1382  func (mwp MyWorkbookProperties) MarshalJSON() ([]byte, error) {
  1383  	objectMap := make(map[string]interface{})
  1384  	if mwp.DisplayName != nil {
  1385  		objectMap["displayName"] = mwp.DisplayName
  1386  	}
  1387  	if mwp.SerializedData != nil {
  1388  		objectMap["serializedData"] = mwp.SerializedData
  1389  	}
  1390  	if mwp.Version != nil {
  1391  		objectMap["version"] = mwp.Version
  1392  	}
  1393  	if mwp.Category != nil {
  1394  		objectMap["category"] = mwp.Category
  1395  	}
  1396  	if mwp.Tags != nil {
  1397  		objectMap["tags"] = mwp.Tags
  1398  	}
  1399  	if mwp.SourceID != nil {
  1400  		objectMap["sourceId"] = mwp.SourceID
  1401  	}
  1402  	return json.Marshal(objectMap)
  1403  }
  1404  
  1405  // MyWorkbookResource an azure resource object
  1406  type MyWorkbookResource struct {
  1407  	// ID - Azure resource Id
  1408  	ID *string `json:"id,omitempty"`
  1409  	// Name - Azure resource name
  1410  	Name *string `json:"name,omitempty"`
  1411  	// Type - Azure resource type
  1412  	Type *string `json:"type,omitempty"`
  1413  	// Location - Resource location
  1414  	Location *string `json:"location,omitempty"`
  1415  	// Tags - Resource tags
  1416  	Tags map[string]*string `json:"tags"`
  1417  }
  1418  
  1419  // MarshalJSON is the custom marshaler for MyWorkbookResource.
  1420  func (mwr MyWorkbookResource) MarshalJSON() ([]byte, error) {
  1421  	objectMap := make(map[string]interface{})
  1422  	if mwr.ID != nil {
  1423  		objectMap["id"] = mwr.ID
  1424  	}
  1425  	if mwr.Name != nil {
  1426  		objectMap["name"] = mwr.Name
  1427  	}
  1428  	if mwr.Type != nil {
  1429  		objectMap["type"] = mwr.Type
  1430  	}
  1431  	if mwr.Location != nil {
  1432  		objectMap["location"] = mwr.Location
  1433  	}
  1434  	if mwr.Tags != nil {
  1435  		objectMap["tags"] = mwr.Tags
  1436  	}
  1437  	return json.Marshal(objectMap)
  1438  }
  1439  
  1440  // MyWorkbooksListResult workbook list result.
  1441  type MyWorkbooksListResult struct {
  1442  	autorest.Response `json:"-"`
  1443  	// Value - READ-ONLY; An array of private workbooks.
  1444  	Value *[]MyWorkbook `json:"value,omitempty"`
  1445  }
  1446  
  1447  // MarshalJSON is the custom marshaler for MyWorkbooksListResult.
  1448  func (mwlr MyWorkbooksListResult) MarshalJSON() ([]byte, error) {
  1449  	objectMap := make(map[string]interface{})
  1450  	return json.Marshal(objectMap)
  1451  }
  1452  
  1453  // Operation CDN REST API operation
  1454  type Operation struct {
  1455  	// Name - Operation name: {provider}/{resource}/{operation}
  1456  	Name *string `json:"name,omitempty"`
  1457  	// Display - The object that represents the operation.
  1458  	Display *OperationDisplay `json:"display,omitempty"`
  1459  }
  1460  
  1461  // OperationDisplay the object that represents the operation.
  1462  type OperationDisplay struct {
  1463  	// Provider - Service provider: Microsoft.Cdn
  1464  	Provider *string `json:"provider,omitempty"`
  1465  	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
  1466  	Resource *string `json:"resource,omitempty"`
  1467  	// Operation - Operation type: Read, write, delete, etc.
  1468  	Operation *string `json:"operation,omitempty"`
  1469  }
  1470  
  1471  // OperationListResult result of the request to list CDN operations. It contains a list of operations and a
  1472  // URL link to get the next set of results.
  1473  type OperationListResult struct {
  1474  	autorest.Response `json:"-"`
  1475  	// Value - List of CDN operations supported by the CDN resource provider.
  1476  	Value *[]Operation `json:"value,omitempty"`
  1477  	// NextLink - URL to get the next set of operation list results if there are any.
  1478  	NextLink *string `json:"nextLink,omitempty"`
  1479  }
  1480  
  1481  // OperationListResultIterator provides access to a complete listing of Operation values.
  1482  type OperationListResultIterator struct {
  1483  	i    int
  1484  	page OperationListResultPage
  1485  }
  1486  
  1487  // NextWithContext advances to the next value.  If there was an error making
  1488  // the request the iterator does not advance and the error is returned.
  1489  func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1490  	if tracing.IsEnabled() {
  1491  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
  1492  		defer func() {
  1493  			sc := -1
  1494  			if iter.Response().Response.Response != nil {
  1495  				sc = iter.Response().Response.Response.StatusCode
  1496  			}
  1497  			tracing.EndSpan(ctx, sc, err)
  1498  		}()
  1499  	}
  1500  	iter.i++
  1501  	if iter.i < len(iter.page.Values()) {
  1502  		return nil
  1503  	}
  1504  	err = iter.page.NextWithContext(ctx)
  1505  	if err != nil {
  1506  		iter.i--
  1507  		return err
  1508  	}
  1509  	iter.i = 0
  1510  	return nil
  1511  }
  1512  
  1513  // Next advances to the next value.  If there was an error making
  1514  // the request the iterator does not advance and the error is returned.
  1515  // Deprecated: Use NextWithContext() instead.
  1516  func (iter *OperationListResultIterator) Next() error {
  1517  	return iter.NextWithContext(context.Background())
  1518  }
  1519  
  1520  // NotDone returns true if the enumeration should be started or is not yet complete.
  1521  func (iter OperationListResultIterator) NotDone() bool {
  1522  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1523  }
  1524  
  1525  // Response returns the raw server response from the last page request.
  1526  func (iter OperationListResultIterator) Response() OperationListResult {
  1527  	return iter.page.Response()
  1528  }
  1529  
  1530  // Value returns the current value or a zero-initialized value if the
  1531  // iterator has advanced beyond the end of the collection.
  1532  func (iter OperationListResultIterator) Value() Operation {
  1533  	if !iter.page.NotDone() {
  1534  		return Operation{}
  1535  	}
  1536  	return iter.page.Values()[iter.i]
  1537  }
  1538  
  1539  // Creates a new instance of the OperationListResultIterator type.
  1540  func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
  1541  	return OperationListResultIterator{page: page}
  1542  }
  1543  
  1544  // IsEmpty returns true if the ListResult contains no values.
  1545  func (olr OperationListResult) IsEmpty() bool {
  1546  	return olr.Value == nil || len(*olr.Value) == 0
  1547  }
  1548  
  1549  // hasNextLink returns true if the NextLink is not empty.
  1550  func (olr OperationListResult) hasNextLink() bool {
  1551  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  1552  }
  1553  
  1554  // operationListResultPreparer prepares a request to retrieve the next set of results.
  1555  // It returns nil if no more results exist.
  1556  func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
  1557  	if !olr.hasNextLink() {
  1558  		return nil, nil
  1559  	}
  1560  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1561  		autorest.AsJSON(),
  1562  		autorest.AsGet(),
  1563  		autorest.WithBaseURL(to.String(olr.NextLink)))
  1564  }
  1565  
  1566  // OperationListResultPage contains a page of Operation values.
  1567  type OperationListResultPage struct {
  1568  	fn  func(context.Context, OperationListResult) (OperationListResult, error)
  1569  	olr OperationListResult
  1570  }
  1571  
  1572  // NextWithContext advances to the next page of values.  If there was an error making
  1573  // the request the page does not advance and the error is returned.
  1574  func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
  1575  	if tracing.IsEnabled() {
  1576  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
  1577  		defer func() {
  1578  			sc := -1
  1579  			if page.Response().Response.Response != nil {
  1580  				sc = page.Response().Response.Response.StatusCode
  1581  			}
  1582  			tracing.EndSpan(ctx, sc, err)
  1583  		}()
  1584  	}
  1585  	for {
  1586  		next, err := page.fn(ctx, page.olr)
  1587  		if err != nil {
  1588  			return err
  1589  		}
  1590  		page.olr = next
  1591  		if !next.hasNextLink() || !next.IsEmpty() {
  1592  			break
  1593  		}
  1594  	}
  1595  	return nil
  1596  }
  1597  
  1598  // Next advances to the next page of values.  If there was an error making
  1599  // the request the page does not advance and the error is returned.
  1600  // Deprecated: Use NextWithContext() instead.
  1601  func (page *OperationListResultPage) Next() error {
  1602  	return page.NextWithContext(context.Background())
  1603  }
  1604  
  1605  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1606  func (page OperationListResultPage) NotDone() bool {
  1607  	return !page.olr.IsEmpty()
  1608  }
  1609  
  1610  // Response returns the raw server response from the last page request.
  1611  func (page OperationListResultPage) Response() OperationListResult {
  1612  	return page.olr
  1613  }
  1614  
  1615  // Values returns the slice of values for the current page or nil if there are no values.
  1616  func (page OperationListResultPage) Values() []Operation {
  1617  	if page.olr.IsEmpty() {
  1618  		return nil
  1619  	}
  1620  	return *page.olr.Value
  1621  }
  1622  
  1623  // Creates a new instance of the OperationListResultPage type.
  1624  func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
  1625  	return OperationListResultPage{
  1626  		fn:  getNextPage,
  1627  		olr: cur,
  1628  	}
  1629  }
  1630  
  1631  // PrivateLinkScopedResource the private link scope resource reference.
  1632  type PrivateLinkScopedResource struct {
  1633  	// ResourceID - The full resource Id of the private link scope resource.
  1634  	ResourceID *string `json:"ResourceId,omitempty"`
  1635  	// ScopeID - The private link scope unique Identifier.
  1636  	ScopeID *string `json:"ScopeId,omitempty"`
  1637  }
  1638  
  1639  // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
  1640  // have tags and a location
  1641  type ProxyResource struct {
  1642  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1643  	ID *string `json:"id,omitempty"`
  1644  	// Name - READ-ONLY; The name of the resource
  1645  	Name *string `json:"name,omitempty"`
  1646  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1647  	Type *string `json:"type,omitempty"`
  1648  }
  1649  
  1650  // MarshalJSON is the custom marshaler for ProxyResource.
  1651  func (pr ProxyResource) MarshalJSON() ([]byte, error) {
  1652  	objectMap := make(map[string]interface{})
  1653  	return json.Marshal(objectMap)
  1654  }
  1655  
  1656  // Resource common fields that are returned in the response for all Azure Resource Manager resources
  1657  type Resource struct {
  1658  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1659  	ID *string `json:"id,omitempty"`
  1660  	// Name - READ-ONLY; The name of the resource
  1661  	Name *string `json:"name,omitempty"`
  1662  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1663  	Type *string `json:"type,omitempty"`
  1664  }
  1665  
  1666  // MarshalJSON is the custom marshaler for Resource.
  1667  func (r Resource) MarshalJSON() ([]byte, error) {
  1668  	objectMap := make(map[string]interface{})
  1669  	return json.Marshal(objectMap)
  1670  }
  1671  
  1672  // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a
  1673  // WebTest instance.
  1674  type TagsResource struct {
  1675  	// Tags - Resource tags
  1676  	Tags map[string]*string `json:"tags"`
  1677  }
  1678  
  1679  // MarshalJSON is the custom marshaler for TagsResource.
  1680  func (tr TagsResource) MarshalJSON() ([]byte, error) {
  1681  	objectMap := make(map[string]interface{})
  1682  	if tr.Tags != nil {
  1683  		objectMap["tags"] = tr.Tags
  1684  	}
  1685  	return json.Marshal(objectMap)
  1686  }
  1687  
  1688  // TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
  1689  // which has 'tags' and a 'location'
  1690  type TrackedResource struct {
  1691  	// Tags - Resource tags.
  1692  	Tags map[string]*string `json:"tags"`
  1693  	// Location - The geo-location where the resource lives
  1694  	Location *string `json:"location,omitempty"`
  1695  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  1696  	ID *string `json:"id,omitempty"`
  1697  	// Name - READ-ONLY; The name of the resource
  1698  	Name *string `json:"name,omitempty"`
  1699  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  1700  	Type *string `json:"type,omitempty"`
  1701  }
  1702  
  1703  // MarshalJSON is the custom marshaler for TrackedResource.
  1704  func (tr TrackedResource) MarshalJSON() ([]byte, error) {
  1705  	objectMap := make(map[string]interface{})
  1706  	if tr.Tags != nil {
  1707  		objectMap["tags"] = tr.Tags
  1708  	}
  1709  	if tr.Location != nil {
  1710  		objectMap["location"] = tr.Location
  1711  	}
  1712  	return json.Marshal(objectMap)
  1713  }
  1714  
  1715  // WebTest an Application Insights web test definition.
  1716  type WebTest struct {
  1717  	autorest.Response `json:"-"`
  1718  	// Kind - The kind of web test that this web test watches. Choices are ping and multistep. Possible values include: 'WebTestKindPing', 'WebTestKindMultistep'
  1719  	Kind WebTestKind `json:"kind,omitempty"`
  1720  	// WebTestProperties - Metadata describing a web test for an Azure resource.
  1721  	*WebTestProperties `json:"properties,omitempty"`
  1722  	// ID - READ-ONLY; Azure resource Id
  1723  	ID *string `json:"id,omitempty"`
  1724  	// Name - READ-ONLY; Azure resource name
  1725  	Name *string `json:"name,omitempty"`
  1726  	// Type - READ-ONLY; Azure resource type
  1727  	Type *string `json:"type,omitempty"`
  1728  	// Location - Resource location
  1729  	Location *string `json:"location,omitempty"`
  1730  	// Tags - Resource tags
  1731  	Tags map[string]*string `json:"tags"`
  1732  }
  1733  
  1734  // MarshalJSON is the custom marshaler for WebTest.
  1735  func (wt WebTest) MarshalJSON() ([]byte, error) {
  1736  	objectMap := make(map[string]interface{})
  1737  	if wt.Kind != "" {
  1738  		objectMap["kind"] = wt.Kind
  1739  	}
  1740  	if wt.WebTestProperties != nil {
  1741  		objectMap["properties"] = wt.WebTestProperties
  1742  	}
  1743  	if wt.Location != nil {
  1744  		objectMap["location"] = wt.Location
  1745  	}
  1746  	if wt.Tags != nil {
  1747  		objectMap["tags"] = wt.Tags
  1748  	}
  1749  	return json.Marshal(objectMap)
  1750  }
  1751  
  1752  // UnmarshalJSON is the custom unmarshaler for WebTest struct.
  1753  func (wt *WebTest) UnmarshalJSON(body []byte) error {
  1754  	var m map[string]*json.RawMessage
  1755  	err := json.Unmarshal(body, &m)
  1756  	if err != nil {
  1757  		return err
  1758  	}
  1759  	for k, v := range m {
  1760  		switch k {
  1761  		case "kind":
  1762  			if v != nil {
  1763  				var kind WebTestKind
  1764  				err = json.Unmarshal(*v, &kind)
  1765  				if err != nil {
  1766  					return err
  1767  				}
  1768  				wt.Kind = kind
  1769  			}
  1770  		case "properties":
  1771  			if v != nil {
  1772  				var webTestProperties WebTestProperties
  1773  				err = json.Unmarshal(*v, &webTestProperties)
  1774  				if err != nil {
  1775  					return err
  1776  				}
  1777  				wt.WebTestProperties = &webTestProperties
  1778  			}
  1779  		case "id":
  1780  			if v != nil {
  1781  				var ID string
  1782  				err = json.Unmarshal(*v, &ID)
  1783  				if err != nil {
  1784  					return err
  1785  				}
  1786  				wt.ID = &ID
  1787  			}
  1788  		case "name":
  1789  			if v != nil {
  1790  				var name string
  1791  				err = json.Unmarshal(*v, &name)
  1792  				if err != nil {
  1793  					return err
  1794  				}
  1795  				wt.Name = &name
  1796  			}
  1797  		case "type":
  1798  			if v != nil {
  1799  				var typeVar string
  1800  				err = json.Unmarshal(*v, &typeVar)
  1801  				if err != nil {
  1802  					return err
  1803  				}
  1804  				wt.Type = &typeVar
  1805  			}
  1806  		case "location":
  1807  			if v != nil {
  1808  				var location string
  1809  				err = json.Unmarshal(*v, &location)
  1810  				if err != nil {
  1811  					return err
  1812  				}
  1813  				wt.Location = &location
  1814  			}
  1815  		case "tags":
  1816  			if v != nil {
  1817  				var tags map[string]*string
  1818  				err = json.Unmarshal(*v, &tags)
  1819  				if err != nil {
  1820  					return err
  1821  				}
  1822  				wt.Tags = tags
  1823  			}
  1824  		}
  1825  	}
  1826  
  1827  	return nil
  1828  }
  1829  
  1830  // WebTestGeolocation geo-physical location to run a web test from. You must specify one or more locations
  1831  // for the test to run from.
  1832  type WebTestGeolocation struct {
  1833  	// Location - Location ID for the webtest to run from.
  1834  	Location *string `json:"Id,omitempty"`
  1835  }
  1836  
  1837  // WebTestListResult a list of 0 or more Application Insights web test definitions.
  1838  type WebTestListResult struct {
  1839  	autorest.Response `json:"-"`
  1840  	// Value - Set of Application Insights web test definitions.
  1841  	Value *[]WebTest `json:"value,omitempty"`
  1842  	// NextLink - The link to get the next part of the returned list of web tests, should the return set be too large for a single request. May be null.
  1843  	NextLink *string `json:"nextLink,omitempty"`
  1844  }
  1845  
  1846  // WebTestListResultIterator provides access to a complete listing of WebTest values.
  1847  type WebTestListResultIterator struct {
  1848  	i    int
  1849  	page WebTestListResultPage
  1850  }
  1851  
  1852  // NextWithContext advances to the next value.  If there was an error making
  1853  // the request the iterator does not advance and the error is returned.
  1854  func (iter *WebTestListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1855  	if tracing.IsEnabled() {
  1856  		ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultIterator.NextWithContext")
  1857  		defer func() {
  1858  			sc := -1
  1859  			if iter.Response().Response.Response != nil {
  1860  				sc = iter.Response().Response.Response.StatusCode
  1861  			}
  1862  			tracing.EndSpan(ctx, sc, err)
  1863  		}()
  1864  	}
  1865  	iter.i++
  1866  	if iter.i < len(iter.page.Values()) {
  1867  		return nil
  1868  	}
  1869  	err = iter.page.NextWithContext(ctx)
  1870  	if err != nil {
  1871  		iter.i--
  1872  		return err
  1873  	}
  1874  	iter.i = 0
  1875  	return nil
  1876  }
  1877  
  1878  // Next advances to the next value.  If there was an error making
  1879  // the request the iterator does not advance and the error is returned.
  1880  // Deprecated: Use NextWithContext() instead.
  1881  func (iter *WebTestListResultIterator) Next() error {
  1882  	return iter.NextWithContext(context.Background())
  1883  }
  1884  
  1885  // NotDone returns true if the enumeration should be started or is not yet complete.
  1886  func (iter WebTestListResultIterator) NotDone() bool {
  1887  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1888  }
  1889  
  1890  // Response returns the raw server response from the last page request.
  1891  func (iter WebTestListResultIterator) Response() WebTestListResult {
  1892  	return iter.page.Response()
  1893  }
  1894  
  1895  // Value returns the current value or a zero-initialized value if the
  1896  // iterator has advanced beyond the end of the collection.
  1897  func (iter WebTestListResultIterator) Value() WebTest {
  1898  	if !iter.page.NotDone() {
  1899  		return WebTest{}
  1900  	}
  1901  	return iter.page.Values()[iter.i]
  1902  }
  1903  
  1904  // Creates a new instance of the WebTestListResultIterator type.
  1905  func NewWebTestListResultIterator(page WebTestListResultPage) WebTestListResultIterator {
  1906  	return WebTestListResultIterator{page: page}
  1907  }
  1908  
  1909  // IsEmpty returns true if the ListResult contains no values.
  1910  func (wtlr WebTestListResult) IsEmpty() bool {
  1911  	return wtlr.Value == nil || len(*wtlr.Value) == 0
  1912  }
  1913  
  1914  // hasNextLink returns true if the NextLink is not empty.
  1915  func (wtlr WebTestListResult) hasNextLink() bool {
  1916  	return wtlr.NextLink != nil && len(*wtlr.NextLink) != 0
  1917  }
  1918  
  1919  // webTestListResultPreparer prepares a request to retrieve the next set of results.
  1920  // It returns nil if no more results exist.
  1921  func (wtlr WebTestListResult) webTestListResultPreparer(ctx context.Context) (*http.Request, error) {
  1922  	if !wtlr.hasNextLink() {
  1923  		return nil, nil
  1924  	}
  1925  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1926  		autorest.AsJSON(),
  1927  		autorest.AsGet(),
  1928  		autorest.WithBaseURL(to.String(wtlr.NextLink)))
  1929  }
  1930  
  1931  // WebTestListResultPage contains a page of WebTest values.
  1932  type WebTestListResultPage struct {
  1933  	fn   func(context.Context, WebTestListResult) (WebTestListResult, error)
  1934  	wtlr WebTestListResult
  1935  }
  1936  
  1937  // NextWithContext advances to the next page of values.  If there was an error making
  1938  // the request the page does not advance and the error is returned.
  1939  func (page *WebTestListResultPage) NextWithContext(ctx context.Context) (err error) {
  1940  	if tracing.IsEnabled() {
  1941  		ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultPage.NextWithContext")
  1942  		defer func() {
  1943  			sc := -1
  1944  			if page.Response().Response.Response != nil {
  1945  				sc = page.Response().Response.Response.StatusCode
  1946  			}
  1947  			tracing.EndSpan(ctx, sc, err)
  1948  		}()
  1949  	}
  1950  	for {
  1951  		next, err := page.fn(ctx, page.wtlr)
  1952  		if err != nil {
  1953  			return err
  1954  		}
  1955  		page.wtlr = next
  1956  		if !next.hasNextLink() || !next.IsEmpty() {
  1957  			break
  1958  		}
  1959  	}
  1960  	return nil
  1961  }
  1962  
  1963  // Next advances to the next page of values.  If there was an error making
  1964  // the request the page does not advance and the error is returned.
  1965  // Deprecated: Use NextWithContext() instead.
  1966  func (page *WebTestListResultPage) Next() error {
  1967  	return page.NextWithContext(context.Background())
  1968  }
  1969  
  1970  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1971  func (page WebTestListResultPage) NotDone() bool {
  1972  	return !page.wtlr.IsEmpty()
  1973  }
  1974  
  1975  // Response returns the raw server response from the last page request.
  1976  func (page WebTestListResultPage) Response() WebTestListResult {
  1977  	return page.wtlr
  1978  }
  1979  
  1980  // Values returns the slice of values for the current page or nil if there are no values.
  1981  func (page WebTestListResultPage) Values() []WebTest {
  1982  	if page.wtlr.IsEmpty() {
  1983  		return nil
  1984  	}
  1985  	return *page.wtlr.Value
  1986  }
  1987  
  1988  // Creates a new instance of the WebTestListResultPage type.
  1989  func NewWebTestListResultPage(cur WebTestListResult, getNextPage func(context.Context, WebTestListResult) (WebTestListResult, error)) WebTestListResultPage {
  1990  	return WebTestListResultPage{
  1991  		fn:   getNextPage,
  1992  		wtlr: cur,
  1993  	}
  1994  }
  1995  
  1996  // WebTestProperties metadata describing a web test for an Azure resource.
  1997  type WebTestProperties struct {
  1998  	// SyntheticMonitorID - Unique ID of this WebTest. This is typically the same value as the Name field.
  1999  	SyntheticMonitorID *string `json:"SyntheticMonitorId,omitempty"`
  2000  	// WebTestName - User defined name if this WebTest.
  2001  	WebTestName *string `json:"Name,omitempty"`
  2002  	// Description - Purpose/user defined descriptive test for this WebTest.
  2003  	Description *string `json:"Description,omitempty"`
  2004  	// Enabled - Is the test actively being monitored.
  2005  	Enabled *bool `json:"Enabled,omitempty"`
  2006  	// Frequency - Interval in seconds between test runs for this WebTest. Default value is 300.
  2007  	Frequency *int32 `json:"Frequency,omitempty"`
  2008  	// Timeout - Seconds until this WebTest will timeout and fail. Default value is 30.
  2009  	Timeout *int32 `json:"Timeout,omitempty"`
  2010  	// WebTestKind - The kind of web test this is, valid choices are ping and multistep. Possible values include: 'WebTestKindPing', 'WebTestKindMultistep'
  2011  	WebTestKind WebTestKind `json:"Kind,omitempty"`
  2012  	// RetryEnabled - Allow for retries should this WebTest fail.
  2013  	RetryEnabled *bool `json:"RetryEnabled,omitempty"`
  2014  	// Locations - A list of where to physically run the tests from to give global coverage for accessibility of your application.
  2015  	Locations *[]WebTestGeolocation `json:"Locations,omitempty"`
  2016  	// Configuration - An XML configuration specification for a WebTest.
  2017  	Configuration *WebTestPropertiesConfiguration `json:"Configuration,omitempty"`
  2018  	// ProvisioningState - READ-ONLY; Current state of this component, 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 Succeeded, Deploying, Canceled, and Failed.
  2019  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2020  }
  2021  
  2022  // MarshalJSON is the custom marshaler for WebTestProperties.
  2023  func (wtp WebTestProperties) MarshalJSON() ([]byte, error) {
  2024  	objectMap := make(map[string]interface{})
  2025  	if wtp.SyntheticMonitorID != nil {
  2026  		objectMap["SyntheticMonitorId"] = wtp.SyntheticMonitorID
  2027  	}
  2028  	if wtp.WebTestName != nil {
  2029  		objectMap["Name"] = wtp.WebTestName
  2030  	}
  2031  	if wtp.Description != nil {
  2032  		objectMap["Description"] = wtp.Description
  2033  	}
  2034  	if wtp.Enabled != nil {
  2035  		objectMap["Enabled"] = wtp.Enabled
  2036  	}
  2037  	if wtp.Frequency != nil {
  2038  		objectMap["Frequency"] = wtp.Frequency
  2039  	}
  2040  	if wtp.Timeout != nil {
  2041  		objectMap["Timeout"] = wtp.Timeout
  2042  	}
  2043  	if wtp.WebTestKind != "" {
  2044  		objectMap["Kind"] = wtp.WebTestKind
  2045  	}
  2046  	if wtp.RetryEnabled != nil {
  2047  		objectMap["RetryEnabled"] = wtp.RetryEnabled
  2048  	}
  2049  	if wtp.Locations != nil {
  2050  		objectMap["Locations"] = wtp.Locations
  2051  	}
  2052  	if wtp.Configuration != nil {
  2053  		objectMap["Configuration"] = wtp.Configuration
  2054  	}
  2055  	return json.Marshal(objectMap)
  2056  }
  2057  
  2058  // WebTestPropertiesConfiguration an XML configuration specification for a WebTest.
  2059  type WebTestPropertiesConfiguration struct {
  2060  	// WebTest - The XML specification of a WebTest to run against an application.
  2061  	WebTest *string `json:"WebTest,omitempty"`
  2062  }
  2063  
  2064  // WebtestsResource an azure resource object
  2065  type WebtestsResource struct {
  2066  	// ID - READ-ONLY; Azure resource Id
  2067  	ID *string `json:"id,omitempty"`
  2068  	// Name - READ-ONLY; Azure resource name
  2069  	Name *string `json:"name,omitempty"`
  2070  	// Type - READ-ONLY; Azure resource type
  2071  	Type *string `json:"type,omitempty"`
  2072  	// Location - Resource location
  2073  	Location *string `json:"location,omitempty"`
  2074  	// Tags - Resource tags
  2075  	Tags map[string]*string `json:"tags"`
  2076  }
  2077  
  2078  // MarshalJSON is the custom marshaler for WebtestsResource.
  2079  func (wr WebtestsResource) MarshalJSON() ([]byte, error) {
  2080  	objectMap := make(map[string]interface{})
  2081  	if wr.Location != nil {
  2082  		objectMap["location"] = wr.Location
  2083  	}
  2084  	if wr.Tags != nil {
  2085  		objectMap["tags"] = wr.Tags
  2086  	}
  2087  	return json.Marshal(objectMap)
  2088  }
  2089  
  2090  // Workbook an Application Insights workbook definition.
  2091  type Workbook struct {
  2092  	autorest.Response `json:"-"`
  2093  	// Kind - The kind of workbook. Choices are user and shared. Possible values include: 'SharedTypeKindUser', 'SharedTypeKindShared'
  2094  	Kind SharedTypeKind `json:"kind,omitempty"`
  2095  	// WorkbookProperties - Metadata describing a web test for an Azure resource.
  2096  	*WorkbookProperties `json:"properties,omitempty"`
  2097  	// ID - READ-ONLY; Azure resource Id
  2098  	ID *string `json:"id,omitempty"`
  2099  	// Name - READ-ONLY; Azure resource name
  2100  	Name *string `json:"name,omitempty"`
  2101  	// Type - READ-ONLY; Azure resource type
  2102  	Type *string `json:"type,omitempty"`
  2103  	// Location - Resource location
  2104  	Location *string `json:"location,omitempty"`
  2105  	// Tags - Resource tags
  2106  	Tags map[string]*string `json:"tags"`
  2107  }
  2108  
  2109  // MarshalJSON is the custom marshaler for Workbook.
  2110  func (w Workbook) MarshalJSON() ([]byte, error) {
  2111  	objectMap := make(map[string]interface{})
  2112  	if w.Kind != "" {
  2113  		objectMap["kind"] = w.Kind
  2114  	}
  2115  	if w.WorkbookProperties != nil {
  2116  		objectMap["properties"] = w.WorkbookProperties
  2117  	}
  2118  	if w.Location != nil {
  2119  		objectMap["location"] = w.Location
  2120  	}
  2121  	if w.Tags != nil {
  2122  		objectMap["tags"] = w.Tags
  2123  	}
  2124  	return json.Marshal(objectMap)
  2125  }
  2126  
  2127  // UnmarshalJSON is the custom unmarshaler for Workbook struct.
  2128  func (w *Workbook) UnmarshalJSON(body []byte) error {
  2129  	var m map[string]*json.RawMessage
  2130  	err := json.Unmarshal(body, &m)
  2131  	if err != nil {
  2132  		return err
  2133  	}
  2134  	for k, v := range m {
  2135  		switch k {
  2136  		case "kind":
  2137  			if v != nil {
  2138  				var kind SharedTypeKind
  2139  				err = json.Unmarshal(*v, &kind)
  2140  				if err != nil {
  2141  					return err
  2142  				}
  2143  				w.Kind = kind
  2144  			}
  2145  		case "properties":
  2146  			if v != nil {
  2147  				var workbookProperties WorkbookProperties
  2148  				err = json.Unmarshal(*v, &workbookProperties)
  2149  				if err != nil {
  2150  					return err
  2151  				}
  2152  				w.WorkbookProperties = &workbookProperties
  2153  			}
  2154  		case "id":
  2155  			if v != nil {
  2156  				var ID string
  2157  				err = json.Unmarshal(*v, &ID)
  2158  				if err != nil {
  2159  					return err
  2160  				}
  2161  				w.ID = &ID
  2162  			}
  2163  		case "name":
  2164  			if v != nil {
  2165  				var name string
  2166  				err = json.Unmarshal(*v, &name)
  2167  				if err != nil {
  2168  					return err
  2169  				}
  2170  				w.Name = &name
  2171  			}
  2172  		case "type":
  2173  			if v != nil {
  2174  				var typeVar string
  2175  				err = json.Unmarshal(*v, &typeVar)
  2176  				if err != nil {
  2177  					return err
  2178  				}
  2179  				w.Type = &typeVar
  2180  			}
  2181  		case "location":
  2182  			if v != nil {
  2183  				var location string
  2184  				err = json.Unmarshal(*v, &location)
  2185  				if err != nil {
  2186  					return err
  2187  				}
  2188  				w.Location = &location
  2189  			}
  2190  		case "tags":
  2191  			if v != nil {
  2192  				var tags map[string]*string
  2193  				err = json.Unmarshal(*v, &tags)
  2194  				if err != nil {
  2195  					return err
  2196  				}
  2197  				w.Tags = tags
  2198  			}
  2199  		}
  2200  	}
  2201  
  2202  	return nil
  2203  }
  2204  
  2205  // WorkbookError error message body that will indicate why the operation failed.
  2206  type WorkbookError struct {
  2207  	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
  2208  	Code *string `json:"code,omitempty"`
  2209  	// Message - Human-readable representation of the error.
  2210  	Message *string `json:"message,omitempty"`
  2211  	// Details - The list of invalid fields send in request, in case of validation error.
  2212  	Details *[]ErrorFieldContract `json:"details,omitempty"`
  2213  }
  2214  
  2215  // WorkbookProperties properties that contain a workbook.
  2216  type WorkbookProperties struct {
  2217  	// Name - The user-defined name of the workbook.
  2218  	Name *string `json:"name,omitempty"`
  2219  	// SerializedData - Configuration of this particular workbook. Configuration data is a string containing valid JSON
  2220  	SerializedData *string `json:"serializedData,omitempty"`
  2221  	// Version - This instance's version of the data model. This can change as new features are added that can be marked workbook.
  2222  	Version *string `json:"version,omitempty"`
  2223  	// WorkbookID - Internally assigned unique id of the workbook definition.
  2224  	WorkbookID *string `json:"workbookId,omitempty"`
  2225  	// SharedTypeKind - Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component. Possible values include: 'SharedTypeKindUser', 'SharedTypeKindShared'
  2226  	SharedTypeKind SharedTypeKind `json:"kind,omitempty"`
  2227  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this workbook definition.
  2228  	TimeModified *string `json:"timeModified,omitempty"`
  2229  	// Category - Workbook category, as defined by the user at creation time.
  2230  	Category *string `json:"category,omitempty"`
  2231  	// Tags - A list of 0 or more tags that are associated with this workbook definition
  2232  	Tags *[]string `json:"tags,omitempty"`
  2233  	// UserID - Unique user id of the specific user that owns this workbook.
  2234  	UserID *string `json:"userId,omitempty"`
  2235  	// SourceResourceID - Optional resourceId for a source resource.
  2236  	SourceResourceID *string `json:"sourceResourceId,omitempty"`
  2237  }
  2238  
  2239  // MarshalJSON is the custom marshaler for WorkbookProperties.
  2240  func (wp WorkbookProperties) MarshalJSON() ([]byte, error) {
  2241  	objectMap := make(map[string]interface{})
  2242  	if wp.Name != nil {
  2243  		objectMap["name"] = wp.Name
  2244  	}
  2245  	if wp.SerializedData != nil {
  2246  		objectMap["serializedData"] = wp.SerializedData
  2247  	}
  2248  	if wp.Version != nil {
  2249  		objectMap["version"] = wp.Version
  2250  	}
  2251  	if wp.WorkbookID != nil {
  2252  		objectMap["workbookId"] = wp.WorkbookID
  2253  	}
  2254  	if wp.SharedTypeKind != "" {
  2255  		objectMap["kind"] = wp.SharedTypeKind
  2256  	}
  2257  	if wp.Category != nil {
  2258  		objectMap["category"] = wp.Category
  2259  	}
  2260  	if wp.Tags != nil {
  2261  		objectMap["tags"] = wp.Tags
  2262  	}
  2263  	if wp.UserID != nil {
  2264  		objectMap["userId"] = wp.UserID
  2265  	}
  2266  	if wp.SourceResourceID != nil {
  2267  		objectMap["sourceResourceId"] = wp.SourceResourceID
  2268  	}
  2269  	return json.Marshal(objectMap)
  2270  }
  2271  
  2272  // WorkbookResource an azure resource object
  2273  type WorkbookResource struct {
  2274  	// ID - READ-ONLY; Azure resource Id
  2275  	ID *string `json:"id,omitempty"`
  2276  	// Name - READ-ONLY; Azure resource name
  2277  	Name *string `json:"name,omitempty"`
  2278  	// Type - READ-ONLY; Azure resource type
  2279  	Type *string `json:"type,omitempty"`
  2280  	// Location - Resource location
  2281  	Location *string `json:"location,omitempty"`
  2282  	// Tags - Resource tags
  2283  	Tags map[string]*string `json:"tags"`
  2284  }
  2285  
  2286  // MarshalJSON is the custom marshaler for WorkbookResource.
  2287  func (wr WorkbookResource) MarshalJSON() ([]byte, error) {
  2288  	objectMap := make(map[string]interface{})
  2289  	if wr.Location != nil {
  2290  		objectMap["location"] = wr.Location
  2291  	}
  2292  	if wr.Tags != nil {
  2293  		objectMap["tags"] = wr.Tags
  2294  	}
  2295  	return json.Marshal(objectMap)
  2296  }
  2297  
  2298  // WorkbooksListResult workbook list result.
  2299  type WorkbooksListResult struct {
  2300  	autorest.Response `json:"-"`
  2301  	// Value - READ-ONLY; An array of workbooks.
  2302  	Value *[]Workbook `json:"value,omitempty"`
  2303  }
  2304  
  2305  // MarshalJSON is the custom marshaler for WorkbooksListResult.
  2306  func (wlr WorkbooksListResult) MarshalJSON() ([]byte, error) {
  2307  	objectMap := make(map[string]interface{})
  2308  	return json.Marshal(objectMap)
  2309  }
  2310  
  2311  // WorkItemConfiguration work item configuration associated with an application insights resource.
  2312  type WorkItemConfiguration struct {
  2313  	autorest.Response `json:"-"`
  2314  	// ConnectorID - Connector identifier where work item is created
  2315  	ConnectorID *string `json:"ConnectorId,omitempty"`
  2316  	// ConfigDisplayName - Configuration friendly name
  2317  	ConfigDisplayName *string `json:"ConfigDisplayName,omitempty"`
  2318  	// IsDefault - Boolean value indicating whether configuration is default
  2319  	IsDefault *bool `json:"IsDefault,omitempty"`
  2320  	// ID - Unique Id for work item
  2321  	ID *string `json:"Id,omitempty"`
  2322  	// ConfigProperties - Serialized JSON object for detailed properties
  2323  	ConfigProperties *string `json:"ConfigProperties,omitempty"`
  2324  }
  2325  
  2326  // WorkItemConfigurationError error associated with trying to get work item configuration or configurations
  2327  type WorkItemConfigurationError struct {
  2328  	// Code - Error detail code and explanation
  2329  	Code *string `json:"code,omitempty"`
  2330  	// Message - Error message
  2331  	Message    *string     `json:"message,omitempty"`
  2332  	Innererror *InnerError `json:"innererror,omitempty"`
  2333  }
  2334  
  2335  // WorkItemConfigurationsListResult work item configuration list result.
  2336  type WorkItemConfigurationsListResult struct {
  2337  	autorest.Response `json:"-"`
  2338  	// Value - READ-ONLY; An array of work item configurations.
  2339  	Value *[]WorkItemConfiguration `json:"value,omitempty"`
  2340  }
  2341  
  2342  // MarshalJSON is the custom marshaler for WorkItemConfigurationsListResult.
  2343  func (wiclr WorkItemConfigurationsListResult) MarshalJSON() ([]byte, error) {
  2344  	objectMap := make(map[string]interface{})
  2345  	return json.Marshal(objectMap)
  2346  }
  2347  
  2348  // WorkItemCreateConfiguration work item configuration creation payload
  2349  type WorkItemCreateConfiguration struct {
  2350  	// ConnectorID - Unique connector id
  2351  	ConnectorID *string `json:"ConnectorId,omitempty"`
  2352  	// ConnectorDataConfiguration - Serialized JSON object for detailed properties
  2353  	ConnectorDataConfiguration *string `json:"ConnectorDataConfiguration,omitempty"`
  2354  	// ValidateOnly - Boolean indicating validate only
  2355  	ValidateOnly *bool `json:"ValidateOnly,omitempty"`
  2356  	// WorkItemProperties - Custom work item properties
  2357  	WorkItemProperties map[string]*string `json:"WorkItemProperties"`
  2358  }
  2359  
  2360  // MarshalJSON is the custom marshaler for WorkItemCreateConfiguration.
  2361  func (wicc WorkItemCreateConfiguration) MarshalJSON() ([]byte, error) {
  2362  	objectMap := make(map[string]interface{})
  2363  	if wicc.ConnectorID != nil {
  2364  		objectMap["ConnectorId"] = wicc.ConnectorID
  2365  	}
  2366  	if wicc.ConnectorDataConfiguration != nil {
  2367  		objectMap["ConnectorDataConfiguration"] = wicc.ConnectorDataConfiguration
  2368  	}
  2369  	if wicc.ValidateOnly != nil {
  2370  		objectMap["ValidateOnly"] = wicc.ValidateOnly
  2371  	}
  2372  	if wicc.WorkItemProperties != nil {
  2373  		objectMap["WorkItemProperties"] = wicc.WorkItemProperties
  2374  	}
  2375  	return json.Marshal(objectMap)
  2376  }
  2377  

View as plain text