| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | | using System.Threading; |
| | 11 | | using System.Threading.Tasks; |
| | 12 | | using Azure; |
| | 13 | | using Azure.Core.Pipeline; |
| | 14 | | using Azure.ResourceManager.Compute.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.Compute |
| | 17 | | { |
| | 18 | | /// <summary> The VirtualMachineExtensionImages service client. </summary> |
| | 19 | | public partial class VirtualMachineExtensionImagesOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 12 | 23 | | internal VirtualMachineExtensionImagesRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of VirtualMachineExtensionImagesOperations for mocking. </summary> |
| 396 | 25 | | protected VirtualMachineExtensionImagesOperations() |
| | 26 | | { |
| 396 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of VirtualMachineExtensionImagesOperations. </summary> |
| | 29 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 30 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 31 | | /// <param name="subscriptionId"> Subscription credentials which uniquely identify Microsoft Azure subscription. |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 396 | 33 | | internal VirtualMachineExtensionImagesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, str |
| | 34 | | { |
| 396 | 35 | | RestClient = new VirtualMachineExtensionImagesRestOperations(clientDiagnostics, pipeline, subscriptionId, en |
| 396 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 396 | 37 | | _pipeline = pipeline; |
| 396 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Gets a virtual machine extension image. </summary> |
| | 41 | | /// <param name="location"> The name of a supported Azure region. </param> |
| | 42 | | /// <param name="publisherName"> The String to use. </param> |
| | 43 | | /// <param name="type"> The String to use. </param> |
| | 44 | | /// <param name="version"> The String to use. </param> |
| | 45 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 46 | | public virtual async Task<Response<VirtualMachineExtensionImage>> GetAsync(string location, string publisherName |
| | 47 | | { |
| 2 | 48 | | using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.Get"); |
| 2 | 49 | | scope.Start(); |
| | 50 | | try |
| | 51 | | { |
| 2 | 52 | | return await RestClient.GetAsync(location, publisherName, type, version, cancellationToken).ConfigureAwa |
| | 53 | | } |
| 0 | 54 | | catch (Exception e) |
| | 55 | | { |
| 0 | 56 | | scope.Failed(e); |
| 0 | 57 | | throw; |
| | 58 | | } |
| 2 | 59 | | } |
| | 60 | |
|
| | 61 | | /// <summary> Gets a virtual machine extension image. </summary> |
| | 62 | | /// <param name="location"> The name of a supported Azure region. </param> |
| | 63 | | /// <param name="publisherName"> The String to use. </param> |
| | 64 | | /// <param name="type"> The String to use. </param> |
| | 65 | | /// <param name="version"> The String to use. </param> |
| | 66 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 67 | | public virtual Response<VirtualMachineExtensionImage> Get(string location, string publisherName, string type, st |
| | 68 | | { |
| 2 | 69 | | using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.Get"); |
| 2 | 70 | | scope.Start(); |
| | 71 | | try |
| | 72 | | { |
| 2 | 73 | | return RestClient.Get(location, publisherName, type, version, cancellationToken); |
| | 74 | | } |
| 0 | 75 | | catch (Exception e) |
| | 76 | | { |
| 0 | 77 | | scope.Failed(e); |
| 0 | 78 | | throw; |
| | 79 | | } |
| 2 | 80 | | } |
| | 81 | |
|
| | 82 | | /// <summary> Gets a list of virtual machine extension image types. </summary> |
| | 83 | | /// <param name="location"> The name of a supported Azure region. </param> |
| | 84 | | /// <param name="publisherName"> The String to use. </param> |
| | 85 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 86 | | public virtual async Task<Response<IReadOnlyList<VirtualMachineExtensionImage>>> ListTypesAsync(string location, |
| | 87 | | { |
| 2 | 88 | | using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListTypes"); |
| 2 | 89 | | scope.Start(); |
| | 90 | | try |
| | 91 | | { |
| 2 | 92 | | return await RestClient.ListTypesAsync(location, publisherName, cancellationToken).ConfigureAwait(false) |
| | 93 | | } |
| 0 | 94 | | catch (Exception e) |
| | 95 | | { |
| 0 | 96 | | scope.Failed(e); |
| 0 | 97 | | throw; |
| | 98 | | } |
| 2 | 99 | | } |
| | 100 | |
|
| | 101 | | /// <summary> Gets a list of virtual machine extension image types. </summary> |
| | 102 | | /// <param name="location"> The name of a supported Azure region. </param> |
| | 103 | | /// <param name="publisherName"> The String to use. </param> |
| | 104 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 105 | | public virtual Response<IReadOnlyList<VirtualMachineExtensionImage>> ListTypes(string location, string publisher |
| | 106 | | { |
| 2 | 107 | | using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListTypes"); |
| 2 | 108 | | scope.Start(); |
| | 109 | | try |
| | 110 | | { |
| 2 | 111 | | return RestClient.ListTypes(location, publisherName, cancellationToken); |
| | 112 | | } |
| 0 | 113 | | catch (Exception e) |
| | 114 | | { |
| 0 | 115 | | scope.Failed(e); |
| 0 | 116 | | throw; |
| | 117 | | } |
| 2 | 118 | | } |
| | 119 | |
|
| | 120 | | /// <summary> Gets a list of virtual machine extension image versions. </summary> |
| | 121 | | /// <param name="location"> The name of a supported Azure region. </param> |
| | 122 | | /// <param name="publisherName"> The String to use. </param> |
| | 123 | | /// <param name="type"> The String to use. </param> |
| | 124 | | /// <param name="filter"> The filter to apply on the operation. </param> |
| | 125 | | /// <param name="top"> The Integer to use. </param> |
| | 126 | | /// <param name="orderby"> The String to use. </param> |
| | 127 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 128 | | public virtual async Task<Response<IReadOnlyList<VirtualMachineExtensionImage>>> ListVersionsAsync(string locati |
| | 129 | | { |
| 2 | 130 | | using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListVersions"); |
| 2 | 131 | | scope.Start(); |
| | 132 | | try |
| | 133 | | { |
| 2 | 134 | | return await RestClient.ListVersionsAsync(location, publisherName, type, filter, top, orderby, cancellat |
| | 135 | | } |
| 0 | 136 | | catch (Exception e) |
| | 137 | | { |
| 0 | 138 | | scope.Failed(e); |
| 0 | 139 | | throw; |
| | 140 | | } |
| 2 | 141 | | } |
| | 142 | |
|
| | 143 | | /// <summary> Gets a list of virtual machine extension image versions. </summary> |
| | 144 | | /// <param name="location"> The name of a supported Azure region. </param> |
| | 145 | | /// <param name="publisherName"> The String to use. </param> |
| | 146 | | /// <param name="type"> The String to use. </param> |
| | 147 | | /// <param name="filter"> The filter to apply on the operation. </param> |
| | 148 | | /// <param name="top"> The Integer to use. </param> |
| | 149 | | /// <param name="orderby"> The String to use. </param> |
| | 150 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 151 | | public virtual Response<IReadOnlyList<VirtualMachineExtensionImage>> ListVersions(string location, string publis |
| | 152 | | { |
| 2 | 153 | | using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListVersions"); |
| 2 | 154 | | scope.Start(); |
| | 155 | | try |
| | 156 | | { |
| 2 | 157 | | return RestClient.ListVersions(location, publisherName, type, filter, top, orderby, cancellationToken); |
| | 158 | | } |
| 0 | 159 | | catch (Exception e) |
| | 160 | | { |
| 0 | 161 | | scope.Failed(e); |
| 0 | 162 | | throw; |
| | 163 | | } |
| 2 | 164 | | } |
| | 165 | | } |
| | 166 | | } |