Skip to content

Commit ea51465

Browse files
Google APIscopybara-github
authored andcommitted
build: library of v1 showcase onboarded to SAM
PiperOrigin-RevId: 428796832
1 parent 4f919d1 commit ea51465

5 files changed

Lines changed: 73 additions & 20 deletions

File tree

google/example/showcase/v1/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/v1/echo.proto

Lines changed: 16 additions & 16 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.
@@ -105,6 +105,21 @@ service Echo {
105105
}
106106
}
107107

108+
// A severity enum used to test enum capabilities in GAPIC surfaces.
109+
enum Severity {
110+
// The severity is unnecessary.
111+
UNNECESSARY = 0;
112+
113+
// The severity is necessary.
114+
NECESSARY = 1;
115+
116+
// Urgent.
117+
URGENT = 2;
118+
119+
// Critical.
120+
CRITICAL = 3;
121+
}
122+
108123
// The request message used for the Echo, Collect and Chat methods.
109124
// If content or opt are set in this message then the request will succeed.
110125
// If status is set in this message then the status will be returned as an
@@ -123,21 +138,6 @@ message EchoRequest {
123138
Severity severity = 3;
124139
}
125140

126-
// A severity enum used to test enum capabilities in GAPIC surfaces.
127-
enum Severity {
128-
// The severity is unnecessary.
129-
UNNECESSARY = 0;
130-
131-
// The severity is necessary.
132-
NECESSARY = 1;
133-
134-
// Urgent.
135-
URGENT = 2;
136-
137-
// Critical.
138-
CRITICAL = 3;
139-
}
140-
141141
// The response message for the Echo methods.
142142
message EchoResponse {
143143
// The content specified in the request.

google/example/showcase/v1/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.v1.Compliance
8+
- name: google.example.showcase.v1.Echo
9+
- name: google.example.showcase.v1.SequenceService
10+
- name: google.example.showcase.v1.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/v1/testing.proto

Lines changed: 2 additions & 2 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.v1;
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;

0 commit comments

Comments
 (0)