From 168eb852349edef650d51410644b05486b3a7634 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 20 Nov 2018 20:20:23 +0000 Subject: [PATCH] Generated from 428b52b308b52edc6e1dd617cb96ba8ee59e7b92 Capitalization comment --- .../preview/network/mgmt/network/models.go | 14 ++++ .../network/mgmt/2018-10-01/network/models.go | 77 ++++++++++++++++++- 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/profiles/preview/network/mgmt/network/models.go b/profiles/preview/network/mgmt/network/models.go index e015588a999c..b197d6f2e478 100644 --- a/profiles/preview/network/mgmt/network/models.go +++ b/profiles/preview/network/mgmt/network/models.go @@ -677,6 +677,15 @@ const ( Standard PublicIPPrefixSkuName = original.Standard ) +type ResourceIdentityType = original.ResourceIdentityType + +const ( + ResourceIdentityTypeNone ResourceIdentityType = original.ResourceIdentityTypeNone + ResourceIdentityTypeSystemAssigned ResourceIdentityType = original.ResourceIdentityTypeSystemAssigned + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = original.ResourceIdentityTypeSystemAssignedUserAssigned + ResourceIdentityTypeUserAssigned ResourceIdentityType = original.ResourceIdentityTypeUserAssigned +) + type RouteNextHopType = original.RouteNextHopType const ( @@ -1276,6 +1285,8 @@ type LocalNetworkGatewaysCreateOrUpdateFuture = original.LocalNetworkGatewaysCre type LocalNetworkGatewaysDeleteFuture = original.LocalNetworkGatewaysDeleteFuture type LocalNetworkGatewaysUpdateTagsFuture = original.LocalNetworkGatewaysUpdateTagsFuture type LogSpecification = original.LogSpecification +type ManagedServiceIdentity = original.ManagedServiceIdentity +type ManagedServiceIdentityUserAssignedIdentitiesValue = original.ManagedServiceIdentityUserAssignedIdentitiesValue type MatchedRule = original.MatchedRule type MetricSpecification = original.MetricSpecification type NextHopParameters = original.NextHopParameters @@ -2051,6 +2062,9 @@ func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName { return original.PossiblePublicIPPrefixSkuNameValues() } +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return original.PossibleResourceIdentityTypeValues() +} func PossibleRouteNextHopTypeValues() []RouteNextHopType { return original.PossibleRouteNextHopTypeValues() } diff --git a/services/network/mgmt/2018-10-01/network/models.go b/services/network/mgmt/2018-10-01/network/models.go index 1f6c4a5b081b..570847d49ef2 100644 --- a/services/network/mgmt/2018-10-01/network/models.go +++ b/services/network/mgmt/2018-10-01/network/models.go @@ -1322,6 +1322,25 @@ func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName { return []PublicIPPrefixSkuName{Standard} } +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // ResourceIdentityTypeUserAssigned ... + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} +} + // RouteNextHopType enumerates the values for route next hop type. type RouteNextHopType string @@ -1733,6 +1752,8 @@ type ApplicationGateway struct { Etag *string `json:"etag,omitempty"` // Zones - A list of availability zones denoting where the resource needs to come from. Zones *[]string `json:"zones,omitempty"` + // Identity - The identity of the application gateway, if configured. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - Resource name. @@ -1757,6 +1778,9 @@ func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { if ag.Zones != nil { objectMap["zones"] = ag.Zones } + if ag.Identity != nil { + objectMap["identity"] = ag.Identity + } if ag.ID != nil { objectMap["id"] = ag.ID } @@ -1811,6 +1835,15 @@ func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { } ag.Zones = &zones } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ag.Identity = &identity + } case "id": if v != nil { var ID string @@ -4098,6 +4131,8 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { Password *string `json:"password,omitempty"` // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. PublicCertData *string `json:"publicCertData,omitempty"` + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } @@ -4366,8 +4401,8 @@ func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { // Data - Certificate public data. Data *string `json:"data,omitempty"` - // KeyvaultSecretID - KeyVault Secret Id for certificate. - KeyvaultSecretID *string `json:"keyvaultSecretId,omitempty"` + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` // ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } @@ -17157,6 +17192,44 @@ type LogSpecification struct { BlobDuration *string `json:"blobDuration,omitempty"` } +// ManagedServiceIdentity identity for the resource. +type ManagedServiceIdentity struct { + // PrincipalID - The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ManagedServiceIdentity. +func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msi.PrincipalID != nil { + objectMap["principalId"] = msi.PrincipalID + } + if msi.TenantID != nil { + objectMap["tenantId"] = msi.TenantID + } + if msi.Type != "" { + objectMap["type"] = msi.Type + } + if msi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// ManagedServiceIdentityUserAssignedIdentitiesValue ... +type ManagedServiceIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + // MatchedRule matched rule. type MatchedRule struct { // RuleName - Name of the matched network security rule.