import { ManagementPolicies } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { StorageManagementClient } from "../storageManagementClient" ; import { ManagementPolicyName , ManagementPoliciesGetOptionalParams , ManagementPoliciesGetResponse , ManagementPolicy , ManagementPoliciesCreateOrUpdateOptionalParams , ManagementPoliciesCreateOrUpdateResponse , ManagementPoliciesDeleteOptionalParams } from "../models" ; /** Class containing ManagementPolicies operations. */ export class ManagementPoliciesImpl implements ManagementPolicies { private readonly client : StorageManagementClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param accountName param managementPolicyName param options get ( resourceGroupName , accountName , managementPolicyName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , managementPolicyName , options } , getOperationSpec ) ; } param resourceGroupName param accountName param managementPolicyName param properties param options createOrUpdate ( resourceGroupName , accountName , managementPolicyName , properties , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , managementPolicyName , properties , options } , createOrUpdateOperationSpec ) ; } param resourceGroupName param accountName param managementPolicyName param options delete ( resourceGroupName , accountName , managementPolicyName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , managementPolicyName , options } , deleteOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . ManagementPolicy } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 , Parameters . managementPolicyName ] , headerParameters : [ Parameters . accept ] , serializer } ; const createOrUpdateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . ManagementPolicy } } , requestBody : Parameters . properties , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 , Parameters . managementPolicyName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const deleteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}" , httpMethod : "DELETE" , responses : { 200 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 , Parameters . managementPolicyName ] , serializer } ;