diff --git a/profiles/preview/preview/frontdoor/mgmt/frontdoor/models.go b/profiles/preview/preview/frontdoor/mgmt/frontdoor/models.go
index 38aa56ec23bf..07f791e21278 100644
--- a/profiles/preview/preview/frontdoor/mgmt/frontdoor/models.go
+++ b/profiles/preview/preview/frontdoor/mgmt/frontdoor/models.go
@@ -168,6 +168,13 @@ const (
OneFullStopZero MinimumTLSVersion = original.OneFullStopZero
)
+type MinimumTLSVersion = original.MinimumTLSVersion
+
+const (
+ OneFullStopTwo MinimumTLSVersion = original.OneFullStopTwo
+ OneFullStopZero MinimumTLSVersion = original.OneFullStopZero
+)
+
type NetworkOperationStatus = original.NetworkOperationStatus
const (
diff --git a/profiles/preview/preview/managednetwork/mgmt/managednetwork/models.go b/profiles/preview/preview/managednetwork/mgmt/managednetwork/models.go
index d2b5de3e5177..579ee5b72acb 100644
--- a/profiles/preview/preview/managednetwork/mgmt/managednetwork/models.go
+++ b/profiles/preview/preview/managednetwork/mgmt/managednetwork/models.go
@@ -35,6 +35,14 @@ const (
Connectivity Kind = original.Connectivity
)
+type PeeringPolicyType = original.PeeringPolicyType
+
+const (
+ PeeringPolicyTypeHubAndSpokeTopology PeeringPolicyType = original.PeeringPolicyTypeHubAndSpokeTopology
+ PeeringPolicyTypeManagedNetworkPeeringPolicyProperties PeeringPolicyType = original.PeeringPolicyTypeManagedNetworkPeeringPolicyProperties
+ PeeringPolicyTypeMeshTopology PeeringPolicyType = original.PeeringPolicyTypeMeshTopology
+)
+
type ProvisioningState = original.ProvisioningState
const (
@@ -44,14 +52,8 @@ const (
Updating ProvisioningState = original.Updating
)
-type Type = original.Type
-
-const (
- HubAndSpokeTopology Type = original.HubAndSpokeTopology
- MeshTopology Type = original.MeshTopology
-)
-
type BaseClient = original.BaseClient
+type BasicPeeringPolicyProperties = original.BasicPeeringPolicyProperties
type ConnectivityCollection = original.ConnectivityCollection
type ErrorResponse = original.ErrorResponse
type Group = original.Group
@@ -169,12 +171,12 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
func PossibleKindValues() []Kind {
return original.PossibleKindValues()
}
+func PossiblePeeringPolicyTypeValues() []PeeringPolicyType {
+ return original.PossiblePeeringPolicyTypeValues()
+}
func PossibleProvisioningStateValues() []ProvisioningState {
return original.PossibleProvisioningStateValues()
}
-func PossibleTypeValues() []Type {
- return original.PossibleTypeValues()
-}
func UserAgent() string {
return original.UserAgent() + " profiles/preview"
}
diff --git a/services/compute/mgmt/2019-03-01/compute/availabilitysets.go b/services/compute/mgmt/2019-03-01/compute/availabilitysets.go
index 8a6bbaa4a195..853abfc1c95c 100644
--- a/services/compute/mgmt/2019-03-01/compute/availabilitysets.go
+++ b/services/compute/mgmt/2019-03-01/compute/availabilitysets.go
@@ -465,7 +465,9 @@ func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Resp
}
// ListBySubscription lists all availability sets in a subscription.
-func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context) (result AvailabilitySetListResultPage, err error) {
+// Parameters:
+// expand - the expand expression to apply to the operation.
+func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, expand string) (result AvailabilitySetListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
defer func() {
@@ -477,7 +479,7 @@ func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context) (re
}()
}
result.fn = client.listBySubscriptionNextResults
- req, err := client.ListBySubscriptionPreparer(ctx)
+ req, err := client.ListBySubscriptionPreparer(ctx, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", nil, "Failure preparing request")
return
@@ -499,7 +501,7 @@ func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context) (re
}
// ListBySubscriptionPreparer prepares the ListBySubscription request.
-func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Context, expand string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
@@ -508,6 +510,9 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -559,7 +564,7 @@ func (client AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.C
}
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
-func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context) (result AvailabilitySetListResultIterator, err error) {
+func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, expand string) (result AvailabilitySetListResultIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
defer func() {
@@ -570,7 +575,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Cont
tracing.EndSpan(ctx, sc, err)
}()
}
- result.page, err = client.ListBySubscription(ctx)
+ result.page, err = client.ListBySubscription(ctx, expand)
return
}
diff --git a/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go
index 9dd226f0493a..b9cb016a868d 100644
--- a/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go
+++ b/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go
@@ -37,7 +37,7 @@ type AvailabilitySetsClientAPI interface {
Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.AvailabilitySet, err error)
List(ctx context.Context, resourceGroupName string) (result compute.AvailabilitySetListResultPage, err error)
ListAvailableSizes(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.VirtualMachineSizeListResult, err error)
- ListBySubscription(ctx context.Context) (result compute.AvailabilitySetListResultPage, err error)
+ ListBySubscription(ctx context.Context, expand string) (result compute.AvailabilitySetListResultPage, err error)
Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters compute.AvailabilitySetUpdate) (result compute.AvailabilitySet, err error)
}
diff --git a/services/compute/mgmt/2019-03-01/compute/models.go b/services/compute/mgmt/2019-03-01/compute/models.go
index e5166f2e83e8..debff09eee2e 100644
--- a/services/compute/mgmt/2019-03-01/compute/models.go
+++ b/services/compute/mgmt/2019-03-01/compute/models.go
@@ -948,6 +948,23 @@ func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
return []VirtualMachinePriorityTypes{Low, Regular}
}
+// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules.
+type VirtualMachineScaleSetScaleInRules string
+
+const (
+ // Default ...
+ Default VirtualMachineScaleSetScaleInRules = "Default"
+ // NewestVM ...
+ NewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
+ // OldestVM ...
+ OldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
+)
+
+// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type.
+func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules {
+ return []VirtualMachineScaleSetScaleInRules{Default, NewestVM, OldestVM}
+}
+
// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type.
type VirtualMachineScaleSetSkuScaleType string
@@ -7291,6 +7308,12 @@ type RunCommandResult struct {
Value *[]InstanceViewStatus `json:"value,omitempty"`
}
+// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
+type ScaleInPolicy struct {
+ // Rules - The rules to be followed when scaling-in a virtual machine scale set.
Possible values are:
**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.
**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.
**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.
+ Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
+}
+
// ScheduledEventsProfile ...
type ScheduledEventsProfile struct {
// TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
@@ -10382,6 +10405,8 @@ type VirtualMachineScaleSetProperties struct {
ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
+ ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
}
// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
@@ -11191,6 +11216,8 @@ type VirtualMachineScaleSetUpdateProperties struct {
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
+ ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
}
// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
diff --git a/services/preview/frontdoor/mgmt/2019-05-01/frontdoor/models.go b/services/preview/frontdoor/mgmt/2019-05-01/frontdoor/models.go
index ab92d8309169..b7801231ebc4 100644
--- a/services/preview/frontdoor/mgmt/2019-05-01/frontdoor/models.go
+++ b/services/preview/frontdoor/mgmt/2019-05-01/frontdoor/models.go
@@ -302,13 +302,11 @@ const (
RequestMethod MatchVariable = "RequestMethod"
// RequestURI ...
RequestURI MatchVariable = "RequestUri"
- // SocketAddr ...
- SocketAddr MatchVariable = "SocketAddr"
)
// PossibleMatchVariableValues returns an array of possible values for the MatchVariable const type.
func PossibleMatchVariableValues() []MatchVariable {
- return []MatchVariable{Cookies, PostArgs, QueryString, RemoteAddr, RequestBody, RequestHeader, RequestMethod, RequestURI, SocketAddr}
+ return []MatchVariable{Cookies, PostArgs, QueryString, RemoteAddr, RequestBody, RequestHeader, RequestMethod, RequestURI}
}
// MinimumTLSVersion enumerates the values for minimum tls version.
@@ -2829,7 +2827,7 @@ type ManagedRuleSetList struct {
// MatchCondition define a match condition.
type MatchCondition struct {
- // MatchVariable - Request variable to compare with. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeader', 'RequestBody', 'Cookies', 'SocketAddr'
+ // MatchVariable - Request variable to compare with. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeader', 'RequestBody', 'Cookies'
MatchVariable MatchVariable `json:"matchVariable,omitempty"`
// Selector - Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null.
Selector *string `json:"selector,omitempty"`
diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go
index 5b1fc536f0d2..92c5c90ee3aa 100644
--- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go
+++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go
@@ -43,6 +43,23 @@ func PossibleKindValues() []Kind {
return []Kind{Connectivity}
}
+// PeeringPolicyType enumerates the values for peering policy type.
+type PeeringPolicyType string
+
+const (
+ // PeeringPolicyTypeHubAndSpokeTopology ...
+ PeeringPolicyTypeHubAndSpokeTopology PeeringPolicyType = "HubAndSpokeTopology"
+ // PeeringPolicyTypeManagedNetworkPeeringPolicyProperties ...
+ PeeringPolicyTypeManagedNetworkPeeringPolicyProperties PeeringPolicyType = "ManagedNetworkPeeringPolicyProperties"
+ // PeeringPolicyTypeMeshTopology ...
+ PeeringPolicyTypeMeshTopology PeeringPolicyType = "MeshTopology"
+)
+
+// PossiblePeeringPolicyTypeValues returns an array of possible values for the PeeringPolicyType const type.
+func PossiblePeeringPolicyTypeValues() []PeeringPolicyType {
+ return []PeeringPolicyType{PeeringPolicyTypeHubAndSpokeTopology, PeeringPolicyTypeManagedNetworkPeeringPolicyProperties, PeeringPolicyTypeMeshTopology}
+}
+
// ProvisioningState enumerates the values for provisioning state.
type ProvisioningState string
@@ -62,21 +79,6 @@ func PossibleProvisioningStateValues() []ProvisioningState {
return []ProvisioningState{Deleting, Failed, Succeeded, Updating}
}
-// Type enumerates the values for type.
-type Type string
-
-const (
- // HubAndSpokeTopology ...
- HubAndSpokeTopology Type = "HubAndSpokeTopology"
- // MeshTopology ...
- MeshTopology Type = "MeshTopology"
-)
-
-// PossibleTypeValues returns an array of possible values for the Type const type.
-func PossibleTypeValues() []Type {
- return []Type{HubAndSpokeTopology, MeshTopology}
-}
-
// ConnectivityCollection the collection of Connectivity related groups and policies within the Managed
// Network
type ConnectivityCollection struct {
@@ -397,8 +399,6 @@ func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Respo
// HubAndSpokePeeringPolicyProperties properties of a Hub and Spoke Peering Policy
type HubAndSpokePeeringPolicyProperties struct {
- // Type - Gets or sets the connectivity type of a network structure policy. Possible values include: 'HubAndSpokeTopology', 'MeshTopology'
- Type Type `json:"type,omitempty"`
// Hub - Gets or sets the hub virtual network ID
Hub *ResourceID `json:"hub,omitempty"`
// Spokes - Gets or sets the spokes group IDs
@@ -409,6 +409,47 @@ type HubAndSpokePeeringPolicyProperties struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
+ // PeeringPolicyType - Possible values include: 'PeeringPolicyTypeManagedNetworkPeeringPolicyProperties', 'PeeringPolicyTypeHubAndSpokeTopology', 'PeeringPolicyTypeMeshTopology'
+ PeeringPolicyType PeeringPolicyType `json:"peeringPolicyType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for HubAndSpokePeeringPolicyProperties.
+func (hasppp HubAndSpokePeeringPolicyProperties) MarshalJSON() ([]byte, error) {
+ hasppp.PeeringPolicyType = PeeringPolicyTypeHubAndSpokeTopology
+ objectMap := make(map[string]interface{})
+ if hasppp.Hub != nil {
+ objectMap["hub"] = hasppp.Hub
+ }
+ if hasppp.Spokes != nil {
+ objectMap["spokes"] = hasppp.Spokes
+ }
+ if hasppp.Mesh != nil {
+ objectMap["mesh"] = hasppp.Mesh
+ }
+ if hasppp.PeeringPolicyType != "" {
+ objectMap["peeringPolicyType"] = hasppp.PeeringPolicyType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsHubAndSpokePeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for HubAndSpokePeeringPolicyProperties.
+func (hasppp HubAndSpokePeeringPolicyProperties) AsHubAndSpokePeeringPolicyProperties() (*HubAndSpokePeeringPolicyProperties, bool) {
+ return &hasppp, true
+}
+
+// AsMeshPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for HubAndSpokePeeringPolicyProperties.
+func (hasppp HubAndSpokePeeringPolicyProperties) AsMeshPeeringPolicyProperties() (*MeshPeeringPolicyProperties, bool) {
+ return nil, false
+}
+
+// AsPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for HubAndSpokePeeringPolicyProperties.
+func (hasppp HubAndSpokePeeringPolicyProperties) AsPeeringPolicyProperties() (*PeeringPolicyProperties, bool) {
+ return nil, false
+}
+
+// AsBasicPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for HubAndSpokePeeringPolicyProperties.
+func (hasppp HubAndSpokePeeringPolicyProperties) AsBasicPeeringPolicyProperties() (BasicPeeringPolicyProperties, bool) {
+ return &hasppp, true
}
// ListResult result of the request to list Managed Network. It contains a list of Managed Networks and a
@@ -564,7 +605,7 @@ type ManagedNetwork struct {
// Properties - The MNC properties
*Properties `json:"properties,omitempty"`
// Tags - Resource tags.
- Tags *[]string `json:"tags,omitempty"`
+ Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
@@ -610,12 +651,12 @@ func (mn *ManagedNetwork) UnmarshalJSON(body []byte) error {
}
case "tags":
if v != nil {
- var tags []string
+ var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
- mn.Tags = &tags
+ mn.Tags = tags
}
case "location":
if v != nil {
@@ -713,20 +754,59 @@ func (future *ManagedNetworksUpdateFutureType) Result(client ManagedNetworksClie
// MeshPeeringPolicyProperties properties of a Mesh Peering Policy
type MeshPeeringPolicyProperties struct {
- // Type - Gets or sets the connectivity type of a network structure policy. Possible values include: 'HubAndSpokeTopology', 'MeshTopology'
- Type Type `json:"type,omitempty"`
// Hub - Gets or sets the hub virtual network ID
Hub *ResourceID `json:"hub,omitempty"`
// Spokes - Gets or sets the spokes group IDs
Spokes *[]ResourceID `json:"spokes,omitempty"`
// Mesh - Gets or sets the mesh group IDs
Mesh *[]ResourceID `json:"mesh,omitempty"`
+ // PeeringPolicyType - Possible values include: 'PeeringPolicyTypeManagedNetworkPeeringPolicyProperties', 'PeeringPolicyTypeHubAndSpokeTopology', 'PeeringPolicyTypeMeshTopology'
+ PeeringPolicyType PeeringPolicyType `json:"peeringPolicyType,omitempty"`
// ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
}
+// MarshalJSON is the custom marshaler for MeshPeeringPolicyProperties.
+func (mppp MeshPeeringPolicyProperties) MarshalJSON() ([]byte, error) {
+ mppp.PeeringPolicyType = PeeringPolicyTypeMeshTopology
+ objectMap := make(map[string]interface{})
+ if mppp.Hub != nil {
+ objectMap["hub"] = mppp.Hub
+ }
+ if mppp.Spokes != nil {
+ objectMap["spokes"] = mppp.Spokes
+ }
+ if mppp.Mesh != nil {
+ objectMap["mesh"] = mppp.Mesh
+ }
+ if mppp.PeeringPolicyType != "" {
+ objectMap["peeringPolicyType"] = mppp.PeeringPolicyType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsHubAndSpokePeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for MeshPeeringPolicyProperties.
+func (mppp MeshPeeringPolicyProperties) AsHubAndSpokePeeringPolicyProperties() (*HubAndSpokePeeringPolicyProperties, bool) {
+ return nil, false
+}
+
+// AsMeshPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for MeshPeeringPolicyProperties.
+func (mppp MeshPeeringPolicyProperties) AsMeshPeeringPolicyProperties() (*MeshPeeringPolicyProperties, bool) {
+ return &mppp, true
+}
+
+// AsPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for MeshPeeringPolicyProperties.
+func (mppp MeshPeeringPolicyProperties) AsPeeringPolicyProperties() (*PeeringPolicyProperties, bool) {
+ return nil, false
+}
+
+// AsBasicPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for MeshPeeringPolicyProperties.
+func (mppp MeshPeeringPolicyProperties) AsBasicPeeringPolicyProperties() (BasicPeeringPolicyProperties, bool) {
+ return &mppp, true
+}
+
// Operation REST API operation
type Operation struct {
// Name - Operation name: {provider}/{resource}/{operation}
@@ -948,7 +1028,7 @@ func (future *PeeringPoliciesDeleteFuture) Result(client PeeringPoliciesClient)
type PeeringPolicy struct {
autorest.Response `json:"-"`
// Properties - Gets or sets the properties of a Managed Network Policy
- Properties *PeeringPolicyProperties `json:"properties,omitempty"`
+ Properties BasicPeeringPolicyProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
@@ -957,6 +1037,56 @@ type PeeringPolicy struct {
Type *string `json:"type,omitempty"`
}
+// UnmarshalJSON is the custom unmarshaler for PeeringPolicy struct.
+func (pp *PeeringPolicy) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ properties, err := unmarshalBasicPeeringPolicyProperties(*v)
+ if err != nil {
+ return err
+ }
+ pp.Properties = properties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
// PeeringPolicyListResult result of the request to list Managed Network Peering Policies. It contains a
// list of policies and a URL link to get the next set of results.
type PeeringPolicyListResult struct {
@@ -1104,25 +1234,112 @@ func NewPeeringPolicyListResultPage(getNextPage func(context.Context, PeeringPol
return PeeringPolicyListResultPage{fn: getNextPage}
}
+// BasicPeeringPolicyProperties properties of a Managed Network Peering Policy
+type BasicPeeringPolicyProperties interface {
+ AsHubAndSpokePeeringPolicyProperties() (*HubAndSpokePeeringPolicyProperties, bool)
+ AsMeshPeeringPolicyProperties() (*MeshPeeringPolicyProperties, bool)
+ AsPeeringPolicyProperties() (*PeeringPolicyProperties, bool)
+}
+
// PeeringPolicyProperties properties of a Managed Network Peering Policy
type PeeringPolicyProperties struct {
- // Type - Gets or sets the connectivity type of a network structure policy. Possible values include: 'HubAndSpokeTopology', 'MeshTopology'
- Type Type `json:"type,omitempty"`
// Hub - Gets or sets the hub virtual network ID
Hub *ResourceID `json:"hub,omitempty"`
// Spokes - Gets or sets the spokes group IDs
Spokes *[]ResourceID `json:"spokes,omitempty"`
// Mesh - Gets or sets the mesh group IDs
Mesh *[]ResourceID `json:"mesh,omitempty"`
+ // PeeringPolicyType - Possible values include: 'PeeringPolicyTypeManagedNetworkPeeringPolicyProperties', 'PeeringPolicyTypeHubAndSpokeTopology', 'PeeringPolicyTypeMeshTopology'
+ PeeringPolicyType PeeringPolicyType `json:"peeringPolicyType,omitempty"`
// ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
}
+func unmarshalBasicPeeringPolicyProperties(body []byte) (BasicPeeringPolicyProperties, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["peeringPolicyType"] {
+ case string(PeeringPolicyTypeHubAndSpokeTopology):
+ var hasppp HubAndSpokePeeringPolicyProperties
+ err := json.Unmarshal(body, &hasppp)
+ return hasppp, err
+ case string(PeeringPolicyTypeMeshTopology):
+ var mppp MeshPeeringPolicyProperties
+ err := json.Unmarshal(body, &mppp)
+ return mppp, err
+ default:
+ var ppp PeeringPolicyProperties
+ err := json.Unmarshal(body, &ppp)
+ return ppp, err
+ }
+}
+func unmarshalBasicPeeringPolicyPropertiesArray(body []byte) ([]BasicPeeringPolicyProperties, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ pppArray := make([]BasicPeeringPolicyProperties, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ ppp, err := unmarshalBasicPeeringPolicyProperties(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ pppArray[index] = ppp
+ }
+ return pppArray, nil
+}
+
+// MarshalJSON is the custom marshaler for PeeringPolicyProperties.
+func (ppp PeeringPolicyProperties) MarshalJSON() ([]byte, error) {
+ ppp.PeeringPolicyType = PeeringPolicyTypeManagedNetworkPeeringPolicyProperties
+ objectMap := make(map[string]interface{})
+ if ppp.Hub != nil {
+ objectMap["hub"] = ppp.Hub
+ }
+ if ppp.Spokes != nil {
+ objectMap["spokes"] = ppp.Spokes
+ }
+ if ppp.Mesh != nil {
+ objectMap["mesh"] = ppp.Mesh
+ }
+ if ppp.PeeringPolicyType != "" {
+ objectMap["peeringPolicyType"] = ppp.PeeringPolicyType
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsHubAndSpokePeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for PeeringPolicyProperties.
+func (ppp PeeringPolicyProperties) AsHubAndSpokePeeringPolicyProperties() (*HubAndSpokePeeringPolicyProperties, bool) {
+ return nil, false
+}
+
+// AsMeshPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for PeeringPolicyProperties.
+func (ppp PeeringPolicyProperties) AsMeshPeeringPolicyProperties() (*MeshPeeringPolicyProperties, bool) {
+ return nil, false
+}
+
+// AsPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for PeeringPolicyProperties.
+func (ppp PeeringPolicyProperties) AsPeeringPolicyProperties() (*PeeringPolicyProperties, bool) {
+ return &ppp, true
+}
+
+// AsBasicPeeringPolicyProperties is the BasicPeeringPolicyProperties implementation for PeeringPolicyProperties.
+func (ppp PeeringPolicyProperties) AsBasicPeeringPolicyProperties() (BasicPeeringPolicyProperties, bool) {
+ return &ppp, true
+}
+
// Properties properties of Managed Network
type Properties struct {
- // Scope - The collection of management groups, subscriptions, virtual networks, and subnets by the Managed Network. This is a read-only property that is reflective of all ScopeAssignments for this Managed Network
+ // Scope - READ-ONLY; The collection of management groups, subscriptions, virtual networks, and subnets by the Managed Network. This is a read-only property that is reflective of all ScopeAssignments for this Managed Network
Scope *Scope `json:"scope,omitempty"`
// Connectivity - READ-ONLY; The collection of groups and policies concerned with connectivity
Connectivity *ConnectivityCollection `json:"connectivity,omitempty"`
@@ -1412,7 +1629,7 @@ type ScopeAssignmentProperties struct {
// TrackedResource the resource model definition for a ARM tracked top level resource
type TrackedResource struct {
// Tags - Resource tags.
- Tags *[]string `json:"tags,omitempty"`
+ Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
@@ -1423,8 +1640,29 @@ type TrackedResource struct {
Type *string `json:"type,omitempty"`
}
+// MarshalJSON is the custom marshaler for TrackedResource.
+func (tr TrackedResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
+ if tr.Location != nil {
+ objectMap["location"] = tr.Location
+ }
+ return json.Marshal(objectMap)
+}
+
// Update update Tags of Managed Network
type Update struct {
// Tags - Updates the tags property of the Managed Network
- Tags *[]string `json:"tags,omitempty"`
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Update.
+func (u Update) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if u.Tags != nil {
+ objectMap["tags"] = u.Tags
+ }
+ return json.Marshal(objectMap)
}
diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json
index 572898ac481a..0f5af7fd539c 100644
--- a/swagger_to_sdk_config.json
+++ b/swagger_to_sdk_config.json
@@ -1,5 +1,5 @@
{
- "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json",
+ "$schema": "https://openapistoragetest.blob.core.windows.net/sdkautomation/test/schemas/swagger_to_sdk_config.schema.json",
"meta": {
"after_scripts": [
"dep ensure",