Skip to content

Commit

Permalink
feat(analyticshub): update the API
Browse files Browse the repository at this point in the history
#### analyticshub:v1

The following keys were added:
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.description
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.flatPath
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.httpMethod
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.id
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.parameterOrder
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.parameters.resource.description
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.parameters.resource.location
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.parameters.resource.pattern
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.parameters.resource.required
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.parameters.resource.type
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.path
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.request.$ref
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.response.$ref
- resources.projects.resources.locations.resources.subscriptions.methods.getIamPolicy.scopes
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.description
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.flatPath
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.httpMethod
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.id
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.parameterOrder
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.parameters.resource.description
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.parameters.resource.location
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.parameters.resource.pattern
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.parameters.resource.required
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.parameters.resource.type
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.path
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.request.$ref
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.response.$ref
- resources.projects.resources.locations.resources.subscriptions.methods.setIamPolicy.scopes
  • Loading branch information
yoshi-automation authored and sofisl committed Jan 3, 2024
1 parent 25d0b67 commit 8279edf
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 1 deletion.
60 changes: 59 additions & 1 deletion discovery/analyticshub-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,35 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
"getIamPolicy": {
"description": "Gets the IAM policy.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:getIamPolicy",
"httpMethod": "POST",
"id": "analyticshub.projects.locations.subscriptions.getIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:getIamPolicy",
"request": {
"$ref": "GetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "Lists all subscriptions in a given project and location.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions",
Expand Down Expand Up @@ -956,6 +985,35 @@
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"setIamPolicy": {
"description": "Sets the IAM policy.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:setIamPolicy",
"httpMethod": "POST",
"id": "analyticshub.projects.locations.subscriptions.setIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:setIamPolicy",
"request": {
"$ref": "SetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
Expand All @@ -964,7 +1022,7 @@
}
}
},
"revision": "20230923",
"revision": "20231211",
"rootUrl": "https://analyticshub.googleapis.com/",
"schemas": {
"AuditConfig": {
Expand Down
200 changes: 200 additions & 0 deletions src/apis/analyticshub/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3131,6 +3131,94 @@ export namespace analyticshub_v1 {
}
}

/**
* Gets the IAM policy.
*
* @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.
*/
getIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Getiampolicy,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
getIamPolicy(
params?: Params$Resource$Projects$Locations$Subscriptions$Getiampolicy,
options?: MethodOptions
): GaxiosPromise<Schema$Policy>;
getIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Getiampolicy,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
getIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Getiampolicy,
options: MethodOptions | BodyResponseCallback<Schema$Policy>,
callback: BodyResponseCallback<Schema$Policy>
): void;
getIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Getiampolicy,
callback: BodyResponseCallback<Schema$Policy>
): void;
getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
getIamPolicy(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Subscriptions$Getiampolicy
| BodyResponseCallback<Schema$Policy>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Policy>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Policy>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Subscriptions$Getiampolicy;
let options = (optionsOrCallback || {}) as MethodOptions;

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

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

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

/**
* Lists all subscriptions in a given project and location.
*
Expand Down Expand Up @@ -3402,6 +3490,94 @@ export namespace analyticshub_v1 {
return createAPIRequest<Schema$RevokeSubscriptionResponse>(parameters);
}
}

/**
* Sets the IAM policy.
*
* @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.
*/
setIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Setiampolicy,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
setIamPolicy(
params?: Params$Resource$Projects$Locations$Subscriptions$Setiampolicy,
options?: MethodOptions
): GaxiosPromise<Schema$Policy>;
setIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Setiampolicy,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
setIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Setiampolicy,
options: MethodOptions | BodyResponseCallback<Schema$Policy>,
callback: BodyResponseCallback<Schema$Policy>
): void;
setIamPolicy(
params: Params$Resource$Projects$Locations$Subscriptions$Setiampolicy,
callback: BodyResponseCallback<Schema$Policy>
): void;
setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
setIamPolicy(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Subscriptions$Setiampolicy
| BodyResponseCallback<Schema$Policy>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Policy>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Policy>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Subscriptions$Setiampolicy;
let options = (optionsOrCallback || {}) as MethodOptions;

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

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

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

export interface Params$Resource$Projects$Locations$Subscriptions$Delete
Expand All @@ -3418,6 +3594,18 @@ export namespace analyticshub_v1 {
*/
name?: string;
}
export interface Params$Resource$Projects$Locations$Subscriptions$Getiampolicy
extends StandardParameters {
/**
* REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
*/
resource?: string;

/**
* Request body metadata
*/
requestBody?: Schema$GetIamPolicyRequest;
}
export interface Params$Resource$Projects$Locations$Subscriptions$List
extends StandardParameters {
/**
Expand Down Expand Up @@ -3461,4 +3649,16 @@ export namespace analyticshub_v1 {
*/
requestBody?: Schema$RevokeSubscriptionRequest;
}
export interface Params$Resource$Projects$Locations$Subscriptions$Setiampolicy
extends StandardParameters {
/**
* REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
*/
resource?: string;

/**
* Request body metadata
*/
requestBody?: Schema$SetIamPolicyRequest;
}
}

0 comments on commit 8279edf

Please sign in to comment.