storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/bucket-stats_gen.go (about)

     1  package cmd
     2  
     3  // Code generated by github.com/tinylib/msgp DO NOT EDIT.
     4  
     5  import (
     6  	"github.com/tinylib/msgp/msgp"
     7  )
     8  
     9  // DecodeMsg implements msgp.Decodable
    10  func (z *BucketReplicationStats) DecodeMsg(dc *msgp.Reader) (err error) {
    11  	var field []byte
    12  	_ = field
    13  	var zb0001 uint32
    14  	zb0001, err = dc.ReadMapHeader()
    15  	if err != nil {
    16  		err = msgp.WrapError(err)
    17  		return
    18  	}
    19  	for zb0001 > 0 {
    20  		zb0001--
    21  		field, err = dc.ReadMapKeyPtr()
    22  		if err != nil {
    23  			err = msgp.WrapError(err)
    24  			return
    25  		}
    26  		switch msgp.UnsafeString(field) {
    27  		case "PendingSize":
    28  			z.PendingSize, err = dc.ReadUint64()
    29  			if err != nil {
    30  				err = msgp.WrapError(err, "PendingSize")
    31  				return
    32  			}
    33  		case "ReplicatedSize":
    34  			z.ReplicatedSize, err = dc.ReadUint64()
    35  			if err != nil {
    36  				err = msgp.WrapError(err, "ReplicatedSize")
    37  				return
    38  			}
    39  		case "ReplicaSize":
    40  			z.ReplicaSize, err = dc.ReadUint64()
    41  			if err != nil {
    42  				err = msgp.WrapError(err, "ReplicaSize")
    43  				return
    44  			}
    45  		case "FailedSize":
    46  			z.FailedSize, err = dc.ReadUint64()
    47  			if err != nil {
    48  				err = msgp.WrapError(err, "FailedSize")
    49  				return
    50  			}
    51  		case "PendingCount":
    52  			z.PendingCount, err = dc.ReadUint64()
    53  			if err != nil {
    54  				err = msgp.WrapError(err, "PendingCount")
    55  				return
    56  			}
    57  		case "FailedCount":
    58  			z.FailedCount, err = dc.ReadUint64()
    59  			if err != nil {
    60  				err = msgp.WrapError(err, "FailedCount")
    61  				return
    62  			}
    63  		default:
    64  			err = dc.Skip()
    65  			if err != nil {
    66  				err = msgp.WrapError(err)
    67  				return
    68  			}
    69  		}
    70  	}
    71  	return
    72  }
    73  
    74  // EncodeMsg implements msgp.Encodable
    75  func (z *BucketReplicationStats) EncodeMsg(en *msgp.Writer) (err error) {
    76  	// map header, size 6
    77  	// write "PendingSize"
    78  	err = en.Append(0x86, 0xab, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65)
    79  	if err != nil {
    80  		return
    81  	}
    82  	err = en.WriteUint64(z.PendingSize)
    83  	if err != nil {
    84  		err = msgp.WrapError(err, "PendingSize")
    85  		return
    86  	}
    87  	// write "ReplicatedSize"
    88  	err = en.Append(0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65)
    89  	if err != nil {
    90  		return
    91  	}
    92  	err = en.WriteUint64(z.ReplicatedSize)
    93  	if err != nil {
    94  		err = msgp.WrapError(err, "ReplicatedSize")
    95  		return
    96  	}
    97  	// write "ReplicaSize"
    98  	err = en.Append(0xab, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x69, 0x7a, 0x65)
    99  	if err != nil {
   100  		return
   101  	}
   102  	err = en.WriteUint64(z.ReplicaSize)
   103  	if err != nil {
   104  		err = msgp.WrapError(err, "ReplicaSize")
   105  		return
   106  	}
   107  	// write "FailedSize"
   108  	err = en.Append(0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65)
   109  	if err != nil {
   110  		return
   111  	}
   112  	err = en.WriteUint64(z.FailedSize)
   113  	if err != nil {
   114  		err = msgp.WrapError(err, "FailedSize")
   115  		return
   116  	}
   117  	// write "PendingCount"
   118  	err = en.Append(0xac, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74)
   119  	if err != nil {
   120  		return
   121  	}
   122  	err = en.WriteUint64(z.PendingCount)
   123  	if err != nil {
   124  		err = msgp.WrapError(err, "PendingCount")
   125  		return
   126  	}
   127  	// write "FailedCount"
   128  	err = en.Append(0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74)
   129  	if err != nil {
   130  		return
   131  	}
   132  	err = en.WriteUint64(z.FailedCount)
   133  	if err != nil {
   134  		err = msgp.WrapError(err, "FailedCount")
   135  		return
   136  	}
   137  	return
   138  }
   139  
   140  // MarshalMsg implements msgp.Marshaler
   141  func (z *BucketReplicationStats) MarshalMsg(b []byte) (o []byte, err error) {
   142  	o = msgp.Require(b, z.Msgsize())
   143  	// map header, size 6
   144  	// string "PendingSize"
   145  	o = append(o, 0x86, 0xab, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65)
   146  	o = msgp.AppendUint64(o, z.PendingSize)
   147  	// string "ReplicatedSize"
   148  	o = append(o, 0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65)
   149  	o = msgp.AppendUint64(o, z.ReplicatedSize)
   150  	// string "ReplicaSize"
   151  	o = append(o, 0xab, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x69, 0x7a, 0x65)
   152  	o = msgp.AppendUint64(o, z.ReplicaSize)
   153  	// string "FailedSize"
   154  	o = append(o, 0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65)
   155  	o = msgp.AppendUint64(o, z.FailedSize)
   156  	// string "PendingCount"
   157  	o = append(o, 0xac, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74)
   158  	o = msgp.AppendUint64(o, z.PendingCount)
   159  	// string "FailedCount"
   160  	o = append(o, 0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74)
   161  	o = msgp.AppendUint64(o, z.FailedCount)
   162  	return
   163  }
   164  
   165  // UnmarshalMsg implements msgp.Unmarshaler
   166  func (z *BucketReplicationStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
   167  	var field []byte
   168  	_ = field
   169  	var zb0001 uint32
   170  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   171  	if err != nil {
   172  		err = msgp.WrapError(err)
   173  		return
   174  	}
   175  	for zb0001 > 0 {
   176  		zb0001--
   177  		field, bts, err = msgp.ReadMapKeyZC(bts)
   178  		if err != nil {
   179  			err = msgp.WrapError(err)
   180  			return
   181  		}
   182  		switch msgp.UnsafeString(field) {
   183  		case "PendingSize":
   184  			z.PendingSize, bts, err = msgp.ReadUint64Bytes(bts)
   185  			if err != nil {
   186  				err = msgp.WrapError(err, "PendingSize")
   187  				return
   188  			}
   189  		case "ReplicatedSize":
   190  			z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts)
   191  			if err != nil {
   192  				err = msgp.WrapError(err, "ReplicatedSize")
   193  				return
   194  			}
   195  		case "ReplicaSize":
   196  			z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts)
   197  			if err != nil {
   198  				err = msgp.WrapError(err, "ReplicaSize")
   199  				return
   200  			}
   201  		case "FailedSize":
   202  			z.FailedSize, bts, err = msgp.ReadUint64Bytes(bts)
   203  			if err != nil {
   204  				err = msgp.WrapError(err, "FailedSize")
   205  				return
   206  			}
   207  		case "PendingCount":
   208  			z.PendingCount, bts, err = msgp.ReadUint64Bytes(bts)
   209  			if err != nil {
   210  				err = msgp.WrapError(err, "PendingCount")
   211  				return
   212  			}
   213  		case "FailedCount":
   214  			z.FailedCount, bts, err = msgp.ReadUint64Bytes(bts)
   215  			if err != nil {
   216  				err = msgp.WrapError(err, "FailedCount")
   217  				return
   218  			}
   219  		default:
   220  			bts, err = msgp.Skip(bts)
   221  			if err != nil {
   222  				err = msgp.WrapError(err)
   223  				return
   224  			}
   225  		}
   226  	}
   227  	o = bts
   228  	return
   229  }
   230  
   231  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   232  func (z *BucketReplicationStats) Msgsize() (s int) {
   233  	s = 1 + 12 + msgp.Uint64Size + 15 + msgp.Uint64Size + 12 + msgp.Uint64Size + 11 + msgp.Uint64Size + 13 + msgp.Uint64Size + 12 + msgp.Uint64Size
   234  	return
   235  }
   236  
   237  // DecodeMsg implements msgp.Decodable
   238  func (z *BucketStats) DecodeMsg(dc *msgp.Reader) (err error) {
   239  	var field []byte
   240  	_ = field
   241  	var zb0001 uint32
   242  	zb0001, err = dc.ReadMapHeader()
   243  	if err != nil {
   244  		err = msgp.WrapError(err)
   245  		return
   246  	}
   247  	for zb0001 > 0 {
   248  		zb0001--
   249  		field, err = dc.ReadMapKeyPtr()
   250  		if err != nil {
   251  			err = msgp.WrapError(err)
   252  			return
   253  		}
   254  		switch msgp.UnsafeString(field) {
   255  		case "ReplicationStats":
   256  			err = z.ReplicationStats.DecodeMsg(dc)
   257  			if err != nil {
   258  				err = msgp.WrapError(err, "ReplicationStats")
   259  				return
   260  			}
   261  		default:
   262  			err = dc.Skip()
   263  			if err != nil {
   264  				err = msgp.WrapError(err)
   265  				return
   266  			}
   267  		}
   268  	}
   269  	return
   270  }
   271  
   272  // EncodeMsg implements msgp.Encodable
   273  func (z *BucketStats) EncodeMsg(en *msgp.Writer) (err error) {
   274  	// map header, size 1
   275  	// write "ReplicationStats"
   276  	err = en.Append(0x81, 0xb0, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73)
   277  	if err != nil {
   278  		return
   279  	}
   280  	err = z.ReplicationStats.EncodeMsg(en)
   281  	if err != nil {
   282  		err = msgp.WrapError(err, "ReplicationStats")
   283  		return
   284  	}
   285  	return
   286  }
   287  
   288  // MarshalMsg implements msgp.Marshaler
   289  func (z *BucketStats) MarshalMsg(b []byte) (o []byte, err error) {
   290  	o = msgp.Require(b, z.Msgsize())
   291  	// map header, size 1
   292  	// string "ReplicationStats"
   293  	o = append(o, 0x81, 0xb0, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73)
   294  	o, err = z.ReplicationStats.MarshalMsg(o)
   295  	if err != nil {
   296  		err = msgp.WrapError(err, "ReplicationStats")
   297  		return
   298  	}
   299  	return
   300  }
   301  
   302  // UnmarshalMsg implements msgp.Unmarshaler
   303  func (z *BucketStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
   304  	var field []byte
   305  	_ = field
   306  	var zb0001 uint32
   307  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   308  	if err != nil {
   309  		err = msgp.WrapError(err)
   310  		return
   311  	}
   312  	for zb0001 > 0 {
   313  		zb0001--
   314  		field, bts, err = msgp.ReadMapKeyZC(bts)
   315  		if err != nil {
   316  			err = msgp.WrapError(err)
   317  			return
   318  		}
   319  		switch msgp.UnsafeString(field) {
   320  		case "ReplicationStats":
   321  			bts, err = z.ReplicationStats.UnmarshalMsg(bts)
   322  			if err != nil {
   323  				err = msgp.WrapError(err, "ReplicationStats")
   324  				return
   325  			}
   326  		default:
   327  			bts, err = msgp.Skip(bts)
   328  			if err != nil {
   329  				err = msgp.WrapError(err)
   330  				return
   331  			}
   332  		}
   333  	}
   334  	o = bts
   335  	return
   336  }
   337  
   338  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   339  func (z *BucketStats) Msgsize() (s int) {
   340  	s = 1 + 17 + z.ReplicationStats.Msgsize()
   341  	return
   342  }