github.com/resonatecoop/user-api@v1.0.0-13.0.20220915120639-05dc9c04014a/proto/google/rpc/code/code.pb.go (about)

     1  // Copyright 2020 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.25.0-devel
    18  // 	protoc        v3.13.0
    19  // source: google/rpc/code.proto
    20  
    21  package code
    22  
    23  import (
    24  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    25  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    26  	reflect "reflect"
    27  	sync "sync"
    28  )
    29  
    30  const (
    31  	// Verify that this generated code is sufficiently up-to-date.
    32  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    33  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    34  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    35  )
    36  
    37  // The canonical error codes for gRPC APIs.
    38  //
    39  //
    40  // Sometimes multiple error codes may apply.  Services should return
    41  // the most specific error code that applies.  For example, prefer
    42  // `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
    43  // Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
    44  type Code int32
    45  
    46  const (
    47  	// Not an error; returned on success
    48  	//
    49  	// HTTP Mapping: 200 OK
    50  	Code_OK Code = 0
    51  	// The operation was cancelled, typically by the caller.
    52  	//
    53  	// HTTP Mapping: 499 Client Closed Request
    54  	Code_CANCELLED Code = 1
    55  	// Unknown error.  For example, this error may be returned when
    56  	// a `Status` value received from another address space belongs to
    57  	// an error space that is not known in this address space.  Also
    58  	// errors raised by APIs that do not return enough error information
    59  	// may be converted to this error.
    60  	//
    61  	// HTTP Mapping: 500 Internal Server Error
    62  	Code_UNKNOWN Code = 2
    63  	// The client specified an invalid argument.  Note that this differs
    64  	// from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
    65  	// that are problematic regardless of the state of the system
    66  	// (e.g., a malformed file name).
    67  	//
    68  	// HTTP Mapping: 400 Bad Request
    69  	Code_INVALID_ARGUMENT Code = 3
    70  	// The deadline expired before the operation could complete. For operations
    71  	// that change the state of the system, this error may be returned
    72  	// even if the operation has completed successfully.  For example, a
    73  	// successful response from a server could have been delayed long
    74  	// enough for the deadline to expire.
    75  	//
    76  	// HTTP Mapping: 504 Gateway Timeout
    77  	Code_DEADLINE_EXCEEDED Code = 4
    78  	// Some requested entity (e.g., file or directory) was not found.
    79  	//
    80  	// Note to server developers: if a request is denied for an entire class
    81  	// of users, such as gradual feature rollout or undocumented whitelist,
    82  	// `NOT_FOUND` may be used. If a request is denied for some users within
    83  	// a class of users, such as user-based access control, `PERMISSION_DENIED`
    84  	// must be used.
    85  	//
    86  	// HTTP Mapping: 404 Not Found
    87  	Code_NOT_FOUND Code = 5
    88  	// The entity that a client attempted to create (e.g., file or directory)
    89  	// already exists.
    90  	//
    91  	// HTTP Mapping: 409 Conflict
    92  	Code_ALREADY_EXISTS Code = 6
    93  	// The caller does not have permission to execute the specified
    94  	// operation. `PERMISSION_DENIED` must not be used for rejections
    95  	// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
    96  	// instead for those errors). `PERMISSION_DENIED` must not be
    97  	// used if the caller can not be identified (use `UNAUTHENTICATED`
    98  	// instead for those errors). This error code does not imply the
    99  	// request is valid or the requested entity exists or satisfies
   100  	// other pre-conditions.
   101  	//
   102  	// HTTP Mapping: 403 Forbidden
   103  	Code_PERMISSION_DENIED Code = 7
   104  	// The request does not have valid authentication credentials for the
   105  	// operation.
   106  	//
   107  	// HTTP Mapping: 401 Unauthorized
   108  	Code_UNAUTHENTICATED Code = 16
   109  	// Some resource has been exhausted, perhaps a per-user quota, or
   110  	// perhaps the entire file system is out of space.
   111  	//
   112  	// HTTP Mapping: 429 Too Many Requests
   113  	Code_RESOURCE_EXHAUSTED Code = 8
   114  	// The operation was rejected because the system is not in a state
   115  	// required for the operation's execution.  For example, the directory
   116  	// to be deleted is non-empty, an rmdir operation is applied to
   117  	// a non-directory, etc.
   118  	//
   119  	// Service implementors can use the following guidelines to decide
   120  	// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
   121  	//  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
   122  	//  (b) Use `ABORTED` if the client should retry at a higher level
   123  	//      (e.g., when a client-specified test-and-set fails, indicating the
   124  	//      client should restart a read-modify-write sequence).
   125  	//  (c) Use `FAILED_PRECONDITION` if the client should not retry until
   126  	//      the system state has been explicitly fixed.  E.g., if an "rmdir"
   127  	//      fails because the directory is non-empty, `FAILED_PRECONDITION`
   128  	//      should be returned since the client should not retry unless
   129  	//      the files are deleted from the directory.
   130  	//
   131  	// HTTP Mapping: 400 Bad Request
   132  	Code_FAILED_PRECONDITION Code = 9
   133  	// The operation was aborted, typically due to a concurrency issue such as
   134  	// a sequencer check failure or transaction abort.
   135  	//
   136  	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
   137  	// `ABORTED`, and `UNAVAILABLE`.
   138  	//
   139  	// HTTP Mapping: 409 Conflict
   140  	Code_ABORTED Code = 10
   141  	// The operation was attempted past the valid range.  E.g., seeking or
   142  	// reading past end-of-file.
   143  	//
   144  	// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
   145  	// be fixed if the system state changes. For example, a 32-bit file
   146  	// system will generate `INVALID_ARGUMENT` if asked to read at an
   147  	// offset that is not in the range [0,2^32-1], but it will generate
   148  	// `OUT_OF_RANGE` if asked to read from an offset past the current
   149  	// file size.
   150  	//
   151  	// There is a fair bit of overlap between `FAILED_PRECONDITION` and
   152  	// `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
   153  	// error) when it applies so that callers who are iterating through
   154  	// a space can easily look for an `OUT_OF_RANGE` error to detect when
   155  	// they are done.
   156  	//
   157  	// HTTP Mapping: 400 Bad Request
   158  	Code_OUT_OF_RANGE Code = 11
   159  	// The operation is not implemented or is not supported/enabled in this
   160  	// service.
   161  	//
   162  	// HTTP Mapping: 501 Not Implemented
   163  	Code_UNIMPLEMENTED Code = 12
   164  	// Internal errors.  This means that some invariants expected by the
   165  	// underlying system have been broken.  This error code is reserved
   166  	// for serious errors.
   167  	//
   168  	// HTTP Mapping: 500 Internal Server Error
   169  	Code_INTERNAL Code = 13
   170  	// The service is currently unavailable.  This is most likely a
   171  	// transient condition, which can be corrected by retrying with
   172  	// a backoff. Note that it is not always safe to retry
   173  	// non-idempotent operations.
   174  	//
   175  	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
   176  	// `ABORTED`, and `UNAVAILABLE`.
   177  	//
   178  	// HTTP Mapping: 503 Service Unavailable
   179  	Code_UNAVAILABLE Code = 14
   180  	// Unrecoverable data loss or corruption.
   181  	//
   182  	// HTTP Mapping: 500 Internal Server Error
   183  	Code_DATA_LOSS Code = 15
   184  )
   185  
   186  // Enum value maps for Code.
   187  var (
   188  	Code_name = map[int32]string{
   189  		0:  "OK",
   190  		1:  "CANCELLED",
   191  		2:  "UNKNOWN",
   192  		3:  "INVALID_ARGUMENT",
   193  		4:  "DEADLINE_EXCEEDED",
   194  		5:  "NOT_FOUND",
   195  		6:  "ALREADY_EXISTS",
   196  		7:  "PERMISSION_DENIED",
   197  		16: "UNAUTHENTICATED",
   198  		8:  "RESOURCE_EXHAUSTED",
   199  		9:  "FAILED_PRECONDITION",
   200  		10: "ABORTED",
   201  		11: "OUT_OF_RANGE",
   202  		12: "UNIMPLEMENTED",
   203  		13: "INTERNAL",
   204  		14: "UNAVAILABLE",
   205  		15: "DATA_LOSS",
   206  	}
   207  	Code_value = map[string]int32{
   208  		"OK":                  0,
   209  		"CANCELLED":           1,
   210  		"UNKNOWN":             2,
   211  		"INVALID_ARGUMENT":    3,
   212  		"DEADLINE_EXCEEDED":   4,
   213  		"NOT_FOUND":           5,
   214  		"ALREADY_EXISTS":      6,
   215  		"PERMISSION_DENIED":   7,
   216  		"UNAUTHENTICATED":     16,
   217  		"RESOURCE_EXHAUSTED":  8,
   218  		"FAILED_PRECONDITION": 9,
   219  		"ABORTED":             10,
   220  		"OUT_OF_RANGE":        11,
   221  		"UNIMPLEMENTED":       12,
   222  		"INTERNAL":            13,
   223  		"UNAVAILABLE":         14,
   224  		"DATA_LOSS":           15,
   225  	}
   226  )
   227  
   228  func (x Code) Enum() *Code {
   229  	p := new(Code)
   230  	*p = x
   231  	return p
   232  }
   233  
   234  func (x Code) String() string {
   235  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   236  }
   237  
   238  func (Code) Descriptor() protoreflect.EnumDescriptor {
   239  	return file_google_rpc_code_proto_enumTypes[0].Descriptor()
   240  }
   241  
   242  func (Code) Type() protoreflect.EnumType {
   243  	return &file_google_rpc_code_proto_enumTypes[0]
   244  }
   245  
   246  func (x Code) Number() protoreflect.EnumNumber {
   247  	return protoreflect.EnumNumber(x)
   248  }
   249  
   250  // Deprecated: Use Code.Descriptor instead.
   251  func (Code) EnumDescriptor() ([]byte, []int) {
   252  	return file_google_rpc_code_proto_rawDescGZIP(), []int{0}
   253  }
   254  
   255  var File_google_rpc_code_proto protoreflect.FileDescriptor
   256  
   257  var file_google_rpc_code_proto_rawDesc = []byte{
   258  	0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64,
   259  	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
   260  	0x72, 0x70, 0x63, 0x2a, 0xb7, 0x02, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02,
   261  	0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45,
   262  	0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02,
   263  	0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55,
   264  	0x4d, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49,
   265  	0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a,
   266  	0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e,
   267  	0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x06,
   268  	0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44,
   269  	0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x55, 0x54,
   270  	0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x10, 0x12, 0x16, 0x0a, 0x12,
   271  	0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, 0x55, 0x53, 0x54,
   272  	0x45, 0x44, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50,
   273  	0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a,
   274  	0x07, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55,
   275  	0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d,
   276  	0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x12,
   277  	0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x0f, 0x0a,
   278  	0x0b, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, 0x0d,
   279  	0x0a, 0x09, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, 0x42, 0x58, 0x0a,
   280  	0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42,
   281  	0x09, 0x43, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x6f,
   282  	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
   283  	0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
   284  	0x70, 0x69, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x3b, 0x63, 0x6f, 0x64,
   285  	0x65, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   286  }
   287  
   288  var (
   289  	file_google_rpc_code_proto_rawDescOnce sync.Once
   290  	file_google_rpc_code_proto_rawDescData = file_google_rpc_code_proto_rawDesc
   291  )
   292  
   293  func file_google_rpc_code_proto_rawDescGZIP() []byte {
   294  	file_google_rpc_code_proto_rawDescOnce.Do(func() {
   295  		file_google_rpc_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_code_proto_rawDescData)
   296  	})
   297  	return file_google_rpc_code_proto_rawDescData
   298  }
   299  
   300  var file_google_rpc_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   301  var file_google_rpc_code_proto_goTypes = []interface{}{
   302  	(Code)(0), // 0: google.rpc.Code
   303  }
   304  var file_google_rpc_code_proto_depIdxs = []int32{
   305  	0, // [0:0] is the sub-list for method output_type
   306  	0, // [0:0] is the sub-list for method input_type
   307  	0, // [0:0] is the sub-list for extension type_name
   308  	0, // [0:0] is the sub-list for extension extendee
   309  	0, // [0:0] is the sub-list for field type_name
   310  }
   311  
   312  func init() { file_google_rpc_code_proto_init() }
   313  func file_google_rpc_code_proto_init() {
   314  	if File_google_rpc_code_proto != nil {
   315  		return
   316  	}
   317  	type x struct{}
   318  	out := protoimpl.TypeBuilder{
   319  		File: protoimpl.DescBuilder{
   320  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   321  			RawDescriptor: file_google_rpc_code_proto_rawDesc,
   322  			NumEnums:      1,
   323  			NumMessages:   0,
   324  			NumExtensions: 0,
   325  			NumServices:   0,
   326  		},
   327  		GoTypes:           file_google_rpc_code_proto_goTypes,
   328  		DependencyIndexes: file_google_rpc_code_proto_depIdxs,
   329  		EnumInfos:         file_google_rpc_code_proto_enumTypes,
   330  	}.Build()
   331  	File_google_rpc_code_proto = out.File
   332  	file_google_rpc_code_proto_rawDesc = nil
   333  	file_google_rpc_code_proto_goTypes = nil
   334  	file_google_rpc_code_proto_depIdxs = nil
   335  }