| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.ContentModerator |
| | 8 | | { |
| | 9 | | using Models; |
| | 10 | | using System.Collections; |
| | 11 | | using System.Collections.Generic; |
| | 12 | | using System.Threading; |
| | 13 | | using System.Threading.Tasks; |
| | 14 | |
|
| | 15 | | /// <summary> |
| | 16 | | /// Extension methods for ListManagementImageLists. |
| | 17 | | /// </summary> |
| | 18 | | public static partial class ListManagementImageListsExtensions |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Returns the details of the image list with list Id equal to list Id passed. |
| | 22 | | /// </summary> |
| | 23 | | /// <param name='operations'> |
| | 24 | | /// The operations group for this extension method. |
| | 25 | | /// </param> |
| | 26 | | /// <param name='listId'> |
| | 27 | | /// List Id of the image list. |
| | 28 | | /// </param> |
| | 29 | | public static ImageList GetDetails(this IListManagementImageLists operations, string listId) |
| | 30 | | { |
| 0 | 31 | | return operations.GetDetailsAsync(listId).GetAwaiter().GetResult(); |
| | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Returns the details of the image list with list Id equal to list Id passed. |
| | 36 | | /// </summary> |
| | 37 | | /// <param name='operations'> |
| | 38 | | /// The operations group for this extension method. |
| | 39 | | /// </param> |
| | 40 | | /// <param name='listId'> |
| | 41 | | /// List Id of the image list. |
| | 42 | | /// </param> |
| | 43 | | /// <param name='cancellationToken'> |
| | 44 | | /// The cancellation token. |
| | 45 | | /// </param> |
| | 46 | | public static async Task<ImageList> GetDetailsAsync(this IListManagementImageLists operations, string listId |
| | 47 | | { |
| 0 | 48 | | using (var _result = await operations.GetDetailsWithHttpMessagesAsync(listId, null, cancellationToken).C |
| | 49 | | { |
| 0 | 50 | | return _result.Body; |
| | 51 | | } |
| 0 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Deletes image list with the list Id equal to list Id passed. |
| | 56 | | /// </summary> |
| | 57 | | /// <param name='operations'> |
| | 58 | | /// The operations group for this extension method. |
| | 59 | | /// </param> |
| | 60 | | /// <param name='listId'> |
| | 61 | | /// List Id of the image list. |
| | 62 | | /// </param> |
| | 63 | | public static string Delete(this IListManagementImageLists operations, string listId) |
| | 64 | | { |
| 0 | 65 | | return operations.DeleteAsync(listId).GetAwaiter().GetResult(); |
| | 66 | | } |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Deletes image list with the list Id equal to list Id passed. |
| | 70 | | /// </summary> |
| | 71 | | /// <param name='operations'> |
| | 72 | | /// The operations group for this extension method. |
| | 73 | | /// </param> |
| | 74 | | /// <param name='listId'> |
| | 75 | | /// List Id of the image list. |
| | 76 | | /// </param> |
| | 77 | | /// <param name='cancellationToken'> |
| | 78 | | /// The cancellation token. |
| | 79 | | /// </param> |
| | 80 | | public static async Task<string> DeleteAsync(this IListManagementImageLists operations, string listId, Cance |
| | 81 | | { |
| 0 | 82 | | using (var _result = await operations.DeleteWithHttpMessagesAsync(listId, null, cancellationToken).Confi |
| | 83 | | { |
| 0 | 84 | | return _result.Body; |
| | 85 | | } |
| 0 | 86 | | } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Updates an image list with list Id equal to list Id passed. |
| | 90 | | /// </summary> |
| | 91 | | /// <param name='operations'> |
| | 92 | | /// The operations group for this extension method. |
| | 93 | | /// </param> |
| | 94 | | /// <param name='listId'> |
| | 95 | | /// List Id of the image list. |
| | 96 | | /// </param> |
| | 97 | | /// <param name='contentType'> |
| | 98 | | /// The content type. |
| | 99 | | /// </param> |
| | 100 | | /// <param name='body'> |
| | 101 | | /// Schema of the body. |
| | 102 | | /// </param> |
| | 103 | | public static ImageList Update(this IListManagementImageLists operations, string listId, string contentType, |
| | 104 | | { |
| 0 | 105 | | return operations.UpdateAsync(listId, contentType, body).GetAwaiter().GetResult(); |
| | 106 | | } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Updates an image list with list Id equal to list Id passed. |
| | 110 | | /// </summary> |
| | 111 | | /// <param name='operations'> |
| | 112 | | /// The operations group for this extension method. |
| | 113 | | /// </param> |
| | 114 | | /// <param name='listId'> |
| | 115 | | /// List Id of the image list. |
| | 116 | | /// </param> |
| | 117 | | /// <param name='contentType'> |
| | 118 | | /// The content type. |
| | 119 | | /// </param> |
| | 120 | | /// <param name='body'> |
| | 121 | | /// Schema of the body. |
| | 122 | | /// </param> |
| | 123 | | /// <param name='cancellationToken'> |
| | 124 | | /// The cancellation token. |
| | 125 | | /// </param> |
| | 126 | | public static async Task<ImageList> UpdateAsync(this IListManagementImageLists operations, string listId, st |
| | 127 | | { |
| 0 | 128 | | using (var _result = await operations.UpdateWithHttpMessagesAsync(listId, contentType, body, null, cance |
| | 129 | | { |
| 0 | 130 | | return _result.Body; |
| | 131 | | } |
| 0 | 132 | | } |
| | 133 | |
|
| | 134 | | /// <summary> |
| | 135 | | /// Creates an image list. |
| | 136 | | /// </summary> |
| | 137 | | /// <param name='operations'> |
| | 138 | | /// The operations group for this extension method. |
| | 139 | | /// </param> |
| | 140 | | /// <param name='contentType'> |
| | 141 | | /// The content type. |
| | 142 | | /// </param> |
| | 143 | | /// <param name='body'> |
| | 144 | | /// Schema of the body. |
| | 145 | | /// </param> |
| | 146 | | public static ImageList Create(this IListManagementImageLists operations, string contentType, Body body) |
| | 147 | | { |
| 0 | 148 | | return operations.CreateAsync(contentType, body).GetAwaiter().GetResult(); |
| | 149 | | } |
| | 150 | |
|
| | 151 | | /// <summary> |
| | 152 | | /// Creates an image list. |
| | 153 | | /// </summary> |
| | 154 | | /// <param name='operations'> |
| | 155 | | /// The operations group for this extension method. |
| | 156 | | /// </param> |
| | 157 | | /// <param name='contentType'> |
| | 158 | | /// The content type. |
| | 159 | | /// </param> |
| | 160 | | /// <param name='body'> |
| | 161 | | /// Schema of the body. |
| | 162 | | /// </param> |
| | 163 | | /// <param name='cancellationToken'> |
| | 164 | | /// The cancellation token. |
| | 165 | | /// </param> |
| | 166 | | public static async Task<ImageList> CreateAsync(this IListManagementImageLists operations, string contentTyp |
| | 167 | | { |
| 0 | 168 | | using (var _result = await operations.CreateWithHttpMessagesAsync(contentType, body, null, cancellationT |
| | 169 | | { |
| 0 | 170 | | return _result.Body; |
| | 171 | | } |
| 0 | 172 | | } |
| | 173 | |
|
| | 174 | | /// <summary> |
| | 175 | | /// Gets all the Image Lists. |
| | 176 | | /// </summary> |
| | 177 | | /// <param name='operations'> |
| | 178 | | /// The operations group for this extension method. |
| | 179 | | /// </param> |
| | 180 | | public static IList<ImageList> GetAllImageLists(this IListManagementImageLists operations) |
| | 181 | | { |
| 0 | 182 | | return operations.GetAllImageListsAsync().GetAwaiter().GetResult(); |
| | 183 | | } |
| | 184 | |
|
| | 185 | | /// <summary> |
| | 186 | | /// Gets all the Image Lists. |
| | 187 | | /// </summary> |
| | 188 | | /// <param name='operations'> |
| | 189 | | /// The operations group for this extension method. |
| | 190 | | /// </param> |
| | 191 | | /// <param name='cancellationToken'> |
| | 192 | | /// The cancellation token. |
| | 193 | | /// </param> |
| | 194 | | public static async Task<IList<ImageList>> GetAllImageListsAsync(this IListManagementImageLists operations, |
| | 195 | | { |
| 0 | 196 | | using (var _result = await operations.GetAllImageListsWithHttpMessagesAsync(null, cancellationToken).Con |
| | 197 | | { |
| 0 | 198 | | return _result.Body; |
| | 199 | | } |
| 0 | 200 | | } |
| | 201 | |
|
| | 202 | | /// <summary> |
| | 203 | | /// Refreshes the index of the list with list Id equal to list Id passed. |
| | 204 | | /// </summary> |
| | 205 | | /// <param name='operations'> |
| | 206 | | /// The operations group for this extension method. |
| | 207 | | /// </param> |
| | 208 | | /// <param name='listId'> |
| | 209 | | /// List Id of the image list. |
| | 210 | | /// </param> |
| | 211 | | public static RefreshIndex RefreshIndexMethod(this IListManagementImageLists operations, string listId) |
| | 212 | | { |
| 0 | 213 | | return operations.RefreshIndexMethodAsync(listId).GetAwaiter().GetResult(); |
| | 214 | | } |
| | 215 | |
|
| | 216 | | /// <summary> |
| | 217 | | /// Refreshes the index of the list with list Id equal to list Id passed. |
| | 218 | | /// </summary> |
| | 219 | | /// <param name='operations'> |
| | 220 | | /// The operations group for this extension method. |
| | 221 | | /// </param> |
| | 222 | | /// <param name='listId'> |
| | 223 | | /// List Id of the image list. |
| | 224 | | /// </param> |
| | 225 | | /// <param name='cancellationToken'> |
| | 226 | | /// The cancellation token. |
| | 227 | | /// </param> |
| | 228 | | public static async Task<RefreshIndex> RefreshIndexMethodAsync(this IListManagementImageLists operations, st |
| | 229 | | { |
| 0 | 230 | | using (var _result = await operations.RefreshIndexMethodWithHttpMessagesAsync(listId, null, cancellation |
| | 231 | | { |
| 0 | 232 | | return _result.Body; |
| | 233 | | } |
| 0 | 234 | | } |
| | 235 | |
|
| | 236 | | } |
| | 237 | | } |