From 4e8a830a4765ff85aad4b8451f3c74da4aa54e0a Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 24 Aug 2020 03:07:15 +0000 Subject: [PATCH] Generated from e58a0d78cad8d423cd73efc74a9ef6b643b09ca9 Change variable name to TrackedResourceLocation --- .../security/mgmt/v1.0/security/enums.go | 4 ++- .../security/mgmt/v1.0/security/models.go | 29 +++++++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/services/preview/security/mgmt/v1.0/security/enums.go b/services/preview/security/mgmt/v1.0/security/enums.go index 4a3cbf485556..898a67989e9c 100644 --- a/services/preview/security/mgmt/v1.0/security/enums.go +++ b/services/preview/security/mgmt/v1.0/security/enums.go @@ -339,11 +339,13 @@ const ( Alerts EventSource = "Alerts" // Assessments ... Assessments EventSource = "Assessments" + // SubAssessments ... + SubAssessments EventSource = "SubAssessments" ) // PossibleEventSourceValues returns an array of possible values for the EventSource const type. func PossibleEventSourceValues() []EventSource { - return []EventSource{Alerts, Assessments} + return []EventSource{Alerts, Assessments, SubAssessments} } // Exe enumerates the values for exe. diff --git a/services/preview/security/mgmt/v1.0/security/models.go b/services/preview/security/mgmt/v1.0/security/models.go index eabfb8955f70..83ba9d2568b1 100644 --- a/services/preview/security/mgmt/v1.0/security/models.go +++ b/services/preview/security/mgmt/v1.0/security/models.go @@ -2020,7 +2020,7 @@ type Automation struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` - // Location - READ-ONLY; Location where the resource is stored + // Location - Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Kind of the resource Kind *string `json:"kind,omitempty"` @@ -2036,6 +2036,9 @@ func (a Automation) MarshalJSON() ([]byte, error) { if a.AutomationProperties != nil { objectMap["properties"] = a.AutomationProperties } + if a.Location != nil { + objectMap["location"] = a.Location + } if a.Kind != nil { objectMap["kind"] = a.Kind } @@ -2644,7 +2647,7 @@ type AutomationScope struct { // security alerts and security assessments. To learn more about the supported security events data models // schemas - please visit https://aka.ms/ASCAutomationSchemas. type AutomationSource struct { - // EventSource - A valid event source type. Possible values include: 'Assessments', 'Alerts' + // EventSource - A valid event source type. Possible values include: 'Assessments', 'SubAssessments', 'Alerts' EventSource EventSource `json:"eventSource,omitempty"` // RuleSets - A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical 'or'). RuleSets *[]AutomationRuleSet `json:"ruleSets,omitempty"` @@ -8412,6 +8415,8 @@ type SecureScoreItemProperties struct { DisplayName *string `json:"displayName,omitempty"` // ScoreDetails - READ-ONLY; score object *ScoreDetails `json:"score,omitempty"` + // Weight - READ-ONLY; The weight for calculation of an aggregated score for several scopes + Weight *int64 `json:"weight,omitempty"` } // MarshalJSON is the custom marshaler for SecureScoreItemProperties. @@ -8447,6 +8452,15 @@ func (ssip *SecureScoreItemProperties) UnmarshalJSON(body []byte) error { } ssip.ScoreDetails = &scoreDetails } + case "weight": + if v != nil { + var weight int64 + err = json.Unmarshal(*v, &weight) + if err != nil { + return err + } + ssip.Weight = &weight + } } } @@ -9998,7 +10012,7 @@ type TrackedResource struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` - // Location - READ-ONLY; Location where the resource is stored + // Location - Location where the resource is stored Location *string `json:"location,omitempty"` // Kind - Kind of the resource Kind *string `json:"kind,omitempty"` @@ -10011,6 +10025,9 @@ type TrackedResource struct { // MarshalJSON is the custom marshaler for TrackedResource. func (tr TrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if tr.Location != nil { + objectMap["location"] = tr.Location + } if tr.Kind != nil { objectMap["kind"] = tr.Kind } @@ -10023,6 +10040,12 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// TrackedResourceLocation describes an Azure resource with location +type TrackedResourceLocation struct { + // Location - Location where the resource is stored + Location *string `json:"location,omitempty"` +} + // UserRecommendation represents a user that is recommended to be allowed for a certain rule type UserRecommendation struct { // Username - Represents a user that is recommended to be allowed for a certain rule