Skip to content

Commit

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

#### cloudbuild:v1alpha1

The following keys were changed:
- schemas.Empty.description

#### cloudbuild:v1alpha2

The following keys were changed:
- schemas.Empty.description

#### cloudbuild:v1beta1

The following keys were changed:
- schemas.Empty.description

#### cloudbuild:v1

The following keys were deleted:
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.description
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.flatPath
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.httpMethod
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.id
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.parameterOrder
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.parameters.config.description
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.parameters.config.location
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.parameters.config.pattern
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.parameters.config.required
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.parameters.config.type
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.path
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.request.$ref
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.response.$ref
- resources.projects.resources.locations.resources.bitbucketServerConfigs.methods.addBitbucketServerConnectedRepository.scopes
- schemas.AddBitbucketServerConnectedRepositoryRequest.description
- schemas.AddBitbucketServerConnectedRepositoryRequest.id
- schemas.AddBitbucketServerConnectedRepositoryRequest.properties.connectedRepository.$ref
- schemas.AddBitbucketServerConnectedRepositoryRequest.properties.connectedRepository.description
- schemas.AddBitbucketServerConnectedRepositoryRequest.type
- schemas.AddBitbucketServerConnectedRepositoryResponse.description
- schemas.AddBitbucketServerConnectedRepositoryResponse.id
- schemas.AddBitbucketServerConnectedRepositoryResponse.properties.config.description
- schemas.AddBitbucketServerConnectedRepositoryResponse.properties.config.type
- schemas.AddBitbucketServerConnectedRepositoryResponse.properties.connectedRepository.$ref
- schemas.AddBitbucketServerConnectedRepositoryResponse.properties.connectedRepository.description
- schemas.AddBitbucketServerConnectedRepositoryResponse.type

The following keys were changed:
- schemas.Empty.description
- schemas.GitFileSource.properties.uri.description
- schemas.GitRepoSource.properties.uri.description
  • Loading branch information
yoshi-automation authored and sofisl committed Apr 1, 2022
1 parent 9e045c9 commit 6bbebc3
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 255 deletions.
62 changes: 4 additions & 58 deletions discovery/cloudbuild-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,34 +591,6 @@
"resources": {
"bitbucketServerConfigs": {
"methods": {
"addBitbucketServerConnectedRepository": {
"description": "Add a Bitbucket Server repository to a given BitbucketServerConfig's connected repositories. This API is experimental.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/bitbucketServerConfigs/{bitbucketServerConfigsId}:addBitbucketServerConnectedRepository",
"httpMethod": "POST",
"id": "cloudbuild.projects.locations.bitbucketServerConfigs.addBitbucketServerConnectedRepository",
"parameterOrder": [
"config"
],
"parameters": {
"config": {
"description": "Required. The name of the `BitbucketServerConfig` to add a connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/bitbucketServerConfigs/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+config}:addBitbucketServerConnectedRepository",
"request": {
"$ref": "AddBitbucketServerConnectedRepositoryRequest"
},
"response": {
"$ref": "AddBitbucketServerConnectedRepositoryResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"create": {
"description": "Creates a new `BitbucketServerConfig`. This API is experimental.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/bitbucketServerConfigs",
Expand Down Expand Up @@ -2039,35 +2011,9 @@
}
}
},
"revision": "20220310",
"revision": "20220322",
"rootUrl": "https://cloudbuild.googleapis.com/",
"schemas": {
"AddBitbucketServerConnectedRepositoryRequest": {
"description": "RPC request object accepted by the AddBitbucketServerConnectedRepository RPC method.",
"id": "AddBitbucketServerConnectedRepositoryRequest",
"properties": {
"connectedRepository": {
"$ref": "BitbucketServerRepositoryId",
"description": "The connected repository to add."
}
},
"type": "object"
},
"AddBitbucketServerConnectedRepositoryResponse": {
"description": "RPC request object returned by the AddBitbucketServerConnectedRepository RPC method.",
"id": "AddBitbucketServerConnectedRepositoryResponse",
"properties": {
"config": {
"description": "The name of the `BitbucketServerConfig` that added connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}`",
"type": "string"
},
"connectedRepository": {
"$ref": "BitbucketServerRepositoryId",
"description": "The connected repository."
}
},
"type": "object"
},
"ApprovalConfig": {
"description": "ApprovalConfig describes configuration for manual approval of a build.",
"id": "ApprovalConfig",
Expand Down Expand Up @@ -3251,7 +3197,7 @@
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
Expand Down Expand Up @@ -3340,7 +3286,7 @@
"type": "string"
},
"uri": {
"description": "The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.",
"description": "The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.",
"type": "string"
}
},
Expand Down Expand Up @@ -3496,7 +3442,7 @@
"type": "string"
},
"uri": {
"description": "The URI of the repo (required).",
"description": "The URI of the repo. Either uri or repository can be specified and is required.",
"type": "string"
}
},
Expand Down
4 changes: 2 additions & 2 deletions discovery/cloudbuild-v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
}
}
},
"revision": "20220301",
"revision": "20220322",
"rootUrl": "https://cloudbuild.googleapis.com/",
"schemas": {
"ApprovalConfig": {
Expand Down Expand Up @@ -1170,7 +1170,7 @@
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
Expand Down
4 changes: 2 additions & 2 deletions discovery/cloudbuild-v1alpha2.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
}
}
},
"revision": "20220301",
"revision": "20220322",
"rootUrl": "https://cloudbuild.googleapis.com/",
"schemas": {
"ApprovalConfig": {
Expand Down Expand Up @@ -1181,7 +1181,7 @@
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
Expand Down
4 changes: 2 additions & 2 deletions discovery/cloudbuild-v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
}
}
},
"revision": "20220301",
"revision": "20220322",
"rootUrl": "https://cloudbuild.googleapis.com/",
"schemas": {
"ApprovalConfig": {
Expand Down Expand Up @@ -1186,7 +1186,7 @@
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
Expand Down
191 changes: 3 additions & 188 deletions src/apis/cloudbuild/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,28 +131,6 @@ export namespace cloudbuild_v1 {
}
}

/**
* RPC request object accepted by the AddBitbucketServerConnectedRepository RPC method.
*/
export interface Schema$AddBitbucketServerConnectedRepositoryRequest {
/**
* The connected repository to add.
*/
connectedRepository?: Schema$BitbucketServerRepositoryId;
}
/**
* RPC request object returned by the AddBitbucketServerConnectedRepository RPC method.
*/
export interface Schema$AddBitbucketServerConnectedRepositoryResponse {
/**
* The name of the `BitbucketServerConfig` that added connected repository. Format: `projects/{project\}/locations/{location\}/bitbucketServerConfigs/{config\}`
*/
config?: string | null;
/**
* The connected repository.
*/
connectedRepository?: Schema$BitbucketServerRepositoryId;
}
/**
* ApprovalConfig describes configuration for manual approval of a build.
*/
Expand Down Expand Up @@ -978,7 +956,7 @@ export namespace cloudbuild_v1 {
workerPool?: string | null;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`.
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
*/
export interface Schema$Empty {}
/**
Expand Down Expand Up @@ -1028,7 +1006,7 @@ export namespace cloudbuild_v1 {
*/
revision?: string | null;
/**
* The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
* The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
*/
uri?: string | null;
}
Expand Down Expand Up @@ -1160,7 +1138,7 @@ export namespace cloudbuild_v1 {
*/
repoType?: string | null;
/**
* The URI of the repo (required).
* The URI of the repo. Either uri or repository can be specified and is required.
*/
uri?: string | null;
}
Expand Down Expand Up @@ -4412,157 +4390,6 @@ export namespace cloudbuild_v1 {
);
}

/**
* Add a Bitbucket Server repository to a given BitbucketServerConfig's connected repositories. This API is experimental.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/cloudbuild.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 cloudbuild = google.cloudbuild('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 cloudbuild.projects.locations.bitbucketServerConfigs.addBitbucketServerConnectedRepository(
* {
* // Required. The name of the `BitbucketServerConfig` to add a connected repository. Format: `projects/{project\}/locations/{location\}/bitbucketServerConfigs/{config\}`
* config:
* 'projects/my-project/locations/my-location/bitbucketServerConfigs/my-bitbucketServerConfig',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "connectedRepository": {}
* // }
* },
* }
* );
* console.log(res.data);
*
* // Example response
* // {
* // "config": "my_config",
* // "connectedRepository": {}
* // }
* }
*
* 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.
*/
addBitbucketServerConnectedRepository(
params: Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
addBitbucketServerConnectedRepository(
params?: Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository,
options?: MethodOptions
): GaxiosPromise<Schema$AddBitbucketServerConnectedRepositoryResponse>;
addBitbucketServerConnectedRepository(
params: Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
addBitbucketServerConnectedRepository(
params: Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository,
options:
| MethodOptions
| BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>,
callback: BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>
): void;
addBitbucketServerConnectedRepository(
params: Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository,
callback: BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>
): void;
addBitbucketServerConnectedRepository(
callback: BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>
): void;
addBitbucketServerConnectedRepository(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository
| BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$AddBitbucketServerConnectedRepositoryResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$AddBitbucketServerConnectedRepositoryResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository;
let options = (optionsOrCallback || {}) as MethodOptions;

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

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

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

/**
* Creates a new `BitbucketServerConfig`. This API is experimental.
* @example
Expand Down Expand Up @@ -5428,18 +5255,6 @@ export namespace cloudbuild_v1 {
}
}

export interface Params$Resource$Projects$Locations$Bitbucketserverconfigs$Addbitbucketserverconnectedrepository
extends StandardParameters {
/**
* Required. The name of the `BitbucketServerConfig` to add a connected repository. Format: `projects/{project\}/locations/{location\}/bitbucketServerConfigs/{config\}`
*/
config?: string;

/**
* Request body metadata
*/
requestBody?: Schema$AddBitbucketServerConnectedRepositoryRequest;
}
export interface Params$Resource$Projects$Locations$Bitbucketserverconfigs$Create
extends StandardParameters {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/apis/cloudbuild/v1alpha1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ export namespace cloudbuild_v1alpha1 {
workerPool?: string | null;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`.
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
*/
export interface Schema$Empty {}
/**
Expand Down
Loading

0 comments on commit 6bbebc3

Please sign in to comment.