Skip to content

Commit

Permalink
feat(serviceconsumermanagement)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.

#### serviceconsumermanagement:v1beta1

The following keys were deleted:
- resources.services.resources.properties.methods.create.description
- resources.services.resources.properties.methods.create.flatPath
- resources.services.resources.properties.methods.create.httpMethod
- resources.services.resources.properties.methods.create.id
- resources.services.resources.properties.methods.create.parameterOrder
- resources.services.resources.properties.methods.create.parameters.parent.description
- resources.services.resources.properties.methods.create.parameters.parent.location
- resources.services.resources.properties.methods.create.parameters.parent.pattern
- resources.services.resources.properties.methods.create.parameters.parent.required
- resources.services.resources.properties.methods.create.parameters.parent.type
- resources.services.resources.properties.methods.create.path
- resources.services.resources.properties.methods.create.request.$ref
- resources.services.resources.properties.methods.create.response.$ref
- resources.services.resources.properties.methods.create.scopes
- schemas.V1Beta1ConsumerProperty.description
- schemas.V1Beta1ConsumerProperty.id
- schemas.V1Beta1ConsumerProperty.properties.description.description
- schemas.V1Beta1ConsumerProperty.properties.description.type
- schemas.V1Beta1ConsumerProperty.properties.name.description
- schemas.V1Beta1ConsumerProperty.properties.name.type
- schemas.V1Beta1ConsumerProperty.properties.propagation.$ref
- schemas.V1Beta1ConsumerProperty.properties.propagation.description
- schemas.V1Beta1ConsumerProperty.properties.propertyKey.description
- schemas.V1Beta1ConsumerProperty.properties.propertyKey.type
- schemas.V1Beta1ConsumerProperty.properties.type.description
- schemas.V1Beta1ConsumerProperty.properties.type.enum
- schemas.V1Beta1ConsumerProperty.properties.type.enumDescriptions
- schemas.V1Beta1ConsumerProperty.properties.type.type
- schemas.V1Beta1ConsumerProperty.properties.value.description
- schemas.V1Beta1ConsumerProperty.properties.value.type
- schemas.V1Beta1ConsumerProperty.type
  • Loading branch information
yoshi-automation authored and sofisl committed Jan 5, 2024
1 parent 767af5f commit a68206a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 224 deletions.
79 changes: 1 addition & 78 deletions discovery/serviceconsumermanagement-v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,43 +496,11 @@
}
}
}
},
"properties": {
"methods": {
"create": {
"description": "Creates a consumer property. If the property already exists, this method fails with an ALREADY_EXISTS error. For this failure case, the Status details field will contain the existing property's value.",
"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/properties",
"httpMethod": "POST",
"id": "serviceconsumermanagement.services.properties.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. Name of the property to create. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123`",
"location": "path",
"pattern": "^services/[^/]+/[^/]+/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1beta1/{+parent}/properties",
"request": {
"$ref": "V1Beta1ConsumerProperty"
},
"response": {
"$ref": "V1Beta1ConsumerProperty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
}
},
"revision": "20231218",
"revision": "20240103",
"rootUrl": "https://serviceconsumermanagement.googleapis.com/",
"schemas": {
"Api": {
Expand Down Expand Up @@ -2626,51 +2594,6 @@
},
"type": "object"
},
"V1Beta1ConsumerProperty": {
"description": "A property assigned to a consumer of a service.",
"id": "V1Beta1ConsumerProperty",
"properties": {
"description": {
"description": "Output only. The description of the property.",
"type": "string"
},
"name": {
"description": "Output only. The resource name of this property. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/properties/SERVICE_LEVEL` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.",
"type": "string"
},
"propagation": {
"$ref": "Operation",
"description": "Output only. A long-running operation which tracks the propagation of recent changes to this resource to all affected backends. If this field is empty, all affected backends have been notified of the change. If this field contains an operation in progress, then the most recent change to this resource has not yet been sent out to all backends. If this field contains an operation that has failed with an error, the caller should retry the change."
},
"propertyKey": {
"description": "Output only. The name of the property as it appears in the service configuration. An example property name would be: `SERVICE_LEVEL`",
"type": "string"
},
"type": {
"description": "Output only. The type of this property.",
"enum": [
"UNSPECIFIED",
"INT64",
"BOOL",
"STRING",
"DOUBLE"
],
"enumDescriptions": [
"The type is unspecified, and will result in an error.",
"The type is `int64`.",
"The type is `bool`.",
"The type is `string`.",
"The type is 'double'."
],
"type": "string"
},
"value": {
"description": "Value of this property for the consumer. This field may be empty if the consumer has not been assigned a value.",
"type": "any"
}
},
"type": "object"
},
"V1Beta1ConsumerQuotaLimit": {
"description": "Consumer quota settings for a quota limit.",
"id": "V1Beta1ConsumerQuotaLimit",
Expand Down
146 changes: 0 additions & 146 deletions src/apis/serviceconsumermanagement/v1beta1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1564,35 +1564,6 @@ export namespace serviceconsumermanagement_v1beta1 {
*/
overrides?: Schema$V1Beta1QuotaOverride[];
}
/**
* A property assigned to a consumer of a service.
*/
export interface Schema$V1Beta1ConsumerProperty {
/**
* Output only. The description of the property.
*/
description?: string | null;
/**
* Output only. The resource name of this property. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/properties/SERVICE_LEVEL` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.
*/
name?: string | null;
/**
* Output only. A long-running operation which tracks the propagation of recent changes to this resource to all affected backends. If this field is empty, all affected backends have been notified of the change. If this field contains an operation in progress, then the most recent change to this resource has not yet been sent out to all backends. If this field contains an operation that has failed with an error, the caller should retry the change.
*/
propagation?: Schema$Operation;
/**
* Output only. The name of the property as it appears in the service configuration. An example property name would be: `SERVICE_LEVEL`
*/
propertyKey?: string | null;
/**
* Output only. The type of this property.
*/
type?: string | null;
/**
* Value of this property for the consumer. This field may be empty if the consumer has not been assigned a value.
*/
value?: any | null;
}
/**
* Consumer quota settings for a quota limit.
*/
Expand Down Expand Up @@ -2049,13 +2020,11 @@ export namespace serviceconsumermanagement_v1beta1 {
export class Resource$Services {
context: APIRequestContext;
consumerQuotaMetrics: Resource$Services$Consumerquotametrics;
properties: Resource$Services$Properties;
constructor(context: APIRequestContext) {
this.context = context;
this.consumerQuotaMetrics = new Resource$Services$Consumerquotametrics(
this.context
);
this.properties = new Resource$Services$Properties(this.context);
}
}

Expand Down Expand Up @@ -2947,119 +2916,4 @@ export namespace serviceconsumermanagement_v1beta1 {
*/
requestBody?: Schema$V1Beta1QuotaOverride;
}

export class Resource$Services$Properties {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}

/**
* Creates a consumer property. If the property already exists, this method fails with an ALREADY_EXISTS error. For this failure case, the Status details field will contain the existing property's value.
*
* @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$Services$Properties$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Services$Properties$Create,
options?: MethodOptions
): GaxiosPromise<Schema$V1Beta1ConsumerProperty>;
create(
params: Params$Resource$Services$Properties$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Services$Properties$Create,
options:
| MethodOptions
| BodyResponseCallback<Schema$V1Beta1ConsumerProperty>,
callback: BodyResponseCallback<Schema$V1Beta1ConsumerProperty>
): void;
create(
params: Params$Resource$Services$Properties$Create,
callback: BodyResponseCallback<Schema$V1Beta1ConsumerProperty>
): void;
create(
callback: BodyResponseCallback<Schema$V1Beta1ConsumerProperty>
): void;
create(
paramsOrCallback?:
| Params$Resource$Services$Properties$Create
| BodyResponseCallback<Schema$V1Beta1ConsumerProperty>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$V1Beta1ConsumerProperty>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$V1Beta1ConsumerProperty>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$V1Beta1ConsumerProperty>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Services$Properties$Create;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Services$Properties$Create;
options = {};
}

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

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

export interface Params$Resource$Services$Properties$Create
extends StandardParameters {
/**
* Required. Name of the property to create. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123`
*/
parent?: string;

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

0 comments on commit a68206a

Please sign in to comment.