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