...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2021-11-01-preview/insights/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2021-11-01-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  	"github.com/gofrs/uuid"
    17  	"net/http"
    18  )
    19  
    20  // The package's fully qualified name.
    21  const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2021-11-01-preview/insights"
    22  
    23  // Annotation annotation associated with an application insights resource.
    24  type Annotation struct {
    25  	// AnnotationName - Name of annotation
    26  	AnnotationName *string `json:"AnnotationName,omitempty"`
    27  	// Category - Category of annotation, free form
    28  	Category *string `json:"Category,omitempty"`
    29  	// EventTime - Time when event occurred
    30  	EventTime *date.Time `json:"EventTime,omitempty"`
    31  	// ID - Unique Id for annotation
    32  	ID *string `json:"Id,omitempty"`
    33  	// Properties - Serialized JSON object for detailed properties
    34  	Properties *string `json:"Properties,omitempty"`
    35  	// RelatedAnnotation - Related parent annotation if any
    36  	RelatedAnnotation *string `json:"RelatedAnnotation,omitempty"`
    37  }
    38  
    39  // AnnotationError error associated with trying to create annotation with Id that already exist
    40  type AnnotationError struct {
    41  	// Code - Error detail code and explanation
    42  	Code *string `json:"code,omitempty"`
    43  	// Message - Error message
    44  	Message    *string     `json:"message,omitempty"`
    45  	Innererror *InnerError `json:"innererror,omitempty"`
    46  }
    47  
    48  // AnnotationsListResult annotations list result.
    49  type AnnotationsListResult struct {
    50  	autorest.Response `json:"-"`
    51  	// Value - READ-ONLY; An array of annotations.
    52  	Value *[]Annotation `json:"value,omitempty"`
    53  }
    54  
    55  // MarshalJSON is the custom marshaler for AnnotationsListResult.
    56  func (alr AnnotationsListResult) MarshalJSON() ([]byte, error) {
    57  	objectMap := make(map[string]interface{})
    58  	return json.Marshal(objectMap)
    59  }
    60  
    61  // APIKeyRequest an Application Insights component API Key creation request definition.
    62  type APIKeyRequest struct {
    63  	// Name - The name of the API Key.
    64  	Name *string `json:"name,omitempty"`
    65  	// LinkedReadProperties - The read access rights of this API Key.
    66  	LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
    67  	// LinkedWriteProperties - The write access rights of this API Key.
    68  	LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
    69  }
    70  
    71  // ApplicationInsightsComponent an Application Insights component definition.
    72  type ApplicationInsightsComponent struct {
    73  	autorest.Response `json:"-"`
    74  	// 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.
    75  	Kind *string `json:"kind,omitempty"`
    76  	// ApplicationInsightsComponentProperties - Properties that define an Application Insights component resource.
    77  	*ApplicationInsightsComponentProperties `json:"properties,omitempty"`
    78  	// ID - READ-ONLY; Azure resource Id
    79  	ID *string `json:"id,omitempty"`
    80  	// Name - READ-ONLY; Azure resource name
    81  	Name *string `json:"name,omitempty"`
    82  	// Type - READ-ONLY; Azure resource type
    83  	Type *string `json:"type,omitempty"`
    84  	// Location - Resource location
    85  	Location *string `json:"location,omitempty"`
    86  	// Tags - Resource tags
    87  	Tags map[string]*string `json:"tags"`
    88  }
    89  
    90  // MarshalJSON is the custom marshaler for ApplicationInsightsComponent.
    91  func (aic ApplicationInsightsComponent) MarshalJSON() ([]byte, error) {
    92  	objectMap := make(map[string]interface{})
    93  	if aic.Kind != nil {
    94  		objectMap["kind"] = aic.Kind
    95  	}
    96  	if aic.ApplicationInsightsComponentProperties != nil {
    97  		objectMap["properties"] = aic.ApplicationInsightsComponentProperties
    98  	}
    99  	if aic.Location != nil {
   100  		objectMap["location"] = aic.Location
   101  	}
   102  	if aic.Tags != nil {
   103  		objectMap["tags"] = aic.Tags
   104  	}
   105  	return json.Marshal(objectMap)
   106  }
   107  
   108  // UnmarshalJSON is the custom unmarshaler for ApplicationInsightsComponent struct.
   109  func (aic *ApplicationInsightsComponent) UnmarshalJSON(body []byte) error {
   110  	var m map[string]*json.RawMessage
   111  	err := json.Unmarshal(body, &m)
   112  	if err != nil {
   113  		return err
   114  	}
   115  	for k, v := range m {
   116  		switch k {
   117  		case "kind":
   118  			if v != nil {
   119  				var kind string
   120  				err = json.Unmarshal(*v, &kind)
   121  				if err != nil {
   122  					return err
   123  				}
   124  				aic.Kind = &kind
   125  			}
   126  		case "properties":
   127  			if v != nil {
   128  				var applicationInsightsComponentProperties ApplicationInsightsComponentProperties
   129  				err = json.Unmarshal(*v, &applicationInsightsComponentProperties)
   130  				if err != nil {
   131  					return err
   132  				}
   133  				aic.ApplicationInsightsComponentProperties = &applicationInsightsComponentProperties
   134  			}
   135  		case "id":
   136  			if v != nil {
   137  				var ID string
   138  				err = json.Unmarshal(*v, &ID)
   139  				if err != nil {
   140  					return err
   141  				}
   142  				aic.ID = &ID
   143  			}
   144  		case "name":
   145  			if v != nil {
   146  				var name string
   147  				err = json.Unmarshal(*v, &name)
   148  				if err != nil {
   149  					return err
   150  				}
   151  				aic.Name = &name
   152  			}
   153  		case "type":
   154  			if v != nil {
   155  				var typeVar string
   156  				err = json.Unmarshal(*v, &typeVar)
   157  				if err != nil {
   158  					return err
   159  				}
   160  				aic.Type = &typeVar
   161  			}
   162  		case "location":
   163  			if v != nil {
   164  				var location string
   165  				err = json.Unmarshal(*v, &location)
   166  				if err != nil {
   167  					return err
   168  				}
   169  				aic.Location = &location
   170  			}
   171  		case "tags":
   172  			if v != nil {
   173  				var tags map[string]*string
   174  				err = json.Unmarshal(*v, &tags)
   175  				if err != nil {
   176  					return err
   177  				}
   178  				aic.Tags = tags
   179  			}
   180  		}
   181  	}
   182  
   183  	return nil
   184  }
   185  
   186  // ApplicationInsightsComponentAnalyticsItem properties that define an Analytics item that is associated to
   187  // an Application Insights component.
   188  type ApplicationInsightsComponentAnalyticsItem struct {
   189  	autorest.Response `json:"-"`
   190  	// ID - Internally assigned unique id of the item definition.
   191  	ID *string `json:"Id,omitempty"`
   192  	// Name - The user-defined name of the item.
   193  	Name *string `json:"Name,omitempty"`
   194  	// Content - The content of this item
   195  	Content *string `json:"Content,omitempty"`
   196  	// Version - READ-ONLY; This instance's version of the data model. This can change as new features are added.
   197  	Version *string `json:"Version,omitempty"`
   198  	// 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'
   199  	Scope ItemScope `json:"Scope,omitempty"`
   200  	// Type - Enum indicating the type of the Analytics item. Possible values include: 'ItemTypeQuery', 'ItemTypeFunction', 'ItemTypeFolder', 'ItemTypeRecent'
   201  	Type ItemType `json:"Type,omitempty"`
   202  	// TimeCreated - READ-ONLY; Date and time in UTC when this item was created.
   203  	TimeCreated *string `json:"TimeCreated,omitempty"`
   204  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this item.
   205  	TimeModified *string                                              `json:"TimeModified,omitempty"`
   206  	Properties   *ApplicationInsightsComponentAnalyticsItemProperties `json:"Properties,omitempty"`
   207  }
   208  
   209  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentAnalyticsItem.
   210  func (aicai ApplicationInsightsComponentAnalyticsItem) MarshalJSON() ([]byte, error) {
   211  	objectMap := make(map[string]interface{})
   212  	if aicai.ID != nil {
   213  		objectMap["Id"] = aicai.ID
   214  	}
   215  	if aicai.Name != nil {
   216  		objectMap["Name"] = aicai.Name
   217  	}
   218  	if aicai.Content != nil {
   219  		objectMap["Content"] = aicai.Content
   220  	}
   221  	if aicai.Scope != "" {
   222  		objectMap["Scope"] = aicai.Scope
   223  	}
   224  	if aicai.Type != "" {
   225  		objectMap["Type"] = aicai.Type
   226  	}
   227  	if aicai.Properties != nil {
   228  		objectMap["Properties"] = aicai.Properties
   229  	}
   230  	return json.Marshal(objectMap)
   231  }
   232  
   233  // ApplicationInsightsComponentAnalyticsItemProperties a set of properties that can be defined in the
   234  // context of a specific item type. Each type may have its own properties.
   235  type ApplicationInsightsComponentAnalyticsItemProperties struct {
   236  	// FunctionAlias - A function alias, used when the type of the item is Function
   237  	FunctionAlias *string `json:"functionAlias,omitempty"`
   238  }
   239  
   240  // ApplicationInsightsComponentAPIKey properties that define an API key of an Application Insights
   241  // Component.
   242  type ApplicationInsightsComponentAPIKey struct {
   243  	autorest.Response `json:"-"`
   244  	// 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.
   245  	ID *string `json:"id,omitempty"`
   246  	// APIKey - READ-ONLY; The API key value. It will be only return once when the API Key was created.
   247  	APIKey *string `json:"apiKey,omitempty"`
   248  	// CreatedDate - The create date of this API key.
   249  	CreatedDate *string `json:"createdDate,omitempty"`
   250  	// Name - The name of the API key.
   251  	Name *string `json:"name,omitempty"`
   252  	// LinkedReadProperties - The read access rights of this API Key.
   253  	LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
   254  	// LinkedWriteProperties - The write access rights of this API Key.
   255  	LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
   256  }
   257  
   258  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentAPIKey.
   259  func (aicak ApplicationInsightsComponentAPIKey) MarshalJSON() ([]byte, error) {
   260  	objectMap := make(map[string]interface{})
   261  	if aicak.CreatedDate != nil {
   262  		objectMap["createdDate"] = aicak.CreatedDate
   263  	}
   264  	if aicak.Name != nil {
   265  		objectMap["name"] = aicak.Name
   266  	}
   267  	if aicak.LinkedReadProperties != nil {
   268  		objectMap["linkedReadProperties"] = aicak.LinkedReadProperties
   269  	}
   270  	if aicak.LinkedWriteProperties != nil {
   271  		objectMap["linkedWriteProperties"] = aicak.LinkedWriteProperties
   272  	}
   273  	return json.Marshal(objectMap)
   274  }
   275  
   276  // ApplicationInsightsComponentAPIKeyListResult describes the list of API Keys of an Application Insights
   277  // Component.
   278  type ApplicationInsightsComponentAPIKeyListResult struct {
   279  	autorest.Response `json:"-"`
   280  	// Value - List of API Key definitions.
   281  	Value *[]ApplicationInsightsComponentAPIKey `json:"value,omitempty"`
   282  }
   283  
   284  // ApplicationInsightsComponentAvailableFeatures an Application Insights component available features.
   285  type ApplicationInsightsComponentAvailableFeatures struct {
   286  	autorest.Response `json:"-"`
   287  	// Result - READ-ONLY; A list of Application Insights component feature.
   288  	Result *[]ApplicationInsightsComponentFeature `json:"Result,omitempty"`
   289  }
   290  
   291  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentAvailableFeatures.
   292  func (aicaf ApplicationInsightsComponentAvailableFeatures) MarshalJSON() ([]byte, error) {
   293  	objectMap := make(map[string]interface{})
   294  	return json.Marshal(objectMap)
   295  }
   296  
   297  // ApplicationInsightsComponentBillingFeatures an Application Insights component billing features
   298  type ApplicationInsightsComponentBillingFeatures struct {
   299  	autorest.Response `json:"-"`
   300  	// DataVolumeCap - An Application Insights component daily data volume cap
   301  	DataVolumeCap *ApplicationInsightsComponentDataVolumeCap `json:"DataVolumeCap,omitempty"`
   302  	// CurrentBillingFeatures - Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and 'Application Insights Enterprise'.
   303  	CurrentBillingFeatures *[]string `json:"CurrentBillingFeatures,omitempty"`
   304  }
   305  
   306  // ApplicationInsightsComponentDataVolumeCap an Application Insights component daily data volume cap
   307  type ApplicationInsightsComponentDataVolumeCap struct {
   308  	// Cap - Daily data volume cap in GB.
   309  	Cap *float64 `json:"Cap,omitempty"`
   310  	// ResetTime - READ-ONLY; Daily data volume cap UTC reset hour.
   311  	ResetTime *int32 `json:"ResetTime,omitempty"`
   312  	// WarningThreshold - Reserved, not used for now.
   313  	WarningThreshold *int32 `json:"WarningThreshold,omitempty"`
   314  	// StopSendNotificationWhenHitThreshold - Reserved, not used for now.
   315  	StopSendNotificationWhenHitThreshold *bool `json:"StopSendNotificationWhenHitThreshold,omitempty"`
   316  	// StopSendNotificationWhenHitCap - Do not send a notification email when the daily data volume cap is met.
   317  	StopSendNotificationWhenHitCap *bool `json:"StopSendNotificationWhenHitCap,omitempty"`
   318  	// MaxHistoryCap - READ-ONLY; Maximum daily data volume cap that the user can set for this component.
   319  	MaxHistoryCap *float64 `json:"MaxHistoryCap,omitempty"`
   320  }
   321  
   322  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentDataVolumeCap.
   323  func (aicdvc ApplicationInsightsComponentDataVolumeCap) MarshalJSON() ([]byte, error) {
   324  	objectMap := make(map[string]interface{})
   325  	if aicdvc.Cap != nil {
   326  		objectMap["Cap"] = aicdvc.Cap
   327  	}
   328  	if aicdvc.WarningThreshold != nil {
   329  		objectMap["WarningThreshold"] = aicdvc.WarningThreshold
   330  	}
   331  	if aicdvc.StopSendNotificationWhenHitThreshold != nil {
   332  		objectMap["StopSendNotificationWhenHitThreshold"] = aicdvc.StopSendNotificationWhenHitThreshold
   333  	}
   334  	if aicdvc.StopSendNotificationWhenHitCap != nil {
   335  		objectMap["StopSendNotificationWhenHitCap"] = aicdvc.StopSendNotificationWhenHitCap
   336  	}
   337  	return json.Marshal(objectMap)
   338  }
   339  
   340  // ApplicationInsightsComponentExportConfiguration properties that define a Continuous Export
   341  // configuration.
   342  type ApplicationInsightsComponentExportConfiguration struct {
   343  	autorest.Response `json:"-"`
   344  	// 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.
   345  	ExportID *string `json:"ExportId,omitempty"`
   346  	// InstrumentationKey - READ-ONLY; The instrumentation key of the Application Insights component.
   347  	InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
   348  	// 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'.
   349  	RecordTypes *string `json:"RecordTypes,omitempty"`
   350  	// ApplicationName - READ-ONLY; The name of the Application Insights component.
   351  	ApplicationName *string `json:"ApplicationName,omitempty"`
   352  	// SubscriptionID - READ-ONLY; The subscription of the Application Insights component.
   353  	SubscriptionID *string `json:"SubscriptionId,omitempty"`
   354  	// ResourceGroup - READ-ONLY; The resource group of the Application Insights component.
   355  	ResourceGroup *string `json:"ResourceGroup,omitempty"`
   356  	// DestinationStorageSubscriptionID - READ-ONLY; The destination storage account subscription ID.
   357  	DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
   358  	// DestinationStorageLocationID - READ-ONLY; The destination account location ID.
   359  	DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
   360  	// DestinationAccountID - READ-ONLY; The name of destination account.
   361  	DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
   362  	// DestinationType - READ-ONLY; The destination type.
   363  	DestinationType *string `json:"DestinationType,omitempty"`
   364  	// IsUserEnabled - READ-ONLY; This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be 'false'.
   365  	IsUserEnabled *string `json:"IsUserEnabled,omitempty"`
   366  	// LastUserUpdate - READ-ONLY; Last time the Continuous Export configuration was updated.
   367  	LastUserUpdate *string `json:"LastUserUpdate,omitempty"`
   368  	// NotificationQueueEnabled - Deprecated
   369  	NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
   370  	// ExportStatus - READ-ONLY; This indicates current Continuous Export configuration status. The possible values are 'Preparing', 'Success', 'Failure'.
   371  	ExportStatus *string `json:"ExportStatus,omitempty"`
   372  	// LastSuccessTime - READ-ONLY; The last time data was successfully delivered to the destination storage container for this Continuous Export configuration.
   373  	LastSuccessTime *string `json:"LastSuccessTime,omitempty"`
   374  	// LastGapTime - READ-ONLY; The last time the Continuous Export configuration started failing.
   375  	LastGapTime *string `json:"LastGapTime,omitempty"`
   376  	// PermanentErrorReason - READ-ONLY; This is the reason the Continuous Export configuration started failing. It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'.
   377  	PermanentErrorReason *string `json:"PermanentErrorReason,omitempty"`
   378  	// StorageName - READ-ONLY; The name of the destination storage account.
   379  	StorageName *string `json:"StorageName,omitempty"`
   380  	// ContainerName - READ-ONLY; The name of the destination storage container.
   381  	ContainerName *string `json:"ContainerName,omitempty"`
   382  }
   383  
   384  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentExportConfiguration.
   385  func (aicec ApplicationInsightsComponentExportConfiguration) MarshalJSON() ([]byte, error) {
   386  	objectMap := make(map[string]interface{})
   387  	if aicec.RecordTypes != nil {
   388  		objectMap["RecordTypes"] = aicec.RecordTypes
   389  	}
   390  	if aicec.NotificationQueueEnabled != nil {
   391  		objectMap["NotificationQueueEnabled"] = aicec.NotificationQueueEnabled
   392  	}
   393  	return json.Marshal(objectMap)
   394  }
   395  
   396  // ApplicationInsightsComponentExportRequest an Application Insights component Continuous Export
   397  // configuration request definition.
   398  type ApplicationInsightsComponentExportRequest struct {
   399  	// RecordTypes - The document types to be exported, as comma separated values. Allowed values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'.
   400  	RecordTypes *string `json:"RecordTypes,omitempty"`
   401  	// DestinationType - The Continuous Export destination type. This has to be 'Blob'.
   402  	DestinationType *string `json:"DestinationType,omitempty"`
   403  	// DestinationAddress - The SAS URL for the destination storage container. It must grant write permission.
   404  	DestinationAddress *string `json:"DestinationAddress,omitempty"`
   405  	// IsEnabled - Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to 'false'.
   406  	IsEnabled *string `json:"IsEnabled,omitempty"`
   407  	// NotificationQueueEnabled - Deprecated
   408  	NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
   409  	// NotificationQueueURI - Deprecated
   410  	NotificationQueueURI *string `json:"NotificationQueueUri,omitempty"`
   411  	// DestinationStorageSubscriptionID - The subscription ID of the destination storage container.
   412  	DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
   413  	// DestinationStorageLocationID - The location ID of the destination storage container.
   414  	DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
   415  	// DestinationAccountID - The name of destination storage account.
   416  	DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
   417  }
   418  
   419  // ApplicationInsightsComponentFavorite properties that define a favorite that is associated to an
   420  // Application Insights component.
   421  type ApplicationInsightsComponentFavorite struct {
   422  	autorest.Response `json:"-"`
   423  	// Name - The user-defined name of the favorite.
   424  	Name *string `json:"Name,omitempty"`
   425  	// Config - Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON
   426  	Config *string `json:"Config,omitempty"`
   427  	// 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.
   428  	Version *string `json:"Version,omitempty"`
   429  	// FavoriteID - READ-ONLY; Internally assigned unique id of the favorite definition.
   430  	FavoriteID *string `json:"FavoriteId,omitempty"`
   431  	// 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'
   432  	FavoriteType FavoriteType `json:"FavoriteType,omitempty"`
   433  	// SourceType - The source of the favorite definition.
   434  	SourceType *string `json:"SourceType,omitempty"`
   435  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this favorite definition.
   436  	TimeModified *string `json:"TimeModified,omitempty"`
   437  	// Tags - A list of 0 or more tags that are associated with this favorite definition
   438  	Tags *[]string `json:"Tags,omitempty"`
   439  	// Category - Favorite category, as defined by the user at creation time.
   440  	Category *string `json:"Category,omitempty"`
   441  	// IsGeneratedFromTemplate - Flag denoting wether or not this favorite was generated from a template.
   442  	IsGeneratedFromTemplate *bool `json:"IsGeneratedFromTemplate,omitempty"`
   443  	// UserID - READ-ONLY; Unique user id of the specific user that owns this favorite.
   444  	UserID *string `json:"UserId,omitempty"`
   445  }
   446  
   447  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFavorite.
   448  func (aicf ApplicationInsightsComponentFavorite) MarshalJSON() ([]byte, error) {
   449  	objectMap := make(map[string]interface{})
   450  	if aicf.Name != nil {
   451  		objectMap["Name"] = aicf.Name
   452  	}
   453  	if aicf.Config != nil {
   454  		objectMap["Config"] = aicf.Config
   455  	}
   456  	if aicf.Version != nil {
   457  		objectMap["Version"] = aicf.Version
   458  	}
   459  	if aicf.FavoriteType != "" {
   460  		objectMap["FavoriteType"] = aicf.FavoriteType
   461  	}
   462  	if aicf.SourceType != nil {
   463  		objectMap["SourceType"] = aicf.SourceType
   464  	}
   465  	if aicf.Tags != nil {
   466  		objectMap["Tags"] = aicf.Tags
   467  	}
   468  	if aicf.Category != nil {
   469  		objectMap["Category"] = aicf.Category
   470  	}
   471  	if aicf.IsGeneratedFromTemplate != nil {
   472  		objectMap["IsGeneratedFromTemplate"] = aicf.IsGeneratedFromTemplate
   473  	}
   474  	return json.Marshal(objectMap)
   475  }
   476  
   477  // ApplicationInsightsComponentFeature an Application Insights component daily data volume cap status
   478  type ApplicationInsightsComponentFeature struct {
   479  	// FeatureName - READ-ONLY; The pricing feature name.
   480  	FeatureName *string `json:"FeatureName,omitempty"`
   481  	// MeterID - READ-ONLY; The meter id used for the feature.
   482  	MeterID *string `json:"MeterId,omitempty"`
   483  	// MeterRateFrequency - READ-ONLY; The meter rate for the feature's meter.
   484  	MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
   485  	// ResouceID - READ-ONLY; Reserved, not used now.
   486  	ResouceID *string `json:"ResouceId,omitempty"`
   487  	// IsHidden - READ-ONLY; Reserved, not used now.
   488  	IsHidden *bool `json:"IsHidden,omitempty"`
   489  	// Capabilities - READ-ONLY; A list of Application Insights component feature capability.
   490  	Capabilities *[]ApplicationInsightsComponentFeatureCapability `json:"Capabilities,omitempty"`
   491  	// Title - READ-ONLY; Display name of the feature.
   492  	Title *string `json:"Title,omitempty"`
   493  	// IsMainFeature - READ-ONLY; Whether can apply addon feature on to it.
   494  	IsMainFeature *bool `json:"IsMainFeature,omitempty"`
   495  	// SupportedAddonFeatures - READ-ONLY; The add on features on main feature.
   496  	SupportedAddonFeatures *string `json:"SupportedAddonFeatures,omitempty"`
   497  }
   498  
   499  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFeature.
   500  func (aicf ApplicationInsightsComponentFeature) MarshalJSON() ([]byte, error) {
   501  	objectMap := make(map[string]interface{})
   502  	return json.Marshal(objectMap)
   503  }
   504  
   505  // ApplicationInsightsComponentFeatureCapabilities an Application Insights component feature capabilities
   506  type ApplicationInsightsComponentFeatureCapabilities struct {
   507  	autorest.Response `json:"-"`
   508  	// SupportExportData - READ-ONLY; Whether allow to use continuous export feature.
   509  	SupportExportData *bool `json:"SupportExportData,omitempty"`
   510  	// BurstThrottlePolicy - READ-ONLY; Reserved, not used now.
   511  	BurstThrottlePolicy *string `json:"BurstThrottlePolicy,omitempty"`
   512  	// MetadataClass - READ-ONLY; Reserved, not used now.
   513  	MetadataClass *string `json:"MetadataClass,omitempty"`
   514  	// LiveStreamMetrics - READ-ONLY; Reserved, not used now.
   515  	LiveStreamMetrics *bool `json:"LiveStreamMetrics,omitempty"`
   516  	// ApplicationMap - READ-ONLY; Reserved, not used now.
   517  	ApplicationMap *bool `json:"ApplicationMap,omitempty"`
   518  	// WorkItemIntegration - READ-ONLY; Whether allow to use work item integration feature.
   519  	WorkItemIntegration *bool `json:"WorkItemIntegration,omitempty"`
   520  	// PowerBIIntegration - READ-ONLY; Reserved, not used now.
   521  	PowerBIIntegration *bool `json:"PowerBIIntegration,omitempty"`
   522  	// OpenSchema - READ-ONLY; Reserved, not used now.
   523  	OpenSchema *bool `json:"OpenSchema,omitempty"`
   524  	// ProactiveDetection - READ-ONLY; Reserved, not used now.
   525  	ProactiveDetection *bool `json:"ProactiveDetection,omitempty"`
   526  	// AnalyticsIntegration - READ-ONLY; Reserved, not used now.
   527  	AnalyticsIntegration *bool `json:"AnalyticsIntegration,omitempty"`
   528  	// MultipleStepWebTest - READ-ONLY; Whether allow to use multiple steps web test feature.
   529  	MultipleStepWebTest *bool `json:"MultipleStepWebTest,omitempty"`
   530  	// APIAccessLevel - READ-ONLY; Reserved, not used now.
   531  	APIAccessLevel *string `json:"ApiAccessLevel,omitempty"`
   532  	// TrackingType - READ-ONLY; The application insights component used tracking type.
   533  	TrackingType *string `json:"TrackingType,omitempty"`
   534  	// DailyCap - READ-ONLY; Daily data volume cap in GB.
   535  	DailyCap *float64 `json:"DailyCap,omitempty"`
   536  	// DailyCapResetTime - READ-ONLY; Daily data volume cap UTC reset hour.
   537  	DailyCapResetTime *float64 `json:"DailyCapResetTime,omitempty"`
   538  	// ThrottleRate - READ-ONLY; Reserved, not used now.
   539  	ThrottleRate *float64 `json:"ThrottleRate,omitempty"`
   540  }
   541  
   542  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFeatureCapabilities.
   543  func (aicfc ApplicationInsightsComponentFeatureCapabilities) MarshalJSON() ([]byte, error) {
   544  	objectMap := make(map[string]interface{})
   545  	return json.Marshal(objectMap)
   546  }
   547  
   548  // ApplicationInsightsComponentFeatureCapability an Application Insights component feature capability
   549  type ApplicationInsightsComponentFeatureCapability struct {
   550  	// Name - READ-ONLY; The name of the capability.
   551  	Name *string `json:"Name,omitempty"`
   552  	// Description - READ-ONLY; The description of the capability.
   553  	Description *string `json:"Description,omitempty"`
   554  	// Value - READ-ONLY; The value of the capability.
   555  	Value *string `json:"Value,omitempty"`
   556  	// Unit - READ-ONLY; The unit of the capability.
   557  	Unit *string `json:"Unit,omitempty"`
   558  	// MeterID - READ-ONLY; The meter used for the capability.
   559  	MeterID *string `json:"MeterId,omitempty"`
   560  	// MeterRateFrequency - READ-ONLY; The meter rate of the meter.
   561  	MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
   562  }
   563  
   564  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentFeatureCapability.
   565  func (aicfc ApplicationInsightsComponentFeatureCapability) MarshalJSON() ([]byte, error) {
   566  	objectMap := make(map[string]interface{})
   567  	return json.Marshal(objectMap)
   568  }
   569  
   570  // ApplicationInsightsComponentListResult describes the list of Application Insights Resources.
   571  type ApplicationInsightsComponentListResult struct {
   572  	autorest.Response `json:"-"`
   573  	// Value - List of Application Insights component definitions.
   574  	Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
   575  	// NextLink - The URI to get the next set of Application Insights component definitions if too many components where returned in the result set.
   576  	NextLink *string `json:"nextLink,omitempty"`
   577  }
   578  
   579  // ApplicationInsightsComponentListResultIterator provides access to a complete listing of
   580  // ApplicationInsightsComponent values.
   581  type ApplicationInsightsComponentListResultIterator struct {
   582  	i    int
   583  	page ApplicationInsightsComponentListResultPage
   584  }
   585  
   586  // NextWithContext advances to the next value.  If there was an error making
   587  // the request the iterator does not advance and the error is returned.
   588  func (iter *ApplicationInsightsComponentListResultIterator) NextWithContext(ctx context.Context) (err error) {
   589  	if tracing.IsEnabled() {
   590  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultIterator.NextWithContext")
   591  		defer func() {
   592  			sc := -1
   593  			if iter.Response().Response.Response != nil {
   594  				sc = iter.Response().Response.Response.StatusCode
   595  			}
   596  			tracing.EndSpan(ctx, sc, err)
   597  		}()
   598  	}
   599  	iter.i++
   600  	if iter.i < len(iter.page.Values()) {
   601  		return nil
   602  	}
   603  	err = iter.page.NextWithContext(ctx)
   604  	if err != nil {
   605  		iter.i--
   606  		return err
   607  	}
   608  	iter.i = 0
   609  	return nil
   610  }
   611  
   612  // Next advances to the next value.  If there was an error making
   613  // the request the iterator does not advance and the error is returned.
   614  // Deprecated: Use NextWithContext() instead.
   615  func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
   616  	return iter.NextWithContext(context.Background())
   617  }
   618  
   619  // NotDone returns true if the enumeration should be started or is not yet complete.
   620  func (iter ApplicationInsightsComponentListResultIterator) NotDone() bool {
   621  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   622  }
   623  
   624  // Response returns the raw server response from the last page request.
   625  func (iter ApplicationInsightsComponentListResultIterator) Response() ApplicationInsightsComponentListResult {
   626  	return iter.page.Response()
   627  }
   628  
   629  // Value returns the current value or a zero-initialized value if the
   630  // iterator has advanced beyond the end of the collection.
   631  func (iter ApplicationInsightsComponentListResultIterator) Value() ApplicationInsightsComponent {
   632  	if !iter.page.NotDone() {
   633  		return ApplicationInsightsComponent{}
   634  	}
   635  	return iter.page.Values()[iter.i]
   636  }
   637  
   638  // Creates a new instance of the ApplicationInsightsComponentListResultIterator type.
   639  func NewApplicationInsightsComponentListResultIterator(page ApplicationInsightsComponentListResultPage) ApplicationInsightsComponentListResultIterator {
   640  	return ApplicationInsightsComponentListResultIterator{page: page}
   641  }
   642  
   643  // IsEmpty returns true if the ListResult contains no values.
   644  func (aiclr ApplicationInsightsComponentListResult) IsEmpty() bool {
   645  	return aiclr.Value == nil || len(*aiclr.Value) == 0
   646  }
   647  
   648  // hasNextLink returns true if the NextLink is not empty.
   649  func (aiclr ApplicationInsightsComponentListResult) hasNextLink() bool {
   650  	return aiclr.NextLink != nil && len(*aiclr.NextLink) != 0
   651  }
   652  
   653  // applicationInsightsComponentListResultPreparer prepares a request to retrieve the next set of results.
   654  // It returns nil if no more results exist.
   655  func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponentListResultPreparer(ctx context.Context) (*http.Request, error) {
   656  	if !aiclr.hasNextLink() {
   657  		return nil, nil
   658  	}
   659  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   660  		autorest.AsJSON(),
   661  		autorest.AsGet(),
   662  		autorest.WithBaseURL(to.String(aiclr.NextLink)))
   663  }
   664  
   665  // ApplicationInsightsComponentListResultPage contains a page of ApplicationInsightsComponent values.
   666  type ApplicationInsightsComponentListResultPage struct {
   667  	fn    func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)
   668  	aiclr ApplicationInsightsComponentListResult
   669  }
   670  
   671  // NextWithContext advances to the next page of values.  If there was an error making
   672  // the request the page does not advance and the error is returned.
   673  func (page *ApplicationInsightsComponentListResultPage) NextWithContext(ctx context.Context) (err error) {
   674  	if tracing.IsEnabled() {
   675  		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultPage.NextWithContext")
   676  		defer func() {
   677  			sc := -1
   678  			if page.Response().Response.Response != nil {
   679  				sc = page.Response().Response.Response.StatusCode
   680  			}
   681  			tracing.EndSpan(ctx, sc, err)
   682  		}()
   683  	}
   684  	for {
   685  		next, err := page.fn(ctx, page.aiclr)
   686  		if err != nil {
   687  			return err
   688  		}
   689  		page.aiclr = next
   690  		if !next.hasNextLink() || !next.IsEmpty() {
   691  			break
   692  		}
   693  	}
   694  	return nil
   695  }
   696  
   697  // Next advances to the next page of values.  If there was an error making
   698  // the request the page does not advance and the error is returned.
   699  // Deprecated: Use NextWithContext() instead.
   700  func (page *ApplicationInsightsComponentListResultPage) Next() error {
   701  	return page.NextWithContext(context.Background())
   702  }
   703  
   704  // NotDone returns true if the page enumeration should be started or is not yet complete.
   705  func (page ApplicationInsightsComponentListResultPage) NotDone() bool {
   706  	return !page.aiclr.IsEmpty()
   707  }
   708  
   709  // Response returns the raw server response from the last page request.
   710  func (page ApplicationInsightsComponentListResultPage) Response() ApplicationInsightsComponentListResult {
   711  	return page.aiclr
   712  }
   713  
   714  // Values returns the slice of values for the current page or nil if there are no values.
   715  func (page ApplicationInsightsComponentListResultPage) Values() []ApplicationInsightsComponent {
   716  	if page.aiclr.IsEmpty() {
   717  		return nil
   718  	}
   719  	return *page.aiclr.Value
   720  }
   721  
   722  // Creates a new instance of the ApplicationInsightsComponentListResultPage type.
   723  func NewApplicationInsightsComponentListResultPage(cur ApplicationInsightsComponentListResult, getNextPage func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)) ApplicationInsightsComponentListResultPage {
   724  	return ApplicationInsightsComponentListResultPage{
   725  		fn:    getNextPage,
   726  		aiclr: cur,
   727  	}
   728  }
   729  
   730  // ApplicationInsightsComponentProactiveDetectionConfiguration properties that define a ProactiveDetection
   731  // configuration.
   732  type ApplicationInsightsComponentProactiveDetectionConfiguration struct {
   733  	autorest.Response `json:"-"`
   734  	// Name - The rule name
   735  	Name *string `json:"Name,omitempty"`
   736  	// Enabled - A flag that indicates whether this rule is enabled by the user
   737  	Enabled *bool `json:"Enabled,omitempty"`
   738  	// SendEmailsToSubscriptionOwners - A flag that indicated whether notifications on this rule should be sent to subscription owners
   739  	SendEmailsToSubscriptionOwners *bool `json:"SendEmailsToSubscriptionOwners,omitempty"`
   740  	// CustomEmails - Custom email addresses for this rule notifications
   741  	CustomEmails *[]string `json:"CustomEmails,omitempty"`
   742  	// LastUpdatedTime - The last time this rule was updated
   743  	LastUpdatedTime *string `json:"LastUpdatedTime,omitempty"`
   744  	// RuleDefinitions - Static definitions of the ProactiveDetection configuration rule (same values for all components).
   745  	RuleDefinitions *ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions `json:"RuleDefinitions,omitempty"`
   746  }
   747  
   748  // ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions static definitions of the
   749  // ProactiveDetection configuration rule (same values for all components).
   750  type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions struct {
   751  	// Name - The rule name
   752  	Name *string `json:"Name,omitempty"`
   753  	// DisplayName - The rule name as it is displayed in UI
   754  	DisplayName *string `json:"DisplayName,omitempty"`
   755  	// Description - The rule description
   756  	Description *string `json:"Description,omitempty"`
   757  	// HelpURL - URL which displays additional info about the proactive detection rule
   758  	HelpURL *string `json:"HelpUrl,omitempty"`
   759  	// IsHidden - A flag indicating whether the rule is hidden (from the UI)
   760  	IsHidden *bool `json:"IsHidden,omitempty"`
   761  	// IsEnabledByDefault - A flag indicating whether the rule is enabled by default
   762  	IsEnabledByDefault *bool `json:"IsEnabledByDefault,omitempty"`
   763  	// IsInPreview - A flag indicating whether the rule is in preview
   764  	IsInPreview *bool `json:"IsInPreview,omitempty"`
   765  	// SupportsEmailNotifications - A flag indicating whether email notifications are supported for detections for this rule
   766  	SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
   767  }
   768  
   769  // ApplicationInsightsComponentProperties properties that define an Application Insights component
   770  // resource.
   771  type ApplicationInsightsComponentProperties struct {
   772  	// ApplicationID - READ-ONLY; The unique ID of your application. This field mirrors the 'Name' field and cannot be changed.
   773  	ApplicationID *string `json:"ApplicationId,omitempty"`
   774  	// AppID - READ-ONLY; Application Insights Unique ID for your Application.
   775  	AppID *string `json:"AppId,omitempty"`
   776  	// ApplicationType - Type of application being monitored. Possible values include: 'ApplicationTypeWeb', 'ApplicationTypeOther'
   777  	ApplicationType ApplicationType `json:"Application_Type,omitempty"`
   778  	// 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'
   779  	FlowType FlowType `json:"Flow_Type,omitempty"`
   780  	// RequestSource - Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. Possible values include: 'RequestSourceRest'
   781  	RequestSource RequestSource `json:"Request_Source,omitempty"`
   782  	// 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.
   783  	InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
   784  	// CreationDate - READ-ONLY; Creation Date for the Application Insights component, in ISO 8601 format.
   785  	CreationDate *date.Time `json:"CreationDate,omitempty"`
   786  	// TenantID - READ-ONLY; Azure Tenant Id.
   787  	TenantID *string `json:"TenantId,omitempty"`
   788  	// HockeyAppID - The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp.
   789  	HockeyAppID *string `json:"HockeyAppId,omitempty"`
   790  	// HockeyAppToken - READ-ONLY; Token used to authenticate communications with between Application Insights and HockeyApp.
   791  	HockeyAppToken *string `json:"HockeyAppToken,omitempty"`
   792  	// 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.
   793  	ProvisioningState *string `json:"provisioningState,omitempty"`
   794  	// SamplingPercentage - Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry.
   795  	SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`
   796  	// ConnectionString - READ-ONLY; Application Insights component connection string.
   797  	ConnectionString *string `json:"ConnectionString,omitempty"`
   798  	// RetentionInDays - Retention period in days.
   799  	RetentionInDays *int32 `json:"RetentionInDays,omitempty"`
   800  	// DisableIPMasking - Disable IP masking.
   801  	DisableIPMasking *bool `json:"DisableIpMasking,omitempty"`
   802  	// ImmediatePurgeDataOn30Days - Purge data immediately after 30 days.
   803  	ImmediatePurgeDataOn30Days *bool `json:"ImmediatePurgeDataOn30Days,omitempty"`
   804  	// PrivateLinkScopedResources - READ-ONLY; List of linked private link scope resources.
   805  	PrivateLinkScopedResources *[]PrivateLinkScopedResource `json:"PrivateLinkScopedResources,omitempty"`
   806  	// PublicNetworkAccessForIngestion - The network access type for accessing Application Insights ingestion. Possible values include: 'PublicNetworkAccessTypeEnabled', 'PublicNetworkAccessTypeDisabled'
   807  	PublicNetworkAccessForIngestion PublicNetworkAccessType `json:"publicNetworkAccessForIngestion,omitempty"`
   808  	// PublicNetworkAccessForQuery - The network access type for accessing Application Insights query. Possible values include: 'PublicNetworkAccessTypeEnabled', 'PublicNetworkAccessTypeDisabled'
   809  	PublicNetworkAccessForQuery PublicNetworkAccessType `json:"publicNetworkAccessForQuery,omitempty"`
   810  	// IngestionMode - Indicates the flow of the ingestion. Possible values include: 'IngestionModeApplicationInsights', 'IngestionModeApplicationInsightsWithDiagnosticSettings', 'IngestionModeLogAnalytics'
   811  	IngestionMode IngestionMode `json:"IngestionMode,omitempty"`
   812  }
   813  
   814  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentProperties.
   815  func (aicp ApplicationInsightsComponentProperties) MarshalJSON() ([]byte, error) {
   816  	objectMap := make(map[string]interface{})
   817  	if aicp.ApplicationType != "" {
   818  		objectMap["Application_Type"] = aicp.ApplicationType
   819  	}
   820  	if aicp.FlowType != "" {
   821  		objectMap["Flow_Type"] = aicp.FlowType
   822  	}
   823  	if aicp.RequestSource != "" {
   824  		objectMap["Request_Source"] = aicp.RequestSource
   825  	}
   826  	if aicp.HockeyAppID != nil {
   827  		objectMap["HockeyAppId"] = aicp.HockeyAppID
   828  	}
   829  	if aicp.SamplingPercentage != nil {
   830  		objectMap["SamplingPercentage"] = aicp.SamplingPercentage
   831  	}
   832  	if aicp.RetentionInDays != nil {
   833  		objectMap["RetentionInDays"] = aicp.RetentionInDays
   834  	}
   835  	if aicp.DisableIPMasking != nil {
   836  		objectMap["DisableIpMasking"] = aicp.DisableIPMasking
   837  	}
   838  	if aicp.ImmediatePurgeDataOn30Days != nil {
   839  		objectMap["ImmediatePurgeDataOn30Days"] = aicp.ImmediatePurgeDataOn30Days
   840  	}
   841  	if aicp.PublicNetworkAccessForIngestion != "" {
   842  		objectMap["publicNetworkAccessForIngestion"] = aicp.PublicNetworkAccessForIngestion
   843  	}
   844  	if aicp.PublicNetworkAccessForQuery != "" {
   845  		objectMap["publicNetworkAccessForQuery"] = aicp.PublicNetworkAccessForQuery
   846  	}
   847  	if aicp.IngestionMode != "" {
   848  		objectMap["IngestionMode"] = aicp.IngestionMode
   849  	}
   850  	return json.Marshal(objectMap)
   851  }
   852  
   853  // ApplicationInsightsComponentQuotaStatus an Application Insights component daily data volume cap status
   854  type ApplicationInsightsComponentQuotaStatus struct {
   855  	autorest.Response `json:"-"`
   856  	// AppID - READ-ONLY; The Application ID for the Application Insights component.
   857  	AppID *string `json:"AppId,omitempty"`
   858  	// ShouldBeThrottled - READ-ONLY; The daily data volume cap is met, and data ingestion will be stopped.
   859  	ShouldBeThrottled *bool `json:"ShouldBeThrottled,omitempty"`
   860  	// ExpirationTime - READ-ONLY; Date and time when the daily data volume cap will be reset, and data ingestion will resume.
   861  	ExpirationTime *string `json:"ExpirationTime,omitempty"`
   862  }
   863  
   864  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentQuotaStatus.
   865  func (aicqs ApplicationInsightsComponentQuotaStatus) MarshalJSON() ([]byte, error) {
   866  	objectMap := make(map[string]interface{})
   867  	return json.Marshal(objectMap)
   868  }
   869  
   870  // ApplicationInsightsComponentWebTestLocation properties that define a web test location available to an
   871  // Application Insights Component.
   872  type ApplicationInsightsComponentWebTestLocation struct {
   873  	// DisplayName - READ-ONLY; The display name of the web test location.
   874  	DisplayName *string `json:"DisplayName,omitempty"`
   875  	// Tag - READ-ONLY; Internally defined geographic location tag.
   876  	Tag *string `json:"Tag,omitempty"`
   877  }
   878  
   879  // MarshalJSON is the custom marshaler for ApplicationInsightsComponentWebTestLocation.
   880  func (aicwtl ApplicationInsightsComponentWebTestLocation) MarshalJSON() ([]byte, error) {
   881  	objectMap := make(map[string]interface{})
   882  	return json.Marshal(objectMap)
   883  }
   884  
   885  // ApplicationInsightsWebTestLocationsListResult describes the list of web test locations available to an
   886  // Application Insights Component.
   887  type ApplicationInsightsWebTestLocationsListResult struct {
   888  	autorest.Response `json:"-"`
   889  	// Value - List of web test locations.
   890  	Value *[]ApplicationInsightsComponentWebTestLocation `json:"value,omitempty"`
   891  }
   892  
   893  // AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
   894  type AzureEntityResource struct {
   895  	// Etag - READ-ONLY; Resource Etag.
   896  	Etag *string `json:"etag,omitempty"`
   897  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   898  	ID *string `json:"id,omitempty"`
   899  	// Name - READ-ONLY; The name of the resource
   900  	Name *string `json:"name,omitempty"`
   901  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   902  	Type *string `json:"type,omitempty"`
   903  }
   904  
   905  // MarshalJSON is the custom marshaler for AzureEntityResource.
   906  func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
   907  	objectMap := make(map[string]interface{})
   908  	return json.Marshal(objectMap)
   909  }
   910  
   911  // ComponentLinkedStorageAccounts an Application Insights component linked storage accounts
   912  type ComponentLinkedStorageAccounts struct {
   913  	autorest.Response `json:"-"`
   914  	// LinkedStorageAccountsProperties - The properties of the linked storage accounts.
   915  	*LinkedStorageAccountsProperties `json:"properties,omitempty"`
   916  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
   917  	ID *string `json:"id,omitempty"`
   918  	// Name - READ-ONLY; The name of the resource
   919  	Name *string `json:"name,omitempty"`
   920  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
   921  	Type *string `json:"type,omitempty"`
   922  }
   923  
   924  // MarshalJSON is the custom marshaler for ComponentLinkedStorageAccounts.
   925  func (clsa ComponentLinkedStorageAccounts) MarshalJSON() ([]byte, error) {
   926  	objectMap := make(map[string]interface{})
   927  	if clsa.LinkedStorageAccountsProperties != nil {
   928  		objectMap["properties"] = clsa.LinkedStorageAccountsProperties
   929  	}
   930  	return json.Marshal(objectMap)
   931  }
   932  
   933  // UnmarshalJSON is the custom unmarshaler for ComponentLinkedStorageAccounts struct.
   934  func (clsa *ComponentLinkedStorageAccounts) UnmarshalJSON(body []byte) error {
   935  	var m map[string]*json.RawMessage
   936  	err := json.Unmarshal(body, &m)
   937  	if err != nil {
   938  		return err
   939  	}
   940  	for k, v := range m {
   941  		switch k {
   942  		case "properties":
   943  			if v != nil {
   944  				var linkedStorageAccountsProperties LinkedStorageAccountsProperties
   945  				err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
   946  				if err != nil {
   947  					return err
   948  				}
   949  				clsa.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
   950  			}
   951  		case "id":
   952  			if v != nil {
   953  				var ID string
   954  				err = json.Unmarshal(*v, &ID)
   955  				if err != nil {
   956  					return err
   957  				}
   958  				clsa.ID = &ID
   959  			}
   960  		case "name":
   961  			if v != nil {
   962  				var name string
   963  				err = json.Unmarshal(*v, &name)
   964  				if err != nil {
   965  					return err
   966  				}
   967  				clsa.Name = &name
   968  			}
   969  		case "type":
   970  			if v != nil {
   971  				var typeVar string
   972  				err = json.Unmarshal(*v, &typeVar)
   973  				if err != nil {
   974  					return err
   975  				}
   976  				clsa.Type = &typeVar
   977  			}
   978  		}
   979  	}
   980  
   981  	return nil
   982  }
   983  
   984  // ComponentLinkedStorageAccountsPatch an Application Insights component linked storage accounts patch
   985  type ComponentLinkedStorageAccountsPatch struct {
   986  	// LinkedStorageAccountsProperties - The properties of the linked storage accounts.
   987  	*LinkedStorageAccountsProperties `json:"properties,omitempty"`
   988  }
   989  
   990  // MarshalJSON is the custom marshaler for ComponentLinkedStorageAccountsPatch.
   991  func (clsap ComponentLinkedStorageAccountsPatch) MarshalJSON() ([]byte, error) {
   992  	objectMap := make(map[string]interface{})
   993  	if clsap.LinkedStorageAccountsProperties != nil {
   994  		objectMap["properties"] = clsap.LinkedStorageAccountsProperties
   995  	}
   996  	return json.Marshal(objectMap)
   997  }
   998  
   999  // UnmarshalJSON is the custom unmarshaler for ComponentLinkedStorageAccountsPatch struct.
  1000  func (clsap *ComponentLinkedStorageAccountsPatch) UnmarshalJSON(body []byte) error {
  1001  	var m map[string]*json.RawMessage
  1002  	err := json.Unmarshal(body, &m)
  1003  	if err != nil {
  1004  		return err
  1005  	}
  1006  	for k, v := range m {
  1007  		switch k {
  1008  		case "properties":
  1009  			if v != nil {
  1010  				var linkedStorageAccountsProperties LinkedStorageAccountsProperties
  1011  				err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
  1012  				if err != nil {
  1013  					return err
  1014  				}
  1015  				clsap.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
  1016  			}
  1017  		}
  1018  	}
  1019  
  1020  	return nil
  1021  }
  1022  
  1023  // ComponentPurgeBody describes the body of a purge request for an App Insights component
  1024  type ComponentPurgeBody struct {
  1025  	// Table - Table from which to purge data.
  1026  	Table *string `json:"table,omitempty"`
  1027  	// Filters - The set of columns and filters (queries) to run over them to purge the resulting data.
  1028  	Filters *[]ComponentPurgeBodyFilters `json:"filters,omitempty"`
  1029  }
  1030  
  1031  // ComponentPurgeBodyFilters user-defined filters to return data which will be purged from the table.
  1032  type ComponentPurgeBodyFilters struct {
  1033  	// Column - The column of the table over which the given query should run
  1034  	Column *string `json:"column,omitempty"`
  1035  	// 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.
  1036  	Operator *string `json:"operator,omitempty"`
  1037  	// 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.
  1038  	Value interface{} `json:"value,omitempty"`
  1039  	// Key - When filtering over custom dimensions, this key will be used as the name of the custom dimension.
  1040  	Key *string `json:"key,omitempty"`
  1041  }
  1042  
  1043  // ComponentPurgeResponse response containing operationId for a specific purge action.
  1044  type ComponentPurgeResponse struct {
  1045  	autorest.Response `json:"-"`
  1046  	// OperationID - Id to use when querying for status for a particular purge operation.
  1047  	OperationID *string `json:"operationId,omitempty"`
  1048  }
  1049  
  1050  // ComponentPurgeStatusResponse response containing status for a specific purge operation.
  1051  type ComponentPurgeStatusResponse struct {
  1052  	autorest.Response `json:"-"`
  1053  	// Status - Status of the operation represented by the requested Id. Possible values include: 'PurgeStatePending', 'PurgeStateCompleted'
  1054  	Status PurgeState `json:"status,omitempty"`
  1055  }
  1056  
  1057  // ComponentsResource an azure resource object
  1058  type ComponentsResource struct {
  1059  	// ID - READ-ONLY; Azure resource Id
  1060  	ID *string `json:"id,omitempty"`
  1061  	// Name - READ-ONLY; Azure resource name
  1062  	Name *string `json:"name,omitempty"`
  1063  	// Type - READ-ONLY; Azure resource type
  1064  	Type *string `json:"type,omitempty"`
  1065  	// Location - Resource location
  1066  	Location *string `json:"location,omitempty"`
  1067  	// Tags - Resource tags
  1068  	Tags map[string]*string `json:"tags"`
  1069  }
  1070  
  1071  // MarshalJSON is the custom marshaler for ComponentsResource.
  1072  func (cr ComponentsResource) MarshalJSON() ([]byte, error) {
  1073  	objectMap := make(map[string]interface{})
  1074  	if cr.Location != nil {
  1075  		objectMap["location"] = cr.Location
  1076  	}
  1077  	if cr.Tags != nil {
  1078  		objectMap["tags"] = cr.Tags
  1079  	}
  1080  	return json.Marshal(objectMap)
  1081  }
  1082  
  1083  // ErrorDefinition error definition.
  1084  type ErrorDefinition struct {
  1085  	// Code - READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
  1086  	Code *string `json:"code,omitempty"`
  1087  	// Message - READ-ONLY; Description of the error.
  1088  	Message *string `json:"message,omitempty"`
  1089  	// Innererror - READ-ONLY; Internal error details.
  1090  	Innererror interface{} `json:"innererror,omitempty"`
  1091  }
  1092  
  1093  // MarshalJSON is the custom marshaler for ErrorDefinition.
  1094  func (ed ErrorDefinition) MarshalJSON() ([]byte, error) {
  1095  	objectMap := make(map[string]interface{})
  1096  	return json.Marshal(objectMap)
  1097  }
  1098  
  1099  // ErrorResponse error response indicates Insights service is not able to process the incoming request. The
  1100  // reason is provided in the error message.
  1101  type ErrorResponse struct {
  1102  	// Code - Error code.
  1103  	Code *string `json:"code,omitempty"`
  1104  	// Message - Error message indicating why the operation failed.
  1105  	Message *string `json:"message,omitempty"`
  1106  }
  1107  
  1108  // ErrorResponseLinkedStorage ...
  1109  type ErrorResponseLinkedStorage struct {
  1110  	// Error - Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.
  1111  	Error *ErrorResponseLinkedStorageError `json:"error,omitempty"`
  1112  }
  1113  
  1114  // ErrorResponseLinkedStorageError error response indicates Insights service is not able to process the
  1115  // incoming request. The reason is provided in the error message.
  1116  type ErrorResponseLinkedStorageError struct {
  1117  	// Code - READ-ONLY; Error code.
  1118  	Code *string `json:"code,omitempty"`
  1119  	// Message - READ-ONLY; Error message indicating why the operation failed.
  1120  	Message *string `json:"message,omitempty"`
  1121  }
  1122  
  1123  // MarshalJSON is the custom marshaler for ErrorResponseLinkedStorageError.
  1124  func (erls ErrorResponseLinkedStorageError) MarshalJSON() ([]byte, error) {
  1125  	objectMap := make(map[string]interface{})
  1126  	return json.Marshal(objectMap)
  1127  }
  1128  
  1129  // InnerError inner error
  1130  type InnerError struct {
  1131  	// Diagnosticcontext - Provides correlation for request
  1132  	Diagnosticcontext *string `json:"diagnosticcontext,omitempty"`
  1133  	// Time - Request time
  1134  	Time *date.Time `json:"time,omitempty"`
  1135  }
  1136  
  1137  // InnerErrorTrace error details
  1138  type InnerErrorTrace struct {
  1139  	// Trace - READ-ONLY; detailed error trace
  1140  	Trace *[]string `json:"trace,omitempty"`
  1141  }
  1142  
  1143  // MarshalJSON is the custom marshaler for InnerErrorTrace.
  1144  func (iet InnerErrorTrace) MarshalJSON() ([]byte, error) {
  1145  	objectMap := make(map[string]interface{})
  1146  	return json.Marshal(objectMap)
  1147  }
  1148  
  1149  // LinkedStorageAccountsProperties an Application Insights component linked storage account
  1150  type LinkedStorageAccountsProperties struct {
  1151  	// LinkedStorageAccount - Linked storage account resource ID
  1152  	LinkedStorageAccount *string `json:"linkedStorageAccount,omitempty"`
  1153  }
  1154  
  1155  // ListAnnotation ...
  1156  type ListAnnotation struct {
  1157  	autorest.Response `json:"-"`
  1158  	Value             *[]Annotation `json:"value,omitempty"`
  1159  }
  1160  
  1161  // ListApplicationInsightsComponentAnalyticsItem ...
  1162  type ListApplicationInsightsComponentAnalyticsItem struct {
  1163  	autorest.Response `json:"-"`
  1164  	Value             *[]ApplicationInsightsComponentAnalyticsItem `json:"value,omitempty"`
  1165  }
  1166  
  1167  // ListApplicationInsightsComponentExportConfiguration ...
  1168  type ListApplicationInsightsComponentExportConfiguration struct {
  1169  	autorest.Response `json:"-"`
  1170  	Value             *[]ApplicationInsightsComponentExportConfiguration `json:"value,omitempty"`
  1171  }
  1172  
  1173  // ListApplicationInsightsComponentFavorite ...
  1174  type ListApplicationInsightsComponentFavorite struct {
  1175  	autorest.Response `json:"-"`
  1176  	Value             *[]ApplicationInsightsComponentFavorite `json:"value,omitempty"`
  1177  }
  1178  
  1179  // ListApplicationInsightsComponentProactiveDetectionConfiguration ...
  1180  type ListApplicationInsightsComponentProactiveDetectionConfiguration struct {
  1181  	autorest.Response `json:"-"`
  1182  	Value             *[]ApplicationInsightsComponentProactiveDetectionConfiguration `json:"value,omitempty"`
  1183  }
  1184  
  1185  // LiveTokenResponse the response to a live token query.
  1186  type LiveTokenResponse struct {
  1187  	autorest.Response `json:"-"`
  1188  	// LiveToken - READ-ONLY; JWT token for accessing live metrics stream data.
  1189  	LiveToken *string `json:"liveToken,omitempty"`
  1190  }
  1191  
  1192  // MarshalJSON is the custom marshaler for LiveTokenResponse.
  1193  func (ltr LiveTokenResponse) MarshalJSON() ([]byte, error) {
  1194  	objectMap := make(map[string]interface{})
  1195  	return json.Marshal(objectMap)
  1196  }
  1197  
  1198  // ManagedServiceIdentity managed service identity (system assigned and/or user assigned identities)
  1199  type ManagedServiceIdentity struct {
  1200  	// PrincipalID - READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
  1201  	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
  1202  	// TenantID - READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
  1203  	TenantID *uuid.UUID `json:"tenantId,omitempty"`
  1204  	// Type - Possible values include: 'ManagedServiceIdentityTypeNone', 'ManagedServiceIdentityTypeSystemAssigned', 'ManagedServiceIdentityTypeUserAssigned', 'ManagedServiceIdentityTypeSystemAssignedUserAssigned'
  1205  	Type                   ManagedServiceIdentityType       `json:"type,omitempty"`
  1206  	UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"`
  1207  }
  1208  
  1209  // MarshalJSON is the custom marshaler for ManagedServiceIdentity.
  1210  func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
  1211  	objectMap := make(map[string]interface{})
  1212  	if msi.Type != "" {
  1213  		objectMap["type"] = msi.Type
  1214  	}
  1215  	if msi.UserAssignedIdentities != nil {
  1216  		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
  1217  	}
  1218  	return json.Marshal(objectMap)
  1219  }
  1220  
  1221  // MyWorkbook an Application Insights private workbook definition.
  1222  type MyWorkbook struct {
  1223  	autorest.Response `json:"-"`
  1224  	// Kind - The kind of workbook. Choices are user and shared. Possible values include: 'KindUser', 'KindShared'
  1225  	Kind Kind `json:"kind,omitempty"`
  1226  	// MyWorkbookProperties - Metadata describing a workbook for an Azure resource.
  1227  	*MyWorkbookProperties `json:"properties,omitempty"`
  1228  	// SystemData - READ-ONLY
  1229  	SystemData *SystemData `json:"systemData,omitempty"`
  1230  	// Identity - Identity used for BYOS
  1231  	Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"`
  1232  	// ID - Azure resource Id
  1233  	ID *string `json:"id,omitempty"`
  1234  	// Name - Azure resource name
  1235  	Name *string `json:"name,omitempty"`
  1236  	// Type - Azure resource type
  1237  	Type *string `json:"type,omitempty"`
  1238  	// Location - Resource location
  1239  	Location *string `json:"location,omitempty"`
  1240  	// Tags - Resource tags
  1241  	Tags map[string]*string `json:"tags"`
  1242  	// Etag - Resource etag
  1243  	Etag map[string]*string `json:"etag"`
  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.Identity != nil {
  1256  		objectMap["identity"] = mw.Identity
  1257  	}
  1258  	if mw.ID != nil {
  1259  		objectMap["id"] = mw.ID
  1260  	}
  1261  	if mw.Name != nil {
  1262  		objectMap["name"] = mw.Name
  1263  	}
  1264  	if mw.Type != nil {
  1265  		objectMap["type"] = mw.Type
  1266  	}
  1267  	if mw.Location != nil {
  1268  		objectMap["location"] = mw.Location
  1269  	}
  1270  	if mw.Tags != nil {
  1271  		objectMap["tags"] = mw.Tags
  1272  	}
  1273  	if mw.Etag != nil {
  1274  		objectMap["etag"] = mw.Etag
  1275  	}
  1276  	return json.Marshal(objectMap)
  1277  }
  1278  
  1279  // UnmarshalJSON is the custom unmarshaler for MyWorkbook struct.
  1280  func (mw *MyWorkbook) UnmarshalJSON(body []byte) error {
  1281  	var m map[string]*json.RawMessage
  1282  	err := json.Unmarshal(body, &m)
  1283  	if err != nil {
  1284  		return err
  1285  	}
  1286  	for k, v := range m {
  1287  		switch k {
  1288  		case "kind":
  1289  			if v != nil {
  1290  				var kind Kind
  1291  				err = json.Unmarshal(*v, &kind)
  1292  				if err != nil {
  1293  					return err
  1294  				}
  1295  				mw.Kind = kind
  1296  			}
  1297  		case "properties":
  1298  			if v != nil {
  1299  				var myWorkbookProperties MyWorkbookProperties
  1300  				err = json.Unmarshal(*v, &myWorkbookProperties)
  1301  				if err != nil {
  1302  					return err
  1303  				}
  1304  				mw.MyWorkbookProperties = &myWorkbookProperties
  1305  			}
  1306  		case "systemData":
  1307  			if v != nil {
  1308  				var systemData SystemData
  1309  				err = json.Unmarshal(*v, &systemData)
  1310  				if err != nil {
  1311  					return err
  1312  				}
  1313  				mw.SystemData = &systemData
  1314  			}
  1315  		case "identity":
  1316  			if v != nil {
  1317  				var identity MyWorkbookManagedIdentity
  1318  				err = json.Unmarshal(*v, &identity)
  1319  				if err != nil {
  1320  					return err
  1321  				}
  1322  				mw.Identity = &identity
  1323  			}
  1324  		case "id":
  1325  			if v != nil {
  1326  				var ID string
  1327  				err = json.Unmarshal(*v, &ID)
  1328  				if err != nil {
  1329  					return err
  1330  				}
  1331  				mw.ID = &ID
  1332  			}
  1333  		case "name":
  1334  			if v != nil {
  1335  				var name string
  1336  				err = json.Unmarshal(*v, &name)
  1337  				if err != nil {
  1338  					return err
  1339  				}
  1340  				mw.Name = &name
  1341  			}
  1342  		case "type":
  1343  			if v != nil {
  1344  				var typeVar string
  1345  				err = json.Unmarshal(*v, &typeVar)
  1346  				if err != nil {
  1347  					return err
  1348  				}
  1349  				mw.Type = &typeVar
  1350  			}
  1351  		case "location":
  1352  			if v != nil {
  1353  				var location string
  1354  				err = json.Unmarshal(*v, &location)
  1355  				if err != nil {
  1356  					return err
  1357  				}
  1358  				mw.Location = &location
  1359  			}
  1360  		case "tags":
  1361  			if v != nil {
  1362  				var tags map[string]*string
  1363  				err = json.Unmarshal(*v, &tags)
  1364  				if err != nil {
  1365  					return err
  1366  				}
  1367  				mw.Tags = tags
  1368  			}
  1369  		case "etag":
  1370  			if v != nil {
  1371  				var etag map[string]*string
  1372  				err = json.Unmarshal(*v, &etag)
  1373  				if err != nil {
  1374  					return err
  1375  				}
  1376  				mw.Etag = etag
  1377  			}
  1378  		}
  1379  	}
  1380  
  1381  	return nil
  1382  }
  1383  
  1384  // MyWorkbookError error response.
  1385  type MyWorkbookError struct {
  1386  	// Error - The error details.
  1387  	Error *ErrorDefinition `json:"error,omitempty"`
  1388  }
  1389  
  1390  // MyWorkbookManagedIdentity customer Managed Identity
  1391  type MyWorkbookManagedIdentity struct {
  1392  	UserAssignedIdentities *MyWorkbookUserAssignedIdentities `json:"userAssignedIdentities,omitempty"`
  1393  	// Type - The identity type. Possible values include: 'TypeUserAssigned', 'TypeNone'
  1394  	Type Type `json:"type,omitempty"`
  1395  }
  1396  
  1397  // MyWorkbookProperties properties that contain a private workbook.
  1398  type MyWorkbookProperties struct {
  1399  	// DisplayName - The user-defined name of the private workbook.
  1400  	DisplayName *string `json:"displayName,omitempty"`
  1401  	// SerializedData - Configuration of this particular private workbook. Configuration data is a string containing valid JSON
  1402  	SerializedData *string `json:"serializedData,omitempty"`
  1403  	// Version - This instance's version of the data model. This can change as new features are added that can be marked private workbook.
  1404  	Version *string `json:"version,omitempty"`
  1405  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this private workbook definition.
  1406  	TimeModified *string `json:"timeModified,omitempty"`
  1407  	// Category - Workbook category, as defined by the user at creation time.
  1408  	Category *string `json:"category,omitempty"`
  1409  	// Tags - A list of 0 or more tags that are associated with this private workbook definition
  1410  	Tags *[]string `json:"tags,omitempty"`
  1411  	// UserID - READ-ONLY; Unique user id of the specific user that owns this private workbook.
  1412  	UserID *string `json:"userId,omitempty"`
  1413  	// SourceID - Optional resourceId for a source resource.
  1414  	SourceID *string `json:"sourceId,omitempty"`
  1415  	// StorageURI - BYOS Storage Account URI
  1416  	StorageURI *string `json:"storageUri,omitempty"`
  1417  }
  1418  
  1419  // MarshalJSON is the custom marshaler for MyWorkbookProperties.
  1420  func (mwp MyWorkbookProperties) MarshalJSON() ([]byte, error) {
  1421  	objectMap := make(map[string]interface{})
  1422  	if mwp.DisplayName != nil {
  1423  		objectMap["displayName"] = mwp.DisplayName
  1424  	}
  1425  	if mwp.SerializedData != nil {
  1426  		objectMap["serializedData"] = mwp.SerializedData
  1427  	}
  1428  	if mwp.Version != nil {
  1429  		objectMap["version"] = mwp.Version
  1430  	}
  1431  	if mwp.Category != nil {
  1432  		objectMap["category"] = mwp.Category
  1433  	}
  1434  	if mwp.Tags != nil {
  1435  		objectMap["tags"] = mwp.Tags
  1436  	}
  1437  	if mwp.SourceID != nil {
  1438  		objectMap["sourceId"] = mwp.SourceID
  1439  	}
  1440  	if mwp.StorageURI != nil {
  1441  		objectMap["storageUri"] = mwp.StorageURI
  1442  	}
  1443  	return json.Marshal(objectMap)
  1444  }
  1445  
  1446  // MyWorkbookResource an azure resource object
  1447  type MyWorkbookResource struct {
  1448  	// Identity - Identity used for BYOS
  1449  	Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"`
  1450  	// ID - Azure resource Id
  1451  	ID *string `json:"id,omitempty"`
  1452  	// Name - Azure resource name
  1453  	Name *string `json:"name,omitempty"`
  1454  	// Type - Azure resource type
  1455  	Type *string `json:"type,omitempty"`
  1456  	// Location - Resource location
  1457  	Location *string `json:"location,omitempty"`
  1458  	// Tags - Resource tags
  1459  	Tags map[string]*string `json:"tags"`
  1460  	// Etag - Resource etag
  1461  	Etag map[string]*string `json:"etag"`
  1462  }
  1463  
  1464  // MarshalJSON is the custom marshaler for MyWorkbookResource.
  1465  func (mwr MyWorkbookResource) MarshalJSON() ([]byte, error) {
  1466  	objectMap := make(map[string]interface{})
  1467  	if mwr.Identity != nil {
  1468  		objectMap["identity"] = mwr.Identity
  1469  	}
  1470  	if mwr.ID != nil {
  1471  		objectMap["id"] = mwr.ID
  1472  	}
  1473  	if mwr.Name != nil {
  1474  		objectMap["name"] = mwr.Name
  1475  	}
  1476  	if mwr.Type != nil {
  1477  		objectMap["type"] = mwr.Type
  1478  	}
  1479  	if mwr.Location != nil {
  1480  		objectMap["location"] = mwr.Location
  1481  	}
  1482  	if mwr.Tags != nil {
  1483  		objectMap["tags"] = mwr.Tags
  1484  	}
  1485  	if mwr.Etag != nil {
  1486  		objectMap["etag"] = mwr.Etag
  1487  	}
  1488  	return json.Marshal(objectMap)
  1489  }
  1490  
  1491  // MyWorkbooksListResult workbook list result.
  1492  type MyWorkbooksListResult struct {
  1493  	autorest.Response `json:"-"`
  1494  	// Value - READ-ONLY; An array of private workbooks.
  1495  	Value    *[]MyWorkbook `json:"value,omitempty"`
  1496  	NextLink *string       `json:"nextLink,omitempty"`
  1497  }
  1498  
  1499  // MarshalJSON is the custom marshaler for MyWorkbooksListResult.
  1500  func (mwlr MyWorkbooksListResult) MarshalJSON() ([]byte, error) {
  1501  	objectMap := make(map[string]interface{})
  1502  	if mwlr.NextLink != nil {
  1503  		objectMap["nextLink"] = mwlr.NextLink
  1504  	}
  1505  	return json.Marshal(objectMap)
  1506  }
  1507  
  1508  // MyWorkbooksListResultIterator provides access to a complete listing of MyWorkbook values.
  1509  type MyWorkbooksListResultIterator struct {
  1510  	i    int
  1511  	page MyWorkbooksListResultPage
  1512  }
  1513  
  1514  // NextWithContext advances to the next value.  If there was an error making
  1515  // the request the iterator does not advance and the error is returned.
  1516  func (iter *MyWorkbooksListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1517  	if tracing.IsEnabled() {
  1518  		ctx = tracing.StartSpan(ctx, fqdn+"/MyWorkbooksListResultIterator.NextWithContext")
  1519  		defer func() {
  1520  			sc := -1
  1521  			if iter.Response().Response.Response != nil {
  1522  				sc = iter.Response().Response.Response.StatusCode
  1523  			}
  1524  			tracing.EndSpan(ctx, sc, err)
  1525  		}()
  1526  	}
  1527  	iter.i++
  1528  	if iter.i < len(iter.page.Values()) {
  1529  		return nil
  1530  	}
  1531  	err = iter.page.NextWithContext(ctx)
  1532  	if err != nil {
  1533  		iter.i--
  1534  		return err
  1535  	}
  1536  	iter.i = 0
  1537  	return nil
  1538  }
  1539  
  1540  // Next advances to the next value.  If there was an error making
  1541  // the request the iterator does not advance and the error is returned.
  1542  // Deprecated: Use NextWithContext() instead.
  1543  func (iter *MyWorkbooksListResultIterator) Next() error {
  1544  	return iter.NextWithContext(context.Background())
  1545  }
  1546  
  1547  // NotDone returns true if the enumeration should be started or is not yet complete.
  1548  func (iter MyWorkbooksListResultIterator) NotDone() bool {
  1549  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1550  }
  1551  
  1552  // Response returns the raw server response from the last page request.
  1553  func (iter MyWorkbooksListResultIterator) Response() MyWorkbooksListResult {
  1554  	return iter.page.Response()
  1555  }
  1556  
  1557  // Value returns the current value or a zero-initialized value if the
  1558  // iterator has advanced beyond the end of the collection.
  1559  func (iter MyWorkbooksListResultIterator) Value() MyWorkbook {
  1560  	if !iter.page.NotDone() {
  1561  		return MyWorkbook{}
  1562  	}
  1563  	return iter.page.Values()[iter.i]
  1564  }
  1565  
  1566  // Creates a new instance of the MyWorkbooksListResultIterator type.
  1567  func NewMyWorkbooksListResultIterator(page MyWorkbooksListResultPage) MyWorkbooksListResultIterator {
  1568  	return MyWorkbooksListResultIterator{page: page}
  1569  }
  1570  
  1571  // IsEmpty returns true if the ListResult contains no values.
  1572  func (mwlr MyWorkbooksListResult) IsEmpty() bool {
  1573  	return mwlr.Value == nil || len(*mwlr.Value) == 0
  1574  }
  1575  
  1576  // hasNextLink returns true if the NextLink is not empty.
  1577  func (mwlr MyWorkbooksListResult) hasNextLink() bool {
  1578  	return mwlr.NextLink != nil && len(*mwlr.NextLink) != 0
  1579  }
  1580  
  1581  // myWorkbooksListResultPreparer prepares a request to retrieve the next set of results.
  1582  // It returns nil if no more results exist.
  1583  func (mwlr MyWorkbooksListResult) myWorkbooksListResultPreparer(ctx context.Context) (*http.Request, error) {
  1584  	if !mwlr.hasNextLink() {
  1585  		return nil, nil
  1586  	}
  1587  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1588  		autorest.AsJSON(),
  1589  		autorest.AsGet(),
  1590  		autorest.WithBaseURL(to.String(mwlr.NextLink)))
  1591  }
  1592  
  1593  // MyWorkbooksListResultPage contains a page of MyWorkbook values.
  1594  type MyWorkbooksListResultPage struct {
  1595  	fn   func(context.Context, MyWorkbooksListResult) (MyWorkbooksListResult, error)
  1596  	mwlr MyWorkbooksListResult
  1597  }
  1598  
  1599  // NextWithContext advances to the next page of values.  If there was an error making
  1600  // the request the page does not advance and the error is returned.
  1601  func (page *MyWorkbooksListResultPage) NextWithContext(ctx context.Context) (err error) {
  1602  	if tracing.IsEnabled() {
  1603  		ctx = tracing.StartSpan(ctx, fqdn+"/MyWorkbooksListResultPage.NextWithContext")
  1604  		defer func() {
  1605  			sc := -1
  1606  			if page.Response().Response.Response != nil {
  1607  				sc = page.Response().Response.Response.StatusCode
  1608  			}
  1609  			tracing.EndSpan(ctx, sc, err)
  1610  		}()
  1611  	}
  1612  	for {
  1613  		next, err := page.fn(ctx, page.mwlr)
  1614  		if err != nil {
  1615  			return err
  1616  		}
  1617  		page.mwlr = next
  1618  		if !next.hasNextLink() || !next.IsEmpty() {
  1619  			break
  1620  		}
  1621  	}
  1622  	return nil
  1623  }
  1624  
  1625  // Next advances to the next page of values.  If there was an error making
  1626  // the request the page does not advance and the error is returned.
  1627  // Deprecated: Use NextWithContext() instead.
  1628  func (page *MyWorkbooksListResultPage) Next() error {
  1629  	return page.NextWithContext(context.Background())
  1630  }
  1631  
  1632  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1633  func (page MyWorkbooksListResultPage) NotDone() bool {
  1634  	return !page.mwlr.IsEmpty()
  1635  }
  1636  
  1637  // Response returns the raw server response from the last page request.
  1638  func (page MyWorkbooksListResultPage) Response() MyWorkbooksListResult {
  1639  	return page.mwlr
  1640  }
  1641  
  1642  // Values returns the slice of values for the current page or nil if there are no values.
  1643  func (page MyWorkbooksListResultPage) Values() []MyWorkbook {
  1644  	if page.mwlr.IsEmpty() {
  1645  		return nil
  1646  	}
  1647  	return *page.mwlr.Value
  1648  }
  1649  
  1650  // Creates a new instance of the MyWorkbooksListResultPage type.
  1651  func NewMyWorkbooksListResultPage(cur MyWorkbooksListResult, getNextPage func(context.Context, MyWorkbooksListResult) (MyWorkbooksListResult, error)) MyWorkbooksListResultPage {
  1652  	return MyWorkbooksListResultPage{
  1653  		fn:   getNextPage,
  1654  		mwlr: cur,
  1655  	}
  1656  }
  1657  
  1658  // MyWorkbookUserAssignedIdentities customer Managed Identity
  1659  type MyWorkbookUserAssignedIdentities struct {
  1660  	// PrincipalID - READ-ONLY; The principal ID of resource identity.
  1661  	PrincipalID *string `json:"principalId,omitempty"`
  1662  	// TenantID - READ-ONLY; The tenant ID of resource.
  1663  	TenantID *string `json:"tenantId,omitempty"`
  1664  }
  1665  
  1666  // MarshalJSON is the custom marshaler for MyWorkbookUserAssignedIdentities.
  1667  func (mwuai MyWorkbookUserAssignedIdentities) MarshalJSON() ([]byte, error) {
  1668  	objectMap := make(map[string]interface{})
  1669  	return json.Marshal(objectMap)
  1670  }
  1671  
  1672  // Operation CDN REST API operation
  1673  type Operation struct {
  1674  	// Name - Operation name: {provider}/{resource}/{operation}
  1675  	Name *string `json:"name,omitempty"`
  1676  	// Display - The object that represents the operation.
  1677  	Display *OperationDisplay `json:"display,omitempty"`
  1678  }
  1679  
  1680  // OperationDisplay the object that represents the operation.
  1681  type OperationDisplay struct {
  1682  	// Provider - Service provider: Microsoft.Cdn
  1683  	Provider *string `json:"provider,omitempty"`
  1684  	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
  1685  	Resource *string `json:"resource,omitempty"`
  1686  	// Operation - Operation type: Read, write, delete, etc.
  1687  	Operation *string `json:"operation,omitempty"`
  1688  }
  1689  
  1690  // OperationInfo information about an operation
  1691  type OperationInfo struct {
  1692  	// Provider - Name of the provider
  1693  	Provider *string `json:"provider,omitempty"`
  1694  	// Resource - Name of the resource type
  1695  	Resource *string `json:"resource,omitempty"`
  1696  	// Operation - Name of the operation
  1697  	Operation *string `json:"operation,omitempty"`
  1698  	// Description - Description of the operation
  1699  	Description *string `json:"description,omitempty"`
  1700  }
  1701  
  1702  // OperationListResult result of the request to list CDN operations. It contains a list of operations and a
  1703  // URL link to get the next set of results.
  1704  type OperationListResult struct {
  1705  	autorest.Response `json:"-"`
  1706  	// Value - List of CDN operations supported by the CDN resource provider.
  1707  	Value *[]Operation `json:"value,omitempty"`
  1708  	// NextLink - URL to get the next set of operation list results if there are any.
  1709  	NextLink *string `json:"nextLink,omitempty"`
  1710  }
  1711  
  1712  // OperationListResultIterator provides access to a complete listing of Operation values.
  1713  type OperationListResultIterator struct {
  1714  	i    int
  1715  	page OperationListResultPage
  1716  }
  1717  
  1718  // NextWithContext advances to the next value.  If there was an error making
  1719  // the request the iterator does not advance and the error is returned.
  1720  func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1721  	if tracing.IsEnabled() {
  1722  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
  1723  		defer func() {
  1724  			sc := -1
  1725  			if iter.Response().Response.Response != nil {
  1726  				sc = iter.Response().Response.Response.StatusCode
  1727  			}
  1728  			tracing.EndSpan(ctx, sc, err)
  1729  		}()
  1730  	}
  1731  	iter.i++
  1732  	if iter.i < len(iter.page.Values()) {
  1733  		return nil
  1734  	}
  1735  	err = iter.page.NextWithContext(ctx)
  1736  	if err != nil {
  1737  		iter.i--
  1738  		return err
  1739  	}
  1740  	iter.i = 0
  1741  	return nil
  1742  }
  1743  
  1744  // Next advances to the next value.  If there was an error making
  1745  // the request the iterator does not advance and the error is returned.
  1746  // Deprecated: Use NextWithContext() instead.
  1747  func (iter *OperationListResultIterator) Next() error {
  1748  	return iter.NextWithContext(context.Background())
  1749  }
  1750  
  1751  // NotDone returns true if the enumeration should be started or is not yet complete.
  1752  func (iter OperationListResultIterator) NotDone() bool {
  1753  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1754  }
  1755  
  1756  // Response returns the raw server response from the last page request.
  1757  func (iter OperationListResultIterator) Response() OperationListResult {
  1758  	return iter.page.Response()
  1759  }
  1760  
  1761  // Value returns the current value or a zero-initialized value if the
  1762  // iterator has advanced beyond the end of the collection.
  1763  func (iter OperationListResultIterator) Value() Operation {
  1764  	if !iter.page.NotDone() {
  1765  		return Operation{}
  1766  	}
  1767  	return iter.page.Values()[iter.i]
  1768  }
  1769  
  1770  // Creates a new instance of the OperationListResultIterator type.
  1771  func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
  1772  	return OperationListResultIterator{page: page}
  1773  }
  1774  
  1775  // IsEmpty returns true if the ListResult contains no values.
  1776  func (olr OperationListResult) IsEmpty() bool {
  1777  	return olr.Value == nil || len(*olr.Value) == 0
  1778  }
  1779  
  1780  // hasNextLink returns true if the NextLink is not empty.
  1781  func (olr OperationListResult) hasNextLink() bool {
  1782  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  1783  }
  1784  
  1785  // operationListResultPreparer prepares a request to retrieve the next set of results.
  1786  // It returns nil if no more results exist.
  1787  func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
  1788  	if !olr.hasNextLink() {
  1789  		return nil, nil
  1790  	}
  1791  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1792  		autorest.AsJSON(),
  1793  		autorest.AsGet(),
  1794  		autorest.WithBaseURL(to.String(olr.NextLink)))
  1795  }
  1796  
  1797  // OperationListResultPage contains a page of Operation values.
  1798  type OperationListResultPage struct {
  1799  	fn  func(context.Context, OperationListResult) (OperationListResult, error)
  1800  	olr OperationListResult
  1801  }
  1802  
  1803  // NextWithContext advances to the next page of values.  If there was an error making
  1804  // the request the page does not advance and the error is returned.
  1805  func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
  1806  	if tracing.IsEnabled() {
  1807  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
  1808  		defer func() {
  1809  			sc := -1
  1810  			if page.Response().Response.Response != nil {
  1811  				sc = page.Response().Response.Response.StatusCode
  1812  			}
  1813  			tracing.EndSpan(ctx, sc, err)
  1814  		}()
  1815  	}
  1816  	for {
  1817  		next, err := page.fn(ctx, page.olr)
  1818  		if err != nil {
  1819  			return err
  1820  		}
  1821  		page.olr = next
  1822  		if !next.hasNextLink() || !next.IsEmpty() {
  1823  			break
  1824  		}
  1825  	}
  1826  	return nil
  1827  }
  1828  
  1829  // Next advances to the next page of values.  If there was an error making
  1830  // the request the page does not advance and the error is returned.
  1831  // Deprecated: Use NextWithContext() instead.
  1832  func (page *OperationListResultPage) Next() error {
  1833  	return page.NextWithContext(context.Background())
  1834  }
  1835  
  1836  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1837  func (page OperationListResultPage) NotDone() bool {
  1838  	return !page.olr.IsEmpty()
  1839  }
  1840  
  1841  // Response returns the raw server response from the last page request.
  1842  func (page OperationListResultPage) Response() OperationListResult {
  1843  	return page.olr
  1844  }
  1845  
  1846  // Values returns the slice of values for the current page or nil if there are no values.
  1847  func (page OperationListResultPage) Values() []Operation {
  1848  	if page.olr.IsEmpty() {
  1849  		return nil
  1850  	}
  1851  	return *page.olr.Value
  1852  }
  1853  
  1854  // Creates a new instance of the OperationListResultPage type.
  1855  func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
  1856  	return OperationListResultPage{
  1857  		fn:  getNextPage,
  1858  		olr: cur,
  1859  	}
  1860  }
  1861  
  1862  // OperationLive represents an operation returned by the GetOperations request
  1863  type OperationLive struct {
  1864  	// Name - Name of the operation
  1865  	Name *string `json:"name,omitempty"`
  1866  	// Display - Display name of the operation
  1867  	Display *OperationInfo `json:"display,omitempty"`
  1868  	// Origin - Origin of the operation
  1869  	Origin *string `json:"origin,omitempty"`
  1870  	// Properties - Properties of the operation
  1871  	Properties interface{} `json:"properties,omitempty"`
  1872  }
  1873  
  1874  // OperationsListResult result of the List Operations operation
  1875  type OperationsListResult struct {
  1876  	autorest.Response `json:"-"`
  1877  	// Value - A collection of operations
  1878  	Value *[]OperationLive `json:"value,omitempty"`
  1879  	// NextLink - URL to get the next set of operation list results if there are any.
  1880  	NextLink *string `json:"nextLink,omitempty"`
  1881  }
  1882  
  1883  // OperationsListResultIterator provides access to a complete listing of OperationLive values.
  1884  type OperationsListResultIterator struct {
  1885  	i    int
  1886  	page OperationsListResultPage
  1887  }
  1888  
  1889  // NextWithContext advances to the next value.  If there was an error making
  1890  // the request the iterator does not advance and the error is returned.
  1891  func (iter *OperationsListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1892  	if tracing.IsEnabled() {
  1893  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultIterator.NextWithContext")
  1894  		defer func() {
  1895  			sc := -1
  1896  			if iter.Response().Response.Response != nil {
  1897  				sc = iter.Response().Response.Response.StatusCode
  1898  			}
  1899  			tracing.EndSpan(ctx, sc, err)
  1900  		}()
  1901  	}
  1902  	iter.i++
  1903  	if iter.i < len(iter.page.Values()) {
  1904  		return nil
  1905  	}
  1906  	err = iter.page.NextWithContext(ctx)
  1907  	if err != nil {
  1908  		iter.i--
  1909  		return err
  1910  	}
  1911  	iter.i = 0
  1912  	return nil
  1913  }
  1914  
  1915  // Next advances to the next value.  If there was an error making
  1916  // the request the iterator does not advance and the error is returned.
  1917  // Deprecated: Use NextWithContext() instead.
  1918  func (iter *OperationsListResultIterator) Next() error {
  1919  	return iter.NextWithContext(context.Background())
  1920  }
  1921  
  1922  // NotDone returns true if the enumeration should be started or is not yet complete.
  1923  func (iter OperationsListResultIterator) NotDone() bool {
  1924  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1925  }
  1926  
  1927  // Response returns the raw server response from the last page request.
  1928  func (iter OperationsListResultIterator) Response() OperationsListResult {
  1929  	return iter.page.Response()
  1930  }
  1931  
  1932  // Value returns the current value or a zero-initialized value if the
  1933  // iterator has advanced beyond the end of the collection.
  1934  func (iter OperationsListResultIterator) Value() OperationLive {
  1935  	if !iter.page.NotDone() {
  1936  		return OperationLive{}
  1937  	}
  1938  	return iter.page.Values()[iter.i]
  1939  }
  1940  
  1941  // Creates a new instance of the OperationsListResultIterator type.
  1942  func NewOperationsListResultIterator(page OperationsListResultPage) OperationsListResultIterator {
  1943  	return OperationsListResultIterator{page: page}
  1944  }
  1945  
  1946  // IsEmpty returns true if the ListResult contains no values.
  1947  func (olr OperationsListResult) IsEmpty() bool {
  1948  	return olr.Value == nil || len(*olr.Value) == 0
  1949  }
  1950  
  1951  // hasNextLink returns true if the NextLink is not empty.
  1952  func (olr OperationsListResult) hasNextLink() bool {
  1953  	return olr.NextLink != nil && len(*olr.NextLink) != 0
  1954  }
  1955  
  1956  // operationsListResultPreparer prepares a request to retrieve the next set of results.
  1957  // It returns nil if no more results exist.
  1958  func (olr OperationsListResult) operationsListResultPreparer(ctx context.Context) (*http.Request, error) {
  1959  	if !olr.hasNextLink() {
  1960  		return nil, nil
  1961  	}
  1962  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1963  		autorest.AsJSON(),
  1964  		autorest.AsGet(),
  1965  		autorest.WithBaseURL(to.String(olr.NextLink)))
  1966  }
  1967  
  1968  // OperationsListResultPage contains a page of OperationLive values.
  1969  type OperationsListResultPage struct {
  1970  	fn  func(context.Context, OperationsListResult) (OperationsListResult, error)
  1971  	olr OperationsListResult
  1972  }
  1973  
  1974  // NextWithContext advances to the next page of values.  If there was an error making
  1975  // the request the page does not advance and the error is returned.
  1976  func (page *OperationsListResultPage) NextWithContext(ctx context.Context) (err error) {
  1977  	if tracing.IsEnabled() {
  1978  		ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultPage.NextWithContext")
  1979  		defer func() {
  1980  			sc := -1
  1981  			if page.Response().Response.Response != nil {
  1982  				sc = page.Response().Response.Response.StatusCode
  1983  			}
  1984  			tracing.EndSpan(ctx, sc, err)
  1985  		}()
  1986  	}
  1987  	for {
  1988  		next, err := page.fn(ctx, page.olr)
  1989  		if err != nil {
  1990  			return err
  1991  		}
  1992  		page.olr = next
  1993  		if !next.hasNextLink() || !next.IsEmpty() {
  1994  			break
  1995  		}
  1996  	}
  1997  	return nil
  1998  }
  1999  
  2000  // Next advances to the next page of values.  If there was an error making
  2001  // the request the page does not advance and the error is returned.
  2002  // Deprecated: Use NextWithContext() instead.
  2003  func (page *OperationsListResultPage) Next() error {
  2004  	return page.NextWithContext(context.Background())
  2005  }
  2006  
  2007  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2008  func (page OperationsListResultPage) NotDone() bool {
  2009  	return !page.olr.IsEmpty()
  2010  }
  2011  
  2012  // Response returns the raw server response from the last page request.
  2013  func (page OperationsListResultPage) Response() OperationsListResult {
  2014  	return page.olr
  2015  }
  2016  
  2017  // Values returns the slice of values for the current page or nil if there are no values.
  2018  func (page OperationsListResultPage) Values() []OperationLive {
  2019  	if page.olr.IsEmpty() {
  2020  		return nil
  2021  	}
  2022  	return *page.olr.Value
  2023  }
  2024  
  2025  // Creates a new instance of the OperationsListResultPage type.
  2026  func NewOperationsListResultPage(cur OperationsListResult, getNextPage func(context.Context, OperationsListResult) (OperationsListResult, error)) OperationsListResultPage {
  2027  	return OperationsListResultPage{
  2028  		fn:  getNextPage,
  2029  		olr: cur,
  2030  	}
  2031  }
  2032  
  2033  // PrivateLinkScopedResource the private link scope resource reference.
  2034  type PrivateLinkScopedResource struct {
  2035  	// ResourceID - The full resource Id of the private link scope resource.
  2036  	ResourceID *string `json:"ResourceId,omitempty"`
  2037  	// ScopeID - The private link scope unique Identifier.
  2038  	ScopeID *string `json:"ScopeId,omitempty"`
  2039  }
  2040  
  2041  // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
  2042  // have tags and a location
  2043  type ProxyResource struct {
  2044  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2045  	ID *string `json:"id,omitempty"`
  2046  	// Name - READ-ONLY; The name of the resource
  2047  	Name *string `json:"name,omitempty"`
  2048  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2049  	Type *string `json:"type,omitempty"`
  2050  }
  2051  
  2052  // MarshalJSON is the custom marshaler for ProxyResource.
  2053  func (pr ProxyResource) MarshalJSON() ([]byte, error) {
  2054  	objectMap := make(map[string]interface{})
  2055  	return json.Marshal(objectMap)
  2056  }
  2057  
  2058  // Resource common fields that are returned in the response for all Azure Resource Manager resources
  2059  type Resource struct {
  2060  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2061  	ID *string `json:"id,omitempty"`
  2062  	// Name - READ-ONLY; The name of the resource
  2063  	Name *string `json:"name,omitempty"`
  2064  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2065  	Type *string `json:"type,omitempty"`
  2066  }
  2067  
  2068  // MarshalJSON is the custom marshaler for Resource.
  2069  func (r Resource) MarshalJSON() ([]byte, error) {
  2070  	objectMap := make(map[string]interface{})
  2071  	return json.Marshal(objectMap)
  2072  }
  2073  
  2074  // SystemData metadata pertaining to creation and last modification of the resource.
  2075  type SystemData struct {
  2076  	// CreatedBy - The identity that created the resource.
  2077  	CreatedBy *string `json:"createdBy,omitempty"`
  2078  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  2079  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
  2080  	// CreatedAt - The timestamp of resource creation (UTC).
  2081  	CreatedAt *date.Time `json:"createdAt,omitempty"`
  2082  	// LastModifiedBy - The identity that last modified the resource.
  2083  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
  2084  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  2085  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
  2086  	// LastModifiedAt - The timestamp of resource last modification (UTC)
  2087  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
  2088  }
  2089  
  2090  // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a
  2091  // WebTest instance.
  2092  type TagsResource struct {
  2093  	// Tags - Resource tags
  2094  	Tags map[string]*string `json:"tags"`
  2095  }
  2096  
  2097  // MarshalJSON is the custom marshaler for TagsResource.
  2098  func (tr TagsResource) MarshalJSON() ([]byte, error) {
  2099  	objectMap := make(map[string]interface{})
  2100  	if tr.Tags != nil {
  2101  		objectMap["tags"] = tr.Tags
  2102  	}
  2103  	return json.Marshal(objectMap)
  2104  }
  2105  
  2106  // TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
  2107  // which has 'tags' and a 'location'
  2108  type TrackedResource struct {
  2109  	// Tags - Resource tags.
  2110  	Tags map[string]*string `json:"tags"`
  2111  	// Location - The geo-location where the resource lives
  2112  	Location *string `json:"location,omitempty"`
  2113  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2114  	ID *string `json:"id,omitempty"`
  2115  	// Name - READ-ONLY; The name of the resource
  2116  	Name *string `json:"name,omitempty"`
  2117  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2118  	Type *string `json:"type,omitempty"`
  2119  }
  2120  
  2121  // MarshalJSON is the custom marshaler for TrackedResource.
  2122  func (tr TrackedResource) MarshalJSON() ([]byte, error) {
  2123  	objectMap := make(map[string]interface{})
  2124  	if tr.Tags != nil {
  2125  		objectMap["tags"] = tr.Tags
  2126  	}
  2127  	if tr.Location != nil {
  2128  		objectMap["location"] = tr.Location
  2129  	}
  2130  	return json.Marshal(objectMap)
  2131  }
  2132  
  2133  // UserAssignedIdentity user assigned identity properties
  2134  type UserAssignedIdentity struct {
  2135  	// PrincipalID - READ-ONLY; The principal ID of the assigned identity.
  2136  	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
  2137  	// ClientID - READ-ONLY; The client ID of the assigned identity.
  2138  	ClientID *uuid.UUID `json:"clientId,omitempty"`
  2139  }
  2140  
  2141  // MarshalJSON is the custom marshaler for UserAssignedIdentity.
  2142  func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) {
  2143  	objectMap := make(map[string]interface{})
  2144  	return json.Marshal(objectMap)
  2145  }
  2146  
  2147  // WebTest an Application Insights web test definition.
  2148  type WebTest struct {
  2149  	autorest.Response `json:"-"`
  2150  	// Kind - The kind of web test that this web test watches. Choices are ping and multistep. Possible values include: 'WebTestKindPing', 'WebTestKindMultistep'
  2151  	Kind WebTestKind `json:"kind,omitempty"`
  2152  	// WebTestProperties - Metadata describing a web test for an Azure resource.
  2153  	*WebTestProperties `json:"properties,omitempty"`
  2154  	// ID - READ-ONLY; Azure resource Id
  2155  	ID *string `json:"id,omitempty"`
  2156  	// Name - READ-ONLY; Azure resource name
  2157  	Name *string `json:"name,omitempty"`
  2158  	// Type - READ-ONLY; Azure resource type
  2159  	Type *string `json:"type,omitempty"`
  2160  	// Location - Resource location
  2161  	Location *string `json:"location,omitempty"`
  2162  	// Tags - Resource tags
  2163  	Tags map[string]*string `json:"tags"`
  2164  }
  2165  
  2166  // MarshalJSON is the custom marshaler for WebTest.
  2167  func (wt WebTest) MarshalJSON() ([]byte, error) {
  2168  	objectMap := make(map[string]interface{})
  2169  	if wt.Kind != "" {
  2170  		objectMap["kind"] = wt.Kind
  2171  	}
  2172  	if wt.WebTestProperties != nil {
  2173  		objectMap["properties"] = wt.WebTestProperties
  2174  	}
  2175  	if wt.Location != nil {
  2176  		objectMap["location"] = wt.Location
  2177  	}
  2178  	if wt.Tags != nil {
  2179  		objectMap["tags"] = wt.Tags
  2180  	}
  2181  	return json.Marshal(objectMap)
  2182  }
  2183  
  2184  // UnmarshalJSON is the custom unmarshaler for WebTest struct.
  2185  func (wt *WebTest) UnmarshalJSON(body []byte) error {
  2186  	var m map[string]*json.RawMessage
  2187  	err := json.Unmarshal(body, &m)
  2188  	if err != nil {
  2189  		return err
  2190  	}
  2191  	for k, v := range m {
  2192  		switch k {
  2193  		case "kind":
  2194  			if v != nil {
  2195  				var kind WebTestKind
  2196  				err = json.Unmarshal(*v, &kind)
  2197  				if err != nil {
  2198  					return err
  2199  				}
  2200  				wt.Kind = kind
  2201  			}
  2202  		case "properties":
  2203  			if v != nil {
  2204  				var webTestProperties WebTestProperties
  2205  				err = json.Unmarshal(*v, &webTestProperties)
  2206  				if err != nil {
  2207  					return err
  2208  				}
  2209  				wt.WebTestProperties = &webTestProperties
  2210  			}
  2211  		case "id":
  2212  			if v != nil {
  2213  				var ID string
  2214  				err = json.Unmarshal(*v, &ID)
  2215  				if err != nil {
  2216  					return err
  2217  				}
  2218  				wt.ID = &ID
  2219  			}
  2220  		case "name":
  2221  			if v != nil {
  2222  				var name string
  2223  				err = json.Unmarshal(*v, &name)
  2224  				if err != nil {
  2225  					return err
  2226  				}
  2227  				wt.Name = &name
  2228  			}
  2229  		case "type":
  2230  			if v != nil {
  2231  				var typeVar string
  2232  				err = json.Unmarshal(*v, &typeVar)
  2233  				if err != nil {
  2234  					return err
  2235  				}
  2236  				wt.Type = &typeVar
  2237  			}
  2238  		case "location":
  2239  			if v != nil {
  2240  				var location string
  2241  				err = json.Unmarshal(*v, &location)
  2242  				if err != nil {
  2243  					return err
  2244  				}
  2245  				wt.Location = &location
  2246  			}
  2247  		case "tags":
  2248  			if v != nil {
  2249  				var tags map[string]*string
  2250  				err = json.Unmarshal(*v, &tags)
  2251  				if err != nil {
  2252  					return err
  2253  				}
  2254  				wt.Tags = tags
  2255  			}
  2256  		}
  2257  	}
  2258  
  2259  	return nil
  2260  }
  2261  
  2262  // WebTestGeolocation geo-physical location to run a web test from. You must specify one or more locations
  2263  // for the test to run from.
  2264  type WebTestGeolocation struct {
  2265  	// Location - Location ID for the webtest to run from.
  2266  	Location *string `json:"Id,omitempty"`
  2267  }
  2268  
  2269  // WebTestListResult a list of 0 or more Application Insights web test definitions.
  2270  type WebTestListResult struct {
  2271  	autorest.Response `json:"-"`
  2272  	// Value - Set of Application Insights web test definitions.
  2273  	Value *[]WebTest `json:"value,omitempty"`
  2274  	// 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.
  2275  	NextLink *string `json:"nextLink,omitempty"`
  2276  }
  2277  
  2278  // WebTestListResultIterator provides access to a complete listing of WebTest values.
  2279  type WebTestListResultIterator struct {
  2280  	i    int
  2281  	page WebTestListResultPage
  2282  }
  2283  
  2284  // NextWithContext advances to the next value.  If there was an error making
  2285  // the request the iterator does not advance and the error is returned.
  2286  func (iter *WebTestListResultIterator) NextWithContext(ctx context.Context) (err error) {
  2287  	if tracing.IsEnabled() {
  2288  		ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultIterator.NextWithContext")
  2289  		defer func() {
  2290  			sc := -1
  2291  			if iter.Response().Response.Response != nil {
  2292  				sc = iter.Response().Response.Response.StatusCode
  2293  			}
  2294  			tracing.EndSpan(ctx, sc, err)
  2295  		}()
  2296  	}
  2297  	iter.i++
  2298  	if iter.i < len(iter.page.Values()) {
  2299  		return nil
  2300  	}
  2301  	err = iter.page.NextWithContext(ctx)
  2302  	if err != nil {
  2303  		iter.i--
  2304  		return err
  2305  	}
  2306  	iter.i = 0
  2307  	return nil
  2308  }
  2309  
  2310  // Next advances to the next value.  If there was an error making
  2311  // the request the iterator does not advance and the error is returned.
  2312  // Deprecated: Use NextWithContext() instead.
  2313  func (iter *WebTestListResultIterator) Next() error {
  2314  	return iter.NextWithContext(context.Background())
  2315  }
  2316  
  2317  // NotDone returns true if the enumeration should be started or is not yet complete.
  2318  func (iter WebTestListResultIterator) NotDone() bool {
  2319  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  2320  }
  2321  
  2322  // Response returns the raw server response from the last page request.
  2323  func (iter WebTestListResultIterator) Response() WebTestListResult {
  2324  	return iter.page.Response()
  2325  }
  2326  
  2327  // Value returns the current value or a zero-initialized value if the
  2328  // iterator has advanced beyond the end of the collection.
  2329  func (iter WebTestListResultIterator) Value() WebTest {
  2330  	if !iter.page.NotDone() {
  2331  		return WebTest{}
  2332  	}
  2333  	return iter.page.Values()[iter.i]
  2334  }
  2335  
  2336  // Creates a new instance of the WebTestListResultIterator type.
  2337  func NewWebTestListResultIterator(page WebTestListResultPage) WebTestListResultIterator {
  2338  	return WebTestListResultIterator{page: page}
  2339  }
  2340  
  2341  // IsEmpty returns true if the ListResult contains no values.
  2342  func (wtlr WebTestListResult) IsEmpty() bool {
  2343  	return wtlr.Value == nil || len(*wtlr.Value) == 0
  2344  }
  2345  
  2346  // hasNextLink returns true if the NextLink is not empty.
  2347  func (wtlr WebTestListResult) hasNextLink() bool {
  2348  	return wtlr.NextLink != nil && len(*wtlr.NextLink) != 0
  2349  }
  2350  
  2351  // webTestListResultPreparer prepares a request to retrieve the next set of results.
  2352  // It returns nil if no more results exist.
  2353  func (wtlr WebTestListResult) webTestListResultPreparer(ctx context.Context) (*http.Request, error) {
  2354  	if !wtlr.hasNextLink() {
  2355  		return nil, nil
  2356  	}
  2357  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  2358  		autorest.AsJSON(),
  2359  		autorest.AsGet(),
  2360  		autorest.WithBaseURL(to.String(wtlr.NextLink)))
  2361  }
  2362  
  2363  // WebTestListResultPage contains a page of WebTest values.
  2364  type WebTestListResultPage struct {
  2365  	fn   func(context.Context, WebTestListResult) (WebTestListResult, error)
  2366  	wtlr WebTestListResult
  2367  }
  2368  
  2369  // NextWithContext advances to the next page of values.  If there was an error making
  2370  // the request the page does not advance and the error is returned.
  2371  func (page *WebTestListResultPage) NextWithContext(ctx context.Context) (err error) {
  2372  	if tracing.IsEnabled() {
  2373  		ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultPage.NextWithContext")
  2374  		defer func() {
  2375  			sc := -1
  2376  			if page.Response().Response.Response != nil {
  2377  				sc = page.Response().Response.Response.StatusCode
  2378  			}
  2379  			tracing.EndSpan(ctx, sc, err)
  2380  		}()
  2381  	}
  2382  	for {
  2383  		next, err := page.fn(ctx, page.wtlr)
  2384  		if err != nil {
  2385  			return err
  2386  		}
  2387  		page.wtlr = next
  2388  		if !next.hasNextLink() || !next.IsEmpty() {
  2389  			break
  2390  		}
  2391  	}
  2392  	return nil
  2393  }
  2394  
  2395  // Next advances to the next page of values.  If there was an error making
  2396  // the request the page does not advance and the error is returned.
  2397  // Deprecated: Use NextWithContext() instead.
  2398  func (page *WebTestListResultPage) Next() error {
  2399  	return page.NextWithContext(context.Background())
  2400  }
  2401  
  2402  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2403  func (page WebTestListResultPage) NotDone() bool {
  2404  	return !page.wtlr.IsEmpty()
  2405  }
  2406  
  2407  // Response returns the raw server response from the last page request.
  2408  func (page WebTestListResultPage) Response() WebTestListResult {
  2409  	return page.wtlr
  2410  }
  2411  
  2412  // Values returns the slice of values for the current page or nil if there are no values.
  2413  func (page WebTestListResultPage) Values() []WebTest {
  2414  	if page.wtlr.IsEmpty() {
  2415  		return nil
  2416  	}
  2417  	return *page.wtlr.Value
  2418  }
  2419  
  2420  // Creates a new instance of the WebTestListResultPage type.
  2421  func NewWebTestListResultPage(cur WebTestListResult, getNextPage func(context.Context, WebTestListResult) (WebTestListResult, error)) WebTestListResultPage {
  2422  	return WebTestListResultPage{
  2423  		fn:   getNextPage,
  2424  		wtlr: cur,
  2425  	}
  2426  }
  2427  
  2428  // WebTestProperties metadata describing a web test for an Azure resource.
  2429  type WebTestProperties struct {
  2430  	// SyntheticMonitorID - Unique ID of this WebTest. This is typically the same value as the Name field.
  2431  	SyntheticMonitorID *string `json:"SyntheticMonitorId,omitempty"`
  2432  	// WebTestName - User defined name if this WebTest.
  2433  	WebTestName *string `json:"Name,omitempty"`
  2434  	// Description - Purpose/user defined descriptive test for this WebTest.
  2435  	Description *string `json:"Description,omitempty"`
  2436  	// Enabled - Is the test actively being monitored.
  2437  	Enabled *bool `json:"Enabled,omitempty"`
  2438  	// Frequency - Interval in seconds between test runs for this WebTest. Default value is 300.
  2439  	Frequency *int32 `json:"Frequency,omitempty"`
  2440  	// Timeout - Seconds until this WebTest will timeout and fail. Default value is 30.
  2441  	Timeout *int32 `json:"Timeout,omitempty"`
  2442  	// WebTestKind - The kind of web test this is, valid choices are ping and multistep. Possible values include: 'WebTestKindPing', 'WebTestKindMultistep'
  2443  	WebTestKind WebTestKind `json:"Kind,omitempty"`
  2444  	// RetryEnabled - Allow for retries should this WebTest fail.
  2445  	RetryEnabled *bool `json:"RetryEnabled,omitempty"`
  2446  	// Locations - A list of where to physically run the tests from to give global coverage for accessibility of your application.
  2447  	Locations *[]WebTestGeolocation `json:"Locations,omitempty"`
  2448  	// Configuration - An XML configuration specification for a WebTest.
  2449  	Configuration *WebTestPropertiesConfiguration `json:"Configuration,omitempty"`
  2450  	// 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.
  2451  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2452  }
  2453  
  2454  // MarshalJSON is the custom marshaler for WebTestProperties.
  2455  func (wtp WebTestProperties) MarshalJSON() ([]byte, error) {
  2456  	objectMap := make(map[string]interface{})
  2457  	if wtp.SyntheticMonitorID != nil {
  2458  		objectMap["SyntheticMonitorId"] = wtp.SyntheticMonitorID
  2459  	}
  2460  	if wtp.WebTestName != nil {
  2461  		objectMap["Name"] = wtp.WebTestName
  2462  	}
  2463  	if wtp.Description != nil {
  2464  		objectMap["Description"] = wtp.Description
  2465  	}
  2466  	if wtp.Enabled != nil {
  2467  		objectMap["Enabled"] = wtp.Enabled
  2468  	}
  2469  	if wtp.Frequency != nil {
  2470  		objectMap["Frequency"] = wtp.Frequency
  2471  	}
  2472  	if wtp.Timeout != nil {
  2473  		objectMap["Timeout"] = wtp.Timeout
  2474  	}
  2475  	if wtp.WebTestKind != "" {
  2476  		objectMap["Kind"] = wtp.WebTestKind
  2477  	}
  2478  	if wtp.RetryEnabled != nil {
  2479  		objectMap["RetryEnabled"] = wtp.RetryEnabled
  2480  	}
  2481  	if wtp.Locations != nil {
  2482  		objectMap["Locations"] = wtp.Locations
  2483  	}
  2484  	if wtp.Configuration != nil {
  2485  		objectMap["Configuration"] = wtp.Configuration
  2486  	}
  2487  	return json.Marshal(objectMap)
  2488  }
  2489  
  2490  // WebTestPropertiesConfiguration an XML configuration specification for a WebTest.
  2491  type WebTestPropertiesConfiguration struct {
  2492  	// WebTest - The XML specification of a WebTest to run against an application.
  2493  	WebTest *string `json:"WebTest,omitempty"`
  2494  }
  2495  
  2496  // WebtestsResource an azure resource object
  2497  type WebtestsResource struct {
  2498  	// ID - READ-ONLY; Azure resource Id
  2499  	ID *string `json:"id,omitempty"`
  2500  	// Name - READ-ONLY; Azure resource name
  2501  	Name *string `json:"name,omitempty"`
  2502  	// Type - READ-ONLY; Azure resource type
  2503  	Type *string `json:"type,omitempty"`
  2504  	// Location - Resource location
  2505  	Location *string `json:"location,omitempty"`
  2506  	// Tags - Resource tags
  2507  	Tags map[string]*string `json:"tags"`
  2508  }
  2509  
  2510  // MarshalJSON is the custom marshaler for WebtestsResource.
  2511  func (wr WebtestsResource) MarshalJSON() ([]byte, error) {
  2512  	objectMap := make(map[string]interface{})
  2513  	if wr.Location != nil {
  2514  		objectMap["location"] = wr.Location
  2515  	}
  2516  	if wr.Tags != nil {
  2517  		objectMap["tags"] = wr.Tags
  2518  	}
  2519  	return json.Marshal(objectMap)
  2520  }
  2521  
  2522  // Workbook an Application Insights workbook definition.
  2523  type Workbook struct {
  2524  	autorest.Response `json:"-"`
  2525  	// WorkbookProperties - Metadata describing a workbook for an Azure resource.
  2526  	*WorkbookProperties `json:"properties,omitempty"`
  2527  	// SystemData - READ-ONLY
  2528  	SystemData *SystemData `json:"systemData,omitempty"`
  2529  	// Identity - Identity used for BYOS
  2530  	Identity *WorkbookResourceIdentity `json:"identity,omitempty"`
  2531  	// Kind - The kind of workbook. Choices are user and shared. Possible values include: 'KindUser', 'KindShared'
  2532  	Kind Kind `json:"kind,omitempty"`
  2533  	// Etag - Resource etag
  2534  	Etag map[string]*string `json:"etag"`
  2535  	// Tags - Resource tags.
  2536  	Tags map[string]*string `json:"tags"`
  2537  	// Location - The geo-location where the resource lives
  2538  	Location *string `json:"location,omitempty"`
  2539  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2540  	ID *string `json:"id,omitempty"`
  2541  	// Name - READ-ONLY; The name of the resource
  2542  	Name *string `json:"name,omitempty"`
  2543  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2544  	Type *string `json:"type,omitempty"`
  2545  }
  2546  
  2547  // MarshalJSON is the custom marshaler for Workbook.
  2548  func (w Workbook) MarshalJSON() ([]byte, error) {
  2549  	objectMap := make(map[string]interface{})
  2550  	if w.WorkbookProperties != nil {
  2551  		objectMap["properties"] = w.WorkbookProperties
  2552  	}
  2553  	if w.Identity != nil {
  2554  		objectMap["identity"] = w.Identity
  2555  	}
  2556  	if w.Kind != "" {
  2557  		objectMap["kind"] = w.Kind
  2558  	}
  2559  	if w.Etag != nil {
  2560  		objectMap["etag"] = w.Etag
  2561  	}
  2562  	if w.Tags != nil {
  2563  		objectMap["tags"] = w.Tags
  2564  	}
  2565  	if w.Location != nil {
  2566  		objectMap["location"] = w.Location
  2567  	}
  2568  	return json.Marshal(objectMap)
  2569  }
  2570  
  2571  // UnmarshalJSON is the custom unmarshaler for Workbook struct.
  2572  func (w *Workbook) UnmarshalJSON(body []byte) error {
  2573  	var m map[string]*json.RawMessage
  2574  	err := json.Unmarshal(body, &m)
  2575  	if err != nil {
  2576  		return err
  2577  	}
  2578  	for k, v := range m {
  2579  		switch k {
  2580  		case "properties":
  2581  			if v != nil {
  2582  				var workbookProperties WorkbookProperties
  2583  				err = json.Unmarshal(*v, &workbookProperties)
  2584  				if err != nil {
  2585  					return err
  2586  				}
  2587  				w.WorkbookProperties = &workbookProperties
  2588  			}
  2589  		case "systemData":
  2590  			if v != nil {
  2591  				var systemData SystemData
  2592  				err = json.Unmarshal(*v, &systemData)
  2593  				if err != nil {
  2594  					return err
  2595  				}
  2596  				w.SystemData = &systemData
  2597  			}
  2598  		case "identity":
  2599  			if v != nil {
  2600  				var identity WorkbookResourceIdentity
  2601  				err = json.Unmarshal(*v, &identity)
  2602  				if err != nil {
  2603  					return err
  2604  				}
  2605  				w.Identity = &identity
  2606  			}
  2607  		case "kind":
  2608  			if v != nil {
  2609  				var kind Kind
  2610  				err = json.Unmarshal(*v, &kind)
  2611  				if err != nil {
  2612  					return err
  2613  				}
  2614  				w.Kind = kind
  2615  			}
  2616  		case "etag":
  2617  			if v != nil {
  2618  				var etag map[string]*string
  2619  				err = json.Unmarshal(*v, &etag)
  2620  				if err != nil {
  2621  					return err
  2622  				}
  2623  				w.Etag = etag
  2624  			}
  2625  		case "tags":
  2626  			if v != nil {
  2627  				var tags map[string]*string
  2628  				err = json.Unmarshal(*v, &tags)
  2629  				if err != nil {
  2630  					return err
  2631  				}
  2632  				w.Tags = tags
  2633  			}
  2634  		case "location":
  2635  			if v != nil {
  2636  				var location string
  2637  				err = json.Unmarshal(*v, &location)
  2638  				if err != nil {
  2639  					return err
  2640  				}
  2641  				w.Location = &location
  2642  			}
  2643  		case "id":
  2644  			if v != nil {
  2645  				var ID string
  2646  				err = json.Unmarshal(*v, &ID)
  2647  				if err != nil {
  2648  					return err
  2649  				}
  2650  				w.ID = &ID
  2651  			}
  2652  		case "name":
  2653  			if v != nil {
  2654  				var name string
  2655  				err = json.Unmarshal(*v, &name)
  2656  				if err != nil {
  2657  					return err
  2658  				}
  2659  				w.Name = &name
  2660  			}
  2661  		case "type":
  2662  			if v != nil {
  2663  				var typeVar string
  2664  				err = json.Unmarshal(*v, &typeVar)
  2665  				if err != nil {
  2666  					return err
  2667  				}
  2668  				w.Type = &typeVar
  2669  			}
  2670  		}
  2671  	}
  2672  
  2673  	return nil
  2674  }
  2675  
  2676  // WorkbookError error response.
  2677  type WorkbookError struct {
  2678  	// Error - The error details.
  2679  	Error *WorkbookErrorDefinition `json:"error,omitempty"`
  2680  }
  2681  
  2682  // WorkbookErrorDefinition error definition.
  2683  type WorkbookErrorDefinition struct {
  2684  	// Code - READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
  2685  	Code *string `json:"code,omitempty"`
  2686  	// Message - READ-ONLY; Description of the error.
  2687  	Message *string `json:"message,omitempty"`
  2688  	// InnerError - READ-ONLY; Internal error details.
  2689  	InnerError interface{} `json:"innerError,omitempty"`
  2690  }
  2691  
  2692  // MarshalJSON is the custom marshaler for WorkbookErrorDefinition.
  2693  func (wed WorkbookErrorDefinition) MarshalJSON() ([]byte, error) {
  2694  	objectMap := make(map[string]interface{})
  2695  	return json.Marshal(objectMap)
  2696  }
  2697  
  2698  // WorkbookInnerErrorTrace error details
  2699  type WorkbookInnerErrorTrace struct {
  2700  	// Trace - READ-ONLY; detailed error trace
  2701  	Trace *[]string `json:"trace,omitempty"`
  2702  }
  2703  
  2704  // MarshalJSON is the custom marshaler for WorkbookInnerErrorTrace.
  2705  func (wiet WorkbookInnerErrorTrace) MarshalJSON() ([]byte, error) {
  2706  	objectMap := make(map[string]interface{})
  2707  	return json.Marshal(objectMap)
  2708  }
  2709  
  2710  // WorkbookProperties properties that contain a workbook.
  2711  type WorkbookProperties struct {
  2712  	// DisplayName - The user-defined name (display name) of the workbook.
  2713  	DisplayName *string `json:"displayName,omitempty"`
  2714  	// SerializedData - Configuration of this particular workbook. Configuration data is a string containing valid JSON
  2715  	SerializedData *string `json:"serializedData,omitempty"`
  2716  	// Version - Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData
  2717  	Version *string `json:"version,omitempty"`
  2718  	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this workbook definition.
  2719  	TimeModified *date.Time `json:"timeModified,omitempty"`
  2720  	// Category - Workbook category, as defined by the user at creation time.
  2721  	Category *string `json:"category,omitempty"`
  2722  	// Tags - Being deprecated, please use the other tags field
  2723  	Tags *[]string `json:"tags,omitempty"`
  2724  	// UserID - READ-ONLY; Unique user id of the specific user that owns this workbook.
  2725  	UserID *string `json:"userId,omitempty"`
  2726  	// SourceID - ResourceId for a source resource.
  2727  	SourceID *string `json:"sourceId,omitempty"`
  2728  	// StorageURI - The resourceId to the storage account when bring your own storage is used
  2729  	StorageURI *string `json:"storageUri,omitempty"`
  2730  	// Description - The description of the workbook.
  2731  	Description *string `json:"description,omitempty"`
  2732  	// Revision - READ-ONLY; The unique revision id for this workbook definition
  2733  	Revision *string `json:"revision,omitempty"`
  2734  }
  2735  
  2736  // MarshalJSON is the custom marshaler for WorkbookProperties.
  2737  func (wp WorkbookProperties) MarshalJSON() ([]byte, error) {
  2738  	objectMap := make(map[string]interface{})
  2739  	if wp.DisplayName != nil {
  2740  		objectMap["displayName"] = wp.DisplayName
  2741  	}
  2742  	if wp.SerializedData != nil {
  2743  		objectMap["serializedData"] = wp.SerializedData
  2744  	}
  2745  	if wp.Version != nil {
  2746  		objectMap["version"] = wp.Version
  2747  	}
  2748  	if wp.Category != nil {
  2749  		objectMap["category"] = wp.Category
  2750  	}
  2751  	if wp.Tags != nil {
  2752  		objectMap["tags"] = wp.Tags
  2753  	}
  2754  	if wp.SourceID != nil {
  2755  		objectMap["sourceId"] = wp.SourceID
  2756  	}
  2757  	if wp.StorageURI != nil {
  2758  		objectMap["storageUri"] = wp.StorageURI
  2759  	}
  2760  	if wp.Description != nil {
  2761  		objectMap["description"] = wp.Description
  2762  	}
  2763  	return json.Marshal(objectMap)
  2764  }
  2765  
  2766  // WorkbookPropertiesUpdateParameters properties that contain a workbook for PATCH operation.
  2767  type WorkbookPropertiesUpdateParameters struct {
  2768  	// DisplayName - The user-defined name (display name) of the workbook.
  2769  	DisplayName *string `json:"displayName,omitempty"`
  2770  	// SerializedData - Configuration of this particular workbook. Configuration data is a string containing valid JSON
  2771  	SerializedData *string `json:"serializedData,omitempty"`
  2772  	// Category - Workbook category, as defined by the user at creation time.
  2773  	Category *string `json:"category,omitempty"`
  2774  	// Tags - A list of 0 or more tags that are associated with this workbook definition
  2775  	Tags *[]string `json:"tags,omitempty"`
  2776  	// Description - The description of the workbook.
  2777  	Description *string `json:"description,omitempty"`
  2778  	// Revision - The unique revision id for this workbook definition
  2779  	Revision *string `json:"revision,omitempty"`
  2780  }
  2781  
  2782  // WorkbookResource an azure resource object
  2783  type WorkbookResource struct {
  2784  	// Identity - Identity used for BYOS
  2785  	Identity *WorkbookResourceIdentity `json:"identity,omitempty"`
  2786  	// Kind - The kind of workbook. Choices are user and shared. Possible values include: 'KindUser', 'KindShared'
  2787  	Kind Kind `json:"kind,omitempty"`
  2788  	// Etag - Resource etag
  2789  	Etag map[string]*string `json:"etag"`
  2790  	// Tags - Resource tags.
  2791  	Tags map[string]*string `json:"tags"`
  2792  	// Location - The geo-location where the resource lives
  2793  	Location *string `json:"location,omitempty"`
  2794  	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
  2795  	ID *string `json:"id,omitempty"`
  2796  	// Name - READ-ONLY; The name of the resource
  2797  	Name *string `json:"name,omitempty"`
  2798  	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
  2799  	Type *string `json:"type,omitempty"`
  2800  }
  2801  
  2802  // MarshalJSON is the custom marshaler for WorkbookResource.
  2803  func (wr WorkbookResource) MarshalJSON() ([]byte, error) {
  2804  	objectMap := make(map[string]interface{})
  2805  	if wr.Identity != nil {
  2806  		objectMap["identity"] = wr.Identity
  2807  	}
  2808  	if wr.Kind != "" {
  2809  		objectMap["kind"] = wr.Kind
  2810  	}
  2811  	if wr.Etag != nil {
  2812  		objectMap["etag"] = wr.Etag
  2813  	}
  2814  	if wr.Tags != nil {
  2815  		objectMap["tags"] = wr.Tags
  2816  	}
  2817  	if wr.Location != nil {
  2818  		objectMap["location"] = wr.Location
  2819  	}
  2820  	return json.Marshal(objectMap)
  2821  }
  2822  
  2823  // WorkbookResourceIdentity identity used for BYOS
  2824  type WorkbookResourceIdentity struct {
  2825  	// PrincipalID - READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
  2826  	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
  2827  	// TenantID - READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
  2828  	TenantID *uuid.UUID `json:"tenantId,omitempty"`
  2829  	// Type - Possible values include: 'ManagedServiceIdentityTypeNone', 'ManagedServiceIdentityTypeSystemAssigned', 'ManagedServiceIdentityTypeUserAssigned', 'ManagedServiceIdentityTypeSystemAssignedUserAssigned'
  2830  	Type                   ManagedServiceIdentityType       `json:"type,omitempty"`
  2831  	UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"`
  2832  }
  2833  
  2834  // MarshalJSON is the custom marshaler for WorkbookResourceIdentity.
  2835  func (wr WorkbookResourceIdentity) MarshalJSON() ([]byte, error) {
  2836  	objectMap := make(map[string]interface{})
  2837  	if wr.Type != "" {
  2838  		objectMap["type"] = wr.Type
  2839  	}
  2840  	if wr.UserAssignedIdentities != nil {
  2841  		objectMap["userAssignedIdentities"] = wr.UserAssignedIdentities
  2842  	}
  2843  	return json.Marshal(objectMap)
  2844  }
  2845  
  2846  // WorkbooksListResult workbook list result.
  2847  type WorkbooksListResult struct {
  2848  	autorest.Response `json:"-"`
  2849  	// Value - READ-ONLY; An array of workbooks.
  2850  	Value    *[]Workbook `json:"value,omitempty"`
  2851  	NextLink *string     `json:"nextLink,omitempty"`
  2852  }
  2853  
  2854  // MarshalJSON is the custom marshaler for WorkbooksListResult.
  2855  func (wlr WorkbooksListResult) MarshalJSON() ([]byte, error) {
  2856  	objectMap := make(map[string]interface{})
  2857  	if wlr.NextLink != nil {
  2858  		objectMap["nextLink"] = wlr.NextLink
  2859  	}
  2860  	return json.Marshal(objectMap)
  2861  }
  2862  
  2863  // WorkbooksListResultIterator provides access to a complete listing of Workbook values.
  2864  type WorkbooksListResultIterator struct {
  2865  	i    int
  2866  	page WorkbooksListResultPage
  2867  }
  2868  
  2869  // NextWithContext advances to the next value.  If there was an error making
  2870  // the request the iterator does not advance and the error is returned.
  2871  func (iter *WorkbooksListResultIterator) NextWithContext(ctx context.Context) (err error) {
  2872  	if tracing.IsEnabled() {
  2873  		ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksListResultIterator.NextWithContext")
  2874  		defer func() {
  2875  			sc := -1
  2876  			if iter.Response().Response.Response != nil {
  2877  				sc = iter.Response().Response.Response.StatusCode
  2878  			}
  2879  			tracing.EndSpan(ctx, sc, err)
  2880  		}()
  2881  	}
  2882  	iter.i++
  2883  	if iter.i < len(iter.page.Values()) {
  2884  		return nil
  2885  	}
  2886  	err = iter.page.NextWithContext(ctx)
  2887  	if err != nil {
  2888  		iter.i--
  2889  		return err
  2890  	}
  2891  	iter.i = 0
  2892  	return nil
  2893  }
  2894  
  2895  // Next advances to the next value.  If there was an error making
  2896  // the request the iterator does not advance and the error is returned.
  2897  // Deprecated: Use NextWithContext() instead.
  2898  func (iter *WorkbooksListResultIterator) Next() error {
  2899  	return iter.NextWithContext(context.Background())
  2900  }
  2901  
  2902  // NotDone returns true if the enumeration should be started or is not yet complete.
  2903  func (iter WorkbooksListResultIterator) NotDone() bool {
  2904  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  2905  }
  2906  
  2907  // Response returns the raw server response from the last page request.
  2908  func (iter WorkbooksListResultIterator) Response() WorkbooksListResult {
  2909  	return iter.page.Response()
  2910  }
  2911  
  2912  // Value returns the current value or a zero-initialized value if the
  2913  // iterator has advanced beyond the end of the collection.
  2914  func (iter WorkbooksListResultIterator) Value() Workbook {
  2915  	if !iter.page.NotDone() {
  2916  		return Workbook{}
  2917  	}
  2918  	return iter.page.Values()[iter.i]
  2919  }
  2920  
  2921  // Creates a new instance of the WorkbooksListResultIterator type.
  2922  func NewWorkbooksListResultIterator(page WorkbooksListResultPage) WorkbooksListResultIterator {
  2923  	return WorkbooksListResultIterator{page: page}
  2924  }
  2925  
  2926  // IsEmpty returns true if the ListResult contains no values.
  2927  func (wlr WorkbooksListResult) IsEmpty() bool {
  2928  	return wlr.Value == nil || len(*wlr.Value) == 0
  2929  }
  2930  
  2931  // hasNextLink returns true if the NextLink is not empty.
  2932  func (wlr WorkbooksListResult) hasNextLink() bool {
  2933  	return wlr.NextLink != nil && len(*wlr.NextLink) != 0
  2934  }
  2935  
  2936  // workbooksListResultPreparer prepares a request to retrieve the next set of results.
  2937  // It returns nil if no more results exist.
  2938  func (wlr WorkbooksListResult) workbooksListResultPreparer(ctx context.Context) (*http.Request, error) {
  2939  	if !wlr.hasNextLink() {
  2940  		return nil, nil
  2941  	}
  2942  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  2943  		autorest.AsJSON(),
  2944  		autorest.AsGet(),
  2945  		autorest.WithBaseURL(to.String(wlr.NextLink)))
  2946  }
  2947  
  2948  // WorkbooksListResultPage contains a page of Workbook values.
  2949  type WorkbooksListResultPage struct {
  2950  	fn  func(context.Context, WorkbooksListResult) (WorkbooksListResult, error)
  2951  	wlr WorkbooksListResult
  2952  }
  2953  
  2954  // NextWithContext advances to the next page of values.  If there was an error making
  2955  // the request the page does not advance and the error is returned.
  2956  func (page *WorkbooksListResultPage) NextWithContext(ctx context.Context) (err error) {
  2957  	if tracing.IsEnabled() {
  2958  		ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksListResultPage.NextWithContext")
  2959  		defer func() {
  2960  			sc := -1
  2961  			if page.Response().Response.Response != nil {
  2962  				sc = page.Response().Response.Response.StatusCode
  2963  			}
  2964  			tracing.EndSpan(ctx, sc, err)
  2965  		}()
  2966  	}
  2967  	for {
  2968  		next, err := page.fn(ctx, page.wlr)
  2969  		if err != nil {
  2970  			return err
  2971  		}
  2972  		page.wlr = next
  2973  		if !next.hasNextLink() || !next.IsEmpty() {
  2974  			break
  2975  		}
  2976  	}
  2977  	return nil
  2978  }
  2979  
  2980  // Next advances to the next page of values.  If there was an error making
  2981  // the request the page does not advance and the error is returned.
  2982  // Deprecated: Use NextWithContext() instead.
  2983  func (page *WorkbooksListResultPage) Next() error {
  2984  	return page.NextWithContext(context.Background())
  2985  }
  2986  
  2987  // NotDone returns true if the page enumeration should be started or is not yet complete.
  2988  func (page WorkbooksListResultPage) NotDone() bool {
  2989  	return !page.wlr.IsEmpty()
  2990  }
  2991  
  2992  // Response returns the raw server response from the last page request.
  2993  func (page WorkbooksListResultPage) Response() WorkbooksListResult {
  2994  	return page.wlr
  2995  }
  2996  
  2997  // Values returns the slice of values for the current page or nil if there are no values.
  2998  func (page WorkbooksListResultPage) Values() []Workbook {
  2999  	if page.wlr.IsEmpty() {
  3000  		return nil
  3001  	}
  3002  	return *page.wlr.Value
  3003  }
  3004  
  3005  // Creates a new instance of the WorkbooksListResultPage type.
  3006  func NewWorkbooksListResultPage(cur WorkbooksListResult, getNextPage func(context.Context, WorkbooksListResult) (WorkbooksListResult, error)) WorkbooksListResultPage {
  3007  	return WorkbooksListResultPage{
  3008  		fn:  getNextPage,
  3009  		wlr: cur,
  3010  	}
  3011  }
  3012  
  3013  // WorkbookTemplate an Application Insights workbook template definition.
  3014  type WorkbookTemplate struct {
  3015  	autorest.Response `json:"-"`
  3016  	// WorkbookTemplateProperties - Metadata describing a workbook template for an Azure resource.
  3017  	*WorkbookTemplateProperties `json:"properties,omitempty"`
  3018  	// ID - READ-ONLY; Azure resource Id
  3019  	ID *string `json:"id,omitempty"`
  3020  	// Name - READ-ONLY; Azure resource name.
  3021  	Name *string `json:"name,omitempty"`
  3022  	// Type - READ-ONLY; Azure resource type
  3023  	Type *string `json:"type,omitempty"`
  3024  	// Location - Resource location
  3025  	Location *string `json:"location,omitempty"`
  3026  	// Tags - Resource tags
  3027  	Tags map[string]*string `json:"tags"`
  3028  }
  3029  
  3030  // MarshalJSON is the custom marshaler for WorkbookTemplate.
  3031  func (wt WorkbookTemplate) MarshalJSON() ([]byte, error) {
  3032  	objectMap := make(map[string]interface{})
  3033  	if wt.WorkbookTemplateProperties != nil {
  3034  		objectMap["properties"] = wt.WorkbookTemplateProperties
  3035  	}
  3036  	if wt.Location != nil {
  3037  		objectMap["location"] = wt.Location
  3038  	}
  3039  	if wt.Tags != nil {
  3040  		objectMap["tags"] = wt.Tags
  3041  	}
  3042  	return json.Marshal(objectMap)
  3043  }
  3044  
  3045  // UnmarshalJSON is the custom unmarshaler for WorkbookTemplate struct.
  3046  func (wt *WorkbookTemplate) UnmarshalJSON(body []byte) error {
  3047  	var m map[string]*json.RawMessage
  3048  	err := json.Unmarshal(body, &m)
  3049  	if err != nil {
  3050  		return err
  3051  	}
  3052  	for k, v := range m {
  3053  		switch k {
  3054  		case "properties":
  3055  			if v != nil {
  3056  				var workbookTemplateProperties WorkbookTemplateProperties
  3057  				err = json.Unmarshal(*v, &workbookTemplateProperties)
  3058  				if err != nil {
  3059  					return err
  3060  				}
  3061  				wt.WorkbookTemplateProperties = &workbookTemplateProperties
  3062  			}
  3063  		case "id":
  3064  			if v != nil {
  3065  				var ID string
  3066  				err = json.Unmarshal(*v, &ID)
  3067  				if err != nil {
  3068  					return err
  3069  				}
  3070  				wt.ID = &ID
  3071  			}
  3072  		case "name":
  3073  			if v != nil {
  3074  				var name string
  3075  				err = json.Unmarshal(*v, &name)
  3076  				if err != nil {
  3077  					return err
  3078  				}
  3079  				wt.Name = &name
  3080  			}
  3081  		case "type":
  3082  			if v != nil {
  3083  				var typeVar string
  3084  				err = json.Unmarshal(*v, &typeVar)
  3085  				if err != nil {
  3086  					return err
  3087  				}
  3088  				wt.Type = &typeVar
  3089  			}
  3090  		case "location":
  3091  			if v != nil {
  3092  				var location string
  3093  				err = json.Unmarshal(*v, &location)
  3094  				if err != nil {
  3095  					return err
  3096  				}
  3097  				wt.Location = &location
  3098  			}
  3099  		case "tags":
  3100  			if v != nil {
  3101  				var tags map[string]*string
  3102  				err = json.Unmarshal(*v, &tags)
  3103  				if err != nil {
  3104  					return err
  3105  				}
  3106  				wt.Tags = tags
  3107  			}
  3108  		}
  3109  	}
  3110  
  3111  	return nil
  3112  }
  3113  
  3114  // WorkbookTemplateError error message that will indicate why the operation failed.
  3115  type WorkbookTemplateError struct {
  3116  	// Error - Error message object that will indicate why the operation failed.
  3117  	Error *WorkbookTemplateErrorBody `json:"error,omitempty"`
  3118  }
  3119  
  3120  // WorkbookTemplateErrorBody error message body that will indicate why the operation failed.
  3121  type WorkbookTemplateErrorBody struct {
  3122  	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
  3123  	Code *string `json:"code,omitempty"`
  3124  	// Message - Human-readable representation of the error.
  3125  	Message *string `json:"message,omitempty"`
  3126  	// Details - The list of invalid fields send in request, in case of validation error.
  3127  	Details *[]WorkbookTemplateErrorFieldContract `json:"details,omitempty"`
  3128  }
  3129  
  3130  // WorkbookTemplateErrorFieldContract error Field contract.
  3131  type WorkbookTemplateErrorFieldContract struct {
  3132  	// Code - Property level error code.
  3133  	Code *string `json:"code,omitempty"`
  3134  	// Message - Human-readable representation of property-level error.
  3135  	Message *string `json:"message,omitempty"`
  3136  	// Target - Property name.
  3137  	Target *string `json:"target,omitempty"`
  3138  }
  3139  
  3140  // WorkbookTemplateGallery gallery information for a workbook template.
  3141  type WorkbookTemplateGallery struct {
  3142  	// Name - Name of the workbook template in the gallery.
  3143  	Name *string `json:"name,omitempty"`
  3144  	// Category - Category for the gallery.
  3145  	Category *string `json:"category,omitempty"`
  3146  	// Type - Type of workbook supported by the workbook template.
  3147  	Type *string `json:"type,omitempty"`
  3148  	// Order - Order of the template within the gallery.
  3149  	Order *int32 `json:"order,omitempty"`
  3150  	// ResourceType - Azure resource type supported by the gallery.
  3151  	ResourceType *string `json:"resourceType,omitempty"`
  3152  }
  3153  
  3154  // WorkbookTemplateLocalizedGallery localized template data and gallery information.
  3155  type WorkbookTemplateLocalizedGallery struct {
  3156  	// TemplateData - Valid JSON object containing workbook template payload.
  3157  	TemplateData interface{} `json:"templateData,omitempty"`
  3158  	// Galleries - Workbook galleries supported by the template.
  3159  	Galleries *[]WorkbookTemplateGallery `json:"galleries,omitempty"`
  3160  }
  3161  
  3162  // WorkbookTemplateProperties properties that contain a workbook template.
  3163  type WorkbookTemplateProperties struct {
  3164  	// Priority - Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode.
  3165  	Priority *int32 `json:"priority,omitempty"`
  3166  	// Author - Information about the author of the workbook template.
  3167  	Author *string `json:"author,omitempty"`
  3168  	// TemplateData - Valid JSON object containing workbook template payload.
  3169  	TemplateData interface{} `json:"templateData,omitempty"`
  3170  	// Galleries - Workbook galleries supported by the template.
  3171  	Galleries *[]WorkbookTemplateGallery `json:"galleries,omitempty"`
  3172  	// Localized - Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal.
  3173  	Localized map[string][]WorkbookTemplateLocalizedGallery `json:"localized"`
  3174  }
  3175  
  3176  // MarshalJSON is the custom marshaler for WorkbookTemplateProperties.
  3177  func (wtp WorkbookTemplateProperties) MarshalJSON() ([]byte, error) {
  3178  	objectMap := make(map[string]interface{})
  3179  	if wtp.Priority != nil {
  3180  		objectMap["priority"] = wtp.Priority
  3181  	}
  3182  	if wtp.Author != nil {
  3183  		objectMap["author"] = wtp.Author
  3184  	}
  3185  	if wtp.TemplateData != nil {
  3186  		objectMap["templateData"] = wtp.TemplateData
  3187  	}
  3188  	if wtp.Galleries != nil {
  3189  		objectMap["galleries"] = wtp.Galleries
  3190  	}
  3191  	if wtp.Localized != nil {
  3192  		objectMap["localized"] = wtp.Localized
  3193  	}
  3194  	return json.Marshal(objectMap)
  3195  }
  3196  
  3197  // WorkbookTemplateResource an azure resource object
  3198  type WorkbookTemplateResource struct {
  3199  	// ID - READ-ONLY; Azure resource Id
  3200  	ID *string `json:"id,omitempty"`
  3201  	// Name - READ-ONLY; Azure resource name.
  3202  	Name *string `json:"name,omitempty"`
  3203  	// Type - READ-ONLY; Azure resource type
  3204  	Type *string `json:"type,omitempty"`
  3205  	// Location - Resource location
  3206  	Location *string `json:"location,omitempty"`
  3207  	// Tags - Resource tags
  3208  	Tags map[string]*string `json:"tags"`
  3209  }
  3210  
  3211  // MarshalJSON is the custom marshaler for WorkbookTemplateResource.
  3212  func (wtr WorkbookTemplateResource) MarshalJSON() ([]byte, error) {
  3213  	objectMap := make(map[string]interface{})
  3214  	if wtr.Location != nil {
  3215  		objectMap["location"] = wtr.Location
  3216  	}
  3217  	if wtr.Tags != nil {
  3218  		objectMap["tags"] = wtr.Tags
  3219  	}
  3220  	return json.Marshal(objectMap)
  3221  }
  3222  
  3223  // WorkbookTemplatesListResult workbookTemplate list result.
  3224  type WorkbookTemplatesListResult struct {
  3225  	autorest.Response `json:"-"`
  3226  	// Value - An array of workbook templates.
  3227  	Value *[]WorkbookTemplate `json:"value,omitempty"`
  3228  }
  3229  
  3230  // WorkbookTemplateUpdateParameters the parameters that can be provided when updating workbook template.
  3231  type WorkbookTemplateUpdateParameters struct {
  3232  	// Tags - Resource tags
  3233  	Tags map[string]*string `json:"tags"`
  3234  	// WorkbookTemplateProperties - Metadata describing a workbook for an Azure resource.
  3235  	*WorkbookTemplateProperties `json:"properties,omitempty"`
  3236  }
  3237  
  3238  // MarshalJSON is the custom marshaler for WorkbookTemplateUpdateParameters.
  3239  func (wtup WorkbookTemplateUpdateParameters) MarshalJSON() ([]byte, error) {
  3240  	objectMap := make(map[string]interface{})
  3241  	if wtup.Tags != nil {
  3242  		objectMap["tags"] = wtup.Tags
  3243  	}
  3244  	if wtup.WorkbookTemplateProperties != nil {
  3245  		objectMap["properties"] = wtup.WorkbookTemplateProperties
  3246  	}
  3247  	return json.Marshal(objectMap)
  3248  }
  3249  
  3250  // UnmarshalJSON is the custom unmarshaler for WorkbookTemplateUpdateParameters struct.
  3251  func (wtup *WorkbookTemplateUpdateParameters) UnmarshalJSON(body []byte) error {
  3252  	var m map[string]*json.RawMessage
  3253  	err := json.Unmarshal(body, &m)
  3254  	if err != nil {
  3255  		return err
  3256  	}
  3257  	for k, v := range m {
  3258  		switch k {
  3259  		case "tags":
  3260  			if v != nil {
  3261  				var tags map[string]*string
  3262  				err = json.Unmarshal(*v, &tags)
  3263  				if err != nil {
  3264  					return err
  3265  				}
  3266  				wtup.Tags = tags
  3267  			}
  3268  		case "properties":
  3269  			if v != nil {
  3270  				var workbookTemplateProperties WorkbookTemplateProperties
  3271  				err = json.Unmarshal(*v, &workbookTemplateProperties)
  3272  				if err != nil {
  3273  					return err
  3274  				}
  3275  				wtup.WorkbookTemplateProperties = &workbookTemplateProperties
  3276  			}
  3277  		}
  3278  	}
  3279  
  3280  	return nil
  3281  }
  3282  
  3283  // WorkbookUpdateParameters the parameters that can be provided when updating workbook properties
  3284  // properties.
  3285  type WorkbookUpdateParameters struct {
  3286  	// Kind - The kind of workbook. Choices are user and shared. Possible values include: 'SharedTypeKindUser', 'SharedTypeKindShared'
  3287  	Kind SharedTypeKind `json:"kind,omitempty"`
  3288  	// Tags - Resource tags.
  3289  	Tags map[string]*string `json:"tags"`
  3290  	// WorkbookPropertiesUpdateParameters - Metadata describing a workbook for an Azure resource.
  3291  	*WorkbookPropertiesUpdateParameters `json:"properties,omitempty"`
  3292  }
  3293  
  3294  // MarshalJSON is the custom marshaler for WorkbookUpdateParameters.
  3295  func (wup WorkbookUpdateParameters) MarshalJSON() ([]byte, error) {
  3296  	objectMap := make(map[string]interface{})
  3297  	if wup.Kind != "" {
  3298  		objectMap["kind"] = wup.Kind
  3299  	}
  3300  	if wup.Tags != nil {
  3301  		objectMap["tags"] = wup.Tags
  3302  	}
  3303  	if wup.WorkbookPropertiesUpdateParameters != nil {
  3304  		objectMap["properties"] = wup.WorkbookPropertiesUpdateParameters
  3305  	}
  3306  	return json.Marshal(objectMap)
  3307  }
  3308  
  3309  // UnmarshalJSON is the custom unmarshaler for WorkbookUpdateParameters struct.
  3310  func (wup *WorkbookUpdateParameters) UnmarshalJSON(body []byte) error {
  3311  	var m map[string]*json.RawMessage
  3312  	err := json.Unmarshal(body, &m)
  3313  	if err != nil {
  3314  		return err
  3315  	}
  3316  	for k, v := range m {
  3317  		switch k {
  3318  		case "kind":
  3319  			if v != nil {
  3320  				var kind SharedTypeKind
  3321  				err = json.Unmarshal(*v, &kind)
  3322  				if err != nil {
  3323  					return err
  3324  				}
  3325  				wup.Kind = kind
  3326  			}
  3327  		case "tags":
  3328  			if v != nil {
  3329  				var tags map[string]*string
  3330  				err = json.Unmarshal(*v, &tags)
  3331  				if err != nil {
  3332  					return err
  3333  				}
  3334  				wup.Tags = tags
  3335  			}
  3336  		case "properties":
  3337  			if v != nil {
  3338  				var workbookPropertiesUpdateParameters WorkbookPropertiesUpdateParameters
  3339  				err = json.Unmarshal(*v, &workbookPropertiesUpdateParameters)
  3340  				if err != nil {
  3341  					return err
  3342  				}
  3343  				wup.WorkbookPropertiesUpdateParameters = &workbookPropertiesUpdateParameters
  3344  			}
  3345  		}
  3346  	}
  3347  
  3348  	return nil
  3349  }
  3350  
  3351  // WorkItemConfiguration work item configuration associated with an application insights resource.
  3352  type WorkItemConfiguration struct {
  3353  	autorest.Response `json:"-"`
  3354  	// ConnectorID - Connector identifier where work item is created
  3355  	ConnectorID *string `json:"ConnectorId,omitempty"`
  3356  	// ConfigDisplayName - Configuration friendly name
  3357  	ConfigDisplayName *string `json:"ConfigDisplayName,omitempty"`
  3358  	// IsDefault - Boolean value indicating whether configuration is default
  3359  	IsDefault *bool `json:"IsDefault,omitempty"`
  3360  	// ID - Unique Id for work item
  3361  	ID *string `json:"Id,omitempty"`
  3362  	// ConfigProperties - Serialized JSON object for detailed properties
  3363  	ConfigProperties *string `json:"ConfigProperties,omitempty"`
  3364  }
  3365  
  3366  // WorkItemConfigurationError error associated with trying to get work item configuration or configurations
  3367  type WorkItemConfigurationError struct {
  3368  	// Code - Error detail code and explanation
  3369  	Code *string `json:"code,omitempty"`
  3370  	// Message - Error message
  3371  	Message    *string     `json:"message,omitempty"`
  3372  	Innererror *InnerError `json:"innererror,omitempty"`
  3373  }
  3374  
  3375  // WorkItemConfigurationsListResult work item configuration list result.
  3376  type WorkItemConfigurationsListResult struct {
  3377  	autorest.Response `json:"-"`
  3378  	// Value - READ-ONLY; An array of work item configurations.
  3379  	Value *[]WorkItemConfiguration `json:"value,omitempty"`
  3380  }
  3381  
  3382  // MarshalJSON is the custom marshaler for WorkItemConfigurationsListResult.
  3383  func (wiclr WorkItemConfigurationsListResult) MarshalJSON() ([]byte, error) {
  3384  	objectMap := make(map[string]interface{})
  3385  	return json.Marshal(objectMap)
  3386  }
  3387  
  3388  // WorkItemCreateConfiguration work item configuration creation payload
  3389  type WorkItemCreateConfiguration struct {
  3390  	// ConnectorID - Unique connector id
  3391  	ConnectorID *string `json:"ConnectorId,omitempty"`
  3392  	// ConnectorDataConfiguration - Serialized JSON object for detailed properties
  3393  	ConnectorDataConfiguration *string `json:"ConnectorDataConfiguration,omitempty"`
  3394  	// ValidateOnly - Boolean indicating validate only
  3395  	ValidateOnly *bool `json:"ValidateOnly,omitempty"`
  3396  	// WorkItemProperties - Custom work item properties
  3397  	WorkItemProperties map[string]*string `json:"WorkItemProperties"`
  3398  }
  3399  
  3400  // MarshalJSON is the custom marshaler for WorkItemCreateConfiguration.
  3401  func (wicc WorkItemCreateConfiguration) MarshalJSON() ([]byte, error) {
  3402  	objectMap := make(map[string]interface{})
  3403  	if wicc.ConnectorID != nil {
  3404  		objectMap["ConnectorId"] = wicc.ConnectorID
  3405  	}
  3406  	if wicc.ConnectorDataConfiguration != nil {
  3407  		objectMap["ConnectorDataConfiguration"] = wicc.ConnectorDataConfiguration
  3408  	}
  3409  	if wicc.ValidateOnly != nil {
  3410  		objectMap["ValidateOnly"] = wicc.ValidateOnly
  3411  	}
  3412  	if wicc.WorkItemProperties != nil {
  3413  		objectMap["WorkItemProperties"] = wicc.WorkItemProperties
  3414  	}
  3415  	return json.Marshal(objectMap)
  3416  }
  3417  

View as plain text