Skip to content

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Nov 27, 2024
1 parent b14d91e commit 6c5ed6f
Show file tree
Hide file tree
Showing 9 changed files with 810 additions and 563 deletions.
5 changes: 3 additions & 2 deletions src/rest/PreviewIam.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TokenListInstance } from "./previewIam/v1/token";
import { AuthorizeListInstance } from "./previewIam/v1/authorize";
import PreviewIamBase from "./PreviewIamBase";
import {OrganizationListInstance} from "./previewIam/versionless/organization";
import { OrganizationListInstance } from "./previewIam/versionless/organization";
import Versionless from "./previewIam/Versionless";

class PreviewIam extends PreviewIamBase {
Expand All @@ -24,7 +24,8 @@ class PreviewIam extends PreviewIamBase {

/** Getter for organization resource */
get organization(): OrganizationListInstance {
this._organization = this._organization || new Versionless(this).organization;
this._organization =
this._organization || new Versionless(this).organization;
return this._organization;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/rest/previewIam/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ export default class V1 extends Version {
this._token = this._token || TokenListInstance(this);
return this._token;
}

}
1 change: 0 additions & 1 deletion src/rest/previewIam/Versionless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ export default class Versionless extends Version {
this._organization = this._organization || OrganizationListInstance(this);
return this._organization;
}

}
98 changes: 50 additions & 48 deletions src/rest/previewIam/v1/authorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,45 @@
* 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";



/**
* Options to pass to fetch a AuthorizeInstance
*/
export interface AuthorizeListInstanceFetchOptions {
/** Response Type */
"responseType"?: string;
responseType?: string;
/** The Client Identifier */
"clientId"?: string;
clientId?: string;
/** The url to which response will be redirected to */
"redirectUri"?: string;
redirectUri?: string;
/** The scope of the access request */
"scope"?: string;
scope?: string;
/** An opaque value which can be used to maintain state between the request and callback */
"state"?: string;
state?: string;
}


export interface AuthorizeSolution {
}
export interface AuthorizeSolution {}

export interface AuthorizeListInstance {
_version: V1;
_solution: AuthorizeSolution;
_uri: string;



/**
* Fetch a AuthorizeInstance
*
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed AuthorizeInstance
*/
fetch(callback?: (error: Error | null, item?: AuthorizeInstance) => any): Promise<AuthorizeInstance>;
fetch(
callback?: (error: Error | null, item?: AuthorizeInstance) => any
): Promise<AuthorizeInstance>;
/**
* Fetch a AuthorizeInstance
*
Expand All @@ -64,8 +59,10 @@ export interface AuthorizeListInstance {
*
* @returns Resolves to processed AuthorizeInstance
*/
fetch(params: AuthorizeListInstanceFetchOptions, callback?: (error: Error | null, item?: AuthorizeInstance) => any): Promise<AuthorizeInstance>;

fetch(
params: AuthorizeListInstanceFetchOptions,
callback?: (error: Error | null, item?: AuthorizeInstance) => any
): Promise<AuthorizeInstance>;

/**
* Provide a user-friendly representation
Expand All @@ -78,10 +75,15 @@ export function AuthorizeListInstance(version: V1): AuthorizeListInstance {
const instance = {} as AuthorizeListInstance;

instance._version = version;
instance._solution = { };
instance._solution = {};
instance._uri = `/authorize`;

instance.fetch = function fetch(params?: AuthorizeListInstanceFetchOptions | ((error: Error | null, items: AuthorizeInstance) => any), callback?: (error: Error | null, items: AuthorizeInstance) => any): Promise<AuthorizeInstance> {
instance.fetch = function fetch(
params?:
| AuthorizeListInstanceFetchOptions
| ((error: Error | null, items: AuthorizeInstance) => any),
callback?: (error: Error | null, items: AuthorizeInstance) => any
): Promise<AuthorizeInstance> {
if (params instanceof Function) {
callback = params;
params = {};
Expand All @@ -91,42 +93,46 @@ export function AuthorizeListInstance(version: V1): AuthorizeListInstance {

let data: any = {};

if (params["responseType"] !== undefined)
data["response_type"] = params["responseType"];
if (params["responseType"] !== undefined)
data["response_type"] = params["responseType"];
if (params["clientId"] !== undefined)
data["client_id"] = params["clientId"];
data["client_id"] = params["clientId"];
if (params["redirectUri"] !== undefined)
data["redirect_uri"] = params["redirectUri"];
if (params["scope"] !== undefined)
data["scope"] = params["scope"];
if (params["state"] !== undefined)
data["state"] = params["state"];



data["redirect_uri"] = params["redirectUri"];
if (params["scope"] !== undefined) data["scope"] = params["scope"];
if (params["state"] !== undefined) data["state"] = params["state"];

const headers: any = {};


let operationVersion = version,
operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", params: data, headers });

operationPromise = operationPromise.then(payload => new AuthorizeInstance(operationVersion, payload));


operationPromise = instance._version.setPromiseCallback(operationPromise,callback);
operationPromise = operationVersion.fetch({
uri: instance._uri,
method: "get",
params: data,
headers,
});

operationPromise = operationPromise.then(
(payload) => new AuthorizeInstance(operationVersion, payload)
);

operationPromise = instance._version.setPromiseCallback(
operationPromise,
callback
);
return operationPromise;


}
};

instance.toJSON = function toJSON() {
return instance._solution;
}
};

instance[inspect.custom] = function inspectImpl(_depth: any, options: InspectOptions) {
instance[inspect.custom] = function inspectImpl(
_depth: any,
options: InspectOptions
) {
return inspect(instance.toJSON(), options);
}
};

return instance;
}
Expand All @@ -138,10 +144,8 @@ interface AuthorizeResource {
}

export class AuthorizeInstance {

constructor(protected _version: V1, payload: AuthorizeResource) {
this.redirectTo = (payload.redirect_to);

this.redirectTo = payload.redirect_to;
}

/**
Expand All @@ -157,12 +161,10 @@ export class AuthorizeInstance {
toJSON() {
return {
redirectTo: this.redirectTo,
}
};
}

[inspect.custom](_depth: any, options: InspectOptions) {
return inspect(this.toJSON(), options);
}
}


Loading

0 comments on commit 6c5ed6f

Please sign in to comment.