/*
 * 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.
 */

import { Test } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { AppCenterClient } from "../appCenterClient";
import {
  TestGetDeviceSetOfUserOptionalParams,
  TestGetDeviceSetOfUserResponse,
  TestUpdateDeviceSetOfUserOptionalParams,
  TestUpdateDeviceSetOfUserResponse,
  TestDeleteDeviceSetOfUserOptionalParams,
  TestListDeviceSetsOfUserOptionalParams,
  TestListDeviceSetsOfUserResponse,
  TestCreateDeviceSetOfUserOptionalParams,
  TestCreateDeviceSetOfUserResponse,
  TestGetAllTestRunsForSeriesOptionalParams,
  TestGetAllTestRunsForSeriesResponse,
  TestDeleteTestSeriesOptionalParams,
  TestPatchTestSeriesOptionalParams,
  TestPatchTestSeriesResponse,
  TestGetAllTestSeriesOptionalParams,
  TestGetAllTestSeriesResponse,
  TestCreateTestSeriesOptionalParams,
  TestCreateTestSeriesResponse,
  TestStopTestRunOptionalParams,
  TestStopTestRunResponse,
  TestGetTestRunStateOptionalParams,
  TestGetTestRunStateResponse,
  TestCloudStartTestRunOptions,
  TestStartTestRunOptionalParams,
  TestStartTestRunResponse,
  TestGetTestReportOptionalParams,
  TestGetTestReportResponse,
  PostContentSchemaItem,
  TestUploadHashesBatchOptionalParams,
  TestUploadHashesBatchResponse,
  TestCloudFileHash,
  TestUploadHashOptionalParams,
  TestUploadHashResponse,
  TestStartUploadingFileOptionalParams,
  TestStartUploadingFileResponse,
  TestGetTestRunOptionalParams,
  TestGetTestRunResponse,
  TestArchiveTestRunOptionalParams,
  TestArchiveTestRunResponse,
  TestGetTestRunsOptionalParams,
  TestGetTestRunsResponse,
  TestCreateTestRunOptionalParams,
  TestCreateTestRunResponse,
  TestGdprExportTestRunOptionalParams,
  TestGdprExportTestRunResponse,
  TestGdprExportPipelineTestOptionalParams,
  TestGdprExportPipelineTestResponse,
  TestGdprExportHashFileOptionalParams,
  TestGdprExportHashFileResponse,
  TestGdprExportFileSetFileOptionalParams,
  TestGdprExportFileSetFileResponse,
  TestGdprExportAppOptionalParams,
  TestGdprExportAppResponse,
  TestGdprExportAppsOptionalParams,
  TestGdprExportAppsResponse,
  TestGetSubscriptionsOptionalParams,
  TestGetSubscriptionsResponse,
  TestCreateSubscriptionOptionalParams,
  TestCreateSubscriptionResponse,
  TestGetDeviceSetOfOwnerOptionalParams,
  TestGetDeviceSetOfOwnerResponse,
  TestUpdateDeviceSetOfOwnerOptionalParams,
  TestUpdateDeviceSetOfOwnerResponse,
  TestDeleteDeviceSetOfOwnerOptionalParams,
  TestListDeviceSetsOfOwnerOptionalParams,
  TestListDeviceSetsOfOwnerResponse,
  TestCreateDeviceSetOfOwnerOptionalParams,
  TestCreateDeviceSetOfOwnerResponse,
  TestCreateDeviceSelectionOptionalParams,
  TestCreateDeviceSelectionResponse,
  TestGetDeviceConfigurationsOptionalParams,
  TestGetDeviceConfigurationsResponse,
  TestGdprExportFeatureFlagOptionalParams,
  TestGdprExportFeatureFlagResponse,
  TestGdprExportAccountOptionalParams,
  TestGdprExportAccountResponse,
  TestGdprExportAccountsOptionalParams,
  TestGdprExportAccountsResponse
} from "../models";

/** Class containing Test operations. */
export class TestImpl implements Test {
  private readonly client: AppCenterClient;

  /**
   * Initialize a new instance of the class Test class.
   * @param client Reference to the service client
   */
  constructor(client: AppCenterClient) {
    this.client = client;
  }

  /**
   * Gets a device set belonging to the user
   * @param id The UUID of the device set
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getDeviceSetOfUser(
    id: string,
    ownerName: string,
    appName: string,
    options?: TestGetDeviceSetOfUserOptionalParams
  ): Promise<TestGetDeviceSetOfUserResponse> {
    return this.client.sendOperationRequest(
      { id, ownerName, appName, options },
      getDeviceSetOfUserOperationSpec
    );
  }

  /**
   * Updates a device set belonging to the user
   * @param id The UUID of the device set
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param devices List of device IDs
   * @param name The name of the device set
   * @param options The options parameters.
   */
  updateDeviceSetOfUser(
    id: string,
    ownerName: string,
    appName: string,
    devices: string[],
    name: string,
    options?: TestUpdateDeviceSetOfUserOptionalParams
  ): Promise<TestUpdateDeviceSetOfUserResponse> {
    return this.client.sendOperationRequest(
      { id, ownerName, appName, devices, name, options },
      updateDeviceSetOfUserOperationSpec
    );
  }

  /**
   * Deletes a device set belonging to the user
   * @param id The UUID of the device set
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  deleteDeviceSetOfUser(
    id: string,
    ownerName: string,
    appName: string,
    options?: TestDeleteDeviceSetOfUserOptionalParams
  ): Promise<void> {
    return this.client.sendOperationRequest(
      { id, ownerName, appName, options },
      deleteDeviceSetOfUserOperationSpec
    );
  }

  /**
   * Lists device sets belonging to the user
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  listDeviceSetsOfUser(
    ownerName: string,
    appName: string,
    options?: TestListDeviceSetsOfUserOptionalParams
  ): Promise<TestListDeviceSetsOfUserResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      listDeviceSetsOfUserOperationSpec
    );
  }

  /**
   * Creates a device set belonging to the user
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param devices List of device IDs
   * @param name The name of the device set
   * @param options The options parameters.
   */
  createDeviceSetOfUser(
    ownerName: string,
    appName: string,
    devices: string[],
    name: string,
    options?: TestCreateDeviceSetOfUserOptionalParams
  ): Promise<TestCreateDeviceSetOfUserResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, devices, name, options },
      createDeviceSetOfUserOperationSpec
    );
  }

  /**
   * Returns list of all test runs for a given test series
   * @param testSeriesSlug The slug of the test series
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getAllTestRunsForSeries(
    testSeriesSlug: string,
    ownerName: string,
    appName: string,
    options?: TestGetAllTestRunsForSeriesOptionalParams
  ): Promise<TestGetAllTestRunsForSeriesResponse> {
    return this.client.sendOperationRequest(
      { testSeriesSlug, ownerName, appName, options },
      getAllTestRunsForSeriesOperationSpec
    );
  }

  /**
   * Deletes a single test series
   * @param testSeriesSlug The slug of the test series
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  deleteTestSeries(
    testSeriesSlug: string,
    ownerName: string,
    appName: string,
    options?: TestDeleteTestSeriesOptionalParams
  ): Promise<void> {
    return this.client.sendOperationRequest(
      { testSeriesSlug, ownerName, appName, options },
      deleteTestSeriesOperationSpec
    );
  }

  /**
   * Updates name and slug of a test series
   * @param testSeriesSlug The slug of the test series
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param name Name of the new test series
   * @param options The options parameters.
   */
  patchTestSeries(
    testSeriesSlug: string,
    ownerName: string,
    appName: string,
    name: string,
    options?: TestPatchTestSeriesOptionalParams
  ): Promise<TestPatchTestSeriesResponse> {
    return this.client.sendOperationRequest(
      { testSeriesSlug, ownerName, appName, name, options },
      patchTestSeriesOperationSpec
    );
  }

  /**
   * Returns list of all test series for an application
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getAllTestSeries(
    ownerName: string,
    appName: string,
    options?: TestGetAllTestSeriesOptionalParams
  ): Promise<TestGetAllTestSeriesResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      getAllTestSeriesOperationSpec
    );
  }

  /**
   * Creates new test series for an application
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param name Name of the new test series
   * @param options The options parameters.
   */
  createTestSeries(
    ownerName: string,
    appName: string,
    name: string,
    options?: TestCreateTestSeriesOptionalParams
  ): Promise<TestCreateTestSeriesResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, name, options },
      createTestSeriesOperationSpec
    );
  }

  /**
   * Stop a test run execution
   * @param testRunId The ID of the test run to be stopped
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  stopTestRun(
    testRunId: string,
    ownerName: string,
    appName: string,
    options?: TestStopTestRunOptionalParams
  ): Promise<TestStopTestRunResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, options },
      stopTestRunOperationSpec
    );
  }

  /**
   * Gets state of the test run
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getTestRunState(
    testRunId: string,
    ownerName: string,
    appName: string,
    options?: TestGetTestRunStateOptionalParams
  ): Promise<TestGetTestRunStateResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, options },
      getTestRunStateOperationSpec
    );
  }

  /**
   * Starts test run
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param startOptions Option required to start the test run
   * @param options The options parameters.
   */
  startTestRun(
    testRunId: string,
    ownerName: string,
    appName: string,
    startOptions: TestCloudStartTestRunOptions,
    options?: TestStartTestRunOptionalParams
  ): Promise<TestStartTestRunResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, startOptions, options },
      startTestRunOperationSpec
    );
  }

  /**
   * Returns a single test report
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getTestReport(
    testRunId: string,
    ownerName: string,
    appName: string,
    options?: TestGetTestReportOptionalParams
  ): Promise<TestGetTestReportResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, options },
      getTestReportOperationSpec
    );
  }

  /**
   * Adds file with the given hash to a test run
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param fileInfo File hash information
   * @param options The options parameters.
   */
  uploadHashesBatch(
    testRunId: string,
    ownerName: string,
    appName: string,
    fileInfo: PostContentSchemaItem[],
    options?: TestUploadHashesBatchOptionalParams
  ): Promise<TestUploadHashesBatchResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, fileInfo, options },
      uploadHashesBatchOperationSpec
    );
  }

  /**
   * Adds file with the given hash to a test run
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param fileInfo File hash information
   * @param options The options parameters.
   */
  uploadHash(
    testRunId: string,
    ownerName: string,
    appName: string,
    fileInfo: TestCloudFileHash,
    options?: TestUploadHashOptionalParams
  ): Promise<TestUploadHashResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, fileInfo, options },
      uploadHashOperationSpec
    );
  }

  /**
   * Uploads file for a test run
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  startUploadingFile(
    testRunId: string,
    ownerName: string,
    appName: string,
    options?: TestStartUploadingFileOptionalParams
  ): Promise<TestStartUploadingFileResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, options },
      startUploadingFileOperationSpec
    );
  }

  /**
   * Returns a single test runs
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getTestRun(
    testRunId: string,
    ownerName: string,
    appName: string,
    options?: TestGetTestRunOptionalParams
  ): Promise<TestGetTestRunResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, options },
      getTestRunOperationSpec
    );
  }

  /**
   * Logically deletes a test run
   * @param testRunId The ID of the test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  archiveTestRun(
    testRunId: string,
    ownerName: string,
    appName: string,
    options?: TestArchiveTestRunOptionalParams
  ): Promise<TestArchiveTestRunResponse> {
    return this.client.sendOperationRequest(
      { testRunId, ownerName, appName, options },
      archiveTestRunOperationSpec
    );
  }

  /**
   * Returns a list of test runs
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getTestRuns(
    ownerName: string,
    appName: string,
    options?: TestGetTestRunsOptionalParams
  ): Promise<TestGetTestRunsResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      getTestRunsOperationSpec
    );
  }

  /**
   * Creates a new test run
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  createTestRun(
    ownerName: string,
    appName: string,
    options?: TestCreateTestRunOptionalParams
  ): Promise<TestCreateTestRunResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      createTestRunOperationSpec
    );
  }

  /**
   * Lists test run data
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  gdprExportTestRun(
    ownerName: string,
    appName: string,
    options?: TestGdprExportTestRunOptionalParams
  ): Promise<TestGdprExportTestRunResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      gdprExportTestRunOperationSpec
    );
  }

  /**
   * Lists pipeline test data
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  gdprExportPipelineTest(
    ownerName: string,
    appName: string,
    options?: TestGdprExportPipelineTestOptionalParams
  ): Promise<TestGdprExportPipelineTestResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      gdprExportPipelineTestOperationSpec
    );
  }

  /**
   * Lists hash file data
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  gdprExportHashFile(
    ownerName: string,
    appName: string,
    options?: TestGdprExportHashFileOptionalParams
  ): Promise<TestGdprExportHashFileResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      gdprExportHashFileOperationSpec
    );
  }

  /**
   * Lists file set file data
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  gdprExportFileSetFile(
    ownerName: string,
    appName: string,
    options?: TestGdprExportFileSetFileOptionalParams
  ): Promise<TestGdprExportFileSetFileResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      gdprExportFileSetFileOperationSpec
    );
  }

  /**
   * Lists app data
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  gdprExportApp(
    ownerName: string,
    appName: string,
    options?: TestGdprExportAppOptionalParams
  ): Promise<TestGdprExportAppResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      gdprExportAppOperationSpec
    );
  }

  /**
   * Lists all the endpoints available for Test apps data
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  gdprExportApps(
    ownerName: string,
    appName: string,
    options?: TestGdprExportAppsOptionalParams
  ): Promise<TestGdprExportAppsResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      gdprExportAppsOperationSpec
    );
  }

  /**
   * Get information about the currently active subscriptions, if any
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getSubscriptions(
    ownerName: string,
    appName: string,
    options?: TestGetSubscriptionsOptionalParams
  ): Promise<TestGetSubscriptionsResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      getSubscriptionsOperationSpec
    );
  }

  /**
   * Accept a free trial subscription
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  createSubscription(
    ownerName: string,
    appName: string,
    options?: TestCreateSubscriptionOptionalParams
  ): Promise<TestCreateSubscriptionResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      createSubscriptionOperationSpec
    );
  }

  /**
   * Gets a device set belonging to the owner
   * @param id The UUID of the device set
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getDeviceSetOfOwner(
    id: string,
    ownerName: string,
    appName: string,
    options?: TestGetDeviceSetOfOwnerOptionalParams
  ): Promise<TestGetDeviceSetOfOwnerResponse> {
    return this.client.sendOperationRequest(
      { id, ownerName, appName, options },
      getDeviceSetOfOwnerOperationSpec
    );
  }

  /**
   * Updates a device set belonging to the owner
   * @param id The UUID of the device set
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param devices List of device IDs
   * @param name The name of the device set
   * @param options The options parameters.
   */
  updateDeviceSetOfOwner(
    id: string,
    ownerName: string,
    appName: string,
    devices: string[],
    name: string,
    options?: TestUpdateDeviceSetOfOwnerOptionalParams
  ): Promise<TestUpdateDeviceSetOfOwnerResponse> {
    return this.client.sendOperationRequest(
      { id, ownerName, appName, devices, name, options },
      updateDeviceSetOfOwnerOperationSpec
    );
  }

  /**
   * Deletes a device set belonging to the owner
   * @param id The UUID of the device set
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  deleteDeviceSetOfOwner(
    id: string,
    ownerName: string,
    appName: string,
    options?: TestDeleteDeviceSetOfOwnerOptionalParams
  ): Promise<void> {
    return this.client.sendOperationRequest(
      { id, ownerName, appName, options },
      deleteDeviceSetOfOwnerOperationSpec
    );
  }

  /**
   * Lists device sets belonging to the owner
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  listDeviceSetsOfOwner(
    ownerName: string,
    appName: string,
    options?: TestListDeviceSetsOfOwnerOptionalParams
  ): Promise<TestListDeviceSetsOfOwnerResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      listDeviceSetsOfOwnerOperationSpec
    );
  }

  /**
   * Creates a device set belonging to the owner
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param devices List of device IDs
   * @param name The name of the device set
   * @param options The options parameters.
   */
  createDeviceSetOfOwner(
    ownerName: string,
    appName: string,
    devices: string[],
    name: string,
    options?: TestCreateDeviceSetOfOwnerOptionalParams
  ): Promise<TestCreateDeviceSetOfOwnerResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, devices, name, options },
      createDeviceSetOfOwnerOperationSpec
    );
  }

  /**
   * Creates a short ID for a list of devices
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param devices Array of String
   * @param options The options parameters.
   */
  createDeviceSelection(
    ownerName: string,
    appName: string,
    devices: string[],
    options?: TestCreateDeviceSelectionOptionalParams
  ): Promise<TestCreateDeviceSelectionResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, devices, options },
      createDeviceSelectionOperationSpec
    );
  }

  /**
   * Returns a list of available devices
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getDeviceConfigurations(
    ownerName: string,
    appName: string,
    options?: TestGetDeviceConfigurationsOptionalParams
  ): Promise<TestGetDeviceConfigurationsResponse> {
    return this.client.sendOperationRequest(
      { ownerName, appName, options },
      getDeviceConfigurationsOperationSpec
    );
  }

  /**
   * Lists feature flag data
   * @param options The options parameters.
   */
  gdprExportFeatureFlag(
    options?: TestGdprExportFeatureFlagOptionalParams
  ): Promise<TestGdprExportFeatureFlagResponse> {
    return this.client.sendOperationRequest(
      { options },
      gdprExportFeatureFlagOperationSpec
    );
  }

  /**
   * Lists account data
   * @param options The options parameters.
   */
  gdprExportAccount(
    options?: TestGdprExportAccountOptionalParams
  ): Promise<TestGdprExportAccountResponse> {
    return this.client.sendOperationRequest(
      { options },
      gdprExportAccountOperationSpec
    );
  }

  /**
   * Lists all the endpoints available for Test accounts data
   * @param options The options parameters.
   */
  gdprExportAccounts(
    options?: TestGdprExportAccountsOptionalParams
  ): Promise<TestGdprExportAccountsResponse> {
    return this.client.sendOperationRequest(
      { options },
      gdprExportAccountsOperationSpec
    );
  }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);

const getDeviceSetOfUserOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/user/device_sets/{id}",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: Mappers.DeviceSet
    },
    404: {}
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.id2
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const updateDeviceSetOfUserOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/user/device_sets/{id}",
  httpMethod: "PUT",
  responses: {
    200: {
      bodyMapper: Mappers.DeviceSet0
    },
    400: {
      bodyMapper: Mappers.TestCloudErrorDetails
    },
    404: {}
  },
  requestBody: {
    parameterPath: { devices: ["devices"], name: ["name"] },
    mapper: { ...Mappers.DeviceSetUpdateInformation, required: true }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.id2
  ],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const deleteDeviceSetOfUserOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/user/device_sets/{id}",
  httpMethod: "DELETE",
  responses: { 200: {}, 404: {} },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.id2
  ],
  serializer
};
const listDeviceSetsOfUserOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/user/device_sets",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "Paths17Qazt1V01AppsOwnerNameAppNameUserDeviceSetsGetResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const createDeviceSetOfUserOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/user/device_sets",
  httpMethod: "POST",
  responses: {
    201: {
      bodyMapper: Mappers.DeviceSet1
    },
    400: {
      bodyMapper: Mappers.TestCloudErrorDetails0
    }
  },
  requestBody: {
    parameterPath: { devices: ["devices"], name: ["name"] },
    mapper: { ...Mappers.DeviceSetUpdateInformation0, required: true }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const getAllTestRunsForSeriesOperationSpec: coreClient.OperationSpec = {
  path:
    "/v0.1/apps/{owner_name}/{app_name}/test_series/{test_series_slug}/test_runs",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "PathsShbmt3V01AppsOwnerNameAppNameTestSeriesSlugTestRunsGetResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testSeriesSlug
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const deleteTestSeriesOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_series/{test_series_slug}",
  httpMethod: "DELETE",
  responses: { 200: {}, 404: {} },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testSeriesSlug
  ],
  serializer
};
const patchTestSeriesOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_series/{test_series_slug}",
  httpMethod: "PATCH",
  responses: {
    200: {
      bodyMapper: Mappers.TestSeries
    },
    400: {},
    404: {}
  },
  requestBody: {
    parameterPath: { name: ["name"] },
    mapper: { ...Mappers.NameOfTheTestSeries, required: true }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testSeriesSlug
  ],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const getAllTestSeriesOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_series",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "PathsAd8C7FV01AppsOwnerNameAppNameTestSeriesGetResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  queryParameters: [Parameters.query],
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const createTestSeriesOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_series",
  httpMethod: "POST",
  responses: {
    200: {
      bodyMapper: Mappers.TestSeries0
    },
    400: {
      bodyMapper: Mappers.TestCloudErrorDetails1
    }
  },
  requestBody: {
    parameterPath: { name: ["name"] },
    mapper: { ...Mappers.NameOfTheTestSeries0, required: true }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const stopTestRunOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/stop",
  httpMethod: "PUT",
  responses: {
    200: {
      bodyMapper: Mappers.TestRun
    },
    404: {}
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const getTestRunStateOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/state",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: Mappers.TestRunState
    }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const startTestRunOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/start",
  httpMethod: "POST",
  responses: {
    200: {
      bodyMapper: Mappers.TestCloudTestRunStartResult
    }
  },
  requestBody: Parameters.startOptions,
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId
  ],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const getTestReportOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/report",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.PathsRj1AeoV01AppsOwnerNameAppNameTestRunsTestRunIdReportGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId1
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const uploadHashesBatchOperationSpec: coreClient.OperationSpec = {
  path:
    "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/hashes/batch",
  httpMethod: "POST",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "PathsH1EvszV01AppsOwnerNameAppNameTestRunsTestRunIdHashesBatchPostResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  requestBody: Parameters.fileInfo,
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId
  ],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const uploadHashOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/hashes",
  httpMethod: "POST",
  responses: {
    201: {},
    401: {
      headersMapper: Mappers.TestUploadHashHeaders
    },
    412: {}
  },
  requestBody: Parameters.fileInfo1,
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId
  ],
  headerParameters: [Parameters.contentType],
  mediaType: "json",
  serializer
};
const startUploadingFileOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}/files",
  httpMethod: "POST",
  responses: {
    200: {
      headersMapper: Mappers.TestStartUploadingFileHeaders
    },
    400: {}
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId
  ],
  serializer
};
const getTestRunOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: Mappers.TestRun0
    }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId1
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const archiveTestRunOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs/{test_run_id}",
  httpMethod: "DELETE",
  responses: {
    200: {
      bodyMapper: Mappers.TestRun1
    },
    404: {}
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.testRunId1
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const getTestRunsOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "Paths1CxzjsgV01AppsOwnerNameAppNameTestRunsGetResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const createTestRunOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test_runs",
  httpMethod: "POST",
  responses: {
    201: {
      headersMapper: Mappers.TestCreateTestRunHeaders
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  serializer
};
const gdprExportTestRunOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test/export/testRuns",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.Paths1UxedxfV01AppsOwnerNameAppNameTestExportTestrunsGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportPipelineTestOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test/export/pipelineTests",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.Paths17A5P9IV01AppsOwnerNameAppNameTestExportPipelinetestsGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportHashFileOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test/export/hashFiles",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.PathsQpbfbqV01AppsOwnerNameAppNameTestExportHashfilesGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportFileSetFileOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test/export/fileSetFiles",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.Paths18Bwc0DV01AppsOwnerNameAppNameTestExportFilesetfilesGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportAppOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test/export/apps",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.Paths1D5PwtqV01AppsOwnerNameAppNameTestExportAppsGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportAppsOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/test/export",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.PathsTbqb7JV01AppsOwnerNameAppNameTestExportGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const getSubscriptionsOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/subscriptions",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: Mappers.Subscription0
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const createSubscriptionOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/subscriptions",
  httpMethod: "POST",
  responses: {
    201: {
      bodyMapper: Mappers.Subscription1
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const getDeviceSetOfOwnerOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/owner/device_sets/{id}",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: Mappers.DeviceSet2
    },
    404: {}
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.id2
  ],
  headerParameters: [Parameters.accept],
  serializer
};
const updateDeviceSetOfOwnerOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/owner/device_sets/{id}",
  httpMethod: "PUT",
  responses: {
    200: {
      bodyMapper: Mappers.DeviceSet3
    },
    400: {
      bodyMapper: Mappers.TestCloudErrorDetails2
    },
    404: {}
  },
  requestBody: {
    parameterPath: { devices: ["devices"], name: ["name"] },
    mapper: { ...Mappers.DeviceSetUpdateInformation1, required: true }
  },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.id2
  ],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const deleteDeviceSetOfOwnerOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/owner/device_sets/{id}",
  httpMethod: "DELETE",
  responses: { 200: {}, 404: {} },
  urlParameters: [
    Parameters.$host,
    Parameters.ownerName,
    Parameters.appName,
    Parameters.id2
  ],
  serializer
};
const listDeviceSetsOfOwnerOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/owner/device_sets",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "Paths1Qu9NsjV01AppsOwnerNameAppNameOwnerDeviceSetsGetResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const createDeviceSetOfOwnerOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/owner/device_sets",
  httpMethod: "POST",
  responses: {
    201: {
      bodyMapper: Mappers.DeviceSet4
    },
    400: {
      bodyMapper: Mappers.TestCloudErrorDetails3
    }
  },
  requestBody: {
    parameterPath: { devices: ["devices"], name: ["name"] },
    mapper: { ...Mappers.DeviceSetUpdateInformation2, required: true }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const createDeviceSelectionOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/device_selection",
  httpMethod: "POST",
  responses: {
    201: {
      bodyMapper: Mappers.DeviceSelection
    },
    400: {
      bodyMapper: Mappers.TestCloudErrorDetails4
    }
  },
  requestBody: {
    parameterPath: { devices: ["devices"] },
    mapper: { ...Mappers.DeviceList, required: true }
  },
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.contentType, Parameters.accept],
  mediaType: "json",
  serializer
};
const getDeviceConfigurationsOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/apps/{owner_name}/{app_name}/device_configurations",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper: {
        type: {
          name: "Sequence",
          element: {
            type: {
              name: "Composite",
              className:
                "Paths1Wime0YV01AppsOwnerNameAppNameDeviceConfigurationsGetResponses200ContentApplicationJsonSchemaItems"
            }
          }
        }
      }
    }
  },
  queryParameters: [Parameters.appUploadId],
  urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportFeatureFlagOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/account/test/export/featureFlags",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.Paths120IxifV01AccountTestExportFeatureflagsGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportAccountOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/account/test/export/accounts",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.PathsK7Amr2V01AccountTestExportAccountsGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host],
  headerParameters: [Parameters.accept],
  serializer
};
const gdprExportAccountsOperationSpec: coreClient.OperationSpec = {
  path: "/v0.1/account/test/export",
  httpMethod: "GET",
  responses: {
    200: {
      bodyMapper:
        Mappers.PathsIp035RV01AccountTestExportGetResponses200ContentApplicationJsonSchema
    }
  },
  urlParameters: [Parameters.$host],
  headerParameters: [Parameters.accept],
  serializer
};
