|
| 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.Sql |
| 6 | +{ |
| 7 | + using Microsoft.Rest.Azure; |
| 8 | + using Models; |
| 9 | + |
| 10 | + /// <summary> |
| 11 | + /// Extension methods for DatabaseSchemasOperations |
| 12 | + /// </summary> |
| 13 | + public static partial class DatabaseSchemasOperationsExtensions |
| 14 | + { |
| 15 | + /// <summary> |
| 16 | + /// List database schemas |
| 17 | + /// </summary> |
| 18 | + /// <param name='operations'> |
| 19 | + /// The operations group for this extension method. |
| 20 | + /// </param> |
| 21 | + /// <param name='odataQuery'> |
| 22 | + /// |
| 23 | + /// </param> |
| 24 | + /// <param name='resourceGroupName'> |
| 25 | + /// The name of the resource group that contains the resource. You can obtain |
| 26 | + /// this value from the Azure Resource Manager API or the portal. |
| 27 | + /// </param> |
| 28 | + /// <param name='serverName'> |
| 29 | + /// The name of the server. |
| 30 | + /// </param> |
| 31 | + /// <param name='databaseName'> |
| 32 | + /// The name of the database. |
| 33 | + /// </param> |
| 34 | + public static Microsoft.Rest.Azure.IPage<DatabaseSchema> ListByDatabase(this IDatabaseSchemasOperations operations, string resourceGroupName, string serverName, string databaseName, Microsoft.Rest.Azure.OData.ODataQuery<DatabaseSchema> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery<DatabaseSchema>)) |
| 35 | + { |
| 36 | + return ((IDatabaseSchemasOperations)operations).ListByDatabaseAsync(resourceGroupName, serverName, databaseName, odataQuery).GetAwaiter().GetResult(); |
| 37 | + } |
| 38 | + |
| 39 | + /// <summary> |
| 40 | + /// List database schemas |
| 41 | + /// </summary> |
| 42 | + /// <param name='operations'> |
| 43 | + /// The operations group for this extension method. |
| 44 | + /// </param> |
| 45 | + /// <param name='odataQuery'> |
| 46 | + /// |
| 47 | + /// </param> |
| 48 | + /// <param name='resourceGroupName'> |
| 49 | + /// The name of the resource group that contains the resource. You can obtain |
| 50 | + /// this value from the Azure Resource Manager API or the portal. |
| 51 | + /// </param> |
| 52 | + /// <param name='serverName'> |
| 53 | + /// The name of the server. |
| 54 | + /// </param> |
| 55 | + /// <param name='databaseName'> |
| 56 | + /// The name of the database. |
| 57 | + /// </param> |
| 58 | + /// <param name='cancellationToken'> |
| 59 | + /// The cancellation token. |
| 60 | + /// </param> |
| 61 | + public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DatabaseSchema>> ListByDatabaseAsync(this IDatabaseSchemasOperations operations, string resourceGroupName, string serverName, string databaseName, Microsoft.Rest.Azure.OData.ODataQuery<DatabaseSchema> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery<DatabaseSchema>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 62 | + { |
| 63 | + using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, odataQuery, null, cancellationToken).ConfigureAwait(false)) |
| 64 | + { |
| 65 | + return _result.Body; |
| 66 | + } |
| 67 | + } |
| 68 | + /// <summary> |
| 69 | + /// Get database schema |
| 70 | + /// </summary> |
| 71 | + /// <param name='operations'> |
| 72 | + /// The operations group for this extension method. |
| 73 | + /// </param> |
| 74 | + /// <param name='resourceGroupName'> |
| 75 | + /// The name of the resource group that contains the resource. You can obtain |
| 76 | + /// this value from the Azure Resource Manager API or the portal. |
| 77 | + /// </param> |
| 78 | + /// <param name='serverName'> |
| 79 | + /// The name of the server. |
| 80 | + /// </param> |
| 81 | + /// <param name='databaseName'> |
| 82 | + /// The name of the database. |
| 83 | + /// </param> |
| 84 | + /// <param name='schemaName'> |
| 85 | + /// The name of the schema. |
| 86 | + /// </param> |
| 87 | + public static DatabaseSchema Get(this IDatabaseSchemasOperations operations, string resourceGroupName, string serverName, string databaseName, string schemaName) |
| 88 | + { |
| 89 | + return ((IDatabaseSchemasOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, schemaName).GetAwaiter().GetResult(); |
| 90 | + } |
| 91 | + |
| 92 | + /// <summary> |
| 93 | + /// Get database schema |
| 94 | + /// </summary> |
| 95 | + /// <param name='operations'> |
| 96 | + /// The operations group for this extension method. |
| 97 | + /// </param> |
| 98 | + /// <param name='resourceGroupName'> |
| 99 | + /// The name of the resource group that contains the resource. You can obtain |
| 100 | + /// this value from the Azure Resource Manager API or the portal. |
| 101 | + /// </param> |
| 102 | + /// <param name='serverName'> |
| 103 | + /// The name of the server. |
| 104 | + /// </param> |
| 105 | + /// <param name='databaseName'> |
| 106 | + /// The name of the database. |
| 107 | + /// </param> |
| 108 | + /// <param name='schemaName'> |
| 109 | + /// The name of the schema. |
| 110 | + /// </param> |
| 111 | + /// <param name='cancellationToken'> |
| 112 | + /// The cancellation token. |
| 113 | + /// </param> |
| 114 | + public static async System.Threading.Tasks.Task<DatabaseSchema> GetAsync(this IDatabaseSchemasOperations operations, string resourceGroupName, string serverName, string databaseName, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 115 | + { |
| 116 | + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, schemaName, null, cancellationToken).ConfigureAwait(false)) |
| 117 | + { |
| 118 | + return _result.Body; |
| 119 | + } |
| 120 | + } |
| 121 | + /// <summary> |
| 122 | + /// List database schemas |
| 123 | + /// </summary> |
| 124 | + /// <param name='operations'> |
| 125 | + /// The operations group for this extension method. |
| 126 | + /// </param> |
| 127 | + /// <param name='nextPageLink'> |
| 128 | + /// The NextLink from the previous successful call to List operation. |
| 129 | + /// </param> |
| 130 | + public static Microsoft.Rest.Azure.IPage<DatabaseSchema> ListByDatabaseNext(this IDatabaseSchemasOperations operations, string nextPageLink) |
| 131 | + { |
| 132 | + return ((IDatabaseSchemasOperations)operations).ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 133 | + } |
| 134 | + |
| 135 | + /// <summary> |
| 136 | + /// List database schemas |
| 137 | + /// </summary> |
| 138 | + /// <param name='operations'> |
| 139 | + /// The operations group for this extension method. |
| 140 | + /// </param> |
| 141 | + /// <param name='nextPageLink'> |
| 142 | + /// The NextLink from the previous successful call to List operation. |
| 143 | + /// </param> |
| 144 | + /// <param name='cancellationToken'> |
| 145 | + /// The cancellation token. |
| 146 | + /// </param> |
| 147 | + public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DatabaseSchema>> ListByDatabaseNextAsync(this IDatabaseSchemasOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 148 | + { |
| 149 | + using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
| 150 | + { |
| 151 | + return _result.Body; |
| 152 | + } |
| 153 | + } |
| 154 | + } |
| 155 | +} |
0 commit comments