-
Notifications
You must be signed in to change notification settings - Fork 5.1k
RecoveryServicess on latest Swagger #3028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
...ices/Microsoft.Azure.Management.RecoveryServices/Customizations/RecoveryServicesClient.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for | ||
| // license information. | ||
|
|
||
| using System.Linq; | ||
| using System.Net.Http; | ||
| using Microsoft.Rest; | ||
| using Microsoft.Rest.Serialization; | ||
|
|
||
| namespace Microsoft.Azure.Management.RecoveryServices | ||
| { | ||
| public partial class RecoveryServicesClient | ||
| { | ||
| bool DisableDispose { get; set; } | ||
|
|
||
| protected RecoveryServicesClient(HttpClient httpClient, params DelegatingHandler[] handlers) | ||
| { | ||
| InitializeHttpClient(httpClient, null, handlers); | ||
| Initialize(); | ||
| } | ||
|
|
||
| public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClient httpClient, bool disableDispose, params DelegatingHandler[] handlers) | ||
| : this(httpClient, handlers) | ||
| { | ||
| if (baseUri == null) | ||
| { | ||
| throw new System.ArgumentNullException("baseUri"); | ||
| } | ||
| if (credentials == null) | ||
| { | ||
| throw new System.ArgumentNullException("credentials"); | ||
| } | ||
| BaseUri = baseUri; | ||
| Credentials = credentials; | ||
| if (Credentials != null) | ||
| { | ||
| Credentials.InitializeServiceClient(this); | ||
| } | ||
| DisableDispose = disableDispose; | ||
| } | ||
|
|
||
| protected override void Dispose(bool disposing) | ||
| { | ||
| if (DisableDispose) | ||
| { | ||
| base.Dispose(disposing); | ||
| } | ||
| } | ||
|
|
||
| partial void CustomInitialize() | ||
| { | ||
| var iso8601TimeSpanConverter = DeserializationSettings.Converters.First(conv => conv is Iso8601TimeSpanConverter); | ||
| if (iso8601TimeSpanConverter != null) | ||
| { | ||
| DeserializationSettings.Converters.Remove(iso8601TimeSpanConverter); | ||
| } | ||
| } | ||
| } | ||
| } | ||
433 changes: 433 additions & 0 deletions
433
...s/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
108 changes: 108 additions & 0 deletions
108
...t.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperationsExtensions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| // 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. | ||
|
|
||
| namespace Microsoft.Azure.Management.RecoveryServices | ||
| { | ||
| using Microsoft.Azure; | ||
| using Microsoft.Azure.Management; | ||
| using Microsoft.Rest; | ||
| using Microsoft.Rest.Azure; | ||
| using Models; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
|
|
||
| /// <summary> | ||
| /// Extension methods for BackupStorageConfigsOperations. | ||
| /// </summary> | ||
| public static partial class BackupStorageConfigsOperationsExtensions | ||
| { | ||
| /// <summary> | ||
| /// Fetches resource storage config. | ||
| /// </summary> | ||
| /// <param name='operations'> | ||
| /// The operations group for this extension method. | ||
| /// </param> | ||
| /// <param name='resourceGroupName'> | ||
| /// The name of the resource group where the recovery services vault is | ||
| /// present. | ||
| /// </param> | ||
| /// <param name='vaultName'> | ||
| /// The name of the recovery services vault. | ||
| /// </param> | ||
| public static BackupStorageConfig Get(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName) | ||
| { | ||
| return operations.GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Fetches resource storage config. | ||
| /// </summary> | ||
| /// <param name='operations'> | ||
| /// The operations group for this extension method. | ||
| /// </param> | ||
| /// <param name='resourceGroupName'> | ||
| /// The name of the resource group where the recovery services vault is | ||
| /// present. | ||
| /// </param> | ||
| /// <param name='vaultName'> | ||
| /// The name of the recovery services vault. | ||
| /// </param> | ||
| /// <param name='cancellationToken'> | ||
| /// The cancellation token. | ||
| /// </param> | ||
| public static async Task<BackupStorageConfig> GetAsync(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) | ||
| { | ||
| using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) | ||
| { | ||
| return _result.Body; | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Updates vault storage model type. | ||
| /// </summary> | ||
| /// <param name='operations'> | ||
| /// The operations group for this extension method. | ||
| /// </param> | ||
| /// <param name='resourceGroupName'> | ||
| /// The name of the resource group where the recovery services vault is | ||
| /// present. | ||
| /// </param> | ||
| /// <param name='vaultName'> | ||
| /// The name of the recovery services vault. | ||
| /// </param> | ||
| /// <param name='backupStorageConfig'> | ||
| /// Backup storage config. | ||
| /// </param> | ||
| public static void Update(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName, BackupStorageConfig backupStorageConfig) | ||
| { | ||
| operations.UpdateAsync(resourceGroupName, vaultName, backupStorageConfig).GetAwaiter().GetResult(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Updates vault storage model type. | ||
| /// </summary> | ||
| /// <param name='operations'> | ||
| /// The operations group for this extension method. | ||
| /// </param> | ||
| /// <param name='resourceGroupName'> | ||
| /// The name of the resource group where the recovery services vault is | ||
| /// present. | ||
| /// </param> | ||
| /// <param name='vaultName'> | ||
| /// The name of the recovery services vault. | ||
| /// </param> | ||
| /// <param name='backupStorageConfig'> | ||
| /// Backup storage config. | ||
| /// </param> | ||
| /// <param name='cancellationToken'> | ||
| /// The cancellation token. | ||
| /// </param> | ||
| public static async Task UpdateAsync(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName, BackupStorageConfig backupStorageConfig, CancellationToken cancellationToken = default(CancellationToken)) | ||
| { | ||
| (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, backupStorageConfig, null, cancellationToken).ConfigureAwait(false)).Dispose(); | ||
| } | ||
|
|
||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dragonfly91 this file needs a license header