...

Source file src/k8s.io/api/scheduling/v1beta1/generated.pb.go

Documentation: k8s.io/api/scheduling/v1beta1

     1  /*
     2  Copyright The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // Code generated by protoc-gen-gogo. DO NOT EDIT.
    18  // source: k8s.io/api/scheduling/v1beta1/generated.proto
    19  
    20  package v1beta1
    21  
    22  import (
    23  	fmt "fmt"
    24  
    25  	io "io"
    26  
    27  	proto "github.com/gogo/protobuf/proto"
    28  
    29  	k8s_io_api_core_v1 "k8s.io/api/core/v1"
    30  
    31  	math "math"
    32  	math_bits "math/bits"
    33  	reflect "reflect"
    34  	strings "strings"
    35  )
    36  
    37  // Reference imports to suppress errors if they are not otherwise used.
    38  var _ = proto.Marshal
    39  var _ = fmt.Errorf
    40  var _ = math.Inf
    41  
    42  // This is a compile-time assertion to ensure that this generated file
    43  // is compatible with the proto package it is being compiled against.
    44  // A compilation error at this line likely means your copy of the
    45  // proto package needs to be updated.
    46  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    47  
    48  func (m *PriorityClass) Reset()      { *m = PriorityClass{} }
    49  func (*PriorityClass) ProtoMessage() {}
    50  func (*PriorityClass) Descriptor() ([]byte, []int) {
    51  	return fileDescriptor_9edc3acf997efcf2, []int{0}
    52  }
    53  func (m *PriorityClass) XXX_Unmarshal(b []byte) error {
    54  	return m.Unmarshal(b)
    55  }
    56  func (m *PriorityClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    57  	b = b[:cap(b)]
    58  	n, err := m.MarshalToSizedBuffer(b)
    59  	if err != nil {
    60  		return nil, err
    61  	}
    62  	return b[:n], nil
    63  }
    64  func (m *PriorityClass) XXX_Merge(src proto.Message) {
    65  	xxx_messageInfo_PriorityClass.Merge(m, src)
    66  }
    67  func (m *PriorityClass) XXX_Size() int {
    68  	return m.Size()
    69  }
    70  func (m *PriorityClass) XXX_DiscardUnknown() {
    71  	xxx_messageInfo_PriorityClass.DiscardUnknown(m)
    72  }
    73  
    74  var xxx_messageInfo_PriorityClass proto.InternalMessageInfo
    75  
    76  func (m *PriorityClassList) Reset()      { *m = PriorityClassList{} }
    77  func (*PriorityClassList) ProtoMessage() {}
    78  func (*PriorityClassList) Descriptor() ([]byte, []int) {
    79  	return fileDescriptor_9edc3acf997efcf2, []int{1}
    80  }
    81  func (m *PriorityClassList) XXX_Unmarshal(b []byte) error {
    82  	return m.Unmarshal(b)
    83  }
    84  func (m *PriorityClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    85  	b = b[:cap(b)]
    86  	n, err := m.MarshalToSizedBuffer(b)
    87  	if err != nil {
    88  		return nil, err
    89  	}
    90  	return b[:n], nil
    91  }
    92  func (m *PriorityClassList) XXX_Merge(src proto.Message) {
    93  	xxx_messageInfo_PriorityClassList.Merge(m, src)
    94  }
    95  func (m *PriorityClassList) XXX_Size() int {
    96  	return m.Size()
    97  }
    98  func (m *PriorityClassList) XXX_DiscardUnknown() {
    99  	xxx_messageInfo_PriorityClassList.DiscardUnknown(m)
   100  }
   101  
   102  var xxx_messageInfo_PriorityClassList proto.InternalMessageInfo
   103  
   104  func init() {
   105  	proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClass")
   106  	proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClassList")
   107  }
   108  
   109  func init() {
   110  	proto.RegisterFile("k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_9edc3acf997efcf2)
   111  }
   112  
   113  var fileDescriptor_9edc3acf997efcf2 = []byte{
   114  	// 481 bytes of a gzipped FileDescriptorProto
   115  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30,
   116  	0x18, 0x86, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xaa, 0x74, 0x69, 0xd4, 0x5b,
   117  	0x32, 0x70, 0x36, 0x3d, 0x01, 0x42, 0xba, 0x2d, 0x77, 0x12, 0x42, 0x02, 0x51, 0x32, 0x30, 0x20,
   118  	0x06, 0x9c, 0xd4, 0x97, 0x9a, 0x26, 0x71, 0x64, 0x3b, 0x95, 0xba, 0xf1, 0x13, 0xf8, 0x51, 0x0c,
   119  	0x1d, 0x6f, 0xbc, 0xa9, 0xa2, 0xe1, 0x27, 0xb0, 0x31, 0xa1, 0xa4, 0xe1, 0xd2, 0x36, 0x50, 0x6e,
   120  	0xcb, 0xf7, 0x7d, 0xcf, 0xfb, 0xda, 0x7e, 0x63, 0xc3, 0xd3, 0xd9, 0x0b, 0x89, 0x18, 0xc7, 0x24,
   121  	0x65, 0x58, 0x06, 0x53, 0x3a, 0xc9, 0x22, 0x96, 0x84, 0x78, 0x3e, 0xf2, 0xa9, 0x22, 0x23, 0x1c,
   122  	0xd2, 0x84, 0x0a, 0xa2, 0xe8, 0x04, 0xa5, 0x82, 0x2b, 0x6e, 0x1c, 0x6f, 0x70, 0x44, 0x52, 0x86,
   123  	0x6a, 0x1c, 0x55, 0x78, 0xff, 0x34, 0x64, 0x6a, 0x9a, 0xf9, 0x28, 0xe0, 0x31, 0x0e, 0x79, 0xc8,
   124  	0x71, 0xa9, 0xf2, 0xb3, 0xab, 0xb2, 0x2a, 0x8b, 0xf2, 0x6b, 0xe3, 0xd6, 0x1f, 0x6e, 0x2d, 0x1e,
   125  	0x70, 0x41, 0xf1, 0xbc, 0xb1, 0x62, 0xff, 0x69, 0xcd, 0xc4, 0x24, 0x98, 0xb2, 0x84, 0x8a, 0x05,
   126  	0x4e, 0x67, 0x61, 0xd1, 0x90, 0x38, 0xa6, 0x8a, 0xfc, 0x4d, 0x85, 0xff, 0xa5, 0x12, 0x59, 0xa2,
   127  	0x58, 0x4c, 0x1b, 0x82, 0xe7, 0xff, 0x13, 0x14, 0xa7, 0x8d, 0xc9, 0xbe, 0x6e, 0xf8, 0xb3, 0x05,
   128  	0xbb, 0x63, 0xc1, 0xb8, 0x60, 0x6a, 0x71, 0x11, 0x11, 0x29, 0x8d, 0x4f, 0xb0, 0x5d, 0xec, 0x6a,
   129  	0x42, 0x14, 0x31, 0x81, 0x0d, 0x9c, 0xce, 0xd9, 0x13, 0x54, 0xa7, 0x76, 0x6b, 0x8e, 0xd2, 0x59,
   130  	0x58, 0x34, 0x24, 0x2a, 0x68, 0x34, 0x1f, 0xa1, 0xb7, 0xfe, 0x67, 0x1a, 0xa8, 0x37, 0x54, 0x11,
   131  	0xd7, 0x58, 0xae, 0x06, 0x5a, 0xbe, 0x1a, 0xc0, 0xba, 0xe7, 0xdd, 0xba, 0x1a, 0x27, 0x50, 0x9f,
   132  	0x93, 0x28, 0xa3, 0x66, 0xcb, 0x06, 0x8e, 0xee, 0x76, 0x2b, 0x58, 0x7f, 0x5f, 0x34, 0xbd, 0xcd,
   133  	0xcc, 0x38, 0x87, 0xdd, 0x30, 0xe2, 0x3e, 0x89, 0x2e, 0xe9, 0x15, 0xc9, 0x22, 0x65, 0x1e, 0xd9,
   134  	0xc0, 0x69, 0xbb, 0x8f, 0x2a, 0xb8, 0xfb, 0x72, 0x7b, 0xe8, 0xed, 0xb2, 0xc6, 0x33, 0xd8, 0x99,
   135  	0x50, 0x19, 0x08, 0x96, 0x2a, 0xc6, 0x13, 0xf3, 0x9e, 0x0d, 0x9c, 0xfb, 0xee, 0xc3, 0x4a, 0xda,
   136  	0xb9, 0xac, 0x47, 0xde, 0x36, 0x67, 0x84, 0xb0, 0x97, 0x0a, 0x4a, 0xe3, 0xb2, 0x1a, 0xf3, 0x88,
   137  	0x05, 0x0b, 0x53, 0x2f, 0xb5, 0xe7, 0xf9, 0x6a, 0xd0, 0x1b, 0xef, 0xcd, 0x7e, 0xad, 0x06, 0x27,
   138  	0xcd, 0x1b, 0x80, 0xf6, 0x31, 0xaf, 0x61, 0x3a, 0xfc, 0x06, 0xe0, 0x83, 0x9d, 0xd4, 0x5f, 0x33,
   139  	0xa9, 0x8c, 0x8f, 0x8d, 0xe4, 0xd1, 0xdd, 0x92, 0x2f, 0xd4, 0x65, 0xee, 0xbd, 0xea, 0x88, 0xed,
   140  	0x3f, 0x9d, 0xad, 0xd4, 0xdf, 0x41, 0x9d, 0x29, 0x1a, 0x4b, 0xb3, 0x65, 0x1f, 0x39, 0x9d, 0xb3,
   141  	0xc7, 0xe8, 0xe0, 0x53, 0x40, 0x3b, 0xdb, 0xab, 0xff, 0xd1, 0xab, 0xc2, 0xc2, 0xdb, 0x38, 0xb9,
   142  	0x17, 0xcb, 0xb5, 0xa5, 0x5d, 0xaf, 0x2d, 0xed, 0x66, 0x6d, 0x69, 0x5f, 0x72, 0x0b, 0x2c, 0x73,
   143  	0x0b, 0x5c, 0xe7, 0x16, 0xb8, 0xc9, 0x2d, 0xf0, 0x3d, 0xb7, 0xc0, 0xd7, 0x1f, 0x96, 0xf6, 0xe1,
   144  	0xf8, 0xe0, 0x13, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x04, 0x2e, 0xb0, 0xce, 0xc2, 0x03, 0x00,
   145  	0x00,
   146  }
   147  
   148  func (m *PriorityClass) Marshal() (dAtA []byte, err error) {
   149  	size := m.Size()
   150  	dAtA = make([]byte, size)
   151  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	return dAtA[:n], nil
   156  }
   157  
   158  func (m *PriorityClass) MarshalTo(dAtA []byte) (int, error) {
   159  	size := m.Size()
   160  	return m.MarshalToSizedBuffer(dAtA[:size])
   161  }
   162  
   163  func (m *PriorityClass) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   164  	i := len(dAtA)
   165  	_ = i
   166  	var l int
   167  	_ = l
   168  	if m.PreemptionPolicy != nil {
   169  		i -= len(*m.PreemptionPolicy)
   170  		copy(dAtA[i:], *m.PreemptionPolicy)
   171  		i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreemptionPolicy)))
   172  		i--
   173  		dAtA[i] = 0x2a
   174  	}
   175  	i -= len(m.Description)
   176  	copy(dAtA[i:], m.Description)
   177  	i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description)))
   178  	i--
   179  	dAtA[i] = 0x22
   180  	i--
   181  	if m.GlobalDefault {
   182  		dAtA[i] = 1
   183  	} else {
   184  		dAtA[i] = 0
   185  	}
   186  	i--
   187  	dAtA[i] = 0x18
   188  	i = encodeVarintGenerated(dAtA, i, uint64(m.Value))
   189  	i--
   190  	dAtA[i] = 0x10
   191  	{
   192  		size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
   193  		if err != nil {
   194  			return 0, err
   195  		}
   196  		i -= size
   197  		i = encodeVarintGenerated(dAtA, i, uint64(size))
   198  	}
   199  	i--
   200  	dAtA[i] = 0xa
   201  	return len(dAtA) - i, nil
   202  }
   203  
   204  func (m *PriorityClassList) Marshal() (dAtA []byte, err error) {
   205  	size := m.Size()
   206  	dAtA = make([]byte, size)
   207  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   208  	if err != nil {
   209  		return nil, err
   210  	}
   211  	return dAtA[:n], nil
   212  }
   213  
   214  func (m *PriorityClassList) MarshalTo(dAtA []byte) (int, error) {
   215  	size := m.Size()
   216  	return m.MarshalToSizedBuffer(dAtA[:size])
   217  }
   218  
   219  func (m *PriorityClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   220  	i := len(dAtA)
   221  	_ = i
   222  	var l int
   223  	_ = l
   224  	if len(m.Items) > 0 {
   225  		for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
   226  			{
   227  				size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   228  				if err != nil {
   229  					return 0, err
   230  				}
   231  				i -= size
   232  				i = encodeVarintGenerated(dAtA, i, uint64(size))
   233  			}
   234  			i--
   235  			dAtA[i] = 0x12
   236  		}
   237  	}
   238  	{
   239  		size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
   240  		if err != nil {
   241  			return 0, err
   242  		}
   243  		i -= size
   244  		i = encodeVarintGenerated(dAtA, i, uint64(size))
   245  	}
   246  	i--
   247  	dAtA[i] = 0xa
   248  	return len(dAtA) - i, nil
   249  }
   250  
   251  func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
   252  	offset -= sovGenerated(v)
   253  	base := offset
   254  	for v >= 1<<7 {
   255  		dAtA[offset] = uint8(v&0x7f | 0x80)
   256  		v >>= 7
   257  		offset++
   258  	}
   259  	dAtA[offset] = uint8(v)
   260  	return base
   261  }
   262  func (m *PriorityClass) Size() (n int) {
   263  	if m == nil {
   264  		return 0
   265  	}
   266  	var l int
   267  	_ = l
   268  	l = m.ObjectMeta.Size()
   269  	n += 1 + l + sovGenerated(uint64(l))
   270  	n += 1 + sovGenerated(uint64(m.Value))
   271  	n += 2
   272  	l = len(m.Description)
   273  	n += 1 + l + sovGenerated(uint64(l))
   274  	if m.PreemptionPolicy != nil {
   275  		l = len(*m.PreemptionPolicy)
   276  		n += 1 + l + sovGenerated(uint64(l))
   277  	}
   278  	return n
   279  }
   280  
   281  func (m *PriorityClassList) Size() (n int) {
   282  	if m == nil {
   283  		return 0
   284  	}
   285  	var l int
   286  	_ = l
   287  	l = m.ListMeta.Size()
   288  	n += 1 + l + sovGenerated(uint64(l))
   289  	if len(m.Items) > 0 {
   290  		for _, e := range m.Items {
   291  			l = e.Size()
   292  			n += 1 + l + sovGenerated(uint64(l))
   293  		}
   294  	}
   295  	return n
   296  }
   297  
   298  func sovGenerated(x uint64) (n int) {
   299  	return (math_bits.Len64(x|1) + 6) / 7
   300  }
   301  func sozGenerated(x uint64) (n int) {
   302  	return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   303  }
   304  func (this *PriorityClass) String() string {
   305  	if this == nil {
   306  		return "nil"
   307  	}
   308  	s := strings.Join([]string{`&PriorityClass{`,
   309  		`ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
   310  		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
   311  		`GlobalDefault:` + fmt.Sprintf("%v", this.GlobalDefault) + `,`,
   312  		`Description:` + fmt.Sprintf("%v", this.Description) + `,`,
   313  		`PreemptionPolicy:` + valueToStringGenerated(this.PreemptionPolicy) + `,`,
   314  		`}`,
   315  	}, "")
   316  	return s
   317  }
   318  func (this *PriorityClassList) String() string {
   319  	if this == nil {
   320  		return "nil"
   321  	}
   322  	repeatedStringForItems := "[]PriorityClass{"
   323  	for _, f := range this.Items {
   324  		repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PriorityClass", "PriorityClass", 1), `&`, ``, 1) + ","
   325  	}
   326  	repeatedStringForItems += "}"
   327  	s := strings.Join([]string{`&PriorityClassList{`,
   328  		`ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
   329  		`Items:` + repeatedStringForItems + `,`,
   330  		`}`,
   331  	}, "")
   332  	return s
   333  }
   334  func valueToStringGenerated(v interface{}) string {
   335  	rv := reflect.ValueOf(v)
   336  	if rv.IsNil() {
   337  		return "nil"
   338  	}
   339  	pv := reflect.Indirect(rv).Interface()
   340  	return fmt.Sprintf("*%v", pv)
   341  }
   342  func (m *PriorityClass) Unmarshal(dAtA []byte) error {
   343  	l := len(dAtA)
   344  	iNdEx := 0
   345  	for iNdEx < l {
   346  		preIndex := iNdEx
   347  		var wire uint64
   348  		for shift := uint(0); ; shift += 7 {
   349  			if shift >= 64 {
   350  				return ErrIntOverflowGenerated
   351  			}
   352  			if iNdEx >= l {
   353  				return io.ErrUnexpectedEOF
   354  			}
   355  			b := dAtA[iNdEx]
   356  			iNdEx++
   357  			wire |= uint64(b&0x7F) << shift
   358  			if b < 0x80 {
   359  				break
   360  			}
   361  		}
   362  		fieldNum := int32(wire >> 3)
   363  		wireType := int(wire & 0x7)
   364  		if wireType == 4 {
   365  			return fmt.Errorf("proto: PriorityClass: wiretype end group for non-group")
   366  		}
   367  		if fieldNum <= 0 {
   368  			return fmt.Errorf("proto: PriorityClass: illegal tag %d (wire type %d)", fieldNum, wire)
   369  		}
   370  		switch fieldNum {
   371  		case 1:
   372  			if wireType != 2 {
   373  				return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
   374  			}
   375  			var msglen int
   376  			for shift := uint(0); ; shift += 7 {
   377  				if shift >= 64 {
   378  					return ErrIntOverflowGenerated
   379  				}
   380  				if iNdEx >= l {
   381  					return io.ErrUnexpectedEOF
   382  				}
   383  				b := dAtA[iNdEx]
   384  				iNdEx++
   385  				msglen |= int(b&0x7F) << shift
   386  				if b < 0x80 {
   387  					break
   388  				}
   389  			}
   390  			if msglen < 0 {
   391  				return ErrInvalidLengthGenerated
   392  			}
   393  			postIndex := iNdEx + msglen
   394  			if postIndex < 0 {
   395  				return ErrInvalidLengthGenerated
   396  			}
   397  			if postIndex > l {
   398  				return io.ErrUnexpectedEOF
   399  			}
   400  			if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   401  				return err
   402  			}
   403  			iNdEx = postIndex
   404  		case 2:
   405  			if wireType != 0 {
   406  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
   407  			}
   408  			m.Value = 0
   409  			for shift := uint(0); ; shift += 7 {
   410  				if shift >= 64 {
   411  					return ErrIntOverflowGenerated
   412  				}
   413  				if iNdEx >= l {
   414  					return io.ErrUnexpectedEOF
   415  				}
   416  				b := dAtA[iNdEx]
   417  				iNdEx++
   418  				m.Value |= int32(b&0x7F) << shift
   419  				if b < 0x80 {
   420  					break
   421  				}
   422  			}
   423  		case 3:
   424  			if wireType != 0 {
   425  				return fmt.Errorf("proto: wrong wireType = %d for field GlobalDefault", wireType)
   426  			}
   427  			var v int
   428  			for shift := uint(0); ; shift += 7 {
   429  				if shift >= 64 {
   430  					return ErrIntOverflowGenerated
   431  				}
   432  				if iNdEx >= l {
   433  					return io.ErrUnexpectedEOF
   434  				}
   435  				b := dAtA[iNdEx]
   436  				iNdEx++
   437  				v |= int(b&0x7F) << shift
   438  				if b < 0x80 {
   439  					break
   440  				}
   441  			}
   442  			m.GlobalDefault = bool(v != 0)
   443  		case 4:
   444  			if wireType != 2 {
   445  				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
   446  			}
   447  			var stringLen uint64
   448  			for shift := uint(0); ; shift += 7 {
   449  				if shift >= 64 {
   450  					return ErrIntOverflowGenerated
   451  				}
   452  				if iNdEx >= l {
   453  					return io.ErrUnexpectedEOF
   454  				}
   455  				b := dAtA[iNdEx]
   456  				iNdEx++
   457  				stringLen |= uint64(b&0x7F) << shift
   458  				if b < 0x80 {
   459  					break
   460  				}
   461  			}
   462  			intStringLen := int(stringLen)
   463  			if intStringLen < 0 {
   464  				return ErrInvalidLengthGenerated
   465  			}
   466  			postIndex := iNdEx + intStringLen
   467  			if postIndex < 0 {
   468  				return ErrInvalidLengthGenerated
   469  			}
   470  			if postIndex > l {
   471  				return io.ErrUnexpectedEOF
   472  			}
   473  			m.Description = string(dAtA[iNdEx:postIndex])
   474  			iNdEx = postIndex
   475  		case 5:
   476  			if wireType != 2 {
   477  				return fmt.Errorf("proto: wrong wireType = %d for field PreemptionPolicy", wireType)
   478  			}
   479  			var stringLen uint64
   480  			for shift := uint(0); ; shift += 7 {
   481  				if shift >= 64 {
   482  					return ErrIntOverflowGenerated
   483  				}
   484  				if iNdEx >= l {
   485  					return io.ErrUnexpectedEOF
   486  				}
   487  				b := dAtA[iNdEx]
   488  				iNdEx++
   489  				stringLen |= uint64(b&0x7F) << shift
   490  				if b < 0x80 {
   491  					break
   492  				}
   493  			}
   494  			intStringLen := int(stringLen)
   495  			if intStringLen < 0 {
   496  				return ErrInvalidLengthGenerated
   497  			}
   498  			postIndex := iNdEx + intStringLen
   499  			if postIndex < 0 {
   500  				return ErrInvalidLengthGenerated
   501  			}
   502  			if postIndex > l {
   503  				return io.ErrUnexpectedEOF
   504  			}
   505  			s := k8s_io_api_core_v1.PreemptionPolicy(dAtA[iNdEx:postIndex])
   506  			m.PreemptionPolicy = &s
   507  			iNdEx = postIndex
   508  		default:
   509  			iNdEx = preIndex
   510  			skippy, err := skipGenerated(dAtA[iNdEx:])
   511  			if err != nil {
   512  				return err
   513  			}
   514  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   515  				return ErrInvalidLengthGenerated
   516  			}
   517  			if (iNdEx + skippy) > l {
   518  				return io.ErrUnexpectedEOF
   519  			}
   520  			iNdEx += skippy
   521  		}
   522  	}
   523  
   524  	if iNdEx > l {
   525  		return io.ErrUnexpectedEOF
   526  	}
   527  	return nil
   528  }
   529  func (m *PriorityClassList) Unmarshal(dAtA []byte) error {
   530  	l := len(dAtA)
   531  	iNdEx := 0
   532  	for iNdEx < l {
   533  		preIndex := iNdEx
   534  		var wire uint64
   535  		for shift := uint(0); ; shift += 7 {
   536  			if shift >= 64 {
   537  				return ErrIntOverflowGenerated
   538  			}
   539  			if iNdEx >= l {
   540  				return io.ErrUnexpectedEOF
   541  			}
   542  			b := dAtA[iNdEx]
   543  			iNdEx++
   544  			wire |= uint64(b&0x7F) << shift
   545  			if b < 0x80 {
   546  				break
   547  			}
   548  		}
   549  		fieldNum := int32(wire >> 3)
   550  		wireType := int(wire & 0x7)
   551  		if wireType == 4 {
   552  			return fmt.Errorf("proto: PriorityClassList: wiretype end group for non-group")
   553  		}
   554  		if fieldNum <= 0 {
   555  			return fmt.Errorf("proto: PriorityClassList: illegal tag %d (wire type %d)", fieldNum, wire)
   556  		}
   557  		switch fieldNum {
   558  		case 1:
   559  			if wireType != 2 {
   560  				return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
   561  			}
   562  			var msglen int
   563  			for shift := uint(0); ; shift += 7 {
   564  				if shift >= 64 {
   565  					return ErrIntOverflowGenerated
   566  				}
   567  				if iNdEx >= l {
   568  					return io.ErrUnexpectedEOF
   569  				}
   570  				b := dAtA[iNdEx]
   571  				iNdEx++
   572  				msglen |= int(b&0x7F) << shift
   573  				if b < 0x80 {
   574  					break
   575  				}
   576  			}
   577  			if msglen < 0 {
   578  				return ErrInvalidLengthGenerated
   579  			}
   580  			postIndex := iNdEx + msglen
   581  			if postIndex < 0 {
   582  				return ErrInvalidLengthGenerated
   583  			}
   584  			if postIndex > l {
   585  				return io.ErrUnexpectedEOF
   586  			}
   587  			if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   588  				return err
   589  			}
   590  			iNdEx = postIndex
   591  		case 2:
   592  			if wireType != 2 {
   593  				return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
   594  			}
   595  			var msglen int
   596  			for shift := uint(0); ; shift += 7 {
   597  				if shift >= 64 {
   598  					return ErrIntOverflowGenerated
   599  				}
   600  				if iNdEx >= l {
   601  					return io.ErrUnexpectedEOF
   602  				}
   603  				b := dAtA[iNdEx]
   604  				iNdEx++
   605  				msglen |= int(b&0x7F) << shift
   606  				if b < 0x80 {
   607  					break
   608  				}
   609  			}
   610  			if msglen < 0 {
   611  				return ErrInvalidLengthGenerated
   612  			}
   613  			postIndex := iNdEx + msglen
   614  			if postIndex < 0 {
   615  				return ErrInvalidLengthGenerated
   616  			}
   617  			if postIndex > l {
   618  				return io.ErrUnexpectedEOF
   619  			}
   620  			m.Items = append(m.Items, PriorityClass{})
   621  			if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   622  				return err
   623  			}
   624  			iNdEx = postIndex
   625  		default:
   626  			iNdEx = preIndex
   627  			skippy, err := skipGenerated(dAtA[iNdEx:])
   628  			if err != nil {
   629  				return err
   630  			}
   631  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   632  				return ErrInvalidLengthGenerated
   633  			}
   634  			if (iNdEx + skippy) > l {
   635  				return io.ErrUnexpectedEOF
   636  			}
   637  			iNdEx += skippy
   638  		}
   639  	}
   640  
   641  	if iNdEx > l {
   642  		return io.ErrUnexpectedEOF
   643  	}
   644  	return nil
   645  }
   646  func skipGenerated(dAtA []byte) (n int, err error) {
   647  	l := len(dAtA)
   648  	iNdEx := 0
   649  	depth := 0
   650  	for iNdEx < l {
   651  		var wire uint64
   652  		for shift := uint(0); ; shift += 7 {
   653  			if shift >= 64 {
   654  				return 0, ErrIntOverflowGenerated
   655  			}
   656  			if iNdEx >= l {
   657  				return 0, io.ErrUnexpectedEOF
   658  			}
   659  			b := dAtA[iNdEx]
   660  			iNdEx++
   661  			wire |= (uint64(b) & 0x7F) << shift
   662  			if b < 0x80 {
   663  				break
   664  			}
   665  		}
   666  		wireType := int(wire & 0x7)
   667  		switch wireType {
   668  		case 0:
   669  			for shift := uint(0); ; shift += 7 {
   670  				if shift >= 64 {
   671  					return 0, ErrIntOverflowGenerated
   672  				}
   673  				if iNdEx >= l {
   674  					return 0, io.ErrUnexpectedEOF
   675  				}
   676  				iNdEx++
   677  				if dAtA[iNdEx-1] < 0x80 {
   678  					break
   679  				}
   680  			}
   681  		case 1:
   682  			iNdEx += 8
   683  		case 2:
   684  			var length int
   685  			for shift := uint(0); ; shift += 7 {
   686  				if shift >= 64 {
   687  					return 0, ErrIntOverflowGenerated
   688  				}
   689  				if iNdEx >= l {
   690  					return 0, io.ErrUnexpectedEOF
   691  				}
   692  				b := dAtA[iNdEx]
   693  				iNdEx++
   694  				length |= (int(b) & 0x7F) << shift
   695  				if b < 0x80 {
   696  					break
   697  				}
   698  			}
   699  			if length < 0 {
   700  				return 0, ErrInvalidLengthGenerated
   701  			}
   702  			iNdEx += length
   703  		case 3:
   704  			depth++
   705  		case 4:
   706  			if depth == 0 {
   707  				return 0, ErrUnexpectedEndOfGroupGenerated
   708  			}
   709  			depth--
   710  		case 5:
   711  			iNdEx += 4
   712  		default:
   713  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   714  		}
   715  		if iNdEx < 0 {
   716  			return 0, ErrInvalidLengthGenerated
   717  		}
   718  		if depth == 0 {
   719  			return iNdEx, nil
   720  		}
   721  	}
   722  	return 0, io.ErrUnexpectedEOF
   723  }
   724  
   725  var (
   726  	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
   727  	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
   728  	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
   729  )
   730  

View as plain text