/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import { createApiKeys } from "../funcs/createApiKeys.js";
import { createObservabilityQuery } from "../funcs/createObservabilityQuery.js";
import { createSpeedInsightsToggle } from "../funcs/createSpeedInsightsToggle.js";
import { createWebInsightsToggle } from "../funcs/createWebInsightsToggle.js";
import { getDomainsRecordsByRecordId } from "../funcs/getDomainsRecordsByRecordId.js";
import { getObservabilitySchema } from "../funcs/getObservabilitySchema.js";
import { getObservabilitySchemaByMetricId } from "../funcs/getObservabilitySchemaByMetricId.js";
import { replaceDomainsByDomainRecords } from "../funcs/replaceDomainsByDomainRecords.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import {
  CreateApiKeysRequestBody,
  CreateApiKeysResponseBody,
} from "../models/createapikeysop.js";
import {
  CreateObservabilityQueryRequestBody,
  CreateObservabilityQueryResponseBody,
} from "../models/createobservabilityqueryop.js";
import {
  CreateSpeedInsightsToggleRequest,
  CreateSpeedInsightsToggleResponseBody,
} from "../models/createspeedinsightstoggleop.js";
import {
  CreateWebInsightsToggleRequest,
  CreateWebInsightsToggleResponseBody,
} from "../models/createwebinsightstoggleop.js";
import {
  GetDomainsRecordsByRecordIdRequest,
  GetDomainsRecordsByRecordIdResponseBody,
} from "../models/getdomainsrecordsbyrecordidop.js";
import {
  GetObservabilitySchemaByMetricIdRequest,
  ResponseBody,
} from "../models/getobservabilityschemabymetricidop.js";
import { GetObservabilitySchemaResponseBody } from "../models/getobservabilityschemaop.js";
import {
  ReplaceDomainsByDomainRecordsRequest,
  ReplaceDomainsByDomainRecordsResponseBody,
} from "../models/replacedomainsbydomainrecordsop.js";
import { unwrapAsync } from "../types/fp.js";
import { AccessGroups } from "./accessgroups.js";
import { AiGateway } from "./aigateway.js";
import { Aliases } from "./aliases.js";
import { ApiAiGateway } from "./apiaigateway.js";
import { Artifacts } from "./artifacts.js";
import { Authentication } from "./authentication.js";
import { Billing } from "./billing.js";
import { BulkRedirects } from "./bulkredirects.js";
import { Certs } from "./certs.js";
import { Checks } from "./checks.js";
import { ChecksV2 } from "./checksv2.js";
import { Connect } from "./connect.js";
import { Deployments } from "./deployments.js";
import { Dns } from "./dns.js";
import { Domains } from "./domains.js";
import { DomainsRegistrar } from "./domainsregistrar.js";
import { Drains } from "./drains.js";
import { EdgeCache } from "./edgecache.js";
import { Environment } from "./environment.js";
import { FeatureFlags } from "./featureflags.js";
import { GlobalConfig } from "./globalconfig.js";
import { Integrations } from "./integrations.js";
import { Kms } from "./kms.js";
import { LogDrains } from "./logdrains.js";
import { Logs } from "./logs.js";
import { Marketplace } from "./marketplace.js";
import { Microfrontends } from "./microfrontends.js";
import { Networking } from "./networking.js";
import { Observability } from "./observability.js";
import { ProjectMembers } from "./projectmembers.js";
import { ProjectRoutes } from "./projectroutes.js";
import { Projects } from "./projects.js";
import { RollingRelease } from "./rollingrelease.js";
import { Sandboxes } from "./sandboxes.js";
import { Security } from "./security.js";
import { StaticIps } from "./staticips.js";
import { Storage } from "./storage.js";
import { Teams } from "./teams.js";
import { User } from "./user.js";
import { Vcr } from "./vcr.js";
import { WebAnalytics } from "./webanalytics.js";
import { Webhooks } from "./webhooks.js";

export class Vercel extends ClientSDK {
  private _accessGroups?: AccessGroups;
  get accessGroups(): AccessGroups {
    return (this._accessGroups ??= new AccessGroups(this._options));
  }

  private _apiAiGateway?: ApiAiGateway;
  get apiAiGateway(): ApiAiGateway {
    return (this._apiAiGateway ??= new ApiAiGateway(this._options));
  }

  private _aiGateway?: AiGateway;
  get aiGateway(): AiGateway {
    return (this._aiGateway ??= new AiGateway(this._options));
  }

  private _artifacts?: Artifacts;
  get artifacts(): Artifacts {
    return (this._artifacts ??= new Artifacts(this._options));
  }

  private _billing?: Billing;
  get billing(): Billing {
    return (this._billing ??= new Billing(this._options));
  }

  private _bulkRedirects?: BulkRedirects;
  get bulkRedirects(): BulkRedirects {
    return (this._bulkRedirects ??= new BulkRedirects(this._options));
  }

  private _checksV2?: ChecksV2;
  get checksV2(): ChecksV2 {
    return (this._checksV2 ??= new ChecksV2(this._options));
  }

  private _checks?: Checks;
  get checks(): Checks {
    return (this._checks ??= new Checks(this._options));
  }

  private _networking?: Networking;
  get networking(): Networking {
    return (this._networking ??= new Networking(this._options));
  }

  private _connect?: Connect;
  get connect(): Connect {
    return (this._connect ??= new Connect(this._options));
  }

  private _deployments?: Deployments;
  get deployments(): Deployments {
    return (this._deployments ??= new Deployments(this._options));
  }

  private _integrations?: Integrations;
  get integrations(): Integrations {
    return (this._integrations ??= new Integrations(this._options));
  }

  private _dns?: Dns;
  get dns(): Dns {
    return (this._dns ??= new Dns(this._options));
  }

  private _domainsRegistrar?: DomainsRegistrar;
  get domainsRegistrar(): DomainsRegistrar {
    return (this._domainsRegistrar ??= new DomainsRegistrar(this._options));
  }

  private _domains?: Domains;
  get domains(): Domains {
    return (this._domains ??= new Domains(this._options));
  }

  private _logDrains?: LogDrains;
  get logDrains(): LogDrains {
    return (this._logDrains ??= new LogDrains(this._options));
  }

  private _drains?: Drains;
  get drains(): Drains {
    return (this._drains ??= new Drains(this._options));
  }

  private _edgeCache?: EdgeCache;
  get edgeCache(): EdgeCache {
    return (this._edgeCache ??= new EdgeCache(this._options));
  }

  private _globalConfig?: GlobalConfig;
  get globalConfig(): GlobalConfig {
    return (this._globalConfig ??= new GlobalConfig(this._options));
  }

  private _environment?: Environment;
  get environment(): Environment {
    return (this._environment ??= new Environment(this._options));
  }

  private _user?: User;
  get user(): User {
    return (this._user ??= new User(this._options));
  }

  private _featureFlags?: FeatureFlags;
  get featureFlags(): FeatureFlags {
    return (this._featureFlags ??= new FeatureFlags(this._options));
  }

  private _marketplace?: Marketplace;
  get marketplace(): Marketplace {
    return (this._marketplace ??= new Marketplace(this._options));
  }

  private _authentication?: Authentication;
  get authentication(): Authentication {
    return (this._authentication ??= new Authentication(this._options));
  }

  private _kms?: Kms;
  get kms(): Kms {
    return (this._kms ??= new Kms(this._options));
  }

  private _logs?: Logs;
  get logs(): Logs {
    return (this._logs ??= new Logs(this._options));
  }

  private _microfrontends?: Microfrontends;
  get microfrontends(): Microfrontends {
    return (this._microfrontends ??= new Microfrontends(this._options));
  }

  private _observability?: Observability;
  get observability(): Observability {
    return (this._observability ??= new Observability(this._options));
  }

  private _projectMembers?: ProjectMembers;
  get projectMembers(): ProjectMembers {
    return (this._projectMembers ??= new ProjectMembers(this._options));
  }

  private _projectRoutes?: ProjectRoutes;
  get projectRoutes(): ProjectRoutes {
    return (this._projectRoutes ??= new ProjectRoutes(this._options));
  }

  private _projects?: Projects;
  get projects(): Projects {
    return (this._projects ??= new Projects(this._options));
  }

  private _staticIps?: StaticIps;
  get staticIps(): StaticIps {
    return (this._staticIps ??= new StaticIps(this._options));
  }

  private _rollingRelease?: RollingRelease;
  get rollingRelease(): RollingRelease {
    return (this._rollingRelease ??= new RollingRelease(this._options));
  }

  private _sandboxes?: Sandboxes;
  get sandboxes(): Sandboxes {
    return (this._sandboxes ??= new Sandboxes(this._options));
  }

  private _security?: Security;
  get security(): Security {
    return (this._security ??= new Security(this._options));
  }

  private _storage?: Storage;
  get storage(): Storage {
    return (this._storage ??= new Storage(this._options));
  }

  private _teams?: Teams;
  get teams(): Teams {
    return (this._teams ??= new Teams(this._options));
  }

  private _vcr?: Vcr;
  get vcr(): Vcr {
    return (this._vcr ??= new Vcr(this._options));
  }

  private _webAnalytics?: WebAnalytics;
  get webAnalytics(): WebAnalytics {
    return (this._webAnalytics ??= new WebAnalytics(this._options));
  }

  private _webhooks?: Webhooks;
  get webhooks(): Webhooks {
    return (this._webhooks ??= new Webhooks(this._options));
  }

  private _aliases?: Aliases;
  get aliases(): Aliases {
    return (this._aliases ??= new Aliases(this._options));
  }

  private _certs?: Certs;
  get certs(): Certs {
    return (this._certs ??= new Certs(this._options));
  }

  async replaceDomainsByDomainRecords(
    request: ReplaceDomainsByDomainRecordsRequest,
    options?: RequestOptions,
  ): Promise<ReplaceDomainsByDomainRecordsResponseBody> {
    return unwrapAsync(replaceDomainsByDomainRecords(
      this,
      request,
      options,
    ));
  }

  async getDomainsRecordsByRecordId(
    request: GetDomainsRecordsByRecordIdRequest,
    options?: RequestOptions,
  ): Promise<GetDomainsRecordsByRecordIdResponseBody> {
    return unwrapAsync(getDomainsRecordsByRecordId(
      this,
      request,
      options,
    ));
  }

  async createApiKeys(
    request?: CreateApiKeysRequestBody | undefined,
    options?: RequestOptions,
  ): Promise<CreateApiKeysResponseBody> {
    return unwrapAsync(createApiKeys(
      this,
      request,
      options,
    ));
  }

  async createObservabilityQuery(
    request?: CreateObservabilityQueryRequestBody | undefined,
    options?: RequestOptions,
  ): Promise<CreateObservabilityQueryResponseBody> {
    return unwrapAsync(createObservabilityQuery(
      this,
      request,
      options,
    ));
  }

  async getObservabilitySchema(
    options?: RequestOptions,
  ): Promise<GetObservabilitySchemaResponseBody> {
    return unwrapAsync(getObservabilitySchema(
      this,
      options,
    ));
  }

  async getObservabilitySchemaByMetricId(
    request: GetObservabilitySchemaByMetricIdRequest,
    options?: RequestOptions,
  ): Promise<Array<ResponseBody>> {
    return unwrapAsync(getObservabilitySchemaByMetricId(
      this,
      request,
      options,
    ));
  }

  async createSpeedInsightsToggle(
    request: CreateSpeedInsightsToggleRequest,
    options?: RequestOptions,
  ): Promise<CreateSpeedInsightsToggleResponseBody> {
    return unwrapAsync(createSpeedInsightsToggle(
      this,
      request,
      options,
    ));
  }

  async createWebInsightsToggle(
    request: CreateWebInsightsToggleRequest,
    options?: RequestOptions,
  ): Promise<CreateWebInsightsToggleResponseBody> {
    return unwrapAsync(createWebInsightsToggle(
      this,
      request,
      options,
    ));
  }
}
