vendor: update all dependencies to latest versions
This commit is contained in:
Generated
Vendored
+54
-14
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,30 +23,26 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupPoliciesClient is the client for the BackupPolicies methods of the
|
||||
// Recoveryservicesbackup service.
|
||||
// BackupPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupPoliciesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient
|
||||
// client.
|
||||
// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client.
|
||||
func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient {
|
||||
return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupPoliciesClientWithBaseURI creates an instance of the
|
||||
// BackupPoliciesClient client.
|
||||
// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client.
|
||||
func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient {
|
||||
return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List lists of backup policies associated with Recovery Services Vault. API
|
||||
// provides pagination parameters to fetch scoped results.
|
||||
// List lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
|
||||
// scoped results.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options.
|
||||
func (client BackupPoliciesClient) List(vaultName string, resourceGroupName string, filter string) (result ProtectionPolicyResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
@@ -136,3 +131,48 @@ func (client BackupPoliciesClient) ListNextResults(lastResults ProtectionPolicyR
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupPoliciesClient) ListComplete(vaultName string, resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ProtectionPolicyResource, <-chan error) {
|
||||
resultChan := make(chan ProtectionPolicyResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user