diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/CHANGELOG.md b/services/provisioningservices/mgmt/2017-11-15/iothub/CHANGELOG.md new file mode 100644 index 000000000000..9adba51b6042 --- /dev/null +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/CHANGELOG.md @@ -0,0 +1,10 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewSharedAccessSignatureAuthorizationRuleListResultPage` parameter(s) have been changed from `(func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error))` to `(SharedAccessSignatureAuthorizationRuleListResult, func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error))` +- Function `NewOperationListResultPage` parameter(s) have been changed from `(func(context.Context, OperationListResult) (OperationListResult, error))` to `(OperationListResult, func(context.Context, OperationListResult) (OperationListResult, error))` +- Function `NewProvisioningServiceDescriptionListResultPage` parameter(s) have been changed from `(func(context.Context, ProvisioningServiceDescriptionListResult) (ProvisioningServiceDescriptionListResult, error))` to `(ProvisioningServiceDescriptionListResult, func(context.Context, ProvisioningServiceDescriptionListResult) (ProvisioningServiceDescriptionListResult, error))` +- Function `NewIotDpsSkuDefinitionListResultPage` parameter(s) have been changed from `(func(context.Context, IotDpsSkuDefinitionListResult) (IotDpsSkuDefinitionListResult, error))` to `(IotDpsSkuDefinitionListResult, func(context.Context, IotDpsSkuDefinitionListResult) (IotDpsSkuDefinitionListResult, error))` diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go b/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go index 6774a1d0848a..b9fa2bc9abdc 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go @@ -84,6 +84,7 @@ func (client DpsCertificateClient) CreateOrUpdate(ctx context.Context, resourceG result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.DpsCertificateClient", "CreateOrUpdate", resp, "Failure responding to request") + return } return @@ -177,6 +178,7 @@ func (client DpsCertificateClient) Delete(ctx context.Context, resourceGroupName result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.DpsCertificateClient", "Delete", resp, "Failure responding to request") + return } return @@ -289,6 +291,7 @@ func (client DpsCertificateClient) GenerateVerificationCode(ctx context.Context, result, err = client.GenerateVerificationCodeResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.DpsCertificateClient", "GenerateVerificationCode", resp, "Failure responding to request") + return } return @@ -392,6 +395,7 @@ func (client DpsCertificateClient) Get(ctx context.Context, certificateName stri result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.DpsCertificateClient", "Get", resp, "Failure responding to request") + return } return @@ -472,6 +476,7 @@ func (client DpsCertificateClient) List(ctx context.Context, resourceGroupName s result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.DpsCertificateClient", "List", resp, "Failure responding to request") + return } return @@ -560,6 +565,7 @@ func (client DpsCertificateClient) VerifyCertificate(ctx context.Context, certif result, err = client.VerifyCertificateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.DpsCertificateClient", "VerifyCertificate", resp, "Failure responding to request") + return } return diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go b/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go index 708fb9d2ac22..bd10856fe8e3 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go @@ -80,6 +80,7 @@ func (client IotDpsResourceClient) CheckProvisioningServiceNameAvailability(ctx result, err = client.CheckProvisioningServiceNameAvailabilityResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "CheckProvisioningServiceNameAvailability", resp, "Failure responding to request") + return } return @@ -316,6 +317,7 @@ func (client IotDpsResourceClient) Get(ctx context.Context, provisioningServiceN result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "Get", resp, "Failure responding to request") + return } return @@ -395,6 +397,7 @@ func (client IotDpsResourceClient) GetOperationResult(ctx context.Context, opera result, err = client.GetOperationResultResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "GetOperationResult", resp, "Failure responding to request") + return } return @@ -472,9 +475,11 @@ func (client IotDpsResourceClient) ListByResourceGroup(ctx context.Context, reso result.psdlr, err = client.ListByResourceGroupResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "ListByResourceGroup", resp, "Failure responding to request") + return } if result.psdlr.hasNextLink() && result.psdlr.IsEmpty() { err = result.NextWithContext(ctx) + return } return @@ -584,9 +589,11 @@ func (client IotDpsResourceClient) ListBySubscription(ctx context.Context) (resu result.psdlr, err = client.ListBySubscriptionResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "ListBySubscription", resp, "Failure responding to request") + return } if result.psdlr.hasNextLink() && result.psdlr.IsEmpty() { err = result.NextWithContext(ctx) + return } return @@ -698,9 +705,11 @@ func (client IotDpsResourceClient) ListKeys(ctx context.Context, provisioningSer result.sasarlr, err = client.ListKeysResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "ListKeys", resp, "Failure responding to request") + return } if result.sasarlr.hasNextLink() && result.sasarlr.IsEmpty() { err = result.NextWithContext(ctx) + return } return @@ -814,6 +823,7 @@ func (client IotDpsResourceClient) ListKeysForKeyName(ctx context.Context, provi result, err = client.ListKeysForKeyNameResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "ListKeysForKeyName", resp, "Failure responding to request") + return } return @@ -891,9 +901,11 @@ func (client IotDpsResourceClient) ListValidSkus(ctx context.Context, provisioni result.idsdlr, err = client.ListValidSkusResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.IotDpsResourceClient", "ListValidSkus", resp, "Failure responding to request") + return } if result.idsdlr.hasNextLink() && result.idsdlr.IsEmpty() { err = result.NextWithContext(ctx) + return } return diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/models.go b/services/provisioningservices/mgmt/2017-11-15/iothub/models.go index 509ae1480d2d..613639c83fb6 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/models.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/models.go @@ -294,7 +294,8 @@ func (idsdlr IotDpsSkuDefinitionListResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// IotDpsSkuDefinitionListResultIterator provides access to a complete listing of IotDpsSkuDefinition values. +// IotDpsSkuDefinitionListResultIterator provides access to a complete listing of IotDpsSkuDefinition +// values. type IotDpsSkuDefinitionListResultIterator struct { i int page IotDpsSkuDefinitionListResultPage @@ -437,8 +438,11 @@ func (page IotDpsSkuDefinitionListResultPage) Values() []IotDpsSkuDefinition { } // Creates a new instance of the IotDpsSkuDefinitionListResultPage type. -func NewIotDpsSkuDefinitionListResultPage(getNextPage func(context.Context, IotDpsSkuDefinitionListResult) (IotDpsSkuDefinitionListResult, error)) IotDpsSkuDefinitionListResultPage { - return IotDpsSkuDefinitionListResultPage{fn: getNextPage} +func NewIotDpsSkuDefinitionListResultPage(cur IotDpsSkuDefinitionListResult, getNextPage func(context.Context, IotDpsSkuDefinitionListResult) (IotDpsSkuDefinitionListResult, error)) IotDpsSkuDefinitionListResultPage { + return IotDpsSkuDefinitionListResultPage{ + fn: getNextPage, + idsdlr: cur, + } } // IotDpsSkuInfo list of possible provisioning service SKUs. @@ -507,8 +511,8 @@ type OperationInputs struct { Name *string `json:"name,omitempty"` } -// OperationListResult result of the request to list IoT 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 IoT 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 IoT Hub operations supported by the Microsoft.Devices resource provider. @@ -660,8 +664,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, + } } // ProvisioningServiceDescription the description of the provisioning service. @@ -868,8 +875,11 @@ func (page ProvisioningServiceDescriptionListResultPage) Values() []Provisioning } // Creates a new instance of the ProvisioningServiceDescriptionListResultPage type. -func NewProvisioningServiceDescriptionListResultPage(getNextPage func(context.Context, ProvisioningServiceDescriptionListResult) (ProvisioningServiceDescriptionListResult, error)) ProvisioningServiceDescriptionListResultPage { - return ProvisioningServiceDescriptionListResultPage{fn: getNextPage} +func NewProvisioningServiceDescriptionListResultPage(cur ProvisioningServiceDescriptionListResult, getNextPage func(context.Context, ProvisioningServiceDescriptionListResult) (ProvisioningServiceDescriptionListResult, error)) ProvisioningServiceDescriptionListResultPage { + return ProvisioningServiceDescriptionListResultPage{ + fn: getNextPage, + psdlr: cur, + } } // Resource the common properties of an Azure resource. @@ -1074,8 +1084,11 @@ func (page SharedAccessSignatureAuthorizationRuleListResultPage) Values() []Shar } // Creates a new instance of the SharedAccessSignatureAuthorizationRuleListResultPage type. -func NewSharedAccessSignatureAuthorizationRuleListResultPage(getNextPage func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)) SharedAccessSignatureAuthorizationRuleListResultPage { - return SharedAccessSignatureAuthorizationRuleListResultPage{fn: getNextPage} +func NewSharedAccessSignatureAuthorizationRuleListResultPage(cur SharedAccessSignatureAuthorizationRuleListResult, getNextPage func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)) SharedAccessSignatureAuthorizationRuleListResultPage { + return SharedAccessSignatureAuthorizationRuleListResultPage{ + fn: getNextPage, + sasarlr: cur, + } } // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go b/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go index e22b3113367c..23a68a65c4d8 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go @@ -70,9 +70,11 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe result.olr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", resp, "Failure responding to request") + return } if result.olr.hasNextLink() && result.olr.IsEmpty() { err = result.NextWithContext(ctx) + return } return