...

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

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

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

View as plain text