Skip to content

Commit 79bec21

Browse files
Google APIscopybara-github
authored andcommitted
build: library of v1beta1 showcase onboarded to SAM
PiperOrigin-RevId: 428795675
1 parent e8fea5a commit 79bec21

5 files changed

Lines changed: 85 additions & 32 deletions

File tree

google/example/showcase/v1beta1/compliance.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/example/showcase/v1beta1/echo.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/example/showcase/v1beta1/sequence.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
type: google.api.Service
2+
config_version: 3
3+
name: showcase.googleapis.com
4+
title: Client Libraries Showcase API
5+
6+
apis:
7+
- name: google.example.showcase.v1beta1.Compliance
8+
- name: google.example.showcase.v1beta1.Echo
9+
- name: google.example.showcase.v1beta1.SequenceService
10+
- name: google.example.showcase.v1beta1.Testing
11+
12+
documentation:
13+
summary: |-
14+
Showcase represents both a model API and an integration testing surface
15+
for client library generator consumption.
16+
rules:
17+
- selector: google.cloud.location.Locations.GetLocation
18+
description: Gets information about a location.
19+
20+
- selector: google.cloud.location.Locations.ListLocations
21+
description: Lists information about the supported locations for this service.
22+
23+
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
24+
description: |-
25+
Gets the access control policy for a resource. Returns an empty policy
26+
if the resource exists and does not have a policy set.
27+
28+
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
29+
description: |-
30+
Sets the access control policy on the specified resource. Replaces
31+
any existing policy.
32+
33+
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
34+
errors.
35+
36+
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
37+
description: |-
38+
Returns permissions that a caller has on the specified resource. If the
39+
resource does not exist, this will return an empty set of
40+
permissions, not a `NOT_FOUND` error.
41+
42+
Note: This operation is designed to be used for building
43+
permission-aware UIs and command-line tools, not for authorization
44+
checking. This operation may "fail open" without warning.
45+
46+
backend:
47+
rules:
48+
- selector: google.cloud.location.Locations.GetLocation
49+
deadline: 60.0
50+
- selector: google.cloud.location.Locations.ListLocations
51+
deadline: 60.0
52+
- selector: 'google.iam.v1.IAMPolicy.*'
53+
deadline: 60.0

google/example/showcase/v1beta1/testing.proto

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -17,9 +17,9 @@ syntax = "proto3";
1717
package google.example.showcase.v1beta1;
1818

1919
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
2021
import "google/api/resource.proto";
2122
import "google/protobuf/empty.proto";
22-
import "google/api/client.proto";
2323

2424
option go_package = "github.com/googleapis/gapic-showcase/server/genproto";
2525
option java_multiple_files = true;
@@ -212,6 +212,33 @@ message Test {
212212
pattern: "sessions/{session}/tests/{test}"
213213
};
214214

215+
// Whether or not a test is required, recommended, or optional.
216+
enum ExpectationLevel {
217+
EXPECTATION_LEVEL_UNSPECIFIED = 0;
218+
219+
// This test is strictly required.
220+
REQUIRED = 1;
221+
222+
// This test is recommended.
223+
//
224+
// If a generator explicitly ignores a recommended test (see `DeleteTest`),
225+
// then the report may still pass, but with a warning.
226+
//
227+
// If a generator skips a recommended test and does not explicitly
228+
// express that intention, the report will fail.
229+
RECOMMENDED = 2;
230+
231+
// This test is optional.
232+
//
233+
// If a generator explicitly ignores an optional test (see `DeleteTest`),
234+
// then the report may still pass, and no warning will be issued.
235+
//
236+
// If a generator skips an optional test and does not explicitly
237+
// express that intention, the report may still pass, but with a
238+
// warning.
239+
OPTIONAL = 3;
240+
}
241+
215242
// A blueprint is an explicit definition of methods and requests that are
216243
// needed to be made to test this specific test case. Ideally this would be
217244
// represented by something more robust like CEL, but as of writing this, I am
@@ -244,33 +271,6 @@ message Test {
244271
repeated Invocation additional_requests = 4;
245272
}
246273

247-
// Whether or not a test is required, recommended, or optional.
248-
enum ExpectationLevel {
249-
EXPECTATION_LEVEL_UNSPECIFIED = 0;
250-
251-
// This test is strictly required.
252-
REQUIRED = 1;
253-
254-
// This test is recommended.
255-
//
256-
// If a generator explicitly ignores a recommended test (see `DeleteTest`),
257-
// then the report may still pass, but with a warning.
258-
//
259-
// If a generator skips a recommended test and does not explicitly
260-
// express that intention, the report will fail.
261-
RECOMMENDED = 2;
262-
263-
// This test is optional.
264-
//
265-
// If a generator explicitly ignores an optional test (see `DeleteTest`),
266-
// then the report may still pass, and no warning will be issued.
267-
//
268-
// If a generator skips an optional test and does not explicitly
269-
// express that intention, the report may still pass, but with a
270-
// warning.
271-
OPTIONAL = 3;
272-
}
273-
274274
// The name of the test.
275275
// The tests/* portion of the names are hard-coded, and do not change
276276
// from session to session.

0 commit comments

Comments
 (0)