1package advisor 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 "encoding/json" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/date" 24 "github.com/Azure/go-autorest/autorest/to" 25 "github.com/satori/go.uuid" 26 "net/http" 27) 28 29// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 30// Category enumerates the values for category. 31type Category string 32 33const ( 34 // Cost ... 35 Cost Category = "Cost" 36 // HighAvailability ... 37 HighAvailability Category = "HighAvailability" 38 // Performance ... 39 Performance Category = "Performance" 40 // Security ... 41 Security Category = "Security" 42) 43 44// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 45// PossibleCategoryValues returns an array of possible values for the Category const type. 46func PossibleCategoryValues() []Category { 47 return []Category{Cost, HighAvailability, Performance, Security} 48} 49 50// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 51// Impact enumerates the values for impact. 52type Impact string 53 54const ( 55 // High ... 56 High Impact = "High" 57 // Low ... 58 Low Impact = "Low" 59 // Medium ... 60 Medium Impact = "Medium" 61) 62 63// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 64// PossibleImpactValues returns an array of possible values for the Impact const type. 65func PossibleImpactValues() []Impact { 66 return []Impact{High, Low, Medium} 67} 68 69// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 70// Risk enumerates the values for risk. 71type Risk string 72 73const ( 74 // Error ... 75 Error Risk = "Error" 76 // None ... 77 None Risk = "None" 78 // Warning ... 79 Warning Risk = "Warning" 80) 81 82// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 83// PossibleRiskValues returns an array of possible values for the Risk const type. 84func PossibleRiskValues() []Risk { 85 return []Risk{Error, None, Warning} 86} 87 88// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 89// ListSuppressionContract ... 90type ListSuppressionContract struct { 91 autorest.Response `json:"-"` 92 Value *[]SuppressionContract `json:"value,omitempty"` 93} 94 95// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 96// OperationDisplayInfo the operation supported by Advisor. 97type OperationDisplayInfo struct { 98 // Description - The description of the operation. 99 Description *string `json:"description,omitempty"` 100 // Operation - The action that users can perform, based on their permission level. 101 Operation *string `json:"operation,omitempty"` 102 // Provider - Service provider: Microsoft Advisor. 103 Provider *string `json:"provider,omitempty"` 104 // Resource - Resource on which the operation is performed. 105 Resource *string `json:"resource,omitempty"` 106} 107 108// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 109// OperationEntity the operation supported by Advisor. 110type OperationEntity struct { 111 // Name - Operation name: {provider}/{resource}/{operation}. 112 Name *string `json:"name,omitempty"` 113 // Display - The operation supported by Advisor. 114 Display *OperationDisplayInfo `json:"display,omitempty"` 115} 116 117// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 118// OperationEntityListResult the list of Advisor operations. 119type OperationEntityListResult struct { 120 autorest.Response `json:"-"` 121 // NextLink - The link used to get the next page of operations. 122 NextLink *string `json:"nextLink,omitempty"` 123 // Value - The list of operations. 124 Value *[]OperationEntity `json:"value,omitempty"` 125} 126 127// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 128// OperationEntityListResultIterator provides access to a complete listing of OperationEntity values. 129type OperationEntityListResultIterator struct { 130 i int 131 page OperationEntityListResultPage 132} 133 134// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 135// Next advances to the next value. If there was an error making 136// the request the iterator does not advance and the error is returned. 137func (iter *OperationEntityListResultIterator) Next() error { 138 iter.i++ 139 if iter.i < len(iter.page.Values()) { 140 return nil 141 } 142 err := iter.page.Next() 143 if err != nil { 144 iter.i-- 145 return err 146 } 147 iter.i = 0 148 return nil 149} 150 151// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 152// NotDone returns true if the enumeration should be started or is not yet complete. 153func (iter OperationEntityListResultIterator) NotDone() bool { 154 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 155} 156 157// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 158// Response returns the raw server response from the last page request. 159func (iter OperationEntityListResultIterator) Response() OperationEntityListResult { 160 return iter.page.Response() 161} 162 163// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 164// Value returns the current value or a zero-initialized value if the 165// iterator has advanced beyond the end of the collection. 166func (iter OperationEntityListResultIterator) Value() OperationEntity { 167 if !iter.page.NotDone() { 168 return OperationEntity{} 169 } 170 return iter.page.Values()[iter.i] 171} 172 173// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 174// IsEmpty returns true if the ListResult contains no values. 175func (oelr OperationEntityListResult) IsEmpty() bool { 176 return oelr.Value == nil || len(*oelr.Value) == 0 177} 178 179// operationEntityListResultPreparer prepares a request to retrieve the next set of results. 180// It returns nil if no more results exist. 181func (oelr OperationEntityListResult) operationEntityListResultPreparer() (*http.Request, error) { 182 if oelr.NextLink == nil || len(to.String(oelr.NextLink)) < 1 { 183 return nil, nil 184 } 185 return autorest.Prepare(&http.Request{}, 186 autorest.AsJSON(), 187 autorest.AsGet(), 188 autorest.WithBaseURL(to.String(oelr.NextLink))) 189} 190 191// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 192// OperationEntityListResultPage contains a page of OperationEntity values. 193type OperationEntityListResultPage struct { 194 fn func(OperationEntityListResult) (OperationEntityListResult, error) 195 oelr OperationEntityListResult 196} 197 198// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 199// Next advances to the next page of values. If there was an error making 200// the request the page does not advance and the error is returned. 201func (page *OperationEntityListResultPage) Next() error { 202 next, err := page.fn(page.oelr) 203 if err != nil { 204 return err 205 } 206 page.oelr = next 207 return nil 208} 209 210// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 211// NotDone returns true if the page enumeration should be started or is not yet complete. 212func (page OperationEntityListResultPage) NotDone() bool { 213 return !page.oelr.IsEmpty() 214} 215 216// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 217// Response returns the raw server response from the last page request. 218func (page OperationEntityListResultPage) Response() OperationEntityListResult { 219 return page.oelr 220} 221 222// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 223// Values returns the slice of values for the current page or nil if there are no values. 224func (page OperationEntityListResultPage) Values() []OperationEntity { 225 if page.oelr.IsEmpty() { 226 return nil 227 } 228 return *page.oelr.Value 229} 230 231// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 232// RecommendationProperties the properties of the recommendation. 233type RecommendationProperties struct { 234 // Category - The category of the recommendation. Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost' 235 Category Category `json:"category,omitempty"` 236 // Impact - The business impact of the recommendation. Possible values include: 'High', 'Medium', 'Low' 237 Impact Impact `json:"impact,omitempty"` 238 // ImpactedField - The resource type identified by Advisor. 239 ImpactedField *string `json:"impactedField,omitempty"` 240 // ImpactedValue - The resource identified by Advisor. 241 ImpactedValue *string `json:"impactedValue,omitempty"` 242 // LastUpdated - The most recent time that Advisor checked the validity of the recommendation. 243 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 244 // Metadata - The recommendation metadata. 245 Metadata map[string]interface{} `json:"metadata"` 246 // RecommendationTypeID - The recommendation-type GUID. 247 RecommendationTypeID *string `json:"recommendationTypeId,omitempty"` 248 // Risk - The potential risk of not implementing the recommendation. Possible values include: 'Error', 'Warning', 'None' 249 Risk Risk `json:"risk,omitempty"` 250 // ShortDescription - A summary of the recommendation. 251 ShortDescription *ShortDescription `json:"shortDescription,omitempty"` 252} 253 254// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 255// MarshalJSON is the custom marshaler for RecommendationProperties. 256func (rp RecommendationProperties) MarshalJSON() ([]byte, error) { 257 objectMap := make(map[string]interface{}) 258 if rp.Category != "" { 259 objectMap["category"] = rp.Category 260 } 261 if rp.Impact != "" { 262 objectMap["impact"] = rp.Impact 263 } 264 if rp.ImpactedField != nil { 265 objectMap["impactedField"] = rp.ImpactedField 266 } 267 if rp.ImpactedValue != nil { 268 objectMap["impactedValue"] = rp.ImpactedValue 269 } 270 if rp.LastUpdated != nil { 271 objectMap["lastUpdated"] = rp.LastUpdated 272 } 273 if rp.Metadata != nil { 274 objectMap["metadata"] = rp.Metadata 275 } 276 if rp.RecommendationTypeID != nil { 277 objectMap["recommendationTypeId"] = rp.RecommendationTypeID 278 } 279 if rp.Risk != "" { 280 objectMap["risk"] = rp.Risk 281 } 282 if rp.ShortDescription != nil { 283 objectMap["shortDescription"] = rp.ShortDescription 284 } 285 return json.Marshal(objectMap) 286} 287 288// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 289// Resource an Azure resource. 290type Resource struct { 291 // ID - The resource ID. 292 ID *string `json:"id,omitempty"` 293 // Name - The name of the resource. 294 Name *string `json:"name,omitempty"` 295 // Type - The type of the resource. 296 Type *string `json:"type,omitempty"` 297 // Location - The location of the resource. This cannot be changed after the resource is created. 298 Location *string `json:"location,omitempty"` 299 // Tags - The tags of the resource. 300 Tags map[string]*string `json:"tags"` 301} 302 303// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 304// MarshalJSON is the custom marshaler for Resource. 305func (r Resource) MarshalJSON() ([]byte, error) { 306 objectMap := make(map[string]interface{}) 307 if r.ID != nil { 308 objectMap["id"] = r.ID 309 } 310 if r.Name != nil { 311 objectMap["name"] = r.Name 312 } 313 if r.Type != nil { 314 objectMap["type"] = r.Type 315 } 316 if r.Location != nil { 317 objectMap["location"] = r.Location 318 } 319 if r.Tags != nil { 320 objectMap["tags"] = r.Tags 321 } 322 return json.Marshal(objectMap) 323} 324 325// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 326// ResourceRecommendationBase advisor Recommendation. 327type ResourceRecommendationBase struct { 328 autorest.Response `json:"-"` 329 // ID - The fully qualified recommendation ID, for example /subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.ClassicCompute/virtualMachines/vm1/providers/Microsoft.Advisor/recommendations/recommendationGUID. 330 ID *string `json:"id,omitempty"` 331 // Name - The name of recommendation. 332 Name *string `json:"name,omitempty"` 333 // RecommendationProperties - The properties of the recommendation. 334 *RecommendationProperties `json:"properties,omitempty"` 335 // SuppressionIds - The list of snoozed and dismissed rules for the recommendation. 336 SuppressionIds *[]uuid.UUID `json:"suppressionIds,omitempty"` 337 // Type - The recommendation type: Microsoft.Advisor/recommendations. 338 Type *string `json:"type,omitempty"` 339} 340 341// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 342// MarshalJSON is the custom marshaler for ResourceRecommendationBase. 343func (rrb ResourceRecommendationBase) MarshalJSON() ([]byte, error) { 344 objectMap := make(map[string]interface{}) 345 if rrb.ID != nil { 346 objectMap["id"] = rrb.ID 347 } 348 if rrb.Name != nil { 349 objectMap["name"] = rrb.Name 350 } 351 if rrb.RecommendationProperties != nil { 352 objectMap["properties"] = rrb.RecommendationProperties 353 } 354 if rrb.SuppressionIds != nil { 355 objectMap["suppressionIds"] = rrb.SuppressionIds 356 } 357 if rrb.Type != nil { 358 objectMap["type"] = rrb.Type 359 } 360 return json.Marshal(objectMap) 361} 362 363// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 364// UnmarshalJSON is the custom unmarshaler for ResourceRecommendationBase struct. 365func (rrb *ResourceRecommendationBase) UnmarshalJSON(body []byte) error { 366 var m map[string]*json.RawMessage 367 err := json.Unmarshal(body, &m) 368 if err != nil { 369 return err 370 } 371 for k, v := range m { 372 switch k { 373 case "id": 374 if v != nil { 375 var ID string 376 err = json.Unmarshal(*v, &ID) 377 if err != nil { 378 return err 379 } 380 rrb.ID = &ID 381 } 382 case "name": 383 if v != nil { 384 var name string 385 err = json.Unmarshal(*v, &name) 386 if err != nil { 387 return err 388 } 389 rrb.Name = &name 390 } 391 case "properties": 392 if v != nil { 393 var recommendationProperties RecommendationProperties 394 err = json.Unmarshal(*v, &recommendationProperties) 395 if err != nil { 396 return err 397 } 398 rrb.RecommendationProperties = &recommendationProperties 399 } 400 case "suppressionIds": 401 if v != nil { 402 var suppressionIds []uuid.UUID 403 err = json.Unmarshal(*v, &suppressionIds) 404 if err != nil { 405 return err 406 } 407 rrb.SuppressionIds = &suppressionIds 408 } 409 case "type": 410 if v != nil { 411 var typeVar string 412 err = json.Unmarshal(*v, &typeVar) 413 if err != nil { 414 return err 415 } 416 rrb.Type = &typeVar 417 } 418 } 419 } 420 421 return nil 422} 423 424// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 425// ResourceRecommendationBaseListResult the list of Advisor recommendations. 426type ResourceRecommendationBaseListResult struct { 427 autorest.Response `json:"-"` 428 // NextLink - The link used to get the next page of recommendations. 429 NextLink *string `json:"nextLink,omitempty"` 430 // Value - The list of recommendations. 431 Value *[]ResourceRecommendationBase `json:"value,omitempty"` 432} 433 434// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 435// ResourceRecommendationBaseListResultIterator provides access to a complete listing of ResourceRecommendationBase 436// values. 437type ResourceRecommendationBaseListResultIterator struct { 438 i int 439 page ResourceRecommendationBaseListResultPage 440} 441 442// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 443// Next advances to the next value. If there was an error making 444// the request the iterator does not advance and the error is returned. 445func (iter *ResourceRecommendationBaseListResultIterator) Next() error { 446 iter.i++ 447 if iter.i < len(iter.page.Values()) { 448 return nil 449 } 450 err := iter.page.Next() 451 if err != nil { 452 iter.i-- 453 return err 454 } 455 iter.i = 0 456 return nil 457} 458 459// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 460// NotDone returns true if the enumeration should be started or is not yet complete. 461func (iter ResourceRecommendationBaseListResultIterator) NotDone() bool { 462 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 463} 464 465// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 466// Response returns the raw server response from the last page request. 467func (iter ResourceRecommendationBaseListResultIterator) Response() ResourceRecommendationBaseListResult { 468 return iter.page.Response() 469} 470 471// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 472// Value returns the current value or a zero-initialized value if the 473// iterator has advanced beyond the end of the collection. 474func (iter ResourceRecommendationBaseListResultIterator) Value() ResourceRecommendationBase { 475 if !iter.page.NotDone() { 476 return ResourceRecommendationBase{} 477 } 478 return iter.page.Values()[iter.i] 479} 480 481// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 482// IsEmpty returns true if the ListResult contains no values. 483func (rrblr ResourceRecommendationBaseListResult) IsEmpty() bool { 484 return rrblr.Value == nil || len(*rrblr.Value) == 0 485} 486 487// resourceRecommendationBaseListResultPreparer prepares a request to retrieve the next set of results. 488// It returns nil if no more results exist. 489func (rrblr ResourceRecommendationBaseListResult) resourceRecommendationBaseListResultPreparer() (*http.Request, error) { 490 if rrblr.NextLink == nil || len(to.String(rrblr.NextLink)) < 1 { 491 return nil, nil 492 } 493 return autorest.Prepare(&http.Request{}, 494 autorest.AsJSON(), 495 autorest.AsGet(), 496 autorest.WithBaseURL(to.String(rrblr.NextLink))) 497} 498 499// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 500// ResourceRecommendationBaseListResultPage contains a page of ResourceRecommendationBase values. 501type ResourceRecommendationBaseListResultPage struct { 502 fn func(ResourceRecommendationBaseListResult) (ResourceRecommendationBaseListResult, error) 503 rrblr ResourceRecommendationBaseListResult 504} 505 506// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 507// Next advances to the next page of values. If there was an error making 508// the request the page does not advance and the error is returned. 509func (page *ResourceRecommendationBaseListResultPage) Next() error { 510 next, err := page.fn(page.rrblr) 511 if err != nil { 512 return err 513 } 514 page.rrblr = next 515 return nil 516} 517 518// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 519// NotDone returns true if the page enumeration should be started or is not yet complete. 520func (page ResourceRecommendationBaseListResultPage) NotDone() bool { 521 return !page.rrblr.IsEmpty() 522} 523 524// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 525// Response returns the raw server response from the last page request. 526func (page ResourceRecommendationBaseListResultPage) Response() ResourceRecommendationBaseListResult { 527 return page.rrblr 528} 529 530// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 531// Values returns the slice of values for the current page or nil if there are no values. 532func (page ResourceRecommendationBaseListResultPage) Values() []ResourceRecommendationBase { 533 if page.rrblr.IsEmpty() { 534 return nil 535 } 536 return *page.rrblr.Value 537} 538 539// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 540// ShortDescription a summary of the recommendation. 541type ShortDescription struct { 542 // Problem - The issue or opportunity identified by the recommendation. 543 Problem *string `json:"problem,omitempty"` 544 // Solution - The remediation action suggested by the recommendation. 545 Solution *string `json:"solution,omitempty"` 546} 547 548// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 549// SuppressionContract the details of the snoozed or dismissed rule; for example, the duration, name, and GUID 550// associated with the rule. 551type SuppressionContract struct { 552 autorest.Response `json:"-"` 553 // SuppressionID - The GUID of the suppression. 554 SuppressionID *string `json:"suppressionId,omitempty"` 555 // TTL - The duration for which the suppression is valid. 556 TTL *string `json:"ttl,omitempty"` 557 // ID - The resource ID. 558 ID *string `json:"id,omitempty"` 559 // Name - The name of the resource. 560 Name *string `json:"name,omitempty"` 561 // Type - The type of the resource. 562 Type *string `json:"type,omitempty"` 563 // Location - The location of the resource. This cannot be changed after the resource is created. 564 Location *string `json:"location,omitempty"` 565 // Tags - The tags of the resource. 566 Tags map[string]*string `json:"tags"` 567} 568 569// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/advisor/mgmt/2016-07-12-preview/advisor instead. 570// MarshalJSON is the custom marshaler for SuppressionContract. 571func (sc SuppressionContract) MarshalJSON() ([]byte, error) { 572 objectMap := make(map[string]interface{}) 573 if sc.SuppressionID != nil { 574 objectMap["suppressionId"] = sc.SuppressionID 575 } 576 if sc.TTL != nil { 577 objectMap["ttl"] = sc.TTL 578 } 579 if sc.ID != nil { 580 objectMap["id"] = sc.ID 581 } 582 if sc.Name != nil { 583 objectMap["name"] = sc.Name 584 } 585 if sc.Type != nil { 586 objectMap["type"] = sc.Type 587 } 588 if sc.Location != nil { 589 objectMap["location"] = sc.Location 590 } 591 if sc.Tags != nil { 592 objectMap["tags"] = sc.Tags 593 } 594 return json.Marshal(objectMap) 595} 596