github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/batch-expire_gen.go (about)

     1  package cmd
     2  
     3  // Code generated by github.com/tinylib/msgp DO NOT EDIT.
     4  
     5  import (
     6  	"time"
     7  
     8  	"github.com/tinylib/msgp/msgp"
     9  )
    10  
    11  // DecodeMsg implements msgp.Decodable
    12  func (z *BatchJobExpire) DecodeMsg(dc *msgp.Reader) (err error) {
    13  	var field []byte
    14  	_ = field
    15  	var zb0001 uint32
    16  	zb0001, err = dc.ReadMapHeader()
    17  	if err != nil {
    18  		err = msgp.WrapError(err)
    19  		return
    20  	}
    21  	for zb0001 > 0 {
    22  		zb0001--
    23  		field, err = dc.ReadMapKeyPtr()
    24  		if err != nil {
    25  			err = msgp.WrapError(err)
    26  			return
    27  		}
    28  		switch msgp.UnsafeString(field) {
    29  		case "APIVersion":
    30  			z.APIVersion, err = dc.ReadString()
    31  			if err != nil {
    32  				err = msgp.WrapError(err, "APIVersion")
    33  				return
    34  			}
    35  		case "Bucket":
    36  			z.Bucket, err = dc.ReadString()
    37  			if err != nil {
    38  				err = msgp.WrapError(err, "Bucket")
    39  				return
    40  			}
    41  		case "Prefix":
    42  			z.Prefix, err = dc.ReadString()
    43  			if err != nil {
    44  				err = msgp.WrapError(err, "Prefix")
    45  				return
    46  			}
    47  		case "NotificationCfg":
    48  			err = z.NotificationCfg.DecodeMsg(dc)
    49  			if err != nil {
    50  				err = msgp.WrapError(err, "NotificationCfg")
    51  				return
    52  			}
    53  		case "Retry":
    54  			err = z.Retry.DecodeMsg(dc)
    55  			if err != nil {
    56  				err = msgp.WrapError(err, "Retry")
    57  				return
    58  			}
    59  		case "Rules":
    60  			var zb0002 uint32
    61  			zb0002, err = dc.ReadArrayHeader()
    62  			if err != nil {
    63  				err = msgp.WrapError(err, "Rules")
    64  				return
    65  			}
    66  			if cap(z.Rules) >= int(zb0002) {
    67  				z.Rules = (z.Rules)[:zb0002]
    68  			} else {
    69  				z.Rules = make([]BatchJobExpireFilter, zb0002)
    70  			}
    71  			for za0001 := range z.Rules {
    72  				err = z.Rules[za0001].DecodeMsg(dc)
    73  				if err != nil {
    74  					err = msgp.WrapError(err, "Rules", za0001)
    75  					return
    76  				}
    77  			}
    78  		default:
    79  			err = dc.Skip()
    80  			if err != nil {
    81  				err = msgp.WrapError(err)
    82  				return
    83  			}
    84  		}
    85  	}
    86  	return
    87  }
    88  
    89  // EncodeMsg implements msgp.Encodable
    90  func (z *BatchJobExpire) EncodeMsg(en *msgp.Writer) (err error) {
    91  	// map header, size 6
    92  	// write "APIVersion"
    93  	err = en.Append(0x86, 0xaa, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
    94  	if err != nil {
    95  		return
    96  	}
    97  	err = en.WriteString(z.APIVersion)
    98  	if err != nil {
    99  		err = msgp.WrapError(err, "APIVersion")
   100  		return
   101  	}
   102  	// write "Bucket"
   103  	err = en.Append(0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74)
   104  	if err != nil {
   105  		return
   106  	}
   107  	err = en.WriteString(z.Bucket)
   108  	if err != nil {
   109  		err = msgp.WrapError(err, "Bucket")
   110  		return
   111  	}
   112  	// write "Prefix"
   113  	err = en.Append(0xa6, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78)
   114  	if err != nil {
   115  		return
   116  	}
   117  	err = en.WriteString(z.Prefix)
   118  	if err != nil {
   119  		err = msgp.WrapError(err, "Prefix")
   120  		return
   121  	}
   122  	// write "NotificationCfg"
   123  	err = en.Append(0xaf, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x66, 0x67)
   124  	if err != nil {
   125  		return
   126  	}
   127  	err = z.NotificationCfg.EncodeMsg(en)
   128  	if err != nil {
   129  		err = msgp.WrapError(err, "NotificationCfg")
   130  		return
   131  	}
   132  	// write "Retry"
   133  	err = en.Append(0xa5, 0x52, 0x65, 0x74, 0x72, 0x79)
   134  	if err != nil {
   135  		return
   136  	}
   137  	err = z.Retry.EncodeMsg(en)
   138  	if err != nil {
   139  		err = msgp.WrapError(err, "Retry")
   140  		return
   141  	}
   142  	// write "Rules"
   143  	err = en.Append(0xa5, 0x52, 0x75, 0x6c, 0x65, 0x73)
   144  	if err != nil {
   145  		return
   146  	}
   147  	err = en.WriteArrayHeader(uint32(len(z.Rules)))
   148  	if err != nil {
   149  		err = msgp.WrapError(err, "Rules")
   150  		return
   151  	}
   152  	for za0001 := range z.Rules {
   153  		err = z.Rules[za0001].EncodeMsg(en)
   154  		if err != nil {
   155  			err = msgp.WrapError(err, "Rules", za0001)
   156  			return
   157  		}
   158  	}
   159  	return
   160  }
   161  
   162  // MarshalMsg implements msgp.Marshaler
   163  func (z *BatchJobExpire) MarshalMsg(b []byte) (o []byte, err error) {
   164  	o = msgp.Require(b, z.Msgsize())
   165  	// map header, size 6
   166  	// string "APIVersion"
   167  	o = append(o, 0x86, 0xaa, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
   168  	o = msgp.AppendString(o, z.APIVersion)
   169  	// string "Bucket"
   170  	o = append(o, 0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74)
   171  	o = msgp.AppendString(o, z.Bucket)
   172  	// string "Prefix"
   173  	o = append(o, 0xa6, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78)
   174  	o = msgp.AppendString(o, z.Prefix)
   175  	// string "NotificationCfg"
   176  	o = append(o, 0xaf, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x66, 0x67)
   177  	o, err = z.NotificationCfg.MarshalMsg(o)
   178  	if err != nil {
   179  		err = msgp.WrapError(err, "NotificationCfg")
   180  		return
   181  	}
   182  	// string "Retry"
   183  	o = append(o, 0xa5, 0x52, 0x65, 0x74, 0x72, 0x79)
   184  	o, err = z.Retry.MarshalMsg(o)
   185  	if err != nil {
   186  		err = msgp.WrapError(err, "Retry")
   187  		return
   188  	}
   189  	// string "Rules"
   190  	o = append(o, 0xa5, 0x52, 0x75, 0x6c, 0x65, 0x73)
   191  	o = msgp.AppendArrayHeader(o, uint32(len(z.Rules)))
   192  	for za0001 := range z.Rules {
   193  		o, err = z.Rules[za0001].MarshalMsg(o)
   194  		if err != nil {
   195  			err = msgp.WrapError(err, "Rules", za0001)
   196  			return
   197  		}
   198  	}
   199  	return
   200  }
   201  
   202  // UnmarshalMsg implements msgp.Unmarshaler
   203  func (z *BatchJobExpire) UnmarshalMsg(bts []byte) (o []byte, err error) {
   204  	var field []byte
   205  	_ = field
   206  	var zb0001 uint32
   207  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   208  	if err != nil {
   209  		err = msgp.WrapError(err)
   210  		return
   211  	}
   212  	for zb0001 > 0 {
   213  		zb0001--
   214  		field, bts, err = msgp.ReadMapKeyZC(bts)
   215  		if err != nil {
   216  			err = msgp.WrapError(err)
   217  			return
   218  		}
   219  		switch msgp.UnsafeString(field) {
   220  		case "APIVersion":
   221  			z.APIVersion, bts, err = msgp.ReadStringBytes(bts)
   222  			if err != nil {
   223  				err = msgp.WrapError(err, "APIVersion")
   224  				return
   225  			}
   226  		case "Bucket":
   227  			z.Bucket, bts, err = msgp.ReadStringBytes(bts)
   228  			if err != nil {
   229  				err = msgp.WrapError(err, "Bucket")
   230  				return
   231  			}
   232  		case "Prefix":
   233  			z.Prefix, bts, err = msgp.ReadStringBytes(bts)
   234  			if err != nil {
   235  				err = msgp.WrapError(err, "Prefix")
   236  				return
   237  			}
   238  		case "NotificationCfg":
   239  			bts, err = z.NotificationCfg.UnmarshalMsg(bts)
   240  			if err != nil {
   241  				err = msgp.WrapError(err, "NotificationCfg")
   242  				return
   243  			}
   244  		case "Retry":
   245  			bts, err = z.Retry.UnmarshalMsg(bts)
   246  			if err != nil {
   247  				err = msgp.WrapError(err, "Retry")
   248  				return
   249  			}
   250  		case "Rules":
   251  			var zb0002 uint32
   252  			zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
   253  			if err != nil {
   254  				err = msgp.WrapError(err, "Rules")
   255  				return
   256  			}
   257  			if cap(z.Rules) >= int(zb0002) {
   258  				z.Rules = (z.Rules)[:zb0002]
   259  			} else {
   260  				z.Rules = make([]BatchJobExpireFilter, zb0002)
   261  			}
   262  			for za0001 := range z.Rules {
   263  				bts, err = z.Rules[za0001].UnmarshalMsg(bts)
   264  				if err != nil {
   265  					err = msgp.WrapError(err, "Rules", za0001)
   266  					return
   267  				}
   268  			}
   269  		default:
   270  			bts, err = msgp.Skip(bts)
   271  			if err != nil {
   272  				err = msgp.WrapError(err)
   273  				return
   274  			}
   275  		}
   276  	}
   277  	o = bts
   278  	return
   279  }
   280  
   281  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   282  func (z *BatchJobExpire) Msgsize() (s int) {
   283  	s = 1 + 11 + msgp.StringPrefixSize + len(z.APIVersion) + 7 + msgp.StringPrefixSize + len(z.Bucket) + 7 + msgp.StringPrefixSize + len(z.Prefix) + 16 + z.NotificationCfg.Msgsize() + 6 + z.Retry.Msgsize() + 6 + msgp.ArrayHeaderSize
   284  	for za0001 := range z.Rules {
   285  		s += z.Rules[za0001].Msgsize()
   286  	}
   287  	return
   288  }
   289  
   290  // DecodeMsg implements msgp.Decodable
   291  func (z *BatchJobExpireFilter) DecodeMsg(dc *msgp.Reader) (err error) {
   292  	var field []byte
   293  	_ = field
   294  	var zb0001 uint32
   295  	zb0001, err = dc.ReadMapHeader()
   296  	if err != nil {
   297  		err = msgp.WrapError(err)
   298  		return
   299  	}
   300  	for zb0001 > 0 {
   301  		zb0001--
   302  		field, err = dc.ReadMapKeyPtr()
   303  		if err != nil {
   304  			err = msgp.WrapError(err)
   305  			return
   306  		}
   307  		switch msgp.UnsafeString(field) {
   308  		case "OlderThan":
   309  			z.OlderThan, err = dc.ReadDuration()
   310  			if err != nil {
   311  				err = msgp.WrapError(err, "OlderThan")
   312  				return
   313  			}
   314  		case "CreatedBefore":
   315  			if dc.IsNil() {
   316  				err = dc.ReadNil()
   317  				if err != nil {
   318  					err = msgp.WrapError(err, "CreatedBefore")
   319  					return
   320  				}
   321  				z.CreatedBefore = nil
   322  			} else {
   323  				if z.CreatedBefore == nil {
   324  					z.CreatedBefore = new(time.Time)
   325  				}
   326  				*z.CreatedBefore, err = dc.ReadTime()
   327  				if err != nil {
   328  					err = msgp.WrapError(err, "CreatedBefore")
   329  					return
   330  				}
   331  			}
   332  		case "Tags":
   333  			var zb0002 uint32
   334  			zb0002, err = dc.ReadArrayHeader()
   335  			if err != nil {
   336  				err = msgp.WrapError(err, "Tags")
   337  				return
   338  			}
   339  			if cap(z.Tags) >= int(zb0002) {
   340  				z.Tags = (z.Tags)[:zb0002]
   341  			} else {
   342  				z.Tags = make([]BatchJobKV, zb0002)
   343  			}
   344  			for za0001 := range z.Tags {
   345  				err = z.Tags[za0001].DecodeMsg(dc)
   346  				if err != nil {
   347  					err = msgp.WrapError(err, "Tags", za0001)
   348  					return
   349  				}
   350  			}
   351  		case "Metadata":
   352  			var zb0003 uint32
   353  			zb0003, err = dc.ReadArrayHeader()
   354  			if err != nil {
   355  				err = msgp.WrapError(err, "Metadata")
   356  				return
   357  			}
   358  			if cap(z.Metadata) >= int(zb0003) {
   359  				z.Metadata = (z.Metadata)[:zb0003]
   360  			} else {
   361  				z.Metadata = make([]BatchJobKV, zb0003)
   362  			}
   363  			for za0002 := range z.Metadata {
   364  				err = z.Metadata[za0002].DecodeMsg(dc)
   365  				if err != nil {
   366  					err = msgp.WrapError(err, "Metadata", za0002)
   367  					return
   368  				}
   369  			}
   370  		case "Size":
   371  			err = z.Size.DecodeMsg(dc)
   372  			if err != nil {
   373  				err = msgp.WrapError(err, "Size")
   374  				return
   375  			}
   376  		case "Type":
   377  			z.Type, err = dc.ReadString()
   378  			if err != nil {
   379  				err = msgp.WrapError(err, "Type")
   380  				return
   381  			}
   382  		case "Name":
   383  			z.Name, err = dc.ReadString()
   384  			if err != nil {
   385  				err = msgp.WrapError(err, "Name")
   386  				return
   387  			}
   388  		case "Purge":
   389  			var zb0004 uint32
   390  			zb0004, err = dc.ReadMapHeader()
   391  			if err != nil {
   392  				err = msgp.WrapError(err, "Purge")
   393  				return
   394  			}
   395  			for zb0004 > 0 {
   396  				zb0004--
   397  				field, err = dc.ReadMapKeyPtr()
   398  				if err != nil {
   399  					err = msgp.WrapError(err, "Purge")
   400  					return
   401  				}
   402  				switch msgp.UnsafeString(field) {
   403  				case "RetainVersions":
   404  					z.Purge.RetainVersions, err = dc.ReadInt()
   405  					if err != nil {
   406  						err = msgp.WrapError(err, "Purge", "RetainVersions")
   407  						return
   408  					}
   409  				default:
   410  					err = dc.Skip()
   411  					if err != nil {
   412  						err = msgp.WrapError(err, "Purge")
   413  						return
   414  					}
   415  				}
   416  			}
   417  		default:
   418  			err = dc.Skip()
   419  			if err != nil {
   420  				err = msgp.WrapError(err)
   421  				return
   422  			}
   423  		}
   424  	}
   425  	return
   426  }
   427  
   428  // EncodeMsg implements msgp.Encodable
   429  func (z *BatchJobExpireFilter) EncodeMsg(en *msgp.Writer) (err error) {
   430  	// map header, size 8
   431  	// write "OlderThan"
   432  	err = en.Append(0x88, 0xa9, 0x4f, 0x6c, 0x64, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e)
   433  	if err != nil {
   434  		return
   435  	}
   436  	err = en.WriteDuration(z.OlderThan)
   437  	if err != nil {
   438  		err = msgp.WrapError(err, "OlderThan")
   439  		return
   440  	}
   441  	// write "CreatedBefore"
   442  	err = en.Append(0xad, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65)
   443  	if err != nil {
   444  		return
   445  	}
   446  	if z.CreatedBefore == nil {
   447  		err = en.WriteNil()
   448  		if err != nil {
   449  			return
   450  		}
   451  	} else {
   452  		err = en.WriteTime(*z.CreatedBefore)
   453  		if err != nil {
   454  			err = msgp.WrapError(err, "CreatedBefore")
   455  			return
   456  		}
   457  	}
   458  	// write "Tags"
   459  	err = en.Append(0xa4, 0x54, 0x61, 0x67, 0x73)
   460  	if err != nil {
   461  		return
   462  	}
   463  	err = en.WriteArrayHeader(uint32(len(z.Tags)))
   464  	if err != nil {
   465  		err = msgp.WrapError(err, "Tags")
   466  		return
   467  	}
   468  	for za0001 := range z.Tags {
   469  		err = z.Tags[za0001].EncodeMsg(en)
   470  		if err != nil {
   471  			err = msgp.WrapError(err, "Tags", za0001)
   472  			return
   473  		}
   474  	}
   475  	// write "Metadata"
   476  	err = en.Append(0xa8, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61)
   477  	if err != nil {
   478  		return
   479  	}
   480  	err = en.WriteArrayHeader(uint32(len(z.Metadata)))
   481  	if err != nil {
   482  		err = msgp.WrapError(err, "Metadata")
   483  		return
   484  	}
   485  	for za0002 := range z.Metadata {
   486  		err = z.Metadata[za0002].EncodeMsg(en)
   487  		if err != nil {
   488  			err = msgp.WrapError(err, "Metadata", za0002)
   489  			return
   490  		}
   491  	}
   492  	// write "Size"
   493  	err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65)
   494  	if err != nil {
   495  		return
   496  	}
   497  	err = z.Size.EncodeMsg(en)
   498  	if err != nil {
   499  		err = msgp.WrapError(err, "Size")
   500  		return
   501  	}
   502  	// write "Type"
   503  	err = en.Append(0xa4, 0x54, 0x79, 0x70, 0x65)
   504  	if err != nil {
   505  		return
   506  	}
   507  	err = en.WriteString(z.Type)
   508  	if err != nil {
   509  		err = msgp.WrapError(err, "Type")
   510  		return
   511  	}
   512  	// write "Name"
   513  	err = en.Append(0xa4, 0x4e, 0x61, 0x6d, 0x65)
   514  	if err != nil {
   515  		return
   516  	}
   517  	err = en.WriteString(z.Name)
   518  	if err != nil {
   519  		err = msgp.WrapError(err, "Name")
   520  		return
   521  	}
   522  	// write "Purge"
   523  	err = en.Append(0xa5, 0x50, 0x75, 0x72, 0x67, 0x65)
   524  	if err != nil {
   525  		return
   526  	}
   527  	// map header, size 1
   528  	// write "RetainVersions"
   529  	err = en.Append(0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
   530  	if err != nil {
   531  		return
   532  	}
   533  	err = en.WriteInt(z.Purge.RetainVersions)
   534  	if err != nil {
   535  		err = msgp.WrapError(err, "Purge", "RetainVersions")
   536  		return
   537  	}
   538  	return
   539  }
   540  
   541  // MarshalMsg implements msgp.Marshaler
   542  func (z *BatchJobExpireFilter) MarshalMsg(b []byte) (o []byte, err error) {
   543  	o = msgp.Require(b, z.Msgsize())
   544  	// map header, size 8
   545  	// string "OlderThan"
   546  	o = append(o, 0x88, 0xa9, 0x4f, 0x6c, 0x64, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e)
   547  	o = msgp.AppendDuration(o, z.OlderThan)
   548  	// string "CreatedBefore"
   549  	o = append(o, 0xad, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65)
   550  	if z.CreatedBefore == nil {
   551  		o = msgp.AppendNil(o)
   552  	} else {
   553  		o = msgp.AppendTime(o, *z.CreatedBefore)
   554  	}
   555  	// string "Tags"
   556  	o = append(o, 0xa4, 0x54, 0x61, 0x67, 0x73)
   557  	o = msgp.AppendArrayHeader(o, uint32(len(z.Tags)))
   558  	for za0001 := range z.Tags {
   559  		o, err = z.Tags[za0001].MarshalMsg(o)
   560  		if err != nil {
   561  			err = msgp.WrapError(err, "Tags", za0001)
   562  			return
   563  		}
   564  	}
   565  	// string "Metadata"
   566  	o = append(o, 0xa8, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61)
   567  	o = msgp.AppendArrayHeader(o, uint32(len(z.Metadata)))
   568  	for za0002 := range z.Metadata {
   569  		o, err = z.Metadata[za0002].MarshalMsg(o)
   570  		if err != nil {
   571  			err = msgp.WrapError(err, "Metadata", za0002)
   572  			return
   573  		}
   574  	}
   575  	// string "Size"
   576  	o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65)
   577  	o, err = z.Size.MarshalMsg(o)
   578  	if err != nil {
   579  		err = msgp.WrapError(err, "Size")
   580  		return
   581  	}
   582  	// string "Type"
   583  	o = append(o, 0xa4, 0x54, 0x79, 0x70, 0x65)
   584  	o = msgp.AppendString(o, z.Type)
   585  	// string "Name"
   586  	o = append(o, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
   587  	o = msgp.AppendString(o, z.Name)
   588  	// string "Purge"
   589  	o = append(o, 0xa5, 0x50, 0x75, 0x72, 0x67, 0x65)
   590  	// map header, size 1
   591  	// string "RetainVersions"
   592  	o = append(o, 0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
   593  	o = msgp.AppendInt(o, z.Purge.RetainVersions)
   594  	return
   595  }
   596  
   597  // UnmarshalMsg implements msgp.Unmarshaler
   598  func (z *BatchJobExpireFilter) UnmarshalMsg(bts []byte) (o []byte, err error) {
   599  	var field []byte
   600  	_ = field
   601  	var zb0001 uint32
   602  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   603  	if err != nil {
   604  		err = msgp.WrapError(err)
   605  		return
   606  	}
   607  	for zb0001 > 0 {
   608  		zb0001--
   609  		field, bts, err = msgp.ReadMapKeyZC(bts)
   610  		if err != nil {
   611  			err = msgp.WrapError(err)
   612  			return
   613  		}
   614  		switch msgp.UnsafeString(field) {
   615  		case "OlderThan":
   616  			z.OlderThan, bts, err = msgp.ReadDurationBytes(bts)
   617  			if err != nil {
   618  				err = msgp.WrapError(err, "OlderThan")
   619  				return
   620  			}
   621  		case "CreatedBefore":
   622  			if msgp.IsNil(bts) {
   623  				bts, err = msgp.ReadNilBytes(bts)
   624  				if err != nil {
   625  					return
   626  				}
   627  				z.CreatedBefore = nil
   628  			} else {
   629  				if z.CreatedBefore == nil {
   630  					z.CreatedBefore = new(time.Time)
   631  				}
   632  				*z.CreatedBefore, bts, err = msgp.ReadTimeBytes(bts)
   633  				if err != nil {
   634  					err = msgp.WrapError(err, "CreatedBefore")
   635  					return
   636  				}
   637  			}
   638  		case "Tags":
   639  			var zb0002 uint32
   640  			zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
   641  			if err != nil {
   642  				err = msgp.WrapError(err, "Tags")
   643  				return
   644  			}
   645  			if cap(z.Tags) >= int(zb0002) {
   646  				z.Tags = (z.Tags)[:zb0002]
   647  			} else {
   648  				z.Tags = make([]BatchJobKV, zb0002)
   649  			}
   650  			for za0001 := range z.Tags {
   651  				bts, err = z.Tags[za0001].UnmarshalMsg(bts)
   652  				if err != nil {
   653  					err = msgp.WrapError(err, "Tags", za0001)
   654  					return
   655  				}
   656  			}
   657  		case "Metadata":
   658  			var zb0003 uint32
   659  			zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts)
   660  			if err != nil {
   661  				err = msgp.WrapError(err, "Metadata")
   662  				return
   663  			}
   664  			if cap(z.Metadata) >= int(zb0003) {
   665  				z.Metadata = (z.Metadata)[:zb0003]
   666  			} else {
   667  				z.Metadata = make([]BatchJobKV, zb0003)
   668  			}
   669  			for za0002 := range z.Metadata {
   670  				bts, err = z.Metadata[za0002].UnmarshalMsg(bts)
   671  				if err != nil {
   672  					err = msgp.WrapError(err, "Metadata", za0002)
   673  					return
   674  				}
   675  			}
   676  		case "Size":
   677  			bts, err = z.Size.UnmarshalMsg(bts)
   678  			if err != nil {
   679  				err = msgp.WrapError(err, "Size")
   680  				return
   681  			}
   682  		case "Type":
   683  			z.Type, bts, err = msgp.ReadStringBytes(bts)
   684  			if err != nil {
   685  				err = msgp.WrapError(err, "Type")
   686  				return
   687  			}
   688  		case "Name":
   689  			z.Name, bts, err = msgp.ReadStringBytes(bts)
   690  			if err != nil {
   691  				err = msgp.WrapError(err, "Name")
   692  				return
   693  			}
   694  		case "Purge":
   695  			var zb0004 uint32
   696  			zb0004, bts, err = msgp.ReadMapHeaderBytes(bts)
   697  			if err != nil {
   698  				err = msgp.WrapError(err, "Purge")
   699  				return
   700  			}
   701  			for zb0004 > 0 {
   702  				zb0004--
   703  				field, bts, err = msgp.ReadMapKeyZC(bts)
   704  				if err != nil {
   705  					err = msgp.WrapError(err, "Purge")
   706  					return
   707  				}
   708  				switch msgp.UnsafeString(field) {
   709  				case "RetainVersions":
   710  					z.Purge.RetainVersions, bts, err = msgp.ReadIntBytes(bts)
   711  					if err != nil {
   712  						err = msgp.WrapError(err, "Purge", "RetainVersions")
   713  						return
   714  					}
   715  				default:
   716  					bts, err = msgp.Skip(bts)
   717  					if err != nil {
   718  						err = msgp.WrapError(err, "Purge")
   719  						return
   720  					}
   721  				}
   722  			}
   723  		default:
   724  			bts, err = msgp.Skip(bts)
   725  			if err != nil {
   726  				err = msgp.WrapError(err)
   727  				return
   728  			}
   729  		}
   730  	}
   731  	o = bts
   732  	return
   733  }
   734  
   735  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   736  func (z *BatchJobExpireFilter) Msgsize() (s int) {
   737  	s = 1 + 10 + msgp.DurationSize + 14
   738  	if z.CreatedBefore == nil {
   739  		s += msgp.NilSize
   740  	} else {
   741  		s += msgp.TimeSize
   742  	}
   743  	s += 5 + msgp.ArrayHeaderSize
   744  	for za0001 := range z.Tags {
   745  		s += z.Tags[za0001].Msgsize()
   746  	}
   747  	s += 9 + msgp.ArrayHeaderSize
   748  	for za0002 := range z.Metadata {
   749  		s += z.Metadata[za0002].Msgsize()
   750  	}
   751  	s += 5 + z.Size.Msgsize() + 5 + msgp.StringPrefixSize + len(z.Type) + 5 + msgp.StringPrefixSize + len(z.Name) + 6 + 1 + 15 + msgp.IntSize
   752  	return
   753  }
   754  
   755  // DecodeMsg implements msgp.Decodable
   756  func (z *BatchJobExpirePurge) DecodeMsg(dc *msgp.Reader) (err error) {
   757  	var field []byte
   758  	_ = field
   759  	var zb0001 uint32
   760  	zb0001, err = dc.ReadMapHeader()
   761  	if err != nil {
   762  		err = msgp.WrapError(err)
   763  		return
   764  	}
   765  	for zb0001 > 0 {
   766  		zb0001--
   767  		field, err = dc.ReadMapKeyPtr()
   768  		if err != nil {
   769  			err = msgp.WrapError(err)
   770  			return
   771  		}
   772  		switch msgp.UnsafeString(field) {
   773  		case "RetainVersions":
   774  			z.RetainVersions, err = dc.ReadInt()
   775  			if err != nil {
   776  				err = msgp.WrapError(err, "RetainVersions")
   777  				return
   778  			}
   779  		default:
   780  			err = dc.Skip()
   781  			if err != nil {
   782  				err = msgp.WrapError(err)
   783  				return
   784  			}
   785  		}
   786  	}
   787  	return
   788  }
   789  
   790  // EncodeMsg implements msgp.Encodable
   791  func (z BatchJobExpirePurge) EncodeMsg(en *msgp.Writer) (err error) {
   792  	// map header, size 1
   793  	// write "RetainVersions"
   794  	err = en.Append(0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
   795  	if err != nil {
   796  		return
   797  	}
   798  	err = en.WriteInt(z.RetainVersions)
   799  	if err != nil {
   800  		err = msgp.WrapError(err, "RetainVersions")
   801  		return
   802  	}
   803  	return
   804  }
   805  
   806  // MarshalMsg implements msgp.Marshaler
   807  func (z BatchJobExpirePurge) MarshalMsg(b []byte) (o []byte, err error) {
   808  	o = msgp.Require(b, z.Msgsize())
   809  	// map header, size 1
   810  	// string "RetainVersions"
   811  	o = append(o, 0x81, 0xae, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73)
   812  	o = msgp.AppendInt(o, z.RetainVersions)
   813  	return
   814  }
   815  
   816  // UnmarshalMsg implements msgp.Unmarshaler
   817  func (z *BatchJobExpirePurge) UnmarshalMsg(bts []byte) (o []byte, err error) {
   818  	var field []byte
   819  	_ = field
   820  	var zb0001 uint32
   821  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   822  	if err != nil {
   823  		err = msgp.WrapError(err)
   824  		return
   825  	}
   826  	for zb0001 > 0 {
   827  		zb0001--
   828  		field, bts, err = msgp.ReadMapKeyZC(bts)
   829  		if err != nil {
   830  			err = msgp.WrapError(err)
   831  			return
   832  		}
   833  		switch msgp.UnsafeString(field) {
   834  		case "RetainVersions":
   835  			z.RetainVersions, bts, err = msgp.ReadIntBytes(bts)
   836  			if err != nil {
   837  				err = msgp.WrapError(err, "RetainVersions")
   838  				return
   839  			}
   840  		default:
   841  			bts, err = msgp.Skip(bts)
   842  			if err != nil {
   843  				err = msgp.WrapError(err)
   844  				return
   845  			}
   846  		}
   847  	}
   848  	o = bts
   849  	return
   850  }
   851  
   852  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   853  func (z BatchJobExpirePurge) Msgsize() (s int) {
   854  	s = 1 + 15 + msgp.IntSize
   855  	return
   856  }