Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 308286e

Browse files
chingor13gcf-owl-bot[bot]Benjamin E. Coesofisl
authored
feat!: make v1 default service version (#139)
* feat!: make v1 default service version Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Benjamin E. Coe <bencoe@google.com> Co-authored-by: Sofia Leon <sofialeon@google.com>
1 parent cafc43b commit 308286e

7 files changed

Lines changed: 37 additions & 37 deletions

File tree

.repo-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/binary-authorization/latest",
33
"api_id": "binaryauthorization.googleapis.com",
44
"distribution_name": "@google-cloud/binary-authorization",
5-
"release_level": "preview",
6-
"default_version": "v1beta1",
5+
"release_level": "stable",
6+
"default_version": "v1",
77
"language": "nodejs",
88
"name_pretty": "Binary Authorization",
99
"repo": "googleapis/nodejs-binary-authorization",

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# [Binary Authorization: Node.js Client](https://github.com/googleapis/nodejs-binary-authorization)
66

7-
[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
7+
[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
88
[![npm version](https://img.shields.io/npm/v/@google-cloud/binary-authorization.svg)](https://www.npmjs.org/package/@google-cloud/binary-authorization)
99

1010

@@ -61,14 +61,14 @@ npm install @google-cloud/binary-authorization
6161

6262
// eslint-disable-next-line node/no-missing-require
6363
const {
64-
BinauthzManagementServiceV1Beta1Client,
64+
BinauthzManagementServiceV1Client,
6565
} = require('@google-cloud/binary-authorization');
6666

6767
// TODO(developer): replace with your prefered project ID.
6868
// const projectId = 'my-project'
6969

7070
// Creates a client
71-
const client = new BinauthzManagementServiceV1Beta1Client();
71+
const client = new BinauthzManagementServiceV1Client();
7272

7373
async function listAttestors() {
7474
const attestors = await client.listAttestors({parent});
@@ -120,13 +120,14 @@ This library follows [Semantic Versioning](http://semver.org/).
120120

121121

122122

123+
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
124+
unless absolutely necessary (e.g. because of critical security issues) or with
125+
an extensive deprecation period. Issues and requests against **stable** libraries
126+
are addressed with the highest priority.
123127

124128

125129

126130

127-
This library is considered to be in **preview**. This means it is still a
128-
work-in-progress and under active development. Any release is subject to
129-
backwards-incompatible changes at any time.
130131

131132

132133
More Information: [Google Cloud Platform Launch Stages][launch_stages]

samples/quickstart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ async function main(parent) {
1919

2020
// eslint-disable-next-line node/no-missing-require
2121
const {
22-
BinauthzManagementServiceV1Beta1Client,
22+
BinauthzManagementServiceV1Client,
2323
} = require('@google-cloud/binary-authorization');
2424

2525
// TODO(developer): replace with your prefered project ID.
2626
// const projectId = 'my-project'
2727

2828
// Creates a client
29-
const client = new BinauthzManagementServiceV1Beta1Client();
29+
const client = new BinauthzManagementServiceV1Client();
3030

3131
async function listAttestors() {
3232
const attestors = await client.listAttestors({parent});

samples/test/quickstart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
const cp = require('child_process');
2121
const {before, describe, it} = require('mocha');
2222
const {
23-
BinauthzManagementServiceV1Beta1Client,
23+
BinauthzManagementServiceV1Client,
2424
} = require('@google-cloud/binary-authorization');
2525
const {assert} = require('chai');
2626

@@ -30,7 +30,7 @@ describe('Quickstart', () => {
3030
let projectId;
3131

3232
before(async () => {
33-
const client = new BinauthzManagementServiceV1Beta1Client();
33+
const client = new BinauthzManagementServiceV1Client();
3434
projectId = await client.getProjectId();
3535
});
3636

src/index.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,26 @@
1919
import * as v1 from './v1';
2020
import * as v1beta1 from './v1beta1';
2121

22-
const BinauthzManagementServiceV1Beta1Client =
23-
v1beta1.BinauthzManagementServiceV1Beta1Client;
24-
type BinauthzManagementServiceV1Beta1Client =
25-
v1beta1.BinauthzManagementServiceV1Beta1Client;
26-
const SystemPolicyV1Beta1Client = v1beta1.SystemPolicyV1Beta1Client;
27-
type SystemPolicyV1Beta1Client = v1beta1.SystemPolicyV1Beta1Client;
22+
const BinauthzManagementServiceV1Client = v1.BinauthzManagementServiceV1Client;
23+
type BinauthzManagementServiceV1Client = v1.BinauthzManagementServiceV1Client;
24+
const SystemPolicyV1Client = v1.SystemPolicyV1Client;
25+
type SystemPolicyV1Client = v1.SystemPolicyV1Client;
26+
const ValidationHelperV1Client = v1.ValidationHelperV1Client;
27+
type ValidationHelperV1Client = v1.ValidationHelperV1Client;
2828

2929
export {
3030
v1,
3131
v1beta1,
32-
BinauthzManagementServiceV1Beta1Client,
33-
SystemPolicyV1Beta1Client,
32+
BinauthzManagementServiceV1Client,
33+
SystemPolicyV1Client,
34+
ValidationHelperV1Client,
3435
};
3536
export default {
3637
v1,
3738
v1beta1,
38-
BinauthzManagementServiceV1Beta1Client,
39-
SystemPolicyV1Beta1Client,
39+
BinauthzManagementServiceV1Client,
40+
SystemPolicyV1Client,
41+
ValidationHelperV1Client,
4042
};
4143
import * as protos from '../protos/protos';
4244
export {protos};

system-test/fixtures/sample/src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
const binaryauthorization = require('@google-cloud/binary-authorization');
2121

2222
function main() {
23-
const binauthzManagementServiceV1Beta1Client =
24-
new binaryauthorization.BinauthzManagementServiceV1Beta1Client();
25-
const systemPolicyV1Beta1Client =
26-
new binaryauthorization.SystemPolicyV1Beta1Client();
23+
const binauthzManagementServiceV1Client =
24+
new binaryauthorization.BinauthzManagementServiceV1Client();
25+
const systemPolicyV1Client = new binaryauthorization.SystemPolicyV1Client();
2726
}
2827

2928
main();

system-test/fixtures/sample/src/index.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,30 @@
1717
// ** All changes to this file may be overwritten. **
1818

1919
import {
20-
BinauthzManagementServiceV1Beta1Client,
21-
SystemPolicyV1Beta1Client,
20+
BinauthzManagementServiceV1Client,
21+
SystemPolicyV1Client,
2222
} from '@google-cloud/binary-authorization';
2323

2424
// check that the client class type name can be used
2525
function doStuffWithBinauthzManagementServiceV1Beta1Client(
26-
client: BinauthzManagementServiceV1Beta1Client
26+
client: BinauthzManagementServiceV1Client
2727
) {
2828
client.close();
2929
}
30-
function doStuffWithSystemPolicyV1Beta1Client(
31-
client: SystemPolicyV1Beta1Client
32-
) {
30+
function doStuffWithSystemPolicyV1Client(client: SystemPolicyV1Client) {
3331
client.close();
3432
}
3533

3634
function main() {
3735
// check that the client instance can be created
38-
const binauthzManagementServiceV1Beta1Client =
39-
new BinauthzManagementServiceV1Beta1Client();
36+
const binauthzManagementServiceV1Client =
37+
new BinauthzManagementServiceV1Client();
4038
doStuffWithBinauthzManagementServiceV1Beta1Client(
41-
binauthzManagementServiceV1Beta1Client
39+
binauthzManagementServiceV1Client
4240
);
4341
// check that the client instance can be created
44-
const systemPolicyV1Beta1Client = new SystemPolicyV1Beta1Client();
45-
doStuffWithSystemPolicyV1Beta1Client(systemPolicyV1Beta1Client);
42+
const systemPolicyV1Beta1Client = new SystemPolicyV1Client();
43+
doStuffWithSystemPolicyV1Client(systemPolicyV1Beta1Client);
4644
}
4745

4846
main();

0 commit comments

Comments
 (0)