Skip to content

Commit

Permalink
feat(ml)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.
#### ml:v1
The following keys were deleted:
- schemas.GoogleIamV1__Binding.properties.bindingId.description

The following keys were added:
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.description
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.flatPath
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.httpMethod
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.id
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.parameterOrder
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.parameters.parent.description
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.parameters.parent.location
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.parameters.parent.pattern
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.parameters.parent.required
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.parameters.parent.type
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.path
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.request.$ref
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.response.$ref
- resources.projects.resources.locations.resources.studies.resources.trials.methods.listOptimalTrials.scopes
- schemas.GoogleCloudMlV1__ListOptimalTrialsRequest.description
- schemas.GoogleCloudMlV1__ListOptimalTrialsRequest.id
- schemas.GoogleCloudMlV1__ListOptimalTrialsRequest.type
- schemas.GoogleCloudMlV1__ListOptimalTrialsResponse.description
- schemas.GoogleCloudMlV1__ListOptimalTrialsResponse.id
- schemas.GoogleCloudMlV1__ListOptimalTrialsResponse.properties.trials.description
- schemas.GoogleCloudMlV1__ListOptimalTrialsResponse.properties.trials.items.$ref
- schemas.GoogleCloudMlV1__ListOptimalTrialsResponse.properties.trials.type
- schemas.GoogleCloudMlV1__ListOptimalTrialsResponse.type

The following keys were changed:
- schemas.GoogleCloudMlV1__AcceleratorConfig.properties.type.enum
- schemas.GoogleCloudMlV1__AcceleratorConfig.properties.type.enumDescriptions
- schemas.GoogleCloudMlV1__Capability.properties.availableAccelerators.items.enum
- schemas.GoogleCloudMlV1__Capability.properties.availableAccelerators.items.enumDescriptions
  • Loading branch information
yoshi-automation authored and sofisl committed Nov 6, 2020
1 parent e7f2840 commit 41fc95d
Show file tree
Hide file tree
Showing 2 changed files with 236 additions and 5 deletions.
55 changes: 53 additions & 2 deletions discovery/ml-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,34 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
"listOptimalTrials": {
"description": "Lists the pareto-optimal trials for multi-objective study or the optimal trials for single-objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials:listOptimalTrials",
"httpMethod": "POST",
"id": "ml.projects.locations.studies.trials.listOptimalTrials",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The name of the study that the pareto-optimal trial belongs to.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/trials:listOptimalTrials",
"request": {
"$ref": "GoogleCloudMlV1__ListOptimalTrialsRequest"
},
"response": {
"$ref": "GoogleCloudMlV1__ListOptimalTrialsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"stop": {
"description": "Stops a trial.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}:stop",
Expand Down Expand Up @@ -1458,7 +1486,7 @@
}
}
},
"revision": "20201016",
"revision": "20201029",
"rootUrl": "https://ml.googleapis.com/",
"schemas": {
"GoogleApi__HttpBody": {
Expand Down Expand Up @@ -1790,6 +1818,7 @@
"NVIDIA_TESLA_V100",
"NVIDIA_TESLA_P4",
"NVIDIA_TESLA_T4",
"NVIDIA_TESLA_A100",
"TPU_V2",
"TPU_V3"
],
Expand All @@ -1800,6 +1829,7 @@
"Nvidia Tesla V100 GPU.",
"Nvidia Tesla P4 GPU.",
"Nvidia Tesla T4 GPU.",
"Nvidia Tesla A100 GPU.",
"TPU v2.",
"TPU v3."
],
Expand Down Expand Up @@ -1898,6 +1928,7 @@
"NVIDIA_TESLA_V100",
"NVIDIA_TESLA_P4",
"NVIDIA_TESLA_T4",
"NVIDIA_TESLA_A100",
"TPU_V2",
"TPU_V3"
],
Expand All @@ -1908,6 +1939,7 @@
"Nvidia Tesla V100 GPU.",
"Nvidia Tesla P4 GPU.",
"Nvidia Tesla T4 GPU.",
"Nvidia Tesla A100 GPU.",
"TPU v2.",
"TPU v3."
],
Expand Down Expand Up @@ -2422,6 +2454,26 @@
},
"type": "object"
},
"GoogleCloudMlV1__ListOptimalTrialsRequest": {
"description": "The request message for the ListTrials service method.",
"id": "GoogleCloudMlV1__ListOptimalTrialsRequest",
"properties": {},
"type": "object"
},
"GoogleCloudMlV1__ListOptimalTrialsResponse": {
"description": "The response message for the ListOptimalTrials method.",
"id": "GoogleCloudMlV1__ListOptimalTrialsResponse",
"properties": {
"trials": {
"description": "The pareto-optimal trials for multiple objective study or the optimal trial for single objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency",
"items": {
"$ref": "GoogleCloudMlV1__Trial"
},
"type": "array"
}
},
"type": "object"
},
"GoogleCloudMlV1__ListStudiesResponse": {
"id": "GoogleCloudMlV1__ListStudiesResponse",
"properties": {
Expand Down Expand Up @@ -3580,7 +3632,6 @@
"id": "GoogleIamV1__Binding",
"properties": {
"bindingId": {
"description": "A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.",
"type": "string"
},
"condition": {
Expand Down
186 changes: 183 additions & 3 deletions src/apis/ml/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,19 @@ export namespace ml_v1 {
*/
nextPageToken?: string | null;
}
/**
* The request message for the ListTrials service method.
*/
export interface Schema$GoogleCloudMlV1__ListOptimalTrialsRequest {}
/**
* The response message for the ListOptimalTrials method.
*/
export interface Schema$GoogleCloudMlV1__ListOptimalTrialsResponse {
/**
* The pareto-optimal trials for multiple objective study or the optimal trial for single objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
*/
trials?: Schema$GoogleCloudMlV1__Trial[];
}
export interface Schema$GoogleCloudMlV1__ListStudiesResponse {
/**
* The studies associated with the project.
Expand Down Expand Up @@ -1499,9 +1512,6 @@ export namespace ml_v1 {
* Associates `members` with a `role`.
*/
export interface Schema$GoogleIamV1__Binding {
/**
* A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
*/
bindingId?: string | null;
/**
* The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Expand Down Expand Up @@ -5669,6 +5679,164 @@ export namespace ml_v1 {
}
}

/**
* Lists the pareto-optimal trials for multi-objective study or the optimal trials for single-objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/ml.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const ml = google.ml('v1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await ml.projects.locations.studies.trials.listOptimalTrials({
* // Required. The name of the study that the pareto-optimal trial belongs to.
* parent: 'projects/my-project/locations/my-location/studies/my-studie',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {}
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "trials": []
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
listOptimalTrials(
params: Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
listOptimalTrials(
params?: Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials,
options?: MethodOptions
): GaxiosPromise<Schema$GoogleCloudMlV1__ListOptimalTrialsResponse>;
listOptimalTrials(
params: Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
listOptimalTrials(
params: Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials,
options:
| MethodOptions
| BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>,
callback: BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>
): void;
listOptimalTrials(
params: Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials,
callback: BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>
): void;
listOptimalTrials(
callback: BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>
): void;
listOptimalTrials(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials
| BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$GoogleCloudMlV1__ListOptimalTrialsResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl = options.rootUrl || 'https://ml.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/{+parent}/trials:listOptimalTrials').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$GoogleCloudMlV1__ListOptimalTrialsResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<
Schema$GoogleCloudMlV1__ListOptimalTrialsResponse
>(parameters);
}
}

/**
* Stops a trial.
* @example
Expand Down Expand Up @@ -6037,6 +6205,18 @@ export namespace ml_v1 {
*/
parent?: string;
}
export interface Params$Resource$Projects$Locations$Studies$Trials$Listoptimaltrials
extends StandardParameters {
/**
* Required. The name of the study that the pareto-optimal trial belongs to.
*/
parent?: string;

/**
* Request body metadata
*/
requestBody?: Schema$GoogleCloudMlV1__ListOptimalTrialsRequest;
}
export interface Params$Resource$Projects$Locations$Studies$Trials$Stop
extends StandardParameters {
/**
Expand Down

0 comments on commit 41fc95d

Please sign in to comment.