Synchronize new proto changes.
This commit is contained in:
parent
5cf7f5a302
commit
1e72437343
|
|
@ -1,5 +1,5 @@
|
|||
# Google RPC
|
||||
|
||||
This package contains type definitions for general RPC systems. While
|
||||
[gRPC](https://github.com/grpc) is using these defintions, but they
|
||||
are not designed specifically to support gRPC.
|
||||
[gRPC](https://github.com/grpc) is using these defintions, they
|
||||
are not designed specifically to support gRPC.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015, Google Inc.
|
||||
// Copyright 2016 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -16,17 +16,15 @@ syntax = "proto3";
|
|||
|
||||
package google.rpc;
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/rpc/code;code";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "CodeProto";
|
||||
option java_package = "com.google.rpc";
|
||||
option objc_class_prefix = "RPC";
|
||||
|
||||
|
||||
// The canonical error codes for Google APIs.
|
||||
// Warnings:
|
||||
//
|
||||
// - Do not change any numeric assignments.
|
||||
// - Changes to this list should be made only if there is a compelling
|
||||
// need that can't be satisfied in another way.
|
||||
//
|
||||
// Sometimes multiple error codes may apply. Services should return
|
||||
// the most specific error code that applies. For example, prefer
|
||||
|
|
@ -70,8 +68,9 @@ enum Code {
|
|||
DEADLINE_EXCEEDED = 4;
|
||||
|
||||
// Some requested entity (e.g., file or directory) was not found.
|
||||
// For privacy reasons, this code *might* be returned when the client
|
||||
// does not have the access rights to the entity.
|
||||
// For privacy reasons, this code *may* be returned when the client
|
||||
// does not have the access rights to the entity, though such usage is
|
||||
// discouraged.
|
||||
//
|
||||
// HTTP Mapping: 404 Not Found
|
||||
NOT_FOUND = 5;
|
||||
|
|
@ -119,17 +118,8 @@ enum Code {
|
|||
// fails because the directory is non-empty, `FAILED_PRECONDITION`
|
||||
// should be returned since the client should not retry unless
|
||||
// the files are deleted from the directory.
|
||||
// (d) Use `FAILED_PRECONDITION` if the client performs conditional
|
||||
// REST Get/Update/Delete on a resource and the resource on the
|
||||
// server does not match the condition. E.g., conflicting
|
||||
// read-modify-write on the same resource.
|
||||
//
|
||||
// HTTP Mapping: 400 Bad Request
|
||||
//
|
||||
// NOTE: HTTP spec says `412 Precondition Failed` should be used only if
|
||||
// the request contains Etag-related headers. So if the server does see
|
||||
// Etag-related headers in the request, it may choose to return 412
|
||||
// instead of 400 for this error code.
|
||||
FAILED_PRECONDITION = 9;
|
||||
|
||||
// The operation was aborted, typically due to a concurrency issue such as
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015, Google Inc.
|
||||
// Copyright 2016 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -18,9 +18,11 @@ package google.rpc;
|
|||
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ErrorDetailsProto";
|
||||
option java_package = "com.google.rpc";
|
||||
option objc_class_prefix = "RPC";
|
||||
|
||||
|
||||
// Describes when the clients can retry a failed request. Clients could ignore
|
||||
|
|
@ -91,7 +93,7 @@ message BadRequest {
|
|||
message FieldViolation {
|
||||
// A path leading to a field in the request body. The value will be a
|
||||
// sequence of dot-separated identifiers that identify a protocol buffer
|
||||
// field. E.g., "violations.field" would identify this field.
|
||||
// field. E.g., "field_violations.field" would identify this field.
|
||||
string field = 1;
|
||||
|
||||
// A description of why the request element is bad.
|
||||
|
|
@ -155,3 +157,15 @@ message Help {
|
|||
// URL(s) pointing to additional information on handling the current error.
|
||||
repeated Link links = 1;
|
||||
}
|
||||
|
||||
// Provides a localized error message that is safe to return to the user
|
||||
// which can be attached to an RPC error.
|
||||
message LocalizedMessage {
|
||||
// The locale used following the specification defined at
|
||||
// http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
|
||||
// Examples are: "en-US", "fr-CH", "es-MX"
|
||||
string locale = 1;
|
||||
|
||||
// The localized error message in the above locale.
|
||||
string message = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015, Google Inc.
|
||||
// Copyright 2016 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -18,9 +18,11 @@ package google.rpc;
|
|||
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "StatusProto";
|
||||
option java_package = "com.google.rpc";
|
||||
option objc_class_prefix = "RPC";
|
||||
|
||||
|
||||
// The `Status` type defines a logical error model that is suitable for different
|
||||
|
|
|
|||
Loading…
Reference in New Issue