UNPKG

appcenter-cli

Version:

Command line tool for Visual Studio App Center

225 lines (224 loc) 8.83 kB
"use strict"; /* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ExportConfigurationsImpl = void 0; const coreClient = require("@azure/core-client"); const Mappers = require("../models/mappers"); const Parameters = require("../models/parameters"); /** Class containing ExportConfigurations operations. */ class ExportConfigurationsImpl { /** * Initialize a new instance of the class ExportConfigurations class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Enable export configuration. * @param exportConfigurationId The id of the export configuration. * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ enable(exportConfigurationId, ownerName, appName, options) { return this.client.sendOperationRequest({ exportConfigurationId, ownerName, appName, options }, enableOperationSpec); } /** * Disable export configuration. * @param exportConfigurationId The id of the export configuration. * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ disable(exportConfigurationId, ownerName, appName, options) { return this.client.sendOperationRequest({ exportConfigurationId, ownerName, appName, options }, disableOperationSpec); } /** * Get export configuration. * @param exportConfigurationId The id of the export configuration. * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ get(exportConfigurationId, ownerName, appName, options) { return this.client.sendOperationRequest({ exportConfigurationId, ownerName, appName, options }, getOperationSpec); } /** * Partially update export configuration. * @param exportConfigurationId The id of the export configuration. * @param ownerName The name of the owner * @param appName The name of the application * @param properties Export configurations. * @param options The options parameters. */ partialUpdate(exportConfigurationId, ownerName, appName, properties, options) { return this.client.sendOperationRequest({ exportConfigurationId, ownerName, appName, properties, options }, partialUpdateOperationSpec); } /** * Delete export configuration. * @param exportConfigurationId The id of the export configuration. * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ delete(exportConfigurationId, ownerName, appName, options) { return this.client.sendOperationRequest({ exportConfigurationId, ownerName, appName, options }, deleteOperationSpec); } /** * List export configurations. * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ list(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, listOperationSpec); } /** * Create new export configuration * @param ownerName The name of the owner * @param appName The name of the application * @param properties Export configurations. * @param options The options parameters. */ create(ownerName, appName, properties, options) { return this.client.sendOperationRequest({ ownerName, appName, properties, options }, createOperationSpec); } } exports.ExportConfigurationsImpl = ExportConfigurationsImpl; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const enableOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations/{export_configuration_id}/enable", httpMethod: "POST", responses: { 200: {}, default: { bodyMapper: Mappers.Paths42AbxiV01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdEnablePostResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.exportConfigurationId ], headerParameters: [Parameters.accept], serializer }; const disableOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations/{export_configuration_id}/disable", httpMethod: "POST", responses: { 200: {}, default: { bodyMapper: Mappers.PathsNstgqpV01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdDisablePostResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.exportConfigurationId ], headerParameters: [Parameters.accept], serializer }; const getOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations/{export_configuration_id}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Paths1OysruzV01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdGetResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.Paths1J8YtkwV01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdGetResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.exportConfigurationId ], headerParameters: [Parameters.accept], serializer }; const partialUpdateOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations/{export_configuration_id}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.Paths420JlyV01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdPatchResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.Paths1Gnrj58V01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdPatchResponsesDefaultContentApplicationJsonSchema } }, requestBody: Parameters.properties4, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.exportConfigurationId ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; const deleteOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations/{export_configuration_id}", httpMethod: "DELETE", responses: { 200: {}, default: { bodyMapper: Mappers.PathsVg92GuV01AppsOwnerNameAppNameExportConfigurationsExportConfigurationIdDeleteResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.exportConfigurationId ], headerParameters: [Parameters.accept], serializer }; const listOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Paths1FgwvpvV01AppsOwnerNameAppNameExportConfigurationsGetResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.Paths1QpjuboV01AppsOwnerNameAppNameExportConfigurationsGetResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer }; const createOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/export_configurations", httpMethod: "POST", responses: { 202: { bodyMapper: Mappers.Paths95VcrfV01AppsOwnerNameAppNameExportConfigurationsPostResponses202ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.PathsElutorV01AppsOwnerNameAppNameExportConfigurationsPostResponsesDefaultContentApplicationJsonSchema } }, requestBody: Parameters.properties5, urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer };