Skip to content

Commit

Permalink
Generated from 8fbe83055ad65a067b53daa97e20a0223d0b6834 (#76)
Browse files Browse the repository at this point in the history
fix examples
  • Loading branch information
openapi-sdkautomation[bot] authored Aug 18, 2019
1 parent 8ad3342 commit 3d49184
Show file tree
Hide file tree
Showing 112 changed files with 8,078 additions and 1,170 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.MachineLearning.CommitmentPlans
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Rest.Azure;
using Models;

/// <summary>
/// Extension methods for CommitmentAssociationsOperations.
/// </summary>
public static partial class CommitmentAssociationsOperationsExtensions
{
/// <summary>
/// Gets a commitment association.
/// Get a commitment association.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -34,11 +38,11 @@ public static partial class CommitmentAssociationsOperationsExtensions
/// </param>
public static CommitmentAssociation Get(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName)
{
return System.Threading.Tasks.Task.Factory.StartNew(s => ((ICommitmentAssociationsOperations)s).GetAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
return operations.GetAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a commitment association.
/// Get a commitment association.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -55,7 +59,7 @@ public static CommitmentAssociation Get(this ICommitmentAssociationsOperations o
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<CommitmentAssociation> GetAsync(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async Task<CommitmentAssociation> GetAsync(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -78,9 +82,9 @@ public static CommitmentAssociation Get(this ICommitmentAssociationsOperations o
/// <param name='skipToken'>
/// Continuation token for pagination.
/// </param>
public static Microsoft.Rest.Azure.IPage<CommitmentAssociation> List(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string skipToken = default(string))
public static IPage<CommitmentAssociation> List(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string skipToken = default(string))
{
return System.Threading.Tasks.Task.Factory.StartNew(s => ((ICommitmentAssociationsOperations)s).ListAsync(resourceGroupName, commitmentPlanName, skipToken), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
return operations.ListAsync(resourceGroupName, commitmentPlanName, skipToken).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -101,7 +105,7 @@ public static CommitmentAssociation Get(this ICommitmentAssociationsOperations o
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<Microsoft.Rest.Azure.IPage<CommitmentAssociation>> ListAsync(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async Task<IPage<CommitmentAssociation>> ListAsync(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, commitmentPlanName, skipToken, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -110,7 +114,7 @@ public static CommitmentAssociation Get(this ICommitmentAssociationsOperations o
}

/// <summary>
/// Re-parents a commitment association from one commitment plan to another.
/// Re-parent a commitment association from one commitment plan to another.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -124,16 +128,17 @@ public static CommitmentAssociation Get(this ICommitmentAssociationsOperations o
/// <param name='commitmentAssociationName'>
/// The commitment association name.
/// </param>
/// <param name='movePayload'>
/// The move request payload.
/// <param name='destinationPlanId'>
/// The ARM ID of the commitment plan to re-parent the commitment association
/// to.
/// </param>
public static CommitmentAssociation Move(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName, MoveCommitmentAssociationRequest movePayload)
public static CommitmentAssociation Move(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName, string destinationPlanId = default(string))
{
return System.Threading.Tasks.Task.Factory.StartNew(s => ((ICommitmentAssociationsOperations)s).MoveAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName, movePayload), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
return operations.MoveAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName, destinationPlanId).GetAwaiter().GetResult();
}

/// <summary>
/// Re-parents a commitment association from one commitment plan to another.
/// Re-parent a commitment association from one commitment plan to another.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -147,15 +152,16 @@ public static CommitmentAssociation Move(this ICommitmentAssociationsOperations
/// <param name='commitmentAssociationName'>
/// The commitment association name.
/// </param>
/// <param name='movePayload'>
/// The move request payload.
/// <param name='destinationPlanId'>
/// The ARM ID of the commitment plan to re-parent the commitment association
/// to.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<CommitmentAssociation> MoveAsync(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName, MoveCommitmentAssociationRequest movePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async Task<CommitmentAssociation> MoveAsync(this ICommitmentAssociationsOperations operations, string resourceGroupName, string commitmentPlanName, string commitmentAssociationName, string destinationPlanId = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.MoveWithHttpMessagesAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName, movePayload, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.MoveWithHttpMessagesAsync(resourceGroupName, commitmentPlanName, commitmentAssociationName, destinationPlanId, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand All @@ -170,9 +176,9 @@ public static CommitmentAssociation Move(this ICommitmentAssociationsOperations
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static Microsoft.Rest.Azure.IPage<CommitmentAssociation> ListNext(this ICommitmentAssociationsOperations operations, string nextPageLink)
public static IPage<CommitmentAssociation> ListNext(this ICommitmentAssociationsOperations operations, string nextPageLink)
{
return System.Threading.Tasks.Task.Factory.StartNew(s => ((ICommitmentAssociationsOperations)s).ListNextAsync(nextPageLink), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -187,7 +193,7 @@ public static Microsoft.Rest.Azure.IPage<CommitmentAssociation> ListNext(this IC
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<Microsoft.Rest.Azure.IPage<CommitmentAssociation>> ListNextAsync(this ICommitmentAssociationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async Task<IPage<CommitmentAssociation>> ListNextAsync(this ICommitmentAssociationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
Expand Down
Loading

0 comments on commit 3d49184

Please sign in to comment.