diff --git a/services/graphrbac/1.6/graphrbac/models.go b/services/graphrbac/1.6/graphrbac/models.go index 4c4fc8a33781..b08b43e608cf 100644 --- a/services/graphrbac/1.6/graphrbac/models.go +++ b/services/graphrbac/1.6/graphrbac/models.go @@ -331,6 +331,10 @@ type Application struct { Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"` // RequiredResourceAccess - Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience. RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"` + // KeyCredentials - A collection of KeyCredential objects. + KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"` + // PasswordCredentials - A collection of PasswordCredential objects + PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"` // AdditionalProperties - Unmatched properties from the message are deserialized this collection AdditionalProperties map[string]interface{} `json:""` // ObjectID - The object ID. @@ -375,6 +379,12 @@ func (a Application) MarshalJSON() ([]byte, error) { if a.RequiredResourceAccess != nil { objectMap["requiredResourceAccess"] = a.RequiredResourceAccess } + if a.KeyCredentials != nil { + objectMap["keyCredentials"] = a.KeyCredentials + } + if a.PasswordCredentials != nil { + objectMap["passwordCredentials"] = a.PasswordCredentials + } if a.ObjectID != nil { objectMap["objectId"] = a.ObjectID } @@ -519,6 +529,24 @@ func (a *Application) UnmarshalJSON(body []byte) error { } a.RequiredResourceAccess = &requiredResourceAccess } + case "keyCredentials": + if v != nil { + var keyCredentials []KeyCredential + err = json.Unmarshal(*v, &keyCredentials) + if err != nil { + return err + } + a.KeyCredentials = &keyCredentials + } + case "passwordCredentials": + if v != nil { + var passwordCredentials []PasswordCredential + err = json.Unmarshal(*v, &passwordCredentials) + if err != nil { + return err + } + a.PasswordCredentials = &passwordCredentials + } default: if v != nil { var additionalProperties interface{} @@ -2159,7 +2187,7 @@ type KeyCredential struct { // Type - Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'. Type *string `json:"type,omitempty"` // CustomKeyIdentifier - Custom Key Identifier - CustomKeyIdentifier *[]byte `json:"customKeyIdentifier,omitempty"` + CustomKeyIdentifier *string `json:"customKeyIdentifier,omitempty"` } // MarshalJSON is the custom marshaler for KeyCredential. @@ -2269,7 +2297,7 @@ func (kc *KeyCredential) UnmarshalJSON(body []byte) error { } case "customKeyIdentifier": if v != nil { - var customKeyIdentifier []byte + var customKeyIdentifier string err = json.Unmarshal(*v, &customKeyIdentifier) if err != nil { return err @@ -2360,6 +2388,8 @@ type PasswordCredential struct { KeyID *string `json:"keyId,omitempty"` // Value - Key value. Value *string `json:"value,omitempty"` + // CustomKeyIdentifier - Custom Key Identifier + CustomKeyIdentifier *[]byte `json:"customKeyIdentifier,omitempty"` } // MarshalJSON is the custom marshaler for PasswordCredential. @@ -2377,6 +2407,9 @@ func (pc PasswordCredential) MarshalJSON() ([]byte, error) { if pc.Value != nil { objectMap["value"] = pc.Value } + if pc.CustomKeyIdentifier != nil { + objectMap["customKeyIdentifier"] = pc.CustomKeyIdentifier + } for k, v := range pc.AdditionalProperties { objectMap[k] = v } @@ -2440,6 +2473,15 @@ func (pc *PasswordCredential) UnmarshalJSON(body []byte) error { } pc.Value = &value } + case "customKeyIdentifier": + if v != nil { + var customKeyIdentifier []byte + err = json.Unmarshal(*v, &customKeyIdentifier) + if err != nil { + return err + } + pc.CustomKeyIdentifier = &customKeyIdentifier + } } }