| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.ContainerRegistry |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Microsoft.Rest.Azure; |
| | 15 | | using Models; |
| | 16 | | using System.Threading; |
| | 17 | | using System.Threading.Tasks; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Extension methods for ManifestsOperations. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class ManifestsOperationsExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Get the manifest identified by `name` and `reference` where `reference` can |
| | 26 | | /// be a tag or digest. |
| | 27 | | /// </summary> |
| | 28 | | /// <param name='operations'> |
| | 29 | | /// The operations group for this extension method. |
| | 30 | | /// </param> |
| | 31 | | /// <param name='name'> |
| | 32 | | /// Name of the image (including the namespace) |
| | 33 | | /// </param> |
| | 34 | | /// <param name='reference'> |
| | 35 | | /// A tag or a digest, pointing to a specific image |
| | 36 | | /// </param> |
| | 37 | | /// <param name='accept'> |
| | 38 | | /// Accept header string delimited by comma. For example, |
| | 39 | | /// application/vnd.docker.distribution.manifest.v2+json |
| | 40 | | /// </param> |
| | 41 | | /// <param name='cancellationToken'> |
| | 42 | | /// The cancellation token. |
| | 43 | | /// </param> |
| | 44 | | public static async Task<ManifestWrapper> GetAsync(this IManifestsOperations operations, string name, string |
| | 45 | | { |
| 12 | 46 | | using (var _result = await operations.GetWithHttpMessagesAsync(name, reference, accept, null, cancellati |
| | 47 | | { |
| 12 | 48 | | return _result.Body; |
| | 49 | | } |
| 12 | 50 | | } |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// Put the manifest identified by `name` and `reference` where `reference` can |
| | 54 | | /// be a tag or digest. |
| | 55 | | /// </summary> |
| | 56 | | /// <param name='operations'> |
| | 57 | | /// The operations group for this extension method. |
| | 58 | | /// </param> |
| | 59 | | /// <param name='name'> |
| | 60 | | /// Name of the image (including the namespace) |
| | 61 | | /// </param> |
| | 62 | | /// <param name='reference'> |
| | 63 | | /// A tag or a digest, pointing to a specific image |
| | 64 | | /// </param> |
| | 65 | | /// <param name='payload'> |
| | 66 | | /// Manifest body, can take v1 or v2 values depending on accept header |
| | 67 | | /// </param> |
| | 68 | | /// <param name='cancellationToken'> |
| | 69 | | /// The cancellation token. |
| | 70 | | /// </param> |
| | 71 | | public static async Task<object> CreateAsync(this IManifestsOperations operations, string name, string refer |
| | 72 | | { |
| 2 | 73 | | using (var _result = await operations.CreateWithHttpMessagesAsync(name, reference, payload, null, cancel |
| | 74 | | { |
| 2 | 75 | | return _result.Body; |
| | 76 | | } |
| 2 | 77 | | } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Delete the manifest identified by `name` and `reference`. Note that a |
| | 81 | | /// manifest can _only_ be deleted by `digest`. |
| | 82 | | /// </summary> |
| | 83 | | /// <param name='operations'> |
| | 84 | | /// The operations group for this extension method. |
| | 85 | | /// </param> |
| | 86 | | /// <param name='name'> |
| | 87 | | /// Name of the image (including the namespace) |
| | 88 | | /// </param> |
| | 89 | | /// <param name='reference'> |
| | 90 | | /// A tag or a digest, pointing to a specific image |
| | 91 | | /// </param> |
| | 92 | | /// <param name='cancellationToken'> |
| | 93 | | /// The cancellation token. |
| | 94 | | /// </param> |
| | 95 | | public static async Task DeleteAsync(this IManifestsOperations operations, string name, string reference, Ca |
| | 96 | | { |
| 2 | 97 | | (await operations.DeleteWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(f |
| 2 | 98 | | } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// List manifests of a repository |
| | 102 | | /// </summary> |
| | 103 | | /// <param name='operations'> |
| | 104 | | /// The operations group for this extension method. |
| | 105 | | /// </param> |
| | 106 | | /// <param name='name'> |
| | 107 | | /// Name of the image (including the namespace) |
| | 108 | | /// </param> |
| | 109 | | /// <param name='last'> |
| | 110 | | /// Query parameter for the last item in previous query. Result set will |
| | 111 | | /// include values lexically after last. |
| | 112 | | /// </param> |
| | 113 | | /// <param name='n'> |
| | 114 | | /// query parameter for max number of items |
| | 115 | | /// </param> |
| | 116 | | /// <param name='orderby'> |
| | 117 | | /// orderby query parameter |
| | 118 | | /// </param> |
| | 119 | | /// <param name='cancellationToken'> |
| | 120 | | /// The cancellation token. |
| | 121 | | /// </param> |
| | 122 | | public static async Task<AcrManifests> GetListAsync(this IManifestsOperations operations, string name, strin |
| | 123 | | { |
| 2 | 124 | | using (var _result = await operations.GetListWithHttpMessagesAsync(name, last, n, orderby, null, cancell |
| | 125 | | { |
| 2 | 126 | | return _result.Body; |
| | 127 | | } |
| 2 | 128 | | } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Get manifest attributes |
| | 132 | | /// </summary> |
| | 133 | | /// <param name='operations'> |
| | 134 | | /// The operations group for this extension method. |
| | 135 | | /// </param> |
| | 136 | | /// <param name='name'> |
| | 137 | | /// Name of the image (including the namespace) |
| | 138 | | /// </param> |
| | 139 | | /// <param name='reference'> |
| | 140 | | /// A tag or a digest, pointing to a specific image |
| | 141 | | /// </param> |
| | 142 | | /// <param name='cancellationToken'> |
| | 143 | | /// The cancellation token. |
| | 144 | | /// </param> |
| | 145 | | public static async Task<ManifestAttributes> GetAttributesAsync(this IManifestsOperations operations, string |
| | 146 | | { |
| 6 | 147 | | using (var _result = await operations.GetAttributesWithHttpMessagesAsync(name, reference, null, cancella |
| | 148 | | { |
| 6 | 149 | | return _result.Body; |
| | 150 | | } |
| 6 | 151 | | } |
| | 152 | |
|
| | 153 | | /// <summary> |
| | 154 | | /// Update attributes of a manifest |
| | 155 | | /// </summary> |
| | 156 | | /// <param name='operations'> |
| | 157 | | /// The operations group for this extension method. |
| | 158 | | /// </param> |
| | 159 | | /// <param name='name'> |
| | 160 | | /// Name of the image (including the namespace) |
| | 161 | | /// </param> |
| | 162 | | /// <param name='reference'> |
| | 163 | | /// A tag or a digest, pointing to a specific image |
| | 164 | | /// </param> |
| | 165 | | /// <param name='value'> |
| | 166 | | /// Repository attribute value |
| | 167 | | /// </param> |
| | 168 | | /// <param name='cancellationToken'> |
| | 169 | | /// The cancellation token. |
| | 170 | | /// </param> |
| | 171 | | public static async Task UpdateAttributesAsync(this IManifestsOperations operations, string name, string ref |
| | 172 | | { |
| 4 | 173 | | (await operations.UpdateAttributesWithHttpMessagesAsync(name, reference, value, null, cancellationToken) |
| 4 | 174 | | } |
| | 175 | |
|
| | 176 | | } |
| | 177 | | } |