import { VirtualMachineImages } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { ComputeManagementClient } from "../computeManagementClient" ; import { VirtualMachineImagesGetOptionalParams , VirtualMachineImagesGetResponse , VirtualMachineImagesListOptionalParams , VirtualMachineImagesListResponse , VirtualMachineImagesListOffersOptionalParams , VirtualMachineImagesListOffersResponse , VirtualMachineImagesListPublishersOptionalParams , VirtualMachineImagesListPublishersResponse , VirtualMachineImagesListSkusOptionalParams , VirtualMachineImagesListSkusResponse } from "../models" ; /** Class containing VirtualMachineImages operations. */ export class VirtualMachineImagesImpl implements VirtualMachineImages { private readonly client : ComputeManagementClient ; param client constructor ( client ) { this . client = client ; } param location param publisherName param offer param skus param version param options get ( location , publisherName , offer , skus , version , options ? ) { return this . client . sendOperationRequest ( { location , publisherName , offer , skus , version , options } , getOperationSpec ) ; } param location param publisherName param offer param skus param options list ( location , publisherName , offer , skus , options ? ) { return this . client . sendOperationRequest ( { location , publisherName , offer , skus , options } , listOperationSpec ) ; } param location param publisherName param options listOffers ( location , publisherName , options ? ) { return this . client . sendOperationRequest ( { location , publisherName , options } , listOffersOperationSpec ) ; } param location param options listPublishers ( location , options ? ) { return this . client . sendOperationRequest ( { location , options } , listPublishersOperationSpec ) ; } param location param publisherName param offer param options listSkus ( location , publisherName , offer , options ? ) { return this . client . sendOperationRequest ( { location , publisherName , offer , options } , listSkusOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualMachineImage } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . location , Parameters . publisherName , Parameters . version , Parameters . offer , Parameters . skus ] , headerParameters : [ Parameters . accept ] , serializer } ; const listOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VirtualMachineImageResource" } } } } } } , queryParameters : [ Parameters . apiVersion , Parameters . expand , Parameters . top , Parameters . orderby ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . location , Parameters . publisherName , Parameters . offer , Parameters . skus ] , headerParameters : [ Parameters . accept ] , serializer } ; const listOffersOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VirtualMachineImageResource" } } } } } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . location , Parameters . publisherName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listPublishersOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VirtualMachineImageResource" } } } } } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . location ] , headerParameters : [ Parameters . accept ] , serializer } ; const listSkusOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VirtualMachineImageResource" } } } } } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . location , Parameters . publisherName , Parameters . offer ] , headerParameters : [ Parameters . accept ] , serializer } ;