/*
 * 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 * as coreClient from "@azure/core-client";
import {
  DevicesImpl,
  NotificationsImpl,
  UsersImpl,
  OrgInvitationsImpl,
  DistributionGroupInvitationsImpl,
  AppInvitationsImpl,
  SharedconnectionImpl,
  DataSubjectRightImpl,
  ReleasesImpl,
  AppsImpl,
  DistributionGroupsImpl,
  TeamsImpl,
  AzureSubscriptionImpl,
  OrganizationImpl,
  OrganizationsImpl,
  BillingAggregatedInformationImpl,
  LegacyCodePushAcquisitionImpl,
  InvitationsImpl,
  BuildsImpl,
  WebhooksImpl,
  CrashesImpl,
  TestImpl,
  SymbolsImpl,
  SymbolUploadsImpl,
  StoreNotificationsImpl,
  RepositoriesImpl,
  RepositoryConfigurationsImpl,
  ProvisioningImpl,
  PushImpl,
  FileAssetsImpl,
  ExportConfigurationsImpl,
  ErrorsImpl,
  StoreReleasesImpl,
  StoreReleasePublishLogsImpl,
  StoresImpl,
  MissingSymbolGroupsImpl,
  AppImpl,
  CodePushDeploymentUploadImpl,
  CodePushDeploymentReleaseImpl,
  DeploymentReleasesImpl,
  CodePushDeploymentReleasesImpl,
  CodePushDeploymentsImpl,
  CodePushDeploymentMetricsImpl,
  DataImpl,
  CrashGroupsImpl,
  CommitsImpl,
  BugTrackerImpl,
  BranchConfigurationsImpl,
  IdentityImpl,
  AppleMappingImpl,
  AppApiTokensImpl,
  AnalyticsImpl,
  UserApiTokensImpl
} from "./operations";
import {
  Devices,
  Notifications,
  Users,
  OrgInvitations,
  DistributionGroupInvitations,
  AppInvitations,
  Sharedconnection,
  DataSubjectRight,
  Releases,
  Apps,
  DistributionGroups,
  Teams,
  AzureSubscription,
  Organization,
  Organizations,
  BillingAggregatedInformation,
  LegacyCodePushAcquisition,
  Invitations,
  Builds,
  Webhooks,
  Crashes,
  Test,
  Symbols,
  SymbolUploads,
  StoreNotifications,
  Repositories,
  RepositoryConfigurations,
  Provisioning,
  Push,
  FileAssets,
  ExportConfigurations,
  Errors,
  StoreReleases,
  StoreReleasePublishLogs,
  Stores,
  MissingSymbolGroups,
  App,
  CodePushDeploymentUpload,
  CodePushDeploymentRelease,
  DeploymentReleases,
  CodePushDeploymentReleases,
  CodePushDeployments,
  CodePushDeploymentMetrics,
  Data,
  CrashGroups,
  Commits,
  BugTracker,
  BranchConfigurations,
  Identity,
  AppleMapping,
  AppApiTokens,
  Analytics,
  UserApiTokens
} from "./operationsInterfaces";
import { AppCenterClientOptionalParams } from "./models";

export class AppCenterClient extends coreClient.ServiceClient {
  $host: string;

  /**
   * Initializes a new instance of the AppCenterClient class.
   * @param options The parameter options
   */
  constructor(options?: AppCenterClientOptionalParams) {
    // Initializing default values for options
    if (!options) {
      options = {};
    }
    const defaults: AppCenterClientOptionalParams = {
      requestContentType: "application/json; charset=utf-8"
    };

    const packageDetails = `azsdk-js-appCenterClient/1.0.0-beta.1`;
    const userAgentPrefix =
      options.userAgentOptions && options.userAgentOptions.userAgentPrefix
        ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
        : `${packageDetails}`;

    const optionsWithDefaults = {
      ...defaults,
      ...options,
      userAgentOptions: {
        userAgentPrefix
      },
      endpoint:
        options.endpoint ?? options.baseUri ?? "https://api.appcenter.ms"
    };
    super(optionsWithDefaults);

    // Assigning values to Constant parameters
    this.$host = options.$host || "https://api.appcenter.ms";
    this.devices = new DevicesImpl(this);
    this.notifications = new NotificationsImpl(this);
    this.users = new UsersImpl(this);
    this.orgInvitations = new OrgInvitationsImpl(this);
    this.distributionGroupInvitations = new DistributionGroupInvitationsImpl(
      this
    );
    this.appInvitations = new AppInvitationsImpl(this);
    this.sharedconnection = new SharedconnectionImpl(this);
    this.dataSubjectRight = new DataSubjectRightImpl(this);
    this.releases = new ReleasesImpl(this);
    this.apps = new AppsImpl(this);
    this.distributionGroups = new DistributionGroupsImpl(this);
    this.teams = new TeamsImpl(this);
    this.azureSubscription = new AzureSubscriptionImpl(this);
    this.organization = new OrganizationImpl(this);
    this.organizations = new OrganizationsImpl(this);
    this.billingAggregatedInformation = new BillingAggregatedInformationImpl(
      this
    );
    this.legacyCodePushAcquisition = new LegacyCodePushAcquisitionImpl(this);
    this.invitations = new InvitationsImpl(this);
    this.builds = new BuildsImpl(this);
    this.webhooks = new WebhooksImpl(this);
    this.crashes = new CrashesImpl(this);
    this.test = new TestImpl(this);
    this.symbols = new SymbolsImpl(this);
    this.symbolUploads = new SymbolUploadsImpl(this);
    this.storeNotifications = new StoreNotificationsImpl(this);
    this.repositories = new RepositoriesImpl(this);
    this.repositoryConfigurations = new RepositoryConfigurationsImpl(this);
    this.provisioning = new ProvisioningImpl(this);
    this.push = new PushImpl(this);
    this.fileAssets = new FileAssetsImpl(this);
    this.exportConfigurations = new ExportConfigurationsImpl(this);
    this.errors = new ErrorsImpl(this);
    this.storeReleases = new StoreReleasesImpl(this);
    this.storeReleasePublishLogs = new StoreReleasePublishLogsImpl(this);
    this.stores = new StoresImpl(this);
    this.missingSymbolGroups = new MissingSymbolGroupsImpl(this);
    this.app = new AppImpl(this);
    this.codePushDeploymentUpload = new CodePushDeploymentUploadImpl(this);
    this.codePushDeploymentRelease = new CodePushDeploymentReleaseImpl(this);
    this.deploymentReleases = new DeploymentReleasesImpl(this);
    this.codePushDeploymentReleases = new CodePushDeploymentReleasesImpl(this);
    this.codePushDeployments = new CodePushDeploymentsImpl(this);
    this.codePushDeploymentMetrics = new CodePushDeploymentMetricsImpl(this);
    this.data = new DataImpl(this);
    this.crashGroups = new CrashGroupsImpl(this);
    this.commits = new CommitsImpl(this);
    this.bugTracker = new BugTrackerImpl(this);
    this.branchConfigurations = new BranchConfigurationsImpl(this);
    this.identity = new IdentityImpl(this);
    this.appleMapping = new AppleMappingImpl(this);
    this.appApiTokens = new AppApiTokensImpl(this);
    this.analytics = new AnalyticsImpl(this);
    this.userApiTokens = new UserApiTokensImpl(this);
  }

  devices: Devices;
  notifications: Notifications;
  users: Users;
  orgInvitations: OrgInvitations;
  distributionGroupInvitations: DistributionGroupInvitations;
  appInvitations: AppInvitations;
  sharedconnection: Sharedconnection;
  dataSubjectRight: DataSubjectRight;
  releases: Releases;
  apps: Apps;
  distributionGroups: DistributionGroups;
  teams: Teams;
  azureSubscription: AzureSubscription;
  organization: Organization;
  organizations: Organizations;
  billingAggregatedInformation: BillingAggregatedInformation;
  legacyCodePushAcquisition: LegacyCodePushAcquisition;
  invitations: Invitations;
  builds: Builds;
  webhooks: Webhooks;
  crashes: Crashes;
  test: Test;
  symbols: Symbols;
  symbolUploads: SymbolUploads;
  storeNotifications: StoreNotifications;
  repositories: Repositories;
  repositoryConfigurations: RepositoryConfigurations;
  provisioning: Provisioning;
  push: Push;
  fileAssets: FileAssets;
  exportConfigurations: ExportConfigurations;
  errors: Errors;
  storeReleases: StoreReleases;
  storeReleasePublishLogs: StoreReleasePublishLogs;
  stores: Stores;
  missingSymbolGroups: MissingSymbolGroups;
  app: App;
  codePushDeploymentUpload: CodePushDeploymentUpload;
  codePushDeploymentRelease: CodePushDeploymentRelease;
  deploymentReleases: DeploymentReleases;
  codePushDeploymentReleases: CodePushDeploymentReleases;
  codePushDeployments: CodePushDeployments;
  codePushDeploymentMetrics: CodePushDeploymentMetrics;
  data: Data;
  crashGroups: CrashGroups;
  commits: Commits;
  bugTracker: BugTracker;
  branchConfigurations: BranchConfigurations;
  identity: Identity;
  appleMapping: AppleMapping;
  appApiTokens: AppApiTokens;
  analytics: Analytics;
  userApiTokens: UserApiTokens;
}
