github.com/onosproject/onos-api/go@v0.10.32/onos/config/v2/failure.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/config/v2/failure.proto 3 4 package v2 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 type Failure_Type int32 26 27 const ( 28 // UNKNOWN unknown failure 29 Failure_UNKNOWN Failure_Type = 0 30 // CANCELED 31 Failure_CANCELED Failure_Type = 1 32 // NOT_FOUND 33 Failure_NOT_FOUND Failure_Type = 2 34 // ALREADY_EXISTS 35 Failure_ALREADY_EXISTS Failure_Type = 3 36 // UNAUTHORIZED 37 Failure_UNAUTHORIZED Failure_Type = 4 38 // FORBIDDEN 39 Failure_FORBIDDEN Failure_Type = 5 40 // CONFLICT 41 Failure_CONFLICT Failure_Type = 6 42 // INVALID 43 Failure_INVALID Failure_Type = 7 44 // UNAVAILABLE 45 Failure_UNAVAILABLE Failure_Type = 8 46 // NOT_SUPPORTED 47 Failure_NOT_SUPPORTED Failure_Type = 9 48 // TIMEOUT 49 Failure_TIMEOUT Failure_Type = 10 50 // INTERNAL 51 Failure_INTERNAL Failure_Type = 11 52 ) 53 54 var Failure_Type_name = map[int32]string{ 55 0: "UNKNOWN", 56 1: "CANCELED", 57 2: "NOT_FOUND", 58 3: "ALREADY_EXISTS", 59 4: "UNAUTHORIZED", 60 5: "FORBIDDEN", 61 6: "CONFLICT", 62 7: "INVALID", 63 8: "UNAVAILABLE", 64 9: "NOT_SUPPORTED", 65 10: "TIMEOUT", 66 11: "INTERNAL", 67 } 68 69 var Failure_Type_value = map[string]int32{ 70 "UNKNOWN": 0, 71 "CANCELED": 1, 72 "NOT_FOUND": 2, 73 "ALREADY_EXISTS": 3, 74 "UNAUTHORIZED": 4, 75 "FORBIDDEN": 5, 76 "CONFLICT": 6, 77 "INVALID": 7, 78 "UNAVAILABLE": 8, 79 "NOT_SUPPORTED": 9, 80 "TIMEOUT": 10, 81 "INTERNAL": 11, 82 } 83 84 func (x Failure_Type) String() string { 85 return proto.EnumName(Failure_Type_name, int32(x)) 86 } 87 88 func (Failure_Type) EnumDescriptor() ([]byte, []int) { 89 return fileDescriptor_c40c1f7ed145316e, []int{0, 0} 90 } 91 92 // Failure transaction failure type and description 93 type Failure struct { 94 Type Failure_Type `protobuf:"varint,1,opt,name=type,proto3,enum=onos.config.v2.Failure_Type" json:"type,omitempty"` 95 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 96 } 97 98 func (m *Failure) Reset() { *m = Failure{} } 99 func (m *Failure) String() string { return proto.CompactTextString(m) } 100 func (*Failure) ProtoMessage() {} 101 func (*Failure) Descriptor() ([]byte, []int) { 102 return fileDescriptor_c40c1f7ed145316e, []int{0} 103 } 104 func (m *Failure) XXX_Unmarshal(b []byte) error { 105 return m.Unmarshal(b) 106 } 107 func (m *Failure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 108 if deterministic { 109 return xxx_messageInfo_Failure.Marshal(b, m, deterministic) 110 } else { 111 b = b[:cap(b)] 112 n, err := m.MarshalToSizedBuffer(b) 113 if err != nil { 114 return nil, err 115 } 116 return b[:n], nil 117 } 118 } 119 func (m *Failure) XXX_Merge(src proto.Message) { 120 xxx_messageInfo_Failure.Merge(m, src) 121 } 122 func (m *Failure) XXX_Size() int { 123 return m.Size() 124 } 125 func (m *Failure) XXX_DiscardUnknown() { 126 xxx_messageInfo_Failure.DiscardUnknown(m) 127 } 128 129 var xxx_messageInfo_Failure proto.InternalMessageInfo 130 131 func (m *Failure) GetType() Failure_Type { 132 if m != nil { 133 return m.Type 134 } 135 return Failure_UNKNOWN 136 } 137 138 func (m *Failure) GetDescription() string { 139 if m != nil { 140 return m.Description 141 } 142 return "" 143 } 144 145 func init() { 146 proto.RegisterEnum("onos.config.v2.Failure_Type", Failure_Type_name, Failure_Type_value) 147 proto.RegisterType((*Failure)(nil), "onos.config.v2.Failure") 148 } 149 150 func init() { proto.RegisterFile("onos/config/v2/failure.proto", fileDescriptor_c40c1f7ed145316e) } 151 152 var fileDescriptor_c40c1f7ed145316e = []byte{ 153 // 325 bytes of a gzipped FileDescriptorProto 154 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xcd, 0x4e, 0x32, 0x31, 155 0x18, 0x85, 0xa7, 0x7c, 0x7c, 0xfc, 0x74, 0x00, 0x6b, 0x57, 0x2c, 0xc8, 0x84, 0xb0, 0x62, 0x35, 156 0x18, 0xbc, 0x82, 0x42, 0x3b, 0xb1, 0xb1, 0xb6, 0xa4, 0xb4, 0xf8, 0xb3, 0x21, 0x8a, 0x83, 0x99, 157 0xc4, 0x30, 0x13, 0x40, 0x12, 0xee, 0xc2, 0x3b, 0xf0, 0x52, 0xdc, 0xba, 0x64, 0xe9, 0xd2, 0xc0, 158 0x8d, 0x98, 0x0e, 0x2e, 0x74, 0xfb, 0x9e, 0xe7, 0x39, 0x27, 0x79, 0x61, 0x2b, 0x5d, 0xa4, 0xab, 159 0xde, 0x2c, 0x5d, 0xcc, 0x93, 0xa7, 0xde, 0xa6, 0xdf, 0x9b, 0xdf, 0x27, 0xcf, 0x2f, 0xcb, 0x38, 160 0xcc, 0x96, 0xe9, 0x3a, 0xc5, 0x0d, 0x97, 0x86, 0xc7, 0x34, 0xdc, 0xf4, 0x3b, 0x6f, 0x05, 0x58, 161 0x8e, 0x8e, 0x04, 0x3e, 0x83, 0xc5, 0xf5, 0x36, 0x8b, 0x9b, 0xa0, 0x0d, 0xba, 0x8d, 0x7e, 0x2b, 162 0xfc, 0x8b, 0x86, 0x3f, 0x58, 0x68, 0xb6, 0x59, 0xac, 0x73, 0x12, 0xb7, 0xa1, 0xff, 0x18, 0xaf, 163 0x66, 0xcb, 0x24, 0x5b, 0x27, 0xe9, 0xa2, 0x59, 0x68, 0x83, 0x6e, 0x55, 0xff, 0x3e, 0x75, 0xde, 164 0x01, 0x2c, 0x3a, 0x01, 0xfb, 0xb0, 0x6c, 0xe5, 0xa5, 0x54, 0xd7, 0x12, 0x79, 0xb8, 0x06, 0x2b, 165 0x43, 0x22, 0x87, 0x4c, 0x30, 0x8a, 0x00, 0xae, 0xc3, 0xaa, 0x54, 0x66, 0x1a, 0x29, 0x2b, 0x29, 166 0x2a, 0x60, 0x0c, 0x1b, 0x44, 0x68, 0x46, 0xe8, 0xed, 0x94, 0xdd, 0xf0, 0xb1, 0x19, 0xa3, 0x7f, 167 0x18, 0xc1, 0x9a, 0x95, 0xc4, 0x9a, 0x0b, 0xa5, 0xf9, 0x1d, 0xa3, 0xa8, 0xe8, 0xa4, 0x48, 0xe9, 168 0x01, 0xa7, 0x94, 0x49, 0xf4, 0x3f, 0x6f, 0x54, 0x32, 0x12, 0x7c, 0x68, 0x50, 0xc9, 0x8d, 0x71, 169 0x39, 0x21, 0x82, 0x53, 0x54, 0xc6, 0x27, 0xd0, 0xb7, 0x92, 0x4c, 0x08, 0x17, 0x64, 0x20, 0x18, 170 0xaa, 0xe0, 0x53, 0x58, 0x77, 0x7b, 0x63, 0x3b, 0x1a, 0x29, 0x6d, 0x18, 0x45, 0x55, 0x27, 0x18, 171 0x7e, 0xc5, 0x94, 0x35, 0x08, 0xba, 0x2e, 0x2e, 0x0d, 0xd3, 0x92, 0x08, 0xe4, 0x0f, 0x9a, 0x1f, 172 0xfb, 0x00, 0xec, 0xf6, 0x01, 0xf8, 0xda, 0x07, 0xe0, 0xf5, 0x10, 0x78, 0xbb, 0x43, 0xe0, 0x7d, 173 0x1e, 0x02, 0xef, 0xa1, 0x94, 0xbf, 0xf4, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xf5, 0x30, 174 0x6c, 0x72, 0x01, 0x00, 0x00, 175 } 176 177 func (m *Failure) Marshal() (dAtA []byte, err error) { 178 size := m.Size() 179 dAtA = make([]byte, size) 180 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 181 if err != nil { 182 return nil, err 183 } 184 return dAtA[:n], nil 185 } 186 187 func (m *Failure) MarshalTo(dAtA []byte) (int, error) { 188 size := m.Size() 189 return m.MarshalToSizedBuffer(dAtA[:size]) 190 } 191 192 func (m *Failure) MarshalToSizedBuffer(dAtA []byte) (int, error) { 193 i := len(dAtA) 194 _ = i 195 var l int 196 _ = l 197 if len(m.Description) > 0 { 198 i -= len(m.Description) 199 copy(dAtA[i:], m.Description) 200 i = encodeVarintFailure(dAtA, i, uint64(len(m.Description))) 201 i-- 202 dAtA[i] = 0x12 203 } 204 if m.Type != 0 { 205 i = encodeVarintFailure(dAtA, i, uint64(m.Type)) 206 i-- 207 dAtA[i] = 0x8 208 } 209 return len(dAtA) - i, nil 210 } 211 212 func encodeVarintFailure(dAtA []byte, offset int, v uint64) int { 213 offset -= sovFailure(v) 214 base := offset 215 for v >= 1<<7 { 216 dAtA[offset] = uint8(v&0x7f | 0x80) 217 v >>= 7 218 offset++ 219 } 220 dAtA[offset] = uint8(v) 221 return base 222 } 223 func (m *Failure) Size() (n int) { 224 if m == nil { 225 return 0 226 } 227 var l int 228 _ = l 229 if m.Type != 0 { 230 n += 1 + sovFailure(uint64(m.Type)) 231 } 232 l = len(m.Description) 233 if l > 0 { 234 n += 1 + l + sovFailure(uint64(l)) 235 } 236 return n 237 } 238 239 func sovFailure(x uint64) (n int) { 240 return (math_bits.Len64(x|1) + 6) / 7 241 } 242 func sozFailure(x uint64) (n int) { 243 return sovFailure(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 244 } 245 func (m *Failure) Unmarshal(dAtA []byte) error { 246 l := len(dAtA) 247 iNdEx := 0 248 for iNdEx < l { 249 preIndex := iNdEx 250 var wire uint64 251 for shift := uint(0); ; shift += 7 { 252 if shift >= 64 { 253 return ErrIntOverflowFailure 254 } 255 if iNdEx >= l { 256 return io.ErrUnexpectedEOF 257 } 258 b := dAtA[iNdEx] 259 iNdEx++ 260 wire |= uint64(b&0x7F) << shift 261 if b < 0x80 { 262 break 263 } 264 } 265 fieldNum := int32(wire >> 3) 266 wireType := int(wire & 0x7) 267 if wireType == 4 { 268 return fmt.Errorf("proto: Failure: wiretype end group for non-group") 269 } 270 if fieldNum <= 0 { 271 return fmt.Errorf("proto: Failure: illegal tag %d (wire type %d)", fieldNum, wire) 272 } 273 switch fieldNum { 274 case 1: 275 if wireType != 0 { 276 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 277 } 278 m.Type = 0 279 for shift := uint(0); ; shift += 7 { 280 if shift >= 64 { 281 return ErrIntOverflowFailure 282 } 283 if iNdEx >= l { 284 return io.ErrUnexpectedEOF 285 } 286 b := dAtA[iNdEx] 287 iNdEx++ 288 m.Type |= Failure_Type(b&0x7F) << shift 289 if b < 0x80 { 290 break 291 } 292 } 293 case 2: 294 if wireType != 2 { 295 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 296 } 297 var stringLen uint64 298 for shift := uint(0); ; shift += 7 { 299 if shift >= 64 { 300 return ErrIntOverflowFailure 301 } 302 if iNdEx >= l { 303 return io.ErrUnexpectedEOF 304 } 305 b := dAtA[iNdEx] 306 iNdEx++ 307 stringLen |= uint64(b&0x7F) << shift 308 if b < 0x80 { 309 break 310 } 311 } 312 intStringLen := int(stringLen) 313 if intStringLen < 0 { 314 return ErrInvalidLengthFailure 315 } 316 postIndex := iNdEx + intStringLen 317 if postIndex < 0 { 318 return ErrInvalidLengthFailure 319 } 320 if postIndex > l { 321 return io.ErrUnexpectedEOF 322 } 323 m.Description = string(dAtA[iNdEx:postIndex]) 324 iNdEx = postIndex 325 default: 326 iNdEx = preIndex 327 skippy, err := skipFailure(dAtA[iNdEx:]) 328 if err != nil { 329 return err 330 } 331 if (skippy < 0) || (iNdEx+skippy) < 0 { 332 return ErrInvalidLengthFailure 333 } 334 if (iNdEx + skippy) > l { 335 return io.ErrUnexpectedEOF 336 } 337 iNdEx += skippy 338 } 339 } 340 341 if iNdEx > l { 342 return io.ErrUnexpectedEOF 343 } 344 return nil 345 } 346 func skipFailure(dAtA []byte) (n int, err error) { 347 l := len(dAtA) 348 iNdEx := 0 349 depth := 0 350 for iNdEx < l { 351 var wire uint64 352 for shift := uint(0); ; shift += 7 { 353 if shift >= 64 { 354 return 0, ErrIntOverflowFailure 355 } 356 if iNdEx >= l { 357 return 0, io.ErrUnexpectedEOF 358 } 359 b := dAtA[iNdEx] 360 iNdEx++ 361 wire |= (uint64(b) & 0x7F) << shift 362 if b < 0x80 { 363 break 364 } 365 } 366 wireType := int(wire & 0x7) 367 switch wireType { 368 case 0: 369 for shift := uint(0); ; shift += 7 { 370 if shift >= 64 { 371 return 0, ErrIntOverflowFailure 372 } 373 if iNdEx >= l { 374 return 0, io.ErrUnexpectedEOF 375 } 376 iNdEx++ 377 if dAtA[iNdEx-1] < 0x80 { 378 break 379 } 380 } 381 case 1: 382 iNdEx += 8 383 case 2: 384 var length int 385 for shift := uint(0); ; shift += 7 { 386 if shift >= 64 { 387 return 0, ErrIntOverflowFailure 388 } 389 if iNdEx >= l { 390 return 0, io.ErrUnexpectedEOF 391 } 392 b := dAtA[iNdEx] 393 iNdEx++ 394 length |= (int(b) & 0x7F) << shift 395 if b < 0x80 { 396 break 397 } 398 } 399 if length < 0 { 400 return 0, ErrInvalidLengthFailure 401 } 402 iNdEx += length 403 case 3: 404 depth++ 405 case 4: 406 if depth == 0 { 407 return 0, ErrUnexpectedEndOfGroupFailure 408 } 409 depth-- 410 case 5: 411 iNdEx += 4 412 default: 413 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 414 } 415 if iNdEx < 0 { 416 return 0, ErrInvalidLengthFailure 417 } 418 if depth == 0 { 419 return iNdEx, nil 420 } 421 } 422 return 0, io.ErrUnexpectedEOF 423 } 424 425 var ( 426 ErrInvalidLengthFailure = fmt.Errorf("proto: negative length found during unmarshaling") 427 ErrIntOverflowFailure = fmt.Errorf("proto: integer overflow") 428 ErrUnexpectedEndOfGroupFailure = fmt.Errorf("proto: unexpected end of group") 429 )