Skip to content

Commit

Permalink
Regenerate swagger APIs (kubeflow#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjbauer authored and neuromage committed Dec 13, 2018
1 parent fdef78d commit af2bb90
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 14 deletions.
82 changes: 82 additions & 0 deletions frontend/src/apis/experiment/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ export interface ProtobufAny {
value?: string;
}

/**
* service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
* @export
* @interface ProtobufEmpty
*/
export interface ProtobufEmpty {
}


/**
* ExperimentServiceApi - fetch parameter creator
Expand Down Expand Up @@ -222,6 +230,42 @@ export const ExperimentServiceApiFetchParamCreator = function (configuration?: C
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteExperiment.');
}
const localVarPath = `/apis/v1beta1/experiments/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("authorization")
: configuration.apiKey;
localVarHeaderParameter["authorization"] = localVarApiKeyValue;
}

localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);

return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
Expand Down Expand Up @@ -330,6 +374,24 @@ export const ExperimentServiceApiFp = function(configuration?: Configuration) {
});
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ProtobufEmpty> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(configuration).deleteExperiment(id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @param {string} id
Expand Down Expand Up @@ -386,6 +448,15 @@ export const ExperimentServiceApiFactory = function (configuration?: Configurati
createExperiment(body: ApiExperiment, options?: any) {
return ExperimentServiceApiFp(configuration).createExperiment(body, options)(fetch, basePath);
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(configuration).deleteExperiment(id, options)(fetch, basePath);
},
/**
*
* @param {string} id
Expand Down Expand Up @@ -427,6 +498,17 @@ export class ExperimentServiceApi extends BaseAPI {
return ExperimentServiceApiFp(this.configuration).createExperiment(body, options)(this.fetch, this.basePath);
}

/**
*
* @param {} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public deleteExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).deleteExperiment(id, options)(this.fetch, this.basePath);
}

/**
*
* @param {} id
Expand Down
22 changes: 14 additions & 8 deletions frontend/src/apis/pipeline/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ export interface ApiPipeline {
* @memberof ApiPipeline
*/
parameters?: Array<ApiParameter>;
/**
*
* @type {ApiUrl}
* @memberof ApiPipeline
*/
url?: ApiUrl;
/**
* In case any error happens retrieving a pipeline field, only pipeline ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call.
* @type {string}
Expand Down Expand Up @@ -253,11 +259,11 @@ export const PipelineServiceApiFetchParamCreator = function (configuration?: Con
return {
/**
*
* @param {ApiUrl} body
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: ApiUrl, options: any = {}): FetchArgs {
createPipeline(body: ApiPipeline, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body','Required parameter body was null or undefined when calling createPipeline.');
Expand All @@ -282,7 +288,7 @@ export const PipelineServiceApiFetchParamCreator = function (configuration?: Con
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization = (<any>"ApiUrl" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
const needsSerialization = (<any>"ApiPipeline" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");

return {
Expand Down Expand Up @@ -454,11 +460,11 @@ export const PipelineServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @param {ApiUrl} body
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: ApiUrl, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipeline> {
createPipeline(body: ApiPipeline, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).createPipeline(body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
Expand Down Expand Up @@ -555,11 +561,11 @@ export const PipelineServiceApiFactory = function (configuration?: Configuration
return {
/**
*
* @param {ApiUrl} body
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: ApiUrl, options?: any) {
createPipeline(body: ApiPipeline, options?: any) {
return PipelineServiceApiFp(configuration).createPipeline(body, options)(fetch, basePath);
},
/**
Expand Down Expand Up @@ -617,7 +623,7 @@ export class PipelineServiceApi extends BaseAPI {
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public createPipeline(body: ApiUrl, options?: any) {
public createPipeline(body: ApiPipeline, options?: any) {
return PipelineServiceApiFp(this.configuration).createPipeline(body, options)(this.fetch, this.basePath);
}

Expand Down
88 changes: 82 additions & 6 deletions frontend/src/apis/run/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,6 @@ export interface ApiRun {
* @memberof ApiRun
*/
metrics?: Array<ApiRunMetric>;
/**
*
* @type {string}
* @memberof ApiRun
*/
namespace?: string;
}

/**
Expand Down Expand Up @@ -452,6 +446,14 @@ export interface ProtobufAny {
value?: string;
}

/**
* service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
* @export
* @interface ProtobufEmpty
*/
export interface ProtobufEmpty {
}

/**
*
* @export
Expand Down Expand Up @@ -554,6 +556,42 @@ export const RunServiceApiFetchParamCreator = function (configuration?: Configur
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRun(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteRun.');
}
const localVarPath = `/apis/v1beta1/runs/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? configuration.apiKey("authorization")
: configuration.apiKey;
localVarHeaderParameter["authorization"] = localVarApiKeyValue;
}

localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);

return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} run_id
Expand Down Expand Up @@ -766,6 +804,24 @@ export const RunServiceApiFp = function(configuration?: Configuration) {
});
};
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRun(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ProtobufEmpty> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).deleteRun(id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @param {string} run_id
Expand Down Expand Up @@ -864,6 +920,15 @@ export const RunServiceApiFactory = function (configuration?: Configuration, fet
createRun(body: ApiRun, options?: any) {
return RunServiceApiFp(configuration).createRun(body, options)(fetch, basePath);
},
/**
*
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRun(id: string, options?: any) {
return RunServiceApiFp(configuration).deleteRun(id, options)(fetch, basePath);
},
/**
*
* @param {string} run_id
Expand Down Expand Up @@ -929,6 +994,17 @@ export class RunServiceApi extends BaseAPI {
return RunServiceApiFp(this.configuration).createRun(body, options)(this.fetch, this.basePath);
}

/**
*
* @param {} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public deleteRun(id: string, options?: any) {
return RunServiceApiFp(this.configuration).deleteRun(id, options)(this.fetch, this.basePath);
}

/**
*
* @param {} run_id
Expand Down

0 comments on commit af2bb90

Please sign in to comment.