Skip to content

Commit

Permalink
generate
Browse files Browse the repository at this point in the history
  • Loading branch information
gracewilcox committed Jan 6, 2025
1 parent 5cb5fb0 commit 7c3fb70
Show file tree
Hide file tree
Showing 33 changed files with 244 additions and 447 deletions.
103 changes: 0 additions & 103 deletions sdk/security/keyvault/azadmin/backup/autorest.md

This file was deleted.

41 changes: 22 additions & 19 deletions sdk/security/keyvault/azadmin/backup/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions sdk/security/keyvault/azadmin/backup/custom_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewClient(vaultURL string, credential azcore.TokenCredential, options *Clie
if err != nil {
return nil, err
}
return &Client{endpoint: vaultURL, internal: azcoreClient}, nil
return &Client{vaultBaseUrl: vaultURL, internal: azcoreClient}, nil
}

// ErrorInfo - Internal error from Azure Key Vault server.
Expand Down Expand Up @@ -98,17 +98,21 @@ func (client *Client) beginFullRestore(ctx context.Context, restoreBlobDetails R
if err != nil {
return nil, err
}
return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FullRestoreResponse]{
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FullRestoreResponse]{
FinalStateVia: runtime.FinalStateViaAzureAsyncOp,
Handler: handler,
Tracer: client.internal.Tracer(),
})
return poller, err
} else {
handler, err := pollers.NewRestorePoller[FullRestoreResponse](client.internal.Pipeline(), nil, runtime.FinalStateViaAzureAsyncOp)
if err != nil {
return nil, err
}
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FullRestoreResponse]{Handler: handler})
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FullRestoreResponse]{
Handler: handler,
Tracer: client.internal.Tracer(),
})
}
}

Expand All @@ -124,16 +128,20 @@ func (client *Client) beginSelectiveKeyRestore(ctx context.Context, keyName stri
if err != nil {
return nil, err
}
return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SelectiveKeyRestoreResponse]{
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SelectiveKeyRestoreResponse]{
FinalStateVia: runtime.FinalStateViaAzureAsyncOp,
Handler: handler,
Tracer: client.internal.Tracer(),
})
return poller, err
} else {
handler, err := pollers.NewRestorePoller[SelectiveKeyRestoreResponse](client.internal.Pipeline(), nil, runtime.FinalStateViaAzureAsyncOp)
if err != nil {
return nil, err
}
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SelectiveKeyRestoreResponse]{Handler: handler})
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SelectiveKeyRestoreResponse]{
Handler: handler,
Tracer: client.internal.Tracer(),
})
}
}
19 changes: 7 additions & 12 deletions sdk/security/keyvault/azadmin/backup/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions sdk/security/keyvault/azadmin/backup/models_serde.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions sdk/security/keyvault/azadmin/backup/options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c3fb70

Please sign in to comment.