Skip to content

Commit

Permalink
build: library of v1 showcase onboarded to SAM
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 428796832
  • Loading branch information
Google APIs authored and Copybara-Service committed Feb 15, 2022
1 parent 4f919d1 commit ea51465
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 20 deletions.
2 changes: 1 addition & 1 deletion google/example/showcase/v1/compliance.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
32 changes: 16 additions & 16 deletions google/example/showcase/v1/echo.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -105,6 +105,21 @@ service Echo {
}
}

// A severity enum used to test enum capabilities in GAPIC surfaces.
enum Severity {
// The severity is unnecessary.
UNNECESSARY = 0;

// The severity is necessary.
NECESSARY = 1;

// Urgent.
URGENT = 2;

// Critical.
CRITICAL = 3;
}

// The request message used for the Echo, Collect and Chat methods.
// If content or opt are set in this message then the request will succeed.
// If status is set in this message then the status will be returned as an
Expand All @@ -123,21 +138,6 @@ message EchoRequest {
Severity severity = 3;
}

// A severity enum used to test enum capabilities in GAPIC surfaces.
enum Severity {
// The severity is unnecessary.
UNNECESSARY = 0;

// The severity is necessary.
NECESSARY = 1;

// Urgent.
URGENT = 2;

// Critical.
CRITICAL = 3;
}

// The response message for the Echo methods.
message EchoResponse {
// The content specified in the request.
Expand Down
2 changes: 1 addition & 1 deletion google/example/showcase/v1/sequence.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
53 changes: 53 additions & 0 deletions google/example/showcase/v1/showcase_v1.yaml
@@ -0,0 +1,53 @@
type: google.api.Service
config_version: 3
name: showcase.googleapis.com
title: Client Libraries Showcase API

apis:
- name: google.example.showcase.v1.Compliance
- name: google.example.showcase.v1.Echo
- name: google.example.showcase.v1.SequenceService
- name: google.example.showcase.v1.Testing

documentation:
summary: |-
Showcase represents both a model API and an integration testing surface
for client library generator consumption.
rules:
- selector: google.cloud.location.Locations.GetLocation
description: Gets information about a location.

- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.

- selector: google.iam.v1.IAMPolicy.GetIamPolicy
description: |-
Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
description: |-
Sets the access control policy on the specified resource. Replaces
any existing policy.
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
errors.
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
description: |-
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a `NOT_FOUND` error.
Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
checking. This operation may "fail open" without warning.
backend:
rules:
- selector: google.cloud.location.Locations.GetLocation
deadline: 60.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 60.0
- selector: 'google.iam.v1.IAMPolicy.*'
deadline: 60.0
4 changes: 2 additions & 2 deletions google/example/showcase/v1/testing.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@ syntax = "proto3";
package google.example.showcase.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/client.proto";

option go_package = "github.com/googleapis/gapic-showcase/server/genproto";
option java_multiple_files = true;
Expand Down

0 comments on commit ea51465

Please sign in to comment.