From a5a4b8fd7f9a339d7a2930faaa57db174282a106 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Dec 2020 02:16:19 +0000 Subject: [PATCH] CodeGen from PR 11966 in Azure/azure-rest-api-specs Update listHosts response to include new optional properties added for BYOK auto rotation (#11966) Co-authored-by: karuna --- .../2015-03-01-preview/hdinsight/CHANGELOG.md | 33 ++++++ .../2015-03-01-preview/hdinsight/enums.go | 48 ++++---- .../2015-03-01-preview/hdinsight/models.go | 103 +++++++++++------- 3 files changed, 119 insertions(+), 65 deletions(-) create mode 100644 services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/CHANGELOG.md diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/CHANGELOG.md b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/CHANGELOG.md new file mode 100644 index 000000000000..fe6420fc6a5f --- /dev/null +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/CHANGELOG.md @@ -0,0 +1,33 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewApplicationListResultPage` parameter(s) have been changed from `(func(context.Context, ApplicationListResult) (ApplicationListResult, error))` to `(ApplicationListResult, func(context.Context, ApplicationListResult) (ApplicationListResult, error))` +- Function `NewScriptActionsListPage` parameter(s) have been changed from `(func(context.Context, ScriptActionsList) (ScriptActionsList, error))` to `(ScriptActionsList, func(context.Context, ScriptActionsList) (ScriptActionsList, error))` +- Function `NewScriptActionExecutionHistoryListPage` parameter(s) have been changed from `(func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error))` to `(ScriptActionExecutionHistoryList, func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error))` +- Function `NewClusterListResultPage` parameter(s) have been changed from `(func(context.Context, ClusterListResult) (ClusterListResult, error))` to `(ClusterListResult, func(context.Context, ClusterListResult) (ClusterListResult, error))` +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` +- Const `PublicLoadBalancer` has been removed +- Const `UDR` has been removed +- Const `InboundAndOutbound` has been removed +- Const `OutboundOnly` has been removed +- Function `PossiblePublicNetworkAccessValues` has been removed +- Function `PossibleOutboundOnlyPublicNetworkAccessTypeValues` has been removed +- Struct `NetworkSettings` has been removed +- Field `NetworkSettings` of struct `ClusterGetProperties` has been removed +- Field `NetworkSettings` of struct `ClusterCreateProperties` has been removed + +## New Content + +- New const `Outbound` +- New const `Inbound` +- New const `Enabled` +- New const `Disabled` +- New function `PossibleResourceProviderConnectionValues() []ResourceProviderConnection` +- New function `PossiblePrivateLinkValues() []PrivateLink` +- New struct `NetworkProperties` +- New field `NetworkProperties` in struct `ClusterCreateProperties` +- New field `ClusterID` in struct `ClusterGetProperties` +- New field `NetworkProperties` in struct `ClusterGetProperties` diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/enums.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/enums.go index bf89ef49d48a..1e79e8cf0d06 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/enums.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/enums.go @@ -140,34 +140,19 @@ func PossibleOSTypeValues() []OSType { return []OSType{Linux, Windows} } -// OutboundOnlyPublicNetworkAccessType enumerates the values for outbound only public network access type. -type OutboundOnlyPublicNetworkAccessType string +// PrivateLink enumerates the values for private link. +type PrivateLink string const ( - // PublicLoadBalancer ... - PublicLoadBalancer OutboundOnlyPublicNetworkAccessType = "PublicLoadBalancer" - // UDR ... - UDR OutboundOnlyPublicNetworkAccessType = "UDR" + // Disabled ... + Disabled PrivateLink = "Disabled" + // Enabled ... + Enabled PrivateLink = "Enabled" ) -// PossibleOutboundOnlyPublicNetworkAccessTypeValues returns an array of possible values for the OutboundOnlyPublicNetworkAccessType const type. -func PossibleOutboundOnlyPublicNetworkAccessTypeValues() []OutboundOnlyPublicNetworkAccessType { - return []OutboundOnlyPublicNetworkAccessType{PublicLoadBalancer, UDR} -} - -// PublicNetworkAccess enumerates the values for public network access. -type PublicNetworkAccess string - -const ( - // InboundAndOutbound ... - InboundAndOutbound PublicNetworkAccess = "InboundAndOutbound" - // OutboundOnly ... - OutboundOnly PublicNetworkAccess = "OutboundOnly" -) - -// PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type. -func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { - return []PublicNetworkAccess{InboundAndOutbound, OutboundOnly} +// PossiblePrivateLinkValues returns an array of possible values for the PrivateLink const type. +func PossiblePrivateLinkValues() []PrivateLink { + return []PrivateLink{Disabled, Enabled} } // ResourceIdentityType enumerates the values for resource identity type. @@ -189,6 +174,21 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned} } +// ResourceProviderConnection enumerates the values for resource provider connection. +type ResourceProviderConnection string + +const ( + // Inbound ... + Inbound ResourceProviderConnection = "Inbound" + // Outbound ... + Outbound ResourceProviderConnection = "Outbound" +) + +// PossibleResourceProviderConnectionValues returns an array of possible values for the ResourceProviderConnection const type. +func PossibleResourceProviderConnectionValues() []ResourceProviderConnection { + return []ResourceProviderConnection{Inbound, Outbound} +} + // Tier enumerates the values for tier. type Tier string diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go index 1bb113e2e5d2..4e317d01e239 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go @@ -88,8 +88,8 @@ type ApplicationGetHTTPSEndpoint struct { DisableGatewayAuth *bool `json:"disableGatewayAuth,omitempty"` } -// ApplicationListResult result of the request to list cluster Applications. It contains a list of operations -// and a URL link to get the next set of results. +// ApplicationListResult result of the request to list cluster Applications. It contains a list of +// operations and a URL link to get the next set of results. type ApplicationListResult struct { autorest.Response `json:"-"` // Value - The list of HDInsight applications installed on HDInsight cluster. @@ -250,8 +250,11 @@ func (page ApplicationListResultPage) Values() []Application { } // Creates a new instance of the ApplicationListResultPage type. -func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { - return ApplicationListResultPage{fn: getNextPage} +func NewApplicationListResultPage(cur ApplicationListResult, getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { + return ApplicationListResultPage{ + fn: getNextPage, + alr: cur, + } } // ApplicationProperties the HDInsight cluster application GET response. @@ -389,8 +392,8 @@ type AutoscaleRecurrence struct { Schedule *[]AutoscaleSchedule `json:"schedule,omitempty"` } -// AutoscaleSchedule parameters for a schedule-based autoscale rule, consisting of an array of days + a time -// and capacity +// AutoscaleSchedule parameters for a schedule-based autoscale rule, consisting of an array of days + a +// time and capacity type AutoscaleSchedule struct { // Days - Days of the week for a schedule-based autoscale rule Days *[]DaysOfWeek `json:"days,omitempty"` @@ -428,7 +431,8 @@ type BillingResources struct { DiskBillingMeters *[]DiskBillingMeters `json:"diskBillingMeters,omitempty"` } -// BillingResponseListResult the response for the operation to get regional billingSpecs for a subscription. +// BillingResponseListResult the response for the operation to get regional billingSpecs for a +// subscription. type BillingResponseListResult struct { autorest.Response `json:"-"` // VMSizes - The virtual machine sizes to include or exclude. @@ -600,8 +604,8 @@ type ClusterCreateProperties struct { EncryptionInTransitProperties *EncryptionInTransitProperties `json:"encryptionInTransitProperties,omitempty"` // MinSupportedTLSVersion - The minimal supported tls version. MinSupportedTLSVersion *string `json:"minSupportedTlsVersion,omitempty"` - // NetworkSettings - The network settings. - NetworkSettings *NetworkSettings `json:"networkSettings,omitempty"` + // NetworkProperties - The network properties. + NetworkProperties *NetworkProperties `json:"networkProperties,omitempty"` } // ClusterDefinition the cluster definition. @@ -652,6 +656,8 @@ type ClusterGetProperties struct { OsType OSType `json:"osType,omitempty"` // Tier - The cluster tier. Possible values include: 'Standard', 'Premium' Tier Tier `json:"tier,omitempty"` + // ClusterID - The cluster id. + ClusterID *string `json:"clusterId,omitempty"` // ClusterDefinition - The cluster definition. ClusterDefinition *ClusterDefinition `json:"clusterDefinition,omitempty"` // KafkaRestProperties - The cluster kafka rest proxy configuration. @@ -678,8 +684,8 @@ type ClusterGetProperties struct { EncryptionInTransitProperties *EncryptionInTransitProperties `json:"encryptionInTransitProperties,omitempty"` // MinSupportedTLSVersion - The minimal supported tls version. MinSupportedTLSVersion *string `json:"minSupportedTlsVersion,omitempty"` - // NetworkSettings - The network settings. - NetworkSettings *NetworkSettings `json:"networkSettings,omitempty"` + // NetworkProperties - The network properties. + NetworkProperties *NetworkProperties `json:"networkProperties,omitempty"` } // ClusterIdentity identity for the cluster. @@ -892,8 +898,11 @@ func (page ClusterListResultPage) Values() []Cluster { } // Creates a new instance of the ClusterListResultPage type. -func NewClusterListResultPage(getNextPage func(context.Context, ClusterListResult) (ClusterListResult, error)) ClusterListResultPage { - return ClusterListResultPage{fn: getNextPage} +func NewClusterListResultPage(cur ClusterListResult, getNextPage func(context.Context, ClusterListResult) (ClusterListResult, error)) ClusterListResultPage { + return ClusterListResultPage{ + fn: getNextPage, + clr: cur, + } } // ClusterListRuntimeScriptActionDetailResult the list runtime script action detail response. @@ -942,7 +951,8 @@ type ClusterResizeParameters struct { TargetInstanceCount *int32 `json:"targetInstanceCount,omitempty"` } -// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersCreateFuture struct { azure.Future } @@ -970,7 +980,8 @@ func (future *ClustersCreateFuture) Result(client ClustersClient) (c Cluster, er return } -// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersDeleteFuture struct { azure.Future } @@ -1015,7 +1026,8 @@ func (future *ClustersExecuteScriptActionsFuture) Result(client ClustersClient) return } -// ClustersResizeFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersResizeFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersResizeFuture struct { azure.Future } @@ -1231,8 +1243,8 @@ type Extension struct { PrimaryKey *string `json:"primaryKey,omitempty"` } -// ExtensionDisableMonitoringFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ExtensionDisableMonitoringFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ExtensionDisableMonitoringFuture struct { azure.Future } @@ -1254,8 +1266,8 @@ func (future *ExtensionDisableMonitoringFuture) Result(client ExtensionClient) ( return } -// ExtensionEnableMonitoringFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ExtensionEnableMonitoringFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ExtensionEnableMonitoringFuture struct { azure.Future } @@ -1318,12 +1330,12 @@ type LocalizedName struct { LocalizedValue *string `json:"localizedValue,omitempty"` } -// NetworkSettings the network settings. -type NetworkSettings struct { - // PublicNetworkAccess - Specifies whether public network access is enabled for inbound and outbound, or outbound only. Possible values include: 'InboundAndOutbound', 'OutboundOnly' - PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` - // OutboundOnlyPublicNetworkAccessType - The mechanism through which the cluster will have outbound access to the public network. Possible values include: 'PublicLoadBalancer', 'UDR' - OutboundOnlyPublicNetworkAccessType OutboundOnlyPublicNetworkAccessType `json:"outboundOnlyPublicNetworkAccessType,omitempty"` +// NetworkProperties the network properties. +type NetworkProperties struct { + // ResourceProviderConnection - The direction for the resource provider connection. Possible values include: 'Inbound', 'Outbound' + ResourceProviderConnection ResourceProviderConnection `json:"resourceProviderConnection,omitempty"` + // PrivateLink - Indicates whether or not private link is enabled. Possible values include: 'Disabled', 'Enabled' + PrivateLink PrivateLink `json:"privateLink,omitempty"` } // Operation the HDInsight REST API operation. @@ -1344,8 +1356,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult result of the request to list HDInsight operations. It contains a list of operations and -// a URL link to get the next set of results. +// OperationListResult result of the request to list HDInsight operations. It contains a list of operations +// and a URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` // Value - The list of HDInsight operations supported by the HDInsight resource provider. @@ -1497,8 +1509,11 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } // OperationResource the azure async operation response. @@ -1688,8 +1703,8 @@ type ScriptActionExecutionHistoryList struct { NextLink *string `json:"nextLink,omitempty"` } -// ScriptActionExecutionHistoryListIterator provides access to a complete listing of RuntimeScriptActionDetail -// values. +// ScriptActionExecutionHistoryListIterator provides access to a complete listing of +// RuntimeScriptActionDetail values. type ScriptActionExecutionHistoryListIterator struct { i int page ScriptActionExecutionHistoryListPage @@ -1832,8 +1847,11 @@ func (page ScriptActionExecutionHistoryListPage) Values() []RuntimeScriptActionD } // Creates a new instance of the ScriptActionExecutionHistoryListPage type. -func NewScriptActionExecutionHistoryListPage(getNextPage func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error)) ScriptActionExecutionHistoryListPage { - return ScriptActionExecutionHistoryListPage{fn: getNextPage} +func NewScriptActionExecutionHistoryListPage(cur ScriptActionExecutionHistoryList, getNextPage func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error)) ScriptActionExecutionHistoryListPage { + return ScriptActionExecutionHistoryListPage{ + fn: getNextPage, + saehl: cur, + } } // ScriptActionExecutionSummary the execution summary of a script action. @@ -2019,8 +2037,11 @@ func (page ScriptActionsListPage) Values() []RuntimeScriptActionDetail { } // Creates a new instance of the ScriptActionsListPage type. -func NewScriptActionsListPage(getNextPage func(context.Context, ScriptActionsList) (ScriptActionsList, error)) ScriptActionsListPage { - return ScriptActionsListPage{fn: getNextPage} +func NewScriptActionsListPage(cur ScriptActionsList, getNextPage func(context.Context, ScriptActionsList) (ScriptActionsList, error)) ScriptActionsListPage { + return ScriptActionsListPage{ + fn: getNextPage, + sal: cur, + } } // SecurityProfile the security profile which contains Ssh public key for the HDInsight cluster. @@ -2211,11 +2232,11 @@ type VMSizeCompatibilityFilter struct { Vmsizes *[]string `json:"vmsizes,omitempty"` } -// VMSizeCompatibilityFilterV2 this class represent a single filter object that defines a multidimensional set. -// The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should -// be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of -// exclusion/inclusion) and the ordering of the Filters. Later filters override previous settings if -// conflicted. +// VMSizeCompatibilityFilterV2 this class represent a single filter object that defines a multidimensional +// set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The +// constraint should be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm +// sizes in affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous +// settings if conflicted. type VMSizeCompatibilityFilterV2 struct { // FilterMode - The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. Possible values include: 'Exclude', 'Include' FilterMode FilterMode `json:"filterMode,omitempty"`