...

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

Documentation: k8s.io/api/scheduling/v1alpha1

     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/v1alpha1/generated.proto
    19  
    20  package v1alpha1
    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_260442fbb28d876a, []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_260442fbb28d876a, []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.v1alpha1.PriorityClass")
   106  	proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1alpha1.PriorityClassList")
   107  }
   108  
   109  func init() {
   110  	proto.RegisterFile("k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptor_260442fbb28d876a)
   111  }
   112  
   113  var fileDescriptor_260442fbb28d876a = []byte{
   114  	// 480 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, 0xeb, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x46, 0xbd, 0x25,
   117  	0xcb, 0xd9, 0xf4, 0x04, 0x08, 0xe9, 0xb6, 0x50, 0x09, 0x21, 0x81, 0xa8, 0x32, 0x30, 0x20, 0x06,
   118  	0xdc, 0xd4, 0xe7, 0x9a, 0x26, 0x71, 0x64, 0x3b, 0x95, 0xba, 0xf1, 0x13, 0xf8, 0x53, 0x48, 0x1d,
   119  	0x6f, 0xbc, 0xa9, 0xa2, 0xe1, 0x27, 0xb0, 0x31, 0xa1, 0xa4, 0xbd, 0x4b, 0xdb, 0xc0, 0x71, 0x5b,
   120  	0xbe, 0xef, 0x7b, 0xde, 0xd7, 0xf6, 0x1b, 0x1b, 0xe2, 0xf9, 0x4b, 0x8d, 0x85, 0x24, 0x34, 0x15,
   121  	0x44, 0x87, 0x33, 0x36, 0xcd, 0x22, 0x91, 0x70, 0xb2, 0x18, 0xd2, 0x28, 0x9d, 0xd1, 0x21, 0xe1,
   122  	0x2c, 0x61, 0x8a, 0x1a, 0x36, 0xc5, 0xa9, 0x92, 0x46, 0xda, 0x68, 0xcb, 0x63, 0x9a, 0x0a, 0x5c,
   123  	0xf1, 0xf8, 0x86, 0xef, 0x9d, 0x71, 0x61, 0x66, 0xd9, 0x04, 0x87, 0x32, 0x26, 0x5c, 0x72, 0x49,
   124  	0x4a, 0xd9, 0x24, 0xbb, 0x2c, 0xab, 0xb2, 0x28, 0xbf, 0xb6, 0x76, 0xbd, 0xc1, 0xde, 0xf2, 0xa1,
   125  	0x54, 0x8c, 0x2c, 0x6a, 0x4b, 0xf6, 0x9e, 0x55, 0x4c, 0x4c, 0xc3, 0x99, 0x48, 0x98, 0x5a, 0x92,
   126  	0x74, 0xce, 0x8b, 0x86, 0x26, 0x31, 0x33, 0xf4, 0x6f, 0x2a, 0xf2, 0x2f, 0x95, 0xca, 0x12, 0x23,
   127  	0x62, 0x56, 0x13, 0xbc, 0xf8, 0x9f, 0xa0, 0x38, 0x6e, 0x4c, 0x8f, 0x75, 0x83, 0x5f, 0x4d, 0xd8,
   128  	0x19, 0x2b, 0x21, 0x95, 0x30, 0xcb, 0x57, 0x11, 0xd5, 0xda, 0xfe, 0x0c, 0x5b, 0xc5, 0xae, 0xa6,
   129  	0xd4, 0x50, 0x07, 0xb8, 0xc0, 0x6b, 0x9f, 0x3f, 0xc5, 0x55, 0x6c, 0xb7, 0xe6, 0x38, 0x9d, 0xf3,
   130  	0xa2, 0xa1, 0x71, 0x41, 0xe3, 0xc5, 0x10, 0xbf, 0x9f, 0x7c, 0x61, 0xa1, 0x79, 0xc7, 0x0c, 0xf5,
   131  	0xed, 0xd5, 0xba, 0xdf, 0xc8, 0xd7, 0x7d, 0x58, 0xf5, 0x82, 0x5b, 0x57, 0xfb, 0x14, 0x5a, 0x0b,
   132  	0x1a, 0x65, 0xcc, 0x69, 0xba, 0xc0, 0xb3, 0xfc, 0xce, 0x0e, 0xb6, 0x3e, 0x14, 0xcd, 0x60, 0x3b,
   133  	0xb3, 0x2f, 0x60, 0x87, 0x47, 0x72, 0x42, 0xa3, 0x11, 0xbb, 0xa4, 0x59, 0x64, 0x9c, 0x13, 0x17,
   134  	0x78, 0x2d, 0xff, 0xc9, 0x0e, 0xee, 0xbc, 0xde, 0x1f, 0x06, 0x87, 0xac, 0xfd, 0x1c, 0xb6, 0xa7,
   135  	0x4c, 0x87, 0x4a, 0xa4, 0x46, 0xc8, 0xc4, 0x79, 0xe0, 0x02, 0xef, 0xa1, 0xff, 0x78, 0x27, 0x6d,
   136  	0x8f, 0xaa, 0x51, 0xb0, 0xcf, 0xd9, 0x1c, 0x76, 0x53, 0xc5, 0x58, 0x5c, 0x56, 0x63, 0x19, 0x89,
   137  	0x70, 0xe9, 0x58, 0xa5, 0xf6, 0x22, 0x5f, 0xf7, 0xbb, 0xe3, 0xa3, 0xd9, 0xef, 0x75, 0xff, 0xb4,
   138  	0x7e, 0x03, 0xf0, 0x31, 0x16, 0xd4, 0x4c, 0x07, 0xdf, 0x01, 0x7c, 0x74, 0x90, 0xfa, 0x5b, 0xa1,
   139  	0x8d, 0xfd, 0xa9, 0x96, 0x3c, 0xbe, 0x5f, 0xf2, 0x85, 0xba, 0xcc, 0xbd, 0xbb, 0x3b, 0x62, 0xeb,
   140  	0xa6, 0xb3, 0x97, 0x7a, 0x00, 0x2d, 0x61, 0x58, 0xac, 0x9d, 0xa6, 0x7b, 0xe2, 0xb5, 0xcf, 0xcf,
   141  	0xf0, 0xdd, 0x6f, 0x01, 0x1f, 0xec, 0xaf, 0xfa, 0x49, 0x6f, 0x0a, 0x8f, 0x60, 0x6b, 0xe5, 0x8f,
   142  	0x56, 0x1b, 0xd4, 0xb8, 0xda, 0xa0, 0xc6, 0xf5, 0x06, 0x35, 0xbe, 0xe6, 0x08, 0xac, 0x72, 0x04,
   143  	0xae, 0x72, 0x04, 0xae, 0x73, 0x04, 0x7e, 0xe4, 0x08, 0x7c, 0xfb, 0x89, 0x1a, 0x1f, 0xd1, 0xdd,
   144  	0xaf, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xfe, 0x45, 0x7e, 0xc6, 0x03, 0x00, 0x00,
   145  }
   146  
   147  func (m *PriorityClass) Marshal() (dAtA []byte, err error) {
   148  	size := m.Size()
   149  	dAtA = make([]byte, size)
   150  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   151  	if err != nil {
   152  		return nil, err
   153  	}
   154  	return dAtA[:n], nil
   155  }
   156  
   157  func (m *PriorityClass) MarshalTo(dAtA []byte) (int, error) {
   158  	size := m.Size()
   159  	return m.MarshalToSizedBuffer(dAtA[:size])
   160  }
   161  
   162  func (m *PriorityClass) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   163  	i := len(dAtA)
   164  	_ = i
   165  	var l int
   166  	_ = l
   167  	if m.PreemptionPolicy != nil {
   168  		i -= len(*m.PreemptionPolicy)
   169  		copy(dAtA[i:], *m.PreemptionPolicy)
   170  		i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreemptionPolicy)))
   171  		i--
   172  		dAtA[i] = 0x2a
   173  	}
   174  	i -= len(m.Description)
   175  	copy(dAtA[i:], m.Description)
   176  	i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description)))
   177  	i--
   178  	dAtA[i] = 0x22
   179  	i--
   180  	if m.GlobalDefault {
   181  		dAtA[i] = 1
   182  	} else {
   183  		dAtA[i] = 0
   184  	}
   185  	i--
   186  	dAtA[i] = 0x18
   187  	i = encodeVarintGenerated(dAtA, i, uint64(m.Value))
   188  	i--
   189  	dAtA[i] = 0x10
   190  	{
   191  		size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
   192  		if err != nil {
   193  			return 0, err
   194  		}
   195  		i -= size
   196  		i = encodeVarintGenerated(dAtA, i, uint64(size))
   197  	}
   198  	i--
   199  	dAtA[i] = 0xa
   200  	return len(dAtA) - i, nil
   201  }
   202  
   203  func (m *PriorityClassList) Marshal() (dAtA []byte, err error) {
   204  	size := m.Size()
   205  	dAtA = make([]byte, size)
   206  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   207  	if err != nil {
   208  		return nil, err
   209  	}
   210  	return dAtA[:n], nil
   211  }
   212  
   213  func (m *PriorityClassList) MarshalTo(dAtA []byte) (int, error) {
   214  	size := m.Size()
   215  	return m.MarshalToSizedBuffer(dAtA[:size])
   216  }
   217  
   218  func (m *PriorityClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   219  	i := len(dAtA)
   220  	_ = i
   221  	var l int
   222  	_ = l
   223  	if len(m.Items) > 0 {
   224  		for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
   225  			{
   226  				size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   227  				if err != nil {
   228  					return 0, err
   229  				}
   230  				i -= size
   231  				i = encodeVarintGenerated(dAtA, i, uint64(size))
   232  			}
   233  			i--
   234  			dAtA[i] = 0x12
   235  		}
   236  	}
   237  	{
   238  		size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
   239  		if err != nil {
   240  			return 0, err
   241  		}
   242  		i -= size
   243  		i = encodeVarintGenerated(dAtA, i, uint64(size))
   244  	}
   245  	i--
   246  	dAtA[i] = 0xa
   247  	return len(dAtA) - i, nil
   248  }
   249  
   250  func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
   251  	offset -= sovGenerated(v)
   252  	base := offset
   253  	for v >= 1<<7 {
   254  		dAtA[offset] = uint8(v&0x7f | 0x80)
   255  		v >>= 7
   256  		offset++
   257  	}
   258  	dAtA[offset] = uint8(v)
   259  	return base
   260  }
   261  func (m *PriorityClass) Size() (n int) {
   262  	if m == nil {
   263  		return 0
   264  	}
   265  	var l int
   266  	_ = l
   267  	l = m.ObjectMeta.Size()
   268  	n += 1 + l + sovGenerated(uint64(l))
   269  	n += 1 + sovGenerated(uint64(m.Value))
   270  	n += 2
   271  	l = len(m.Description)
   272  	n += 1 + l + sovGenerated(uint64(l))
   273  	if m.PreemptionPolicy != nil {
   274  		l = len(*m.PreemptionPolicy)
   275  		n += 1 + l + sovGenerated(uint64(l))
   276  	}
   277  	return n
   278  }
   279  
   280  func (m *PriorityClassList) Size() (n int) {
   281  	if m == nil {
   282  		return 0
   283  	}
   284  	var l int
   285  	_ = l
   286  	l = m.ListMeta.Size()
   287  	n += 1 + l + sovGenerated(uint64(l))
   288  	if len(m.Items) > 0 {
   289  		for _, e := range m.Items {
   290  			l = e.Size()
   291  			n += 1 + l + sovGenerated(uint64(l))
   292  		}
   293  	}
   294  	return n
   295  }
   296  
   297  func sovGenerated(x uint64) (n int) {
   298  	return (math_bits.Len64(x|1) + 6) / 7
   299  }
   300  func sozGenerated(x uint64) (n int) {
   301  	return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   302  }
   303  func (this *PriorityClass) String() string {
   304  	if this == nil {
   305  		return "nil"
   306  	}
   307  	s := strings.Join([]string{`&PriorityClass{`,
   308  		`ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
   309  		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
   310  		`GlobalDefault:` + fmt.Sprintf("%v", this.GlobalDefault) + `,`,
   311  		`Description:` + fmt.Sprintf("%v", this.Description) + `,`,
   312  		`PreemptionPolicy:` + valueToStringGenerated(this.PreemptionPolicy) + `,`,
   313  		`}`,
   314  	}, "")
   315  	return s
   316  }
   317  func (this *PriorityClassList) String() string {
   318  	if this == nil {
   319  		return "nil"
   320  	}
   321  	repeatedStringForItems := "[]PriorityClass{"
   322  	for _, f := range this.Items {
   323  		repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PriorityClass", "PriorityClass", 1), `&`, ``, 1) + ","
   324  	}
   325  	repeatedStringForItems += "}"
   326  	s := strings.Join([]string{`&PriorityClassList{`,
   327  		`ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
   328  		`Items:` + repeatedStringForItems + `,`,
   329  		`}`,
   330  	}, "")
   331  	return s
   332  }
   333  func valueToStringGenerated(v interface{}) string {
   334  	rv := reflect.ValueOf(v)
   335  	if rv.IsNil() {
   336  		return "nil"
   337  	}
   338  	pv := reflect.Indirect(rv).Interface()
   339  	return fmt.Sprintf("*%v", pv)
   340  }
   341  func (m *PriorityClass) Unmarshal(dAtA []byte) error {
   342  	l := len(dAtA)
   343  	iNdEx := 0
   344  	for iNdEx < l {
   345  		preIndex := iNdEx
   346  		var wire uint64
   347  		for shift := uint(0); ; shift += 7 {
   348  			if shift >= 64 {
   349  				return ErrIntOverflowGenerated
   350  			}
   351  			if iNdEx >= l {
   352  				return io.ErrUnexpectedEOF
   353  			}
   354  			b := dAtA[iNdEx]
   355  			iNdEx++
   356  			wire |= uint64(b&0x7F) << shift
   357  			if b < 0x80 {
   358  				break
   359  			}
   360  		}
   361  		fieldNum := int32(wire >> 3)
   362  		wireType := int(wire & 0x7)
   363  		if wireType == 4 {
   364  			return fmt.Errorf("proto: PriorityClass: wiretype end group for non-group")
   365  		}
   366  		if fieldNum <= 0 {
   367  			return fmt.Errorf("proto: PriorityClass: illegal tag %d (wire type %d)", fieldNum, wire)
   368  		}
   369  		switch fieldNum {
   370  		case 1:
   371  			if wireType != 2 {
   372  				return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
   373  			}
   374  			var msglen int
   375  			for shift := uint(0); ; shift += 7 {
   376  				if shift >= 64 {
   377  					return ErrIntOverflowGenerated
   378  				}
   379  				if iNdEx >= l {
   380  					return io.ErrUnexpectedEOF
   381  				}
   382  				b := dAtA[iNdEx]
   383  				iNdEx++
   384  				msglen |= int(b&0x7F) << shift
   385  				if b < 0x80 {
   386  					break
   387  				}
   388  			}
   389  			if msglen < 0 {
   390  				return ErrInvalidLengthGenerated
   391  			}
   392  			postIndex := iNdEx + msglen
   393  			if postIndex < 0 {
   394  				return ErrInvalidLengthGenerated
   395  			}
   396  			if postIndex > l {
   397  				return io.ErrUnexpectedEOF
   398  			}
   399  			if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   400  				return err
   401  			}
   402  			iNdEx = postIndex
   403  		case 2:
   404  			if wireType != 0 {
   405  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
   406  			}
   407  			m.Value = 0
   408  			for shift := uint(0); ; shift += 7 {
   409  				if shift >= 64 {
   410  					return ErrIntOverflowGenerated
   411  				}
   412  				if iNdEx >= l {
   413  					return io.ErrUnexpectedEOF
   414  				}
   415  				b := dAtA[iNdEx]
   416  				iNdEx++
   417  				m.Value |= int32(b&0x7F) << shift
   418  				if b < 0x80 {
   419  					break
   420  				}
   421  			}
   422  		case 3:
   423  			if wireType != 0 {
   424  				return fmt.Errorf("proto: wrong wireType = %d for field GlobalDefault", wireType)
   425  			}
   426  			var v int
   427  			for shift := uint(0); ; shift += 7 {
   428  				if shift >= 64 {
   429  					return ErrIntOverflowGenerated
   430  				}
   431  				if iNdEx >= l {
   432  					return io.ErrUnexpectedEOF
   433  				}
   434  				b := dAtA[iNdEx]
   435  				iNdEx++
   436  				v |= int(b&0x7F) << shift
   437  				if b < 0x80 {
   438  					break
   439  				}
   440  			}
   441  			m.GlobalDefault = bool(v != 0)
   442  		case 4:
   443  			if wireType != 2 {
   444  				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
   445  			}
   446  			var stringLen uint64
   447  			for shift := uint(0); ; shift += 7 {
   448  				if shift >= 64 {
   449  					return ErrIntOverflowGenerated
   450  				}
   451  				if iNdEx >= l {
   452  					return io.ErrUnexpectedEOF
   453  				}
   454  				b := dAtA[iNdEx]
   455  				iNdEx++
   456  				stringLen |= uint64(b&0x7F) << shift
   457  				if b < 0x80 {
   458  					break
   459  				}
   460  			}
   461  			intStringLen := int(stringLen)
   462  			if intStringLen < 0 {
   463  				return ErrInvalidLengthGenerated
   464  			}
   465  			postIndex := iNdEx + intStringLen
   466  			if postIndex < 0 {
   467  				return ErrInvalidLengthGenerated
   468  			}
   469  			if postIndex > l {
   470  				return io.ErrUnexpectedEOF
   471  			}
   472  			m.Description = string(dAtA[iNdEx:postIndex])
   473  			iNdEx = postIndex
   474  		case 5:
   475  			if wireType != 2 {
   476  				return fmt.Errorf("proto: wrong wireType = %d for field PreemptionPolicy", wireType)
   477  			}
   478  			var stringLen uint64
   479  			for shift := uint(0); ; shift += 7 {
   480  				if shift >= 64 {
   481  					return ErrIntOverflowGenerated
   482  				}
   483  				if iNdEx >= l {
   484  					return io.ErrUnexpectedEOF
   485  				}
   486  				b := dAtA[iNdEx]
   487  				iNdEx++
   488  				stringLen |= uint64(b&0x7F) << shift
   489  				if b < 0x80 {
   490  					break
   491  				}
   492  			}
   493  			intStringLen := int(stringLen)
   494  			if intStringLen < 0 {
   495  				return ErrInvalidLengthGenerated
   496  			}
   497  			postIndex := iNdEx + intStringLen
   498  			if postIndex < 0 {
   499  				return ErrInvalidLengthGenerated
   500  			}
   501  			if postIndex > l {
   502  				return io.ErrUnexpectedEOF
   503  			}
   504  			s := k8s_io_api_core_v1.PreemptionPolicy(dAtA[iNdEx:postIndex])
   505  			m.PreemptionPolicy = &s
   506  			iNdEx = postIndex
   507  		default:
   508  			iNdEx = preIndex
   509  			skippy, err := skipGenerated(dAtA[iNdEx:])
   510  			if err != nil {
   511  				return err
   512  			}
   513  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   514  				return ErrInvalidLengthGenerated
   515  			}
   516  			if (iNdEx + skippy) > l {
   517  				return io.ErrUnexpectedEOF
   518  			}
   519  			iNdEx += skippy
   520  		}
   521  	}
   522  
   523  	if iNdEx > l {
   524  		return io.ErrUnexpectedEOF
   525  	}
   526  	return nil
   527  }
   528  func (m *PriorityClassList) Unmarshal(dAtA []byte) error {
   529  	l := len(dAtA)
   530  	iNdEx := 0
   531  	for iNdEx < l {
   532  		preIndex := iNdEx
   533  		var wire uint64
   534  		for shift := uint(0); ; shift += 7 {
   535  			if shift >= 64 {
   536  				return ErrIntOverflowGenerated
   537  			}
   538  			if iNdEx >= l {
   539  				return io.ErrUnexpectedEOF
   540  			}
   541  			b := dAtA[iNdEx]
   542  			iNdEx++
   543  			wire |= uint64(b&0x7F) << shift
   544  			if b < 0x80 {
   545  				break
   546  			}
   547  		}
   548  		fieldNum := int32(wire >> 3)
   549  		wireType := int(wire & 0x7)
   550  		if wireType == 4 {
   551  			return fmt.Errorf("proto: PriorityClassList: wiretype end group for non-group")
   552  		}
   553  		if fieldNum <= 0 {
   554  			return fmt.Errorf("proto: PriorityClassList: illegal tag %d (wire type %d)", fieldNum, wire)
   555  		}
   556  		switch fieldNum {
   557  		case 1:
   558  			if wireType != 2 {
   559  				return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
   560  			}
   561  			var msglen int
   562  			for shift := uint(0); ; shift += 7 {
   563  				if shift >= 64 {
   564  					return ErrIntOverflowGenerated
   565  				}
   566  				if iNdEx >= l {
   567  					return io.ErrUnexpectedEOF
   568  				}
   569  				b := dAtA[iNdEx]
   570  				iNdEx++
   571  				msglen |= int(b&0x7F) << shift
   572  				if b < 0x80 {
   573  					break
   574  				}
   575  			}
   576  			if msglen < 0 {
   577  				return ErrInvalidLengthGenerated
   578  			}
   579  			postIndex := iNdEx + msglen
   580  			if postIndex < 0 {
   581  				return ErrInvalidLengthGenerated
   582  			}
   583  			if postIndex > l {
   584  				return io.ErrUnexpectedEOF
   585  			}
   586  			if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   587  				return err
   588  			}
   589  			iNdEx = postIndex
   590  		case 2:
   591  			if wireType != 2 {
   592  				return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
   593  			}
   594  			var msglen int
   595  			for shift := uint(0); ; shift += 7 {
   596  				if shift >= 64 {
   597  					return ErrIntOverflowGenerated
   598  				}
   599  				if iNdEx >= l {
   600  					return io.ErrUnexpectedEOF
   601  				}
   602  				b := dAtA[iNdEx]
   603  				iNdEx++
   604  				msglen |= int(b&0x7F) << shift
   605  				if b < 0x80 {
   606  					break
   607  				}
   608  			}
   609  			if msglen < 0 {
   610  				return ErrInvalidLengthGenerated
   611  			}
   612  			postIndex := iNdEx + msglen
   613  			if postIndex < 0 {
   614  				return ErrInvalidLengthGenerated
   615  			}
   616  			if postIndex > l {
   617  				return io.ErrUnexpectedEOF
   618  			}
   619  			m.Items = append(m.Items, PriorityClass{})
   620  			if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   621  				return err
   622  			}
   623  			iNdEx = postIndex
   624  		default:
   625  			iNdEx = preIndex
   626  			skippy, err := skipGenerated(dAtA[iNdEx:])
   627  			if err != nil {
   628  				return err
   629  			}
   630  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   631  				return ErrInvalidLengthGenerated
   632  			}
   633  			if (iNdEx + skippy) > l {
   634  				return io.ErrUnexpectedEOF
   635  			}
   636  			iNdEx += skippy
   637  		}
   638  	}
   639  
   640  	if iNdEx > l {
   641  		return io.ErrUnexpectedEOF
   642  	}
   643  	return nil
   644  }
   645  func skipGenerated(dAtA []byte) (n int, err error) {
   646  	l := len(dAtA)
   647  	iNdEx := 0
   648  	depth := 0
   649  	for iNdEx < l {
   650  		var wire uint64
   651  		for shift := uint(0); ; shift += 7 {
   652  			if shift >= 64 {
   653  				return 0, ErrIntOverflowGenerated
   654  			}
   655  			if iNdEx >= l {
   656  				return 0, io.ErrUnexpectedEOF
   657  			}
   658  			b := dAtA[iNdEx]
   659  			iNdEx++
   660  			wire |= (uint64(b) & 0x7F) << shift
   661  			if b < 0x80 {
   662  				break
   663  			}
   664  		}
   665  		wireType := int(wire & 0x7)
   666  		switch wireType {
   667  		case 0:
   668  			for shift := uint(0); ; shift += 7 {
   669  				if shift >= 64 {
   670  					return 0, ErrIntOverflowGenerated
   671  				}
   672  				if iNdEx >= l {
   673  					return 0, io.ErrUnexpectedEOF
   674  				}
   675  				iNdEx++
   676  				if dAtA[iNdEx-1] < 0x80 {
   677  					break
   678  				}
   679  			}
   680  		case 1:
   681  			iNdEx += 8
   682  		case 2:
   683  			var length int
   684  			for shift := uint(0); ; shift += 7 {
   685  				if shift >= 64 {
   686  					return 0, ErrIntOverflowGenerated
   687  				}
   688  				if iNdEx >= l {
   689  					return 0, io.ErrUnexpectedEOF
   690  				}
   691  				b := dAtA[iNdEx]
   692  				iNdEx++
   693  				length |= (int(b) & 0x7F) << shift
   694  				if b < 0x80 {
   695  					break
   696  				}
   697  			}
   698  			if length < 0 {
   699  				return 0, ErrInvalidLengthGenerated
   700  			}
   701  			iNdEx += length
   702  		case 3:
   703  			depth++
   704  		case 4:
   705  			if depth == 0 {
   706  				return 0, ErrUnexpectedEndOfGroupGenerated
   707  			}
   708  			depth--
   709  		case 5:
   710  			iNdEx += 4
   711  		default:
   712  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   713  		}
   714  		if iNdEx < 0 {
   715  			return 0, ErrInvalidLengthGenerated
   716  		}
   717  		if depth == 0 {
   718  			return iNdEx, nil
   719  		}
   720  	}
   721  	return 0, io.ErrUnexpectedEOF
   722  }
   723  
   724  var (
   725  	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
   726  	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
   727  	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
   728  )
   729  

View as plain text