David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 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 | |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 15 | // Code generated by protoc-gen-go. DO NOT EDIT. |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 16 | // versions: |
| 17 | // protoc-gen-go v1.26.0 |
| 18 | // protoc v3.12.2 |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 19 | // source: google/rpc/status.proto |
| 20 | |
divyadesai | 1900913 | 2020-03-04 12:58:08 +0000 | [diff] [blame] | 21 | package status |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 22 | |
divyadesai | 1900913 | 2020-03-04 12:58:08 +0000 | [diff] [blame] | 23 | import ( |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 24 | reflect "reflect" |
| 25 | sync "sync" |
divyadesai | 1900913 | 2020-03-04 12:58:08 +0000 | [diff] [blame] | 26 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 27 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 28 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 29 | anypb "google.golang.org/protobuf/types/known/anypb" |
divyadesai | 1900913 | 2020-03-04 12:58:08 +0000 | [diff] [blame] | 30 | ) |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 31 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 32 | const ( |
| 33 | // Verify that this generated code is sufficiently up-to-date. |
| 34 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 35 | // Verify that runtime/protoimpl is sufficiently up-to-date. |
| 36 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 37 | ) |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 38 | |
divyadesai | 1900913 | 2020-03-04 12:58:08 +0000 | [diff] [blame] | 39 | // The `Status` type defines a logical error model that is suitable for |
| 40 | // different programming environments, including REST APIs and RPC APIs. It is |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 41 | // used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 42 | // three pieces of data: error code, error message, and error details. |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 43 | // |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 44 | // You can find out more about this error model and how to work with it in the |
| 45 | // [API Design Guide](https://cloud.google.com/apis/design/errors). |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 46 | type Status struct { |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 47 | state protoimpl.MessageState |
| 48 | sizeCache protoimpl.SizeCache |
| 49 | unknownFields protoimpl.UnknownFields |
| 50 | |
| 51 | // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 52 | Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` |
| 53 | // A developer-facing error message, which should be in English. Any |
| 54 | // user-facing error message should be localized and sent in the |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 55 | // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 56 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` |
| 57 | // A list of messages that carry the error details. There is a common set of |
| 58 | // message types for APIs to use. |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 59 | Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 60 | } |
| 61 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 62 | func (x *Status) Reset() { |
| 63 | *x = Status{} |
| 64 | if protoimpl.UnsafeEnabled { |
| 65 | mi := &file_google_rpc_status_proto_msgTypes[0] |
| 66 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 67 | ms.StoreMessageInfo(mi) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func (x *Status) String() string { |
| 72 | return protoimpl.X.MessageStringOf(x) |
| 73 | } |
| 74 | |
| 75 | func (*Status) ProtoMessage() {} |
| 76 | |
| 77 | func (x *Status) ProtoReflect() protoreflect.Message { |
| 78 | mi := &file_google_rpc_status_proto_msgTypes[0] |
| 79 | if protoimpl.UnsafeEnabled && x != nil { |
| 80 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 81 | if ms.LoadMessageInfo() == nil { |
| 82 | ms.StoreMessageInfo(mi) |
| 83 | } |
| 84 | return ms |
| 85 | } |
| 86 | return mi.MessageOf(x) |
| 87 | } |
| 88 | |
| 89 | // Deprecated: Use Status.ProtoReflect.Descriptor instead. |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 90 | func (*Status) Descriptor() ([]byte, []int) { |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 91 | return file_google_rpc_status_proto_rawDescGZIP(), []int{0} |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 92 | } |
divyadesai | 1900913 | 2020-03-04 12:58:08 +0000 | [diff] [blame] | 93 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 94 | func (x *Status) GetCode() int32 { |
| 95 | if x != nil { |
| 96 | return x.Code |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 97 | } |
| 98 | return 0 |
| 99 | } |
| 100 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 101 | func (x *Status) GetMessage() string { |
| 102 | if x != nil { |
| 103 | return x.Message |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 104 | } |
| 105 | return "" |
| 106 | } |
| 107 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 108 | func (x *Status) GetDetails() []*anypb.Any { |
| 109 | if x != nil { |
| 110 | return x.Details |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 111 | } |
| 112 | return nil |
| 113 | } |
| 114 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 115 | var File_google_rpc_status_proto protoreflect.FileDescriptor |
| 116 | |
| 117 | var file_google_rpc_status_proto_rawDesc = []byte{ |
| 118 | 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, |
| 119 | 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, |
| 120 | 0x65, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, |
| 121 | 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 122 | 0x22, 0x66, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, |
| 123 | 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, |
| 124 | 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, |
| 125 | 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, |
| 126 | 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, |
| 127 | 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, |
| 128 | 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x61, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, |
| 129 | 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0b, 0x53, 0x74, 0x61, 0x74, |
| 130 | 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, |
| 131 | 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, |
| 132 | 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, |
| 133 | 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74, |
| 134 | 0x75, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, |
| 135 | 0x74, 0x6f, 0x33, |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 136 | } |
| 137 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 138 | var ( |
| 139 | file_google_rpc_status_proto_rawDescOnce sync.Once |
| 140 | file_google_rpc_status_proto_rawDescData = file_google_rpc_status_proto_rawDesc |
| 141 | ) |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 142 | |
David K. Bainbridge | bd6b288 | 2021-08-26 13:31:02 +0000 | [diff] [blame] | 143 | func file_google_rpc_status_proto_rawDescGZIP() []byte { |
| 144 | file_google_rpc_status_proto_rawDescOnce.Do(func() { |
| 145 | file_google_rpc_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_status_proto_rawDescData) |
| 146 | }) |
| 147 | return file_google_rpc_status_proto_rawDescData |
| 148 | } |
| 149 | |
| 150 | var file_google_rpc_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 151 | var file_google_rpc_status_proto_goTypes = []interface{}{ |
| 152 | (*Status)(nil), // 0: google.rpc.Status |
| 153 | (*anypb.Any)(nil), // 1: google.protobuf.Any |
| 154 | } |
| 155 | var file_google_rpc_status_proto_depIdxs = []int32{ |
| 156 | 1, // 0: google.rpc.Status.details:type_name -> google.protobuf.Any |
| 157 | 1, // [1:1] is the sub-list for method output_type |
| 158 | 1, // [1:1] is the sub-list for method input_type |
| 159 | 1, // [1:1] is the sub-list for extension type_name |
| 160 | 1, // [1:1] is the sub-list for extension extendee |
| 161 | 0, // [0:1] is the sub-list for field type_name |
| 162 | } |
| 163 | |
| 164 | func init() { file_google_rpc_status_proto_init() } |
| 165 | func file_google_rpc_status_proto_init() { |
| 166 | if File_google_rpc_status_proto != nil { |
| 167 | return |
| 168 | } |
| 169 | if !protoimpl.UnsafeEnabled { |
| 170 | file_google_rpc_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 171 | switch v := v.(*Status); i { |
| 172 | case 0: |
| 173 | return &v.state |
| 174 | case 1: |
| 175 | return &v.sizeCache |
| 176 | case 2: |
| 177 | return &v.unknownFields |
| 178 | default: |
| 179 | return nil |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | type x struct{} |
| 184 | out := protoimpl.TypeBuilder{ |
| 185 | File: protoimpl.DescBuilder{ |
| 186 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 187 | RawDescriptor: file_google_rpc_status_proto_rawDesc, |
| 188 | NumEnums: 0, |
| 189 | NumMessages: 1, |
| 190 | NumExtensions: 0, |
| 191 | NumServices: 0, |
| 192 | }, |
| 193 | GoTypes: file_google_rpc_status_proto_goTypes, |
| 194 | DependencyIndexes: file_google_rpc_status_proto_depIdxs, |
| 195 | MessageInfos: file_google_rpc_status_proto_msgTypes, |
| 196 | }.Build() |
| 197 | File_google_rpc_status_proto = out.File |
| 198 | file_google_rpc_status_proto_rawDesc = nil |
| 199 | file_google_rpc_status_proto_goTypes = nil |
| 200 | file_google_rpc_status_proto_depIdxs = nil |
Zack Williams | e940c7a | 2019-08-21 14:25:39 -0700 | [diff] [blame] | 201 | } |