// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; import { isRequestOptions } from '../../core'; import * as Core from '../../core'; import * as NamesAPI from './names'; import * as DeploymentsAPI from './deployments'; export class Names extends APIResource { /** * Get a deployment using the name of the flow and the deployment. */ retrieve( flowName: string, deploymentName: string, params?: NameRetrieveParams, options?: Core.RequestOptions, ): Core.APIPromise; retrieve( flowName: string, deploymentName: string, options?: Core.RequestOptions, ): Core.APIPromise; retrieve( flowName: string, deploymentName: string, params: NameRetrieveParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.retrieve(flowName, deploymentName, {}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion } = params; return this._client.get(`/api/deployments/name/${flowName}/${deploymentName}`, { ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } } export interface NameRetrieveParams { 'x-prefect-api-version'?: string; } export namespace Names { export import NameRetrieveParams = NamesAPI.NameRetrieveParams; }