diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/CHANGELOG.md b/services/eventhub/mgmt/2017-04-01/eventhub/CHANGELOG.md new file mode 100644 index 000000000000..7b65be4b52b9 --- /dev/null +++ b/services/eventhub/mgmt/2017-04-01/eventhub/CHANGELOG.md @@ -0,0 +1,14 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewArmDisasterRecoveryListResultPage` parameter(s) have been changed from `(func(context.Context, ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error))` to `(ArmDisasterRecoveryListResult, func(context.Context, ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error))` +- Function `NewNetworkRuleSetListResultPage` parameter(s) have been changed from `(func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error))` to `(NetworkRuleSetListResult, func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error))` +- Function `NewMessagingRegionsListResultPage` parameter(s) have been changed from `(func(context.Context, MessagingRegionsListResult) (MessagingRegionsListResult, error))` to `(MessagingRegionsListResult, func(context.Context, MessagingRegionsListResult) (MessagingRegionsListResult, error))` +- Function `NewConsumerGroupListResultPage` parameter(s) have been changed from `(func(context.Context, ConsumerGroupListResult) (ConsumerGroupListResult, error))` to `(ConsumerGroupListResult, func(context.Context, ConsumerGroupListResult) (ConsumerGroupListResult, error))` +- Function `NewListResultPage` parameter(s) have been changed from `(func(context.Context, ListResult) (ListResult, error))` to `(ListResult, func(context.Context, ListResult) (ListResult, error))` +- Function `NewEHNamespaceListResultPage` parameter(s) have been changed from `(func(context.Context, EHNamespaceListResult) (EHNamespaceListResult, error))` to `(EHNamespaceListResult, func(context.Context, EHNamespaceListResult) (EHNamespaceListResult, error))` +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` +- Function `NewAuthorizationRuleListResultPage` parameter(s) have been changed from `(func(context.Context, AuthorizationRuleListResult) (AuthorizationRuleListResult, error))` to `(AuthorizationRuleListResult, func(context.Context, AuthorizationRuleListResult) (AuthorizationRuleListResult, error))` diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index d0ba4df34b4f..73b65e7d91ea 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -68,7 +68,7 @@ func (client ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, @@ -165,7 +165,7 @@ func (client ConsumerGroupsClient) Delete(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, @@ -259,7 +259,7 @@ func (client ConsumerGroupsClient) Get(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, @@ -358,7 +358,7 @@ func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index a5ef07408f9d..9ac79cd5a90e 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -67,7 +67,7 @@ func (client EventHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, @@ -179,7 +179,7 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRule(ctx context.Contex Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, @@ -277,7 +277,7 @@ func (client EventHubsClient) Delete(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "Delete", err.Error()) } @@ -367,7 +367,7 @@ func (client EventHubsClient) DeleteAuthorizationRule(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -459,7 +459,7 @@ func (client EventHubsClient) Get(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "Get", err.Error()) } @@ -550,7 +550,7 @@ func (client EventHubsClient) GetAuthorizationRule(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -643,7 +643,7 @@ func (client EventHubsClient) ListAuthorizationRules(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListAuthorizationRules", err.Error()) } @@ -921,7 +921,7 @@ func (client EventHubsClient) ListKeys(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -1016,7 +1016,7 @@ func (client EventHubsClient) RegenerateKeys(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/models.go b/services/eventhub/mgmt/2017-04-01/eventhub/models.go index 968634ed2259..f23c85ffa536 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/models.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/models.go @@ -141,7 +141,8 @@ func (adrlr ArmDisasterRecoveryListResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ArmDisasterRecoveryListResultIterator provides access to a complete listing of ArmDisasterRecovery values. +// ArmDisasterRecoveryListResultIterator provides access to a complete listing of ArmDisasterRecovery +// values. type ArmDisasterRecoveryListResultIterator struct { i int page ArmDisasterRecoveryListResultPage @@ -284,8 +285,11 @@ func (page ArmDisasterRecoveryListResultPage) Values() []ArmDisasterRecovery { } // Creates a new instance of the ArmDisasterRecoveryListResultPage type. -func NewArmDisasterRecoveryListResultPage(getNextPage func(context.Context, ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error)) ArmDisasterRecoveryListResultPage { - return ArmDisasterRecoveryListResultPage{fn: getNextPage} +func NewArmDisasterRecoveryListResultPage(cur ArmDisasterRecoveryListResult, getNextPage func(context.Context, ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error)) ArmDisasterRecoveryListResultPage { + return ArmDisasterRecoveryListResultPage{ + fn: getNextPage, + adrlr: cur, + } } // ArmDisasterRecoveryProperties properties required to the Create Or Update Alias(Disaster Recovery @@ -540,8 +544,11 @@ func (page AuthorizationRuleListResultPage) Values() []AuthorizationRule { } // Creates a new instance of the AuthorizationRuleListResultPage type. -func NewAuthorizationRuleListResultPage(getNextPage func(context.Context, AuthorizationRuleListResult) (AuthorizationRuleListResult, error)) AuthorizationRuleListResultPage { - return AuthorizationRuleListResultPage{fn: getNextPage} +func NewAuthorizationRuleListResultPage(cur AuthorizationRuleListResult, getNextPage func(context.Context, AuthorizationRuleListResult) (AuthorizationRuleListResult, error)) AuthorizationRuleListResultPage { + return AuthorizationRuleListResultPage{ + fn: getNextPage, + arlr: cur, + } } // AuthorizationRuleProperties properties supplied to create or update AuthorizationRule @@ -820,8 +827,11 @@ func (page ConsumerGroupListResultPage) Values() []ConsumerGroup { } // Creates a new instance of the ConsumerGroupListResultPage type. -func NewConsumerGroupListResultPage(getNextPage func(context.Context, ConsumerGroupListResult) (ConsumerGroupListResult, error)) ConsumerGroupListResultPage { - return ConsumerGroupListResultPage{fn: getNextPage} +func NewConsumerGroupListResultPage(cur ConsumerGroupListResult, getNextPage func(context.Context, ConsumerGroupListResult) (ConsumerGroupListResult, error)) ConsumerGroupListResultPage { + return ConsumerGroupListResultPage{ + fn: getNextPage, + cglr: cur, + } } // ConsumerGroupProperties single item in List or Get Consumer group operation @@ -896,8 +906,8 @@ func (d *Destination) UnmarshalJSON(body []byte) error { return nil } -// DestinationProperties properties describing the storage account, blob container and archive name format for -// capture destination +// DestinationProperties properties describing the storage account, blob container and archive name format +// for capture destination type DestinationProperties struct { // StorageAccountResourceID - Resource id of the storage account to be used to create the blobs StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` @@ -1174,8 +1184,11 @@ func (page EHNamespaceListResultPage) Values() []EHNamespace { } // Creates a new instance of the EHNamespaceListResultPage type. -func NewEHNamespaceListResultPage(getNextPage func(context.Context, EHNamespaceListResult) (EHNamespaceListResult, error)) EHNamespaceListResultPage { - return EHNamespaceListResultPage{fn: getNextPage} +func NewEHNamespaceListResultPage(cur EHNamespaceListResult, getNextPage func(context.Context, EHNamespaceListResult) (EHNamespaceListResult, error)) EHNamespaceListResultPage { + return EHNamespaceListResultPage{ + fn: getNextPage, + enlr: cur, + } } // EHNamespaceProperties namespace properties supplied for create namespace operation. @@ -1213,8 +1226,8 @@ func (en EHNamespaceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ErrorResponse error response indicates Event Hub service is not able to process the incoming request. The -// reason is provided in the error message. +// ErrorResponse error response indicates Event Hub service is not able to process the incoming request. +// The reason is provided in the error message. type ErrorResponse struct { // Code - Error code. Code *string `json:"code,omitempty"` @@ -1374,8 +1387,11 @@ func (page ListResultPage) Values() []Model { } // Creates a new instance of the ListResultPage type. -func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { - return ListResultPage{fn: getNextPage} +func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{ + fn: getNextPage, + lr: cur, + } } // MessagingPlan messaging Plan for the namespace @@ -1682,8 +1698,11 @@ func (page MessagingRegionsListResultPage) Values() []MessagingRegions { } // Creates a new instance of the MessagingRegionsListResultPage type. -func NewMessagingRegionsListResultPage(getNextPage func(context.Context, MessagingRegionsListResult) (MessagingRegionsListResult, error)) MessagingRegionsListResultPage { - return MessagingRegionsListResultPage{fn: getNextPage} +func NewMessagingRegionsListResultPage(cur MessagingRegionsListResult, getNextPage func(context.Context, MessagingRegionsListResult) (MessagingRegionsListResult, error)) MessagingRegionsListResultPage { + return MessagingRegionsListResultPage{ + fn: getNextPage, + mrlr: cur, + } } // MessagingRegionsProperties properties of Messaging Region @@ -1767,8 +1786,8 @@ func (mVar *Model) UnmarshalJSON(body []byte) error { return nil } -// NamespacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// NamespacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type NamespacesCreateOrUpdateFuture struct { azure.Future } @@ -1796,7 +1815,8 @@ func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (e return } -// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type NamespacesDeleteFuture struct { azure.Future } @@ -2043,8 +2063,11 @@ func (page NetworkRuleSetListResultPage) Values() []NetworkRuleSet { } // Creates a new instance of the NetworkRuleSetListResultPage type. -func NewNetworkRuleSetListResultPage(getNextPage func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error)) NetworkRuleSetListResultPage { - return NetworkRuleSetListResultPage{fn: getNextPage} +func NewNetworkRuleSetListResultPage(cur NetworkRuleSetListResult, getNextPage func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error)) NetworkRuleSetListResultPage { + return NetworkRuleSetListResultPage{ + fn: getNextPage, + nrslr: cur, + } } // NetworkRuleSetProperties networkRuleSet properties @@ -2100,8 +2123,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult result of the request to list Event Hub 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 Event Hub 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 - READ-ONLY; List of Event Hub operations supported by the Microsoft.EventHub resource provider. @@ -2253,8 +2276,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, + } } // Properties properties supplied to the Create Or Update Event Hub operation. @@ -2293,8 +2319,8 @@ func (p Properties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// RegenerateAccessKeyParameters parameters supplied to the Regenerate Authorization Rule operation, specifies -// which key needs to be reset. +// RegenerateAccessKeyParameters parameters supplied to the Regenerate Authorization Rule operation, +// specifies which key needs to be reset. type RegenerateAccessKeyParameters struct { // KeyType - The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' KeyType KeyType `json:"keyType,omitempty"`