Skip to content

Commit

Permalink
feat(privateca)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.
#### privateca:v1beta1
The following keys were deleted:
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.description
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.flatPath
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.httpMethod
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.id
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameterOrder
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.certificateRevocationListId.description
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.certificateRevocationListId.location
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.certificateRevocationListId.type
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.parent.description
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.parent.location
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.parent.pattern
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.parent.required
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.parent.type
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.requestId.description
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.requestId.location
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.parameters.requestId.type
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.path
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.request.$ref
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.response.$ref
- resources.projects.resources.locations.resources.certificateAuthorities.resources.certificateRevocationLists.methods.create.scopes
- schemas.Binding.properties.bindingId.type
  • Loading branch information
yoshi-automation authored and bcoe committed Nov 17, 2020
1 parent 2ababff commit d697bd9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 218 deletions.
43 changes: 1 addition & 42 deletions discovery/privateca-v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,44 +583,6 @@
"resources": {
"certificateRevocationLists": {
"methods": {
"create": {
"description": "Create a new CertificateRevocationList in a given Project, Location for a particular CertificateAuthority.",
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists",
"httpMethod": "POST",
"id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.create",
"parameterOrder": [
"parent"
],
"parameters": {
"certificateRevocationListId": {
"description": "Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The resource name of the location and CertificateAuthority associated with the CertificateRevocationList, in the format `projects/*/locations/*/certificateAuthorities/*`.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$",
"required": true,
"type": "string"
},
"requestId": {
"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
"location": "query",
"type": "string"
}
},
"path": "v1beta1/{+parent}/certificateRevocationLists",
"request": {
"$ref": "CertificateRevocationList"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"get": {
"description": "Returns a CertificateRevocationList.",
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}",
Expand Down Expand Up @@ -1292,7 +1254,7 @@
}
}
},
"revision": "20201102",
"revision": "20201112",
"rootUrl": "https://privateca.googleapis.com/",
"schemas": {
"AccessUrls": {
Expand Down Expand Up @@ -1437,9 +1399,6 @@
"description": "Associates `members` with a `role`.",
"id": "Binding",
"properties": {
"bindingId": {
"type": "string"
},
"condition": {
"$ref": "Expr",
"description": "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
176 changes: 0 additions & 176 deletions src/apis/privateca/v1beta1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ export namespace privateca_v1beta1 {
* Associates `members` with a `role`.
*/
export interface Schema$Binding {
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 @@ -3673,161 +3672,6 @@ export namespace privateca_v1beta1 {
this.context = context;
}

/**
* Create a new CertificateRevocationList in a given Project, Location for a particular CertificateAuthority.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/privateca.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 privateca = google.privateca('v1beta1');
*
* 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 privateca.projects.locations.certificateAuthorities.certificateRevocationLists.create(
* {
* // Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63\}`
* certificateRevocationListId: 'placeholder-value',
* // Required. The resource name of the location and CertificateAuthority associated with the CertificateRevocationList, in the format `projects/x/locations/x/certificateAuthorities/x`.
* parent:
* 'projects/my-project/locations/my-location/certificateAuthorities/my-certificateAuthoritie',
* // Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
* requestId: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "accessUrl": "my_accessUrl",
* // "createTime": "my_createTime",
* // "labels": {},
* // "name": "my_name",
* // "pemCrl": "my_pemCrl",
* // "revokedCertificates": [],
* // "sequenceNumber": "my_sequenceNumber",
* // "state": "my_state",
* // "updateTime": "my_updateTime"
* // }
* },
* }
* );
* console.log(res.data);
*
* // Example response
* // {
* // "done": false,
* // "error": {},
* // "metadata": {},
* // "name": "my_name",
* // "response": {}
* // }
* }
*
* 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.
*/
create(
params: Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create,
options?: MethodOptions
): GaxiosPromise<Schema$Operation>;
create(
params: Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create,
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
callback: BodyResponseCallback<Schema$Operation>
): void;
create(
params: Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create,
callback: BodyResponseCallback<Schema$Operation>
): void;
create(callback: BodyResponseCallback<Schema$Operation>): void;
create(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create;
options = {};
}

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

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

/**
* Returns a CertificateRevocationList.
* @example
Expand Down Expand Up @@ -4708,26 +4552,6 @@ export namespace privateca_v1beta1 {
}
}

export interface Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Create
extends StandardParameters {
/**
* Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63\}`
*/
certificateRevocationListId?: string;
/**
* Required. The resource name of the location and CertificateAuthority associated with the CertificateRevocationList, in the format `projects/x/locations/x/certificateAuthorities/x`.
*/
parent?: string;
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
requestId?: string;

/**
* Request body metadata
*/
requestBody?: Schema$CertificateRevocationList;
}
export interface Params$Resource$Projects$Locations$Certificateauthorities$Certificaterevocationlists$Get
extends StandardParameters {
/**
Expand Down

0 comments on commit d697bd9

Please sign in to comment.