From ac385dec998e3e410a571dfcabe08c99e60bbb57 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 1 Jul 2019 15:48:59 -0700 Subject: [PATCH] [AutoPR iothub/resource-manager] [Hub Generated] Review request for Microsoft.Devices to add version preview/2019-03-22-preview (#5149) * Generated from a2660396e04a6551432a9f9e108956db05266023 adding locations property to iothub properties * Generated from b11a3ac1fafc172c5933d5e07a47a7ea1d4a1c0f adding locations property --- .../preview/iothub/mgmt/devices/models.go | 11 ++++++++ .../mgmt/2019-03-22-preview/devices/models.go | 25 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/profiles/preview/preview/iothub/mgmt/devices/models.go b/profiles/preview/preview/iothub/mgmt/devices/models.go index cf71d4c5fa7b..926eba8f9e48 100644 --- a/profiles/preview/preview/iothub/mgmt/devices/models.go +++ b/profiles/preview/preview/iothub/mgmt/devices/models.go @@ -87,6 +87,13 @@ const ( Invalid IotHubNameUnavailabilityReason = original.Invalid ) +type IotHubReplicaRoleType = original.IotHubReplicaRoleType + +const ( + Primary IotHubReplicaRoleType = original.Primary + Secondary IotHubReplicaRoleType = original.Secondary +) + type IotHubScaleType = original.IotHubScaleType const ( @@ -199,6 +206,7 @@ type IotHubDescription = original.IotHubDescription type IotHubDescriptionListResult = original.IotHubDescriptionListResult type IotHubDescriptionListResultIterator = original.IotHubDescriptionListResultIterator type IotHubDescriptionListResultPage = original.IotHubDescriptionListResultPage +type IotHubLocationDescription = original.IotHubLocationDescription type IotHubManualFailoverFuture = original.IotHubManualFailoverFuture type IotHubNameAvailabilityInfo = original.IotHubNameAvailabilityInfo type IotHubProperties = original.IotHubProperties @@ -363,6 +371,9 @@ func PossibleIPFilterActionTypeValues() []IPFilterActionType { func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityReason { return original.PossibleIotHubNameUnavailabilityReasonValues() } +func PossibleIotHubReplicaRoleTypeValues() []IotHubReplicaRoleType { + return original.PossibleIotHubReplicaRoleTypeValues() +} func PossibleIotHubScaleTypeValues() []IotHubScaleType { return original.PossibleIotHubScaleTypeValues() } diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/models.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/models.go index 7ae1867b60e8..23e4345ab2b4 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/models.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/models.go @@ -138,6 +138,21 @@ func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityRe return []IotHubNameUnavailabilityReason{AlreadyExists, Invalid} } +// IotHubReplicaRoleType enumerates the values for iot hub replica role type. +type IotHubReplicaRoleType string + +const ( + // Primary ... + Primary IotHubReplicaRoleType = "primary" + // Secondary ... + Secondary IotHubReplicaRoleType = "secondary" +) + +// PossibleIotHubReplicaRoleTypeValues returns an array of possible values for the IotHubReplicaRoleType const type. +func PossibleIotHubReplicaRoleTypeValues() []IotHubReplicaRoleType { + return []IotHubReplicaRoleType{Primary, Secondary} +} + // IotHubScaleType enumerates the values for iot hub scale type. type IotHubScaleType string @@ -1024,6 +1039,14 @@ func NewIotHubDescriptionListResultPage(getNextPage func(context.Context, IotHub return IotHubDescriptionListResultPage{fn: getNextPage} } +// IotHubLocationDescription public representation of one of the locations where a resource is provisioned. +type IotHubLocationDescription struct { + // Location - Azure Geo Regions + Location *string `json:"location,omitempty"` + // Role - Specific Role assigned to this location. Possible values include: 'Primary', 'Secondary' + Role IotHubReplicaRoleType `json:"role,omitempty"` +} + // IotHubManualFailoverFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type IotHubManualFailoverFuture struct { @@ -1086,6 +1109,8 @@ type IotHubProperties struct { DeviceStreams *IotHubPropertiesDeviceStreams `json:"deviceStreams,omitempty"` // Features - The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' Features Capabilities `json:"features,omitempty"` + // Locations - READ-ONLY; Primary and secondary location for iot hub + Locations *[]IotHubLocationDescription `json:"locations,omitempty"` } // MarshalJSON is the custom marshaler for IotHubProperties.