1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: mixer/adapter/model/v1beta1/template.proto 3 4package v1beta1 5 6import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 reflect "reflect" 13 strings "strings" 14) 15 16// Reference imports to suppress errors if they are not otherwise used. 17var _ = proto.Marshal 18var _ = fmt.Errorf 19var _ = math.Inf 20 21// This is a compile-time assertion to ensure that this generated file 22// is compatible with the proto package it is being compiled against. 23// A compilation error at this line likely means your copy of the 24// proto package needs to be updated. 25const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27// Template provides the details of a Mixer template. 28type Template struct { 29 // Base64 encoded proto descriptor of the template. 30 Descriptor_ string `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` 31} 32 33func (m *Template) Reset() { *m = Template{} } 34func (*Template) ProtoMessage() {} 35func (*Template) Descriptor() ([]byte, []int) { 36 return fileDescriptor_bfb51c5f8ecd0171, []int{0} 37} 38func (m *Template) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40} 41func (m *Template) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 if deterministic { 43 return xxx_messageInfo_Template.Marshal(b, m, deterministic) 44 } else { 45 b = b[:cap(b)] 46 n, err := m.MarshalToSizedBuffer(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52} 53func (m *Template) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_Template.Merge(m, src) 55} 56func (m *Template) XXX_Size() int { 57 return m.Size() 58} 59func (m *Template) XXX_DiscardUnknown() { 60 xxx_messageInfo_Template.DiscardUnknown(m) 61} 62 63var xxx_messageInfo_Template proto.InternalMessageInfo 64 65func (m *Template) GetDescriptor_() string { 66 if m != nil { 67 return m.Descriptor_ 68 } 69 return "" 70} 71 72func init() { 73 proto.RegisterType((*Template)(nil), "istio.mixer.adapter.model.v1beta1.Template") 74} 75 76func init() { 77 proto.RegisterFile("mixer/adapter/model/v1beta1/template.proto", fileDescriptor_bfb51c5f8ecd0171) 78} 79 80var fileDescriptor_bfb51c5f8ecd0171 = []byte{ 81 // 193 bytes of a gzipped FileDescriptorProto 82 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xca, 0xcd, 0xac, 0x48, 83 0x2d, 0xd2, 0x4f, 0x4c, 0x49, 0x2c, 0x28, 0x49, 0x2d, 0xd2, 0xcf, 0xcd, 0x4f, 0x49, 0xcd, 0xd1, 84 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x49, 0xcd, 0x2d, 0xc8, 0x49, 0x2c, 0x49, 85 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0xcc, 0x2c, 0x2e, 0xc9, 0xcc, 0xd7, 0x03, 0xeb, 86 0xd0, 0x83, 0xea, 0xd0, 0x03, 0xeb, 0xd0, 0x83, 0xea, 0x50, 0xd2, 0xe2, 0xe2, 0x08, 0x81, 0x6a, 87 0x12, 0x92, 0xe3, 0xe2, 0x4a, 0x49, 0x2d, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0x2f, 0x92, 0x60, 88 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x12, 0x71, 0x8a, 0xbb, 0xf0, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 89 0x39, 0x86, 0x0f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9, 0x31, 0xae, 0x78, 0x24, 0xc7, 0x78, 0xe2, 90 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, 0x24, 0xc7, 0xf0, 91 0xe1, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 92 0x10, 0xa5, 0x01, 0x71, 0x44, 0x66, 0xbe, 0x7e, 0x62, 0x41, 0xa6, 0x3e, 0x1e, 0xd7, 0x27, 0xb1, 93 0x81, 0x5d, 0x6d, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xe9, 0x16, 0x20, 0xe3, 0x00, 0x00, 94 0x00, 95} 96 97func (this *Template) Equal(that interface{}) bool { 98 if that == nil { 99 return this == nil 100 } 101 102 that1, ok := that.(*Template) 103 if !ok { 104 that2, ok := that.(Template) 105 if ok { 106 that1 = &that2 107 } else { 108 return false 109 } 110 } 111 if that1 == nil { 112 return this == nil 113 } else if this == nil { 114 return false 115 } 116 if this.Descriptor_ != that1.Descriptor_ { 117 return false 118 } 119 return true 120} 121func (this *Template) GoString() string { 122 if this == nil { 123 return "nil" 124 } 125 s := make([]string, 0, 5) 126 s = append(s, "&v1beta1.Template{") 127 s = append(s, "Descriptor_: "+fmt.Sprintf("%#v", this.Descriptor_)+",\n") 128 s = append(s, "}") 129 return strings.Join(s, "") 130} 131func valueToGoStringTemplate(v interface{}, typ string) string { 132 rv := reflect.ValueOf(v) 133 if rv.IsNil() { 134 return "nil" 135 } 136 pv := reflect.Indirect(rv).Interface() 137 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 138} 139func (m *Template) Marshal() (dAtA []byte, err error) { 140 size := m.Size() 141 dAtA = make([]byte, size) 142 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 143 if err != nil { 144 return nil, err 145 } 146 return dAtA[:n], nil 147} 148 149func (m *Template) MarshalTo(dAtA []byte) (int, error) { 150 size := m.Size() 151 return m.MarshalToSizedBuffer(dAtA[:size]) 152} 153 154func (m *Template) MarshalToSizedBuffer(dAtA []byte) (int, error) { 155 i := len(dAtA) 156 _ = i 157 var l int 158 _ = l 159 if len(m.Descriptor_) > 0 { 160 i -= len(m.Descriptor_) 161 copy(dAtA[i:], m.Descriptor_) 162 i = encodeVarintTemplate(dAtA, i, uint64(len(m.Descriptor_))) 163 i-- 164 dAtA[i] = 0xa 165 } 166 return len(dAtA) - i, nil 167} 168 169func encodeVarintTemplate(dAtA []byte, offset int, v uint64) int { 170 offset -= sovTemplate(v) 171 base := offset 172 for v >= 1<<7 { 173 dAtA[offset] = uint8(v&0x7f | 0x80) 174 v >>= 7 175 offset++ 176 } 177 dAtA[offset] = uint8(v) 178 return base 179} 180func (m *Template) Size() (n int) { 181 if m == nil { 182 return 0 183 } 184 var l int 185 _ = l 186 l = len(m.Descriptor_) 187 if l > 0 { 188 n += 1 + l + sovTemplate(uint64(l)) 189 } 190 return n 191} 192 193func sovTemplate(x uint64) (n int) { 194 return (math_bits.Len64(x|1) + 6) / 7 195} 196func sozTemplate(x uint64) (n int) { 197 return sovTemplate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 198} 199func (this *Template) String() string { 200 if this == nil { 201 return "nil" 202 } 203 s := strings.Join([]string{`&Template{`, 204 `Descriptor_:` + fmt.Sprintf("%v", this.Descriptor_) + `,`, 205 `}`, 206 }, "") 207 return s 208} 209func valueToStringTemplate(v interface{}) string { 210 rv := reflect.ValueOf(v) 211 if rv.IsNil() { 212 return "nil" 213 } 214 pv := reflect.Indirect(rv).Interface() 215 return fmt.Sprintf("*%v", pv) 216} 217func (m *Template) Unmarshal(dAtA []byte) error { 218 l := len(dAtA) 219 iNdEx := 0 220 for iNdEx < l { 221 preIndex := iNdEx 222 var wire uint64 223 for shift := uint(0); ; shift += 7 { 224 if shift >= 64 { 225 return ErrIntOverflowTemplate 226 } 227 if iNdEx >= l { 228 return io.ErrUnexpectedEOF 229 } 230 b := dAtA[iNdEx] 231 iNdEx++ 232 wire |= uint64(b&0x7F) << shift 233 if b < 0x80 { 234 break 235 } 236 } 237 fieldNum := int32(wire >> 3) 238 wireType := int(wire & 0x7) 239 if wireType == 4 { 240 return fmt.Errorf("proto: Template: wiretype end group for non-group") 241 } 242 if fieldNum <= 0 { 243 return fmt.Errorf("proto: Template: illegal tag %d (wire type %d)", fieldNum, wire) 244 } 245 switch fieldNum { 246 case 1: 247 if wireType != 2 { 248 return fmt.Errorf("proto: wrong wireType = %d for field Descriptor_", wireType) 249 } 250 var stringLen uint64 251 for shift := uint(0); ; shift += 7 { 252 if shift >= 64 { 253 return ErrIntOverflowTemplate 254 } 255 if iNdEx >= l { 256 return io.ErrUnexpectedEOF 257 } 258 b := dAtA[iNdEx] 259 iNdEx++ 260 stringLen |= uint64(b&0x7F) << shift 261 if b < 0x80 { 262 break 263 } 264 } 265 intStringLen := int(stringLen) 266 if intStringLen < 0 { 267 return ErrInvalidLengthTemplate 268 } 269 postIndex := iNdEx + intStringLen 270 if postIndex < 0 { 271 return ErrInvalidLengthTemplate 272 } 273 if postIndex > l { 274 return io.ErrUnexpectedEOF 275 } 276 m.Descriptor_ = string(dAtA[iNdEx:postIndex]) 277 iNdEx = postIndex 278 default: 279 iNdEx = preIndex 280 skippy, err := skipTemplate(dAtA[iNdEx:]) 281 if err != nil { 282 return err 283 } 284 if skippy < 0 { 285 return ErrInvalidLengthTemplate 286 } 287 if (iNdEx + skippy) < 0 { 288 return ErrInvalidLengthTemplate 289 } 290 if (iNdEx + skippy) > l { 291 return io.ErrUnexpectedEOF 292 } 293 iNdEx += skippy 294 } 295 } 296 297 if iNdEx > l { 298 return io.ErrUnexpectedEOF 299 } 300 return nil 301} 302func skipTemplate(dAtA []byte) (n int, err error) { 303 l := len(dAtA) 304 iNdEx := 0 305 for iNdEx < l { 306 var wire uint64 307 for shift := uint(0); ; shift += 7 { 308 if shift >= 64 { 309 return 0, ErrIntOverflowTemplate 310 } 311 if iNdEx >= l { 312 return 0, io.ErrUnexpectedEOF 313 } 314 b := dAtA[iNdEx] 315 iNdEx++ 316 wire |= (uint64(b) & 0x7F) << shift 317 if b < 0x80 { 318 break 319 } 320 } 321 wireType := int(wire & 0x7) 322 switch wireType { 323 case 0: 324 for shift := uint(0); ; shift += 7 { 325 if shift >= 64 { 326 return 0, ErrIntOverflowTemplate 327 } 328 if iNdEx >= l { 329 return 0, io.ErrUnexpectedEOF 330 } 331 iNdEx++ 332 if dAtA[iNdEx-1] < 0x80 { 333 break 334 } 335 } 336 return iNdEx, nil 337 case 1: 338 iNdEx += 8 339 return iNdEx, nil 340 case 2: 341 var length int 342 for shift := uint(0); ; shift += 7 { 343 if shift >= 64 { 344 return 0, ErrIntOverflowTemplate 345 } 346 if iNdEx >= l { 347 return 0, io.ErrUnexpectedEOF 348 } 349 b := dAtA[iNdEx] 350 iNdEx++ 351 length |= (int(b) & 0x7F) << shift 352 if b < 0x80 { 353 break 354 } 355 } 356 if length < 0 { 357 return 0, ErrInvalidLengthTemplate 358 } 359 iNdEx += length 360 if iNdEx < 0 { 361 return 0, ErrInvalidLengthTemplate 362 } 363 return iNdEx, nil 364 case 3: 365 for { 366 var innerWire uint64 367 var start int = iNdEx 368 for shift := uint(0); ; shift += 7 { 369 if shift >= 64 { 370 return 0, ErrIntOverflowTemplate 371 } 372 if iNdEx >= l { 373 return 0, io.ErrUnexpectedEOF 374 } 375 b := dAtA[iNdEx] 376 iNdEx++ 377 innerWire |= (uint64(b) & 0x7F) << shift 378 if b < 0x80 { 379 break 380 } 381 } 382 innerWireType := int(innerWire & 0x7) 383 if innerWireType == 4 { 384 break 385 } 386 next, err := skipTemplate(dAtA[start:]) 387 if err != nil { 388 return 0, err 389 } 390 iNdEx = start + next 391 if iNdEx < 0 { 392 return 0, ErrInvalidLengthTemplate 393 } 394 } 395 return iNdEx, nil 396 case 4: 397 return iNdEx, nil 398 case 5: 399 iNdEx += 4 400 return iNdEx, nil 401 default: 402 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 403 } 404 } 405 panic("unreachable") 406} 407 408var ( 409 ErrInvalidLengthTemplate = fmt.Errorf("proto: negative length found during unmarshaling") 410 ErrIntOverflowTemplate = fmt.Errorf("proto: integer overflow") 411) 412