|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. See License.txt in the project root for license information. |
| 3 | +// Code generated by Microsoft (R) AutoRest Code Generator. |
| 4 | +// Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 5 | +namespace Microsoft.Azure.Management.DataShare |
| 6 | +{ |
| 7 | + using Microsoft.Rest.Azure; |
| 8 | + using Models; |
| 9 | + |
| 10 | + /// <summary> |
| 11 | + /// Extension methods for ConsumerInvitationsOperations |
| 12 | + /// </summary> |
| 13 | + public static partial class ConsumerInvitationsOperationsExtensions |
| 14 | + { |
| 15 | + /// <summary> |
| 16 | + /// Reject an invitation |
| 17 | + /// </summary> |
| 18 | + /// <param name='operations'> |
| 19 | + /// The operations group for this extension method. |
| 20 | + /// </param> |
| 21 | + /// <param name='location'> |
| 22 | + /// Location of the invitation |
| 23 | + /// </param> |
| 24 | + public static ConsumerInvitation RejectInvitation(this IConsumerInvitationsOperations operations, string location, ConsumerInvitation invitation) |
| 25 | + { |
| 26 | + return ((IConsumerInvitationsOperations)operations).RejectInvitationAsync(location, invitation).GetAwaiter().GetResult(); |
| 27 | + } |
| 28 | + |
| 29 | + /// <summary> |
| 30 | + /// Reject an invitation |
| 31 | + /// </summary> |
| 32 | + /// <param name='operations'> |
| 33 | + /// The operations group for this extension method. |
| 34 | + /// </param> |
| 35 | + /// <param name='location'> |
| 36 | + /// Location of the invitation |
| 37 | + /// </param> |
| 38 | + /// <param name='cancellationToken'> |
| 39 | + /// The cancellation token. |
| 40 | + /// </param> |
| 41 | + public static async System.Threading.Tasks.Task<ConsumerInvitation> RejectInvitationAsync(this IConsumerInvitationsOperations operations, string location, ConsumerInvitation invitation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 42 | + { |
| 43 | + using (var _result = await operations.RejectInvitationWithHttpMessagesAsync(location, invitation, null, cancellationToken).ConfigureAwait(false)) |
| 44 | + { |
| 45 | + return _result.Body; |
| 46 | + } |
| 47 | + } |
| 48 | + /// <summary> |
| 49 | + /// Get an invitation |
| 50 | + /// </summary> |
| 51 | + /// <param name='operations'> |
| 52 | + /// The operations group for this extension method. |
| 53 | + /// </param> |
| 54 | + /// <param name='location'> |
| 55 | + /// Location of the invitation |
| 56 | + /// </param> |
| 57 | + /// <param name='invitationId'> |
| 58 | + /// An invitation id |
| 59 | + /// </param> |
| 60 | + public static ConsumerInvitation Get(this IConsumerInvitationsOperations operations, string location, string invitationId) |
| 61 | + { |
| 62 | + return ((IConsumerInvitationsOperations)operations).GetAsync(location, invitationId).GetAwaiter().GetResult(); |
| 63 | + } |
| 64 | + |
| 65 | + /// <summary> |
| 66 | + /// Get an invitation |
| 67 | + /// </summary> |
| 68 | + /// <param name='operations'> |
| 69 | + /// The operations group for this extension method. |
| 70 | + /// </param> |
| 71 | + /// <param name='location'> |
| 72 | + /// Location of the invitation |
| 73 | + /// </param> |
| 74 | + /// <param name='invitationId'> |
| 75 | + /// An invitation id |
| 76 | + /// </param> |
| 77 | + /// <param name='cancellationToken'> |
| 78 | + /// The cancellation token. |
| 79 | + /// </param> |
| 80 | + public static async System.Threading.Tasks.Task<ConsumerInvitation> GetAsync(this IConsumerInvitationsOperations operations, string location, string invitationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 81 | + { |
| 82 | + using (var _result = await operations.GetWithHttpMessagesAsync(location, invitationId, null, cancellationToken).ConfigureAwait(false)) |
| 83 | + { |
| 84 | + return _result.Body; |
| 85 | + } |
| 86 | + } |
| 87 | + /// <summary> |
| 88 | + /// Lists invitations |
| 89 | + /// </summary> |
| 90 | + /// <param name='operations'> |
| 91 | + /// The operations group for this extension method. |
| 92 | + /// </param> |
| 93 | + /// <param name='skipToken'> |
| 94 | + /// The continuation token |
| 95 | + /// </param> |
| 96 | + public static Microsoft.Rest.Azure.IPage<ConsumerInvitation> ListInvitations(this IConsumerInvitationsOperations operations, string skipToken = default(string)) |
| 97 | + { |
| 98 | + return ((IConsumerInvitationsOperations)operations).ListInvitationsAsync(skipToken).GetAwaiter().GetResult(); |
| 99 | + } |
| 100 | + |
| 101 | + /// <summary> |
| 102 | + /// Lists invitations |
| 103 | + /// </summary> |
| 104 | + /// <param name='operations'> |
| 105 | + /// The operations group for this extension method. |
| 106 | + /// </param> |
| 107 | + /// <param name='skipToken'> |
| 108 | + /// The continuation token |
| 109 | + /// </param> |
| 110 | + /// <param name='cancellationToken'> |
| 111 | + /// The cancellation token. |
| 112 | + /// </param> |
| 113 | + public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<ConsumerInvitation>> ListInvitationsAsync(this IConsumerInvitationsOperations operations, string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 114 | + { |
| 115 | + using (var _result = await operations.ListInvitationsWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false)) |
| 116 | + { |
| 117 | + return _result.Body; |
| 118 | + } |
| 119 | + } |
| 120 | + /// <summary> |
| 121 | + /// Lists invitations |
| 122 | + /// </summary> |
| 123 | + /// <param name='operations'> |
| 124 | + /// The operations group for this extension method. |
| 125 | + /// </param> |
| 126 | + /// <param name='nextPageLink'> |
| 127 | + /// The NextLink from the previous successful call to List operation. |
| 128 | + /// </param> |
| 129 | + public static Microsoft.Rest.Azure.IPage<ConsumerInvitation> ListInvitationsNext(this IConsumerInvitationsOperations operations, string nextPageLink) |
| 130 | + { |
| 131 | + return ((IConsumerInvitationsOperations)operations).ListInvitationsNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 132 | + } |
| 133 | + |
| 134 | + /// <summary> |
| 135 | + /// Lists invitations |
| 136 | + /// </summary> |
| 137 | + /// <param name='operations'> |
| 138 | + /// The operations group for this extension method. |
| 139 | + /// </param> |
| 140 | + /// <param name='nextPageLink'> |
| 141 | + /// The NextLink from the previous successful call to List operation. |
| 142 | + /// </param> |
| 143 | + /// <param name='cancellationToken'> |
| 144 | + /// The cancellation token. |
| 145 | + /// </param> |
| 146 | + public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<ConsumerInvitation>> ListInvitationsNextAsync(this IConsumerInvitationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 147 | + { |
| 148 | + using (var _result = await operations.ListInvitationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
| 149 | + { |
| 150 | + return _result.Body; |
| 151 | + } |
| 152 | + } |
| 153 | + } |
| 154 | +} |
0 commit comments