mirror of
https://github.com/googleapis/googleapis.git
synced 2026-08-19 13:17:47 +02:00
138 lines
4.1 KiB
Protocol Buffer
138 lines
4.1 KiB
Protocol Buffer
// 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.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
syntax = "proto3";
|
|
|
|
package google.example.showcase.v1beta2;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "google/api/client.proto";
|
|
import "google/api/field_behavior.proto";
|
|
import "google/api/resource.proto";
|
|
import "google/protobuf/duration.proto";
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/rpc/status.proto";
|
|
|
|
option go_package = "github.com/googleapis/gapic-showcase/server/genproto";
|
|
option java_multiple_files = true;
|
|
option java_outer_classname = "SequenceProto";
|
|
option java_package = "com.google.example.showcase.v1beta2s";
|
|
option ruby_package = "Google::Showcase::V1Beta2";
|
|
|
|
service SequenceService {
|
|
option (google.api.default_host) = "showcase.googleapis.com";
|
|
|
|
// Creates a sequence.
|
|
rpc CreateSequence(CreateSequenceRequest) returns (Sequence) {
|
|
option (google.api.http) = {
|
|
post: "/v1beta2/sequences"
|
|
body: "sequence"
|
|
};
|
|
option (google.api.method_signature) = "sequence";
|
|
}
|
|
|
|
// Retrieves a sequence.
|
|
rpc GetSequenceReport(GetSequenceReportRequest) returns (SequenceReport) {
|
|
option (google.api.http) = {
|
|
get: "/v1beta2/{name=sequences/*/sequenceReport}"
|
|
};
|
|
option (google.api.method_signature) = "name";
|
|
}
|
|
|
|
// Attempts a sequence.
|
|
rpc AttemptSequence(AttemptSequenceRequest) returns (google.protobuf.Empty) {
|
|
option (google.api.http) = {
|
|
post: "/v1beta2/{name=sequences/*}"
|
|
body: "*"
|
|
};
|
|
option (google.api.method_signature) = "name";
|
|
}
|
|
}
|
|
|
|
message Sequence {
|
|
option (google.api.resource) = {
|
|
type: "showcase.googleapis.com/Sequence"
|
|
pattern: "sequences/{sequence}"
|
|
};
|
|
|
|
// A server response to an RPC Attempt in a sequence.
|
|
message Response {
|
|
// The status to return for an individual attempt.
|
|
google.rpc.Status status = 1;
|
|
|
|
// The amount of time to delay sending the response.
|
|
google.protobuf.Duration delay = 2;
|
|
}
|
|
|
|
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
|
|
// Sequence of responses to return in order for each attempt. If empty, the
|
|
// default response is an immediate OK.
|
|
repeated Response responses = 2;
|
|
}
|
|
|
|
message SequenceReport {
|
|
option (google.api.resource) = {
|
|
type: "showcase.googleapis.com/SequenceReport"
|
|
pattern: "sequences/{sequence}/sequenceReport"
|
|
};
|
|
|
|
// Contains metrics on individual RPC Attempts in a sequence.
|
|
message Attempt {
|
|
// The attempt number - starting at 0.
|
|
int32 attempt_number = 1;
|
|
|
|
// The deadline dictated by the attempt to the server.
|
|
google.protobuf.Timestamp attempt_deadline = 2;
|
|
|
|
// The time that the server responded to the RPC attempt. Used for
|
|
// calculating attempt_delay.
|
|
google.protobuf.Timestamp response_time = 3;
|
|
|
|
// The server perceived delay between sending the last response and
|
|
// receiving this attempt. Used for validating attempt delay backoff.
|
|
google.protobuf.Duration attempt_delay = 4;
|
|
|
|
// The status returned to the attempt.
|
|
google.rpc.Status status = 5;
|
|
}
|
|
|
|
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
|
|
// The set of RPC attempts received by the server for a Sequence.
|
|
repeated Attempt attempts = 2;
|
|
}
|
|
|
|
message CreateSequenceRequest {
|
|
Sequence sequence = 1;
|
|
}
|
|
|
|
message AttemptSequenceRequest {
|
|
string name = 1 [
|
|
(google.api.field_behavior) = REQUIRED,
|
|
(google.api.resource_reference) = {
|
|
type: "showcase.googleapis.com/Sequence"
|
|
}
|
|
];
|
|
}
|
|
|
|
message GetSequenceReportRequest {
|
|
string name = 1 [
|
|
(google.api.field_behavior) = REQUIRED,
|
|
(google.api.resource_reference) = {
|
|
type: "showcase.googleapis.com/SequenceReport"
|
|
}
|
|
];
|
|
}
|