-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Librarian] Regenerated @ 5eb406c4977c9f6976e6053cb5b581056f541a59
- Loading branch information
Showing
8 changed files
with
631 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
/* | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* Twilio - Flex | ||
* This is the public Twilio REST API. | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator. | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { inspect, InspectOptions } from "util"; | ||
import V1 from "../V1"; | ||
const deserialize = require("../../../base/deserialize"); | ||
const serialize = require("../../../base/serialize"); | ||
import { isValidPathParam } from "../../../base/utility"; | ||
|
||
export type ProvisioningStatusStatus = | ||
| "active" | ||
| "in-progress" | ||
| "not-configured" | ||
| "failed"; | ||
|
||
export interface ProvisioningStatusContext { | ||
/** | ||
* Fetch a ProvisioningStatusInstance | ||
* | ||
* @param callback - Callback to handle processed record | ||
* | ||
* @returns Resolves to processed ProvisioningStatusInstance | ||
*/ | ||
fetch( | ||
callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any | ||
): Promise<ProvisioningStatusInstance>; | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
*/ | ||
toJSON(): any; | ||
[inspect.custom](_depth: any, options: InspectOptions): any; | ||
} | ||
|
||
export interface ProvisioningStatusContextSolution {} | ||
|
||
export class ProvisioningStatusContextImpl | ||
implements ProvisioningStatusContext | ||
{ | ||
protected _solution: ProvisioningStatusContextSolution; | ||
protected _uri: string; | ||
|
||
constructor(protected _version: V1) { | ||
this._solution = {}; | ||
this._uri = `/account/provision/status`; | ||
} | ||
|
||
fetch( | ||
callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any | ||
): Promise<ProvisioningStatusInstance> { | ||
const instance = this; | ||
let operationVersion = instance._version, | ||
operationPromise = operationVersion.fetch({ | ||
uri: instance._uri, | ||
method: "get", | ||
}); | ||
|
||
operationPromise = operationPromise.then( | ||
(payload) => new ProvisioningStatusInstance(operationVersion, payload) | ||
); | ||
|
||
operationPromise = instance._version.setPromiseCallback( | ||
operationPromise, | ||
callback | ||
); | ||
return operationPromise; | ||
} | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
* | ||
* @returns Object | ||
*/ | ||
toJSON() { | ||
return this._solution; | ||
} | ||
|
||
[inspect.custom](_depth: any, options: InspectOptions) { | ||
return inspect(this.toJSON(), options); | ||
} | ||
} | ||
|
||
interface ProvisioningStatusPayload extends ProvisioningStatusResource {} | ||
|
||
interface ProvisioningStatusResource { | ||
status: ProvisioningStatusStatus; | ||
url: string; | ||
} | ||
|
||
export class ProvisioningStatusInstance { | ||
protected _solution: ProvisioningStatusContextSolution; | ||
protected _context?: ProvisioningStatusContext; | ||
|
||
constructor(protected _version: V1, payload: ProvisioningStatusResource) { | ||
this.status = payload.status; | ||
this.url = payload.url; | ||
|
||
this._solution = {}; | ||
} | ||
|
||
status: ProvisioningStatusStatus; | ||
/** | ||
* The absolute URL of the resource. | ||
*/ | ||
url: string; | ||
|
||
private get _proxy(): ProvisioningStatusContext { | ||
this._context = | ||
this._context || new ProvisioningStatusContextImpl(this._version); | ||
return this._context; | ||
} | ||
|
||
/** | ||
* Fetch a ProvisioningStatusInstance | ||
* | ||
* @param callback - Callback to handle processed record | ||
* | ||
* @returns Resolves to processed ProvisioningStatusInstance | ||
*/ | ||
fetch( | ||
callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any | ||
): Promise<ProvisioningStatusInstance> { | ||
return this._proxy.fetch(callback); | ||
} | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
* | ||
* @returns Object | ||
*/ | ||
toJSON() { | ||
return { | ||
status: this.status, | ||
url: this.url, | ||
}; | ||
} | ||
|
||
[inspect.custom](_depth: any, options: InspectOptions) { | ||
return inspect(this.toJSON(), options); | ||
} | ||
} | ||
|
||
export interface ProvisioningStatusSolution {} | ||
|
||
export interface ProvisioningStatusListInstance { | ||
_version: V1; | ||
_solution: ProvisioningStatusSolution; | ||
_uri: string; | ||
|
||
(): ProvisioningStatusContext; | ||
get(): ProvisioningStatusContext; | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
*/ | ||
toJSON(): any; | ||
[inspect.custom](_depth: any, options: InspectOptions): any; | ||
} | ||
|
||
export function ProvisioningStatusListInstance( | ||
version: V1 | ||
): ProvisioningStatusListInstance { | ||
const instance = (() => instance.get()) as ProvisioningStatusListInstance; | ||
|
||
instance.get = function get(): ProvisioningStatusContext { | ||
return new ProvisioningStatusContextImpl(version); | ||
}; | ||
|
||
instance._version = version; | ||
instance._solution = {}; | ||
instance._uri = ``; | ||
|
||
instance.toJSON = function toJSON() { | ||
return instance._solution; | ||
}; | ||
|
||
instance[inspect.custom] = function inspectImpl( | ||
_depth: any, | ||
options: InspectOptions | ||
) { | ||
return inspect(instance.toJSON(), options); | ||
}; | ||
|
||
return instance; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.