storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/bucket-metadata_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 *BucketMetadata) 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 "Name":
    28  			z.Name, err = dc.ReadString()
    29  			if err != nil {
    30  				err = msgp.WrapError(err, "Name")
    31  				return
    32  			}
    33  		case "Created":
    34  			z.Created, err = dc.ReadTime()
    35  			if err != nil {
    36  				err = msgp.WrapError(err, "Created")
    37  				return
    38  			}
    39  		case "LockEnabled":
    40  			z.LockEnabled, err = dc.ReadBool()
    41  			if err != nil {
    42  				err = msgp.WrapError(err, "LockEnabled")
    43  				return
    44  			}
    45  		case "PolicyConfigJSON":
    46  			z.PolicyConfigJSON, err = dc.ReadBytes(z.PolicyConfigJSON)
    47  			if err != nil {
    48  				err = msgp.WrapError(err, "PolicyConfigJSON")
    49  				return
    50  			}
    51  		case "NotificationConfigXML":
    52  			z.NotificationConfigXML, err = dc.ReadBytes(z.NotificationConfigXML)
    53  			if err != nil {
    54  				err = msgp.WrapError(err, "NotificationConfigXML")
    55  				return
    56  			}
    57  		case "LifecycleConfigXML":
    58  			z.LifecycleConfigXML, err = dc.ReadBytes(z.LifecycleConfigXML)
    59  			if err != nil {
    60  				err = msgp.WrapError(err, "LifecycleConfigXML")
    61  				return
    62  			}
    63  		case "ObjectLockConfigXML":
    64  			z.ObjectLockConfigXML, err = dc.ReadBytes(z.ObjectLockConfigXML)
    65  			if err != nil {
    66  				err = msgp.WrapError(err, "ObjectLockConfigXML")
    67  				return
    68  			}
    69  		case "VersioningConfigXML":
    70  			z.VersioningConfigXML, err = dc.ReadBytes(z.VersioningConfigXML)
    71  			if err != nil {
    72  				err = msgp.WrapError(err, "VersioningConfigXML")
    73  				return
    74  			}
    75  		case "EncryptionConfigXML":
    76  			z.EncryptionConfigXML, err = dc.ReadBytes(z.EncryptionConfigXML)
    77  			if err != nil {
    78  				err = msgp.WrapError(err, "EncryptionConfigXML")
    79  				return
    80  			}
    81  		case "TaggingConfigXML":
    82  			z.TaggingConfigXML, err = dc.ReadBytes(z.TaggingConfigXML)
    83  			if err != nil {
    84  				err = msgp.WrapError(err, "TaggingConfigXML")
    85  				return
    86  			}
    87  		case "QuotaConfigJSON":
    88  			z.QuotaConfigJSON, err = dc.ReadBytes(z.QuotaConfigJSON)
    89  			if err != nil {
    90  				err = msgp.WrapError(err, "QuotaConfigJSON")
    91  				return
    92  			}
    93  		case "ReplicationConfigXML":
    94  			z.ReplicationConfigXML, err = dc.ReadBytes(z.ReplicationConfigXML)
    95  			if err != nil {
    96  				err = msgp.WrapError(err, "ReplicationConfigXML")
    97  				return
    98  			}
    99  		case "BucketTargetsConfigJSON":
   100  			z.BucketTargetsConfigJSON, err = dc.ReadBytes(z.BucketTargetsConfigJSON)
   101  			if err != nil {
   102  				err = msgp.WrapError(err, "BucketTargetsConfigJSON")
   103  				return
   104  			}
   105  		case "BucketTargetsConfigMetaJSON":
   106  			z.BucketTargetsConfigMetaJSON, err = dc.ReadBytes(z.BucketTargetsConfigMetaJSON)
   107  			if err != nil {
   108  				err = msgp.WrapError(err, "BucketTargetsConfigMetaJSON")
   109  				return
   110  			}
   111  		default:
   112  			err = dc.Skip()
   113  			if err != nil {
   114  				err = msgp.WrapError(err)
   115  				return
   116  			}
   117  		}
   118  	}
   119  	return
   120  }
   121  
   122  // EncodeMsg implements msgp.Encodable
   123  func (z *BucketMetadata) EncodeMsg(en *msgp.Writer) (err error) {
   124  	// map header, size 14
   125  	// write "Name"
   126  	err = en.Append(0x8e, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
   127  	if err != nil {
   128  		return
   129  	}
   130  	err = en.WriteString(z.Name)
   131  	if err != nil {
   132  		err = msgp.WrapError(err, "Name")
   133  		return
   134  	}
   135  	// write "Created"
   136  	err = en.Append(0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64)
   137  	if err != nil {
   138  		return
   139  	}
   140  	err = en.WriteTime(z.Created)
   141  	if err != nil {
   142  		err = msgp.WrapError(err, "Created")
   143  		return
   144  	}
   145  	// write "LockEnabled"
   146  	err = en.Append(0xab, 0x4c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64)
   147  	if err != nil {
   148  		return
   149  	}
   150  	err = en.WriteBool(z.LockEnabled)
   151  	if err != nil {
   152  		err = msgp.WrapError(err, "LockEnabled")
   153  		return
   154  	}
   155  	// write "PolicyConfigJSON"
   156  	err = en.Append(0xb0, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e)
   157  	if err != nil {
   158  		return
   159  	}
   160  	err = en.WriteBytes(z.PolicyConfigJSON)
   161  	if err != nil {
   162  		err = msgp.WrapError(err, "PolicyConfigJSON")
   163  		return
   164  	}
   165  	// write "NotificationConfigXML"
   166  	err = en.Append(0xb5, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   167  	if err != nil {
   168  		return
   169  	}
   170  	err = en.WriteBytes(z.NotificationConfigXML)
   171  	if err != nil {
   172  		err = msgp.WrapError(err, "NotificationConfigXML")
   173  		return
   174  	}
   175  	// write "LifecycleConfigXML"
   176  	err = en.Append(0xb2, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   177  	if err != nil {
   178  		return
   179  	}
   180  	err = en.WriteBytes(z.LifecycleConfigXML)
   181  	if err != nil {
   182  		err = msgp.WrapError(err, "LifecycleConfigXML")
   183  		return
   184  	}
   185  	// write "ObjectLockConfigXML"
   186  	err = en.Append(0xb3, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   187  	if err != nil {
   188  		return
   189  	}
   190  	err = en.WriteBytes(z.ObjectLockConfigXML)
   191  	if err != nil {
   192  		err = msgp.WrapError(err, "ObjectLockConfigXML")
   193  		return
   194  	}
   195  	// write "VersioningConfigXML"
   196  	err = en.Append(0xb3, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   197  	if err != nil {
   198  		return
   199  	}
   200  	err = en.WriteBytes(z.VersioningConfigXML)
   201  	if err != nil {
   202  		err = msgp.WrapError(err, "VersioningConfigXML")
   203  		return
   204  	}
   205  	// write "EncryptionConfigXML"
   206  	err = en.Append(0xb3, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   207  	if err != nil {
   208  		return
   209  	}
   210  	err = en.WriteBytes(z.EncryptionConfigXML)
   211  	if err != nil {
   212  		err = msgp.WrapError(err, "EncryptionConfigXML")
   213  		return
   214  	}
   215  	// write "TaggingConfigXML"
   216  	err = en.Append(0xb0, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   217  	if err != nil {
   218  		return
   219  	}
   220  	err = en.WriteBytes(z.TaggingConfigXML)
   221  	if err != nil {
   222  		err = msgp.WrapError(err, "TaggingConfigXML")
   223  		return
   224  	}
   225  	// write "QuotaConfigJSON"
   226  	err = en.Append(0xaf, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e)
   227  	if err != nil {
   228  		return
   229  	}
   230  	err = en.WriteBytes(z.QuotaConfigJSON)
   231  	if err != nil {
   232  		err = msgp.WrapError(err, "QuotaConfigJSON")
   233  		return
   234  	}
   235  	// write "ReplicationConfigXML"
   236  	err = en.Append(0xb4, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   237  	if err != nil {
   238  		return
   239  	}
   240  	err = en.WriteBytes(z.ReplicationConfigXML)
   241  	if err != nil {
   242  		err = msgp.WrapError(err, "ReplicationConfigXML")
   243  		return
   244  	}
   245  	// write "BucketTargetsConfigJSON"
   246  	err = en.Append(0xb7, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e)
   247  	if err != nil {
   248  		return
   249  	}
   250  	err = en.WriteBytes(z.BucketTargetsConfigJSON)
   251  	if err != nil {
   252  		err = msgp.WrapError(err, "BucketTargetsConfigJSON")
   253  		return
   254  	}
   255  	// write "BucketTargetsConfigMetaJSON"
   256  	err = en.Append(0xbb, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x4a, 0x53, 0x4f, 0x4e)
   257  	if err != nil {
   258  		return
   259  	}
   260  	err = en.WriteBytes(z.BucketTargetsConfigMetaJSON)
   261  	if err != nil {
   262  		err = msgp.WrapError(err, "BucketTargetsConfigMetaJSON")
   263  		return
   264  	}
   265  	return
   266  }
   267  
   268  // MarshalMsg implements msgp.Marshaler
   269  func (z *BucketMetadata) MarshalMsg(b []byte) (o []byte, err error) {
   270  	o = msgp.Require(b, z.Msgsize())
   271  	// map header, size 14
   272  	// string "Name"
   273  	o = append(o, 0x8e, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
   274  	o = msgp.AppendString(o, z.Name)
   275  	// string "Created"
   276  	o = append(o, 0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64)
   277  	o = msgp.AppendTime(o, z.Created)
   278  	// string "LockEnabled"
   279  	o = append(o, 0xab, 0x4c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64)
   280  	o = msgp.AppendBool(o, z.LockEnabled)
   281  	// string "PolicyConfigJSON"
   282  	o = append(o, 0xb0, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e)
   283  	o = msgp.AppendBytes(o, z.PolicyConfigJSON)
   284  	// string "NotificationConfigXML"
   285  	o = append(o, 0xb5, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   286  	o = msgp.AppendBytes(o, z.NotificationConfigXML)
   287  	// string "LifecycleConfigXML"
   288  	o = append(o, 0xb2, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   289  	o = msgp.AppendBytes(o, z.LifecycleConfigXML)
   290  	// string "ObjectLockConfigXML"
   291  	o = append(o, 0xb3, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   292  	o = msgp.AppendBytes(o, z.ObjectLockConfigXML)
   293  	// string "VersioningConfigXML"
   294  	o = append(o, 0xb3, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   295  	o = msgp.AppendBytes(o, z.VersioningConfigXML)
   296  	// string "EncryptionConfigXML"
   297  	o = append(o, 0xb3, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   298  	o = msgp.AppendBytes(o, z.EncryptionConfigXML)
   299  	// string "TaggingConfigXML"
   300  	o = append(o, 0xb0, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   301  	o = msgp.AppendBytes(o, z.TaggingConfigXML)
   302  	// string "QuotaConfigJSON"
   303  	o = append(o, 0xaf, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e)
   304  	o = msgp.AppendBytes(o, z.QuotaConfigJSON)
   305  	// string "ReplicationConfigXML"
   306  	o = append(o, 0xb4, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x58, 0x4d, 0x4c)
   307  	o = msgp.AppendBytes(o, z.ReplicationConfigXML)
   308  	// string "BucketTargetsConfigJSON"
   309  	o = append(o, 0xb7, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e)
   310  	o = msgp.AppendBytes(o, z.BucketTargetsConfigJSON)
   311  	// string "BucketTargetsConfigMetaJSON"
   312  	o = append(o, 0xbb, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x4a, 0x53, 0x4f, 0x4e)
   313  	o = msgp.AppendBytes(o, z.BucketTargetsConfigMetaJSON)
   314  	return
   315  }
   316  
   317  // UnmarshalMsg implements msgp.Unmarshaler
   318  func (z *BucketMetadata) UnmarshalMsg(bts []byte) (o []byte, err error) {
   319  	var field []byte
   320  	_ = field
   321  	var zb0001 uint32
   322  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   323  	if err != nil {
   324  		err = msgp.WrapError(err)
   325  		return
   326  	}
   327  	for zb0001 > 0 {
   328  		zb0001--
   329  		field, bts, err = msgp.ReadMapKeyZC(bts)
   330  		if err != nil {
   331  			err = msgp.WrapError(err)
   332  			return
   333  		}
   334  		switch msgp.UnsafeString(field) {
   335  		case "Name":
   336  			z.Name, bts, err = msgp.ReadStringBytes(bts)
   337  			if err != nil {
   338  				err = msgp.WrapError(err, "Name")
   339  				return
   340  			}
   341  		case "Created":
   342  			z.Created, bts, err = msgp.ReadTimeBytes(bts)
   343  			if err != nil {
   344  				err = msgp.WrapError(err, "Created")
   345  				return
   346  			}
   347  		case "LockEnabled":
   348  			z.LockEnabled, bts, err = msgp.ReadBoolBytes(bts)
   349  			if err != nil {
   350  				err = msgp.WrapError(err, "LockEnabled")
   351  				return
   352  			}
   353  		case "PolicyConfigJSON":
   354  			z.PolicyConfigJSON, bts, err = msgp.ReadBytesBytes(bts, z.PolicyConfigJSON)
   355  			if err != nil {
   356  				err = msgp.WrapError(err, "PolicyConfigJSON")
   357  				return
   358  			}
   359  		case "NotificationConfigXML":
   360  			z.NotificationConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.NotificationConfigXML)
   361  			if err != nil {
   362  				err = msgp.WrapError(err, "NotificationConfigXML")
   363  				return
   364  			}
   365  		case "LifecycleConfigXML":
   366  			z.LifecycleConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.LifecycleConfigXML)
   367  			if err != nil {
   368  				err = msgp.WrapError(err, "LifecycleConfigXML")
   369  				return
   370  			}
   371  		case "ObjectLockConfigXML":
   372  			z.ObjectLockConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.ObjectLockConfigXML)
   373  			if err != nil {
   374  				err = msgp.WrapError(err, "ObjectLockConfigXML")
   375  				return
   376  			}
   377  		case "VersioningConfigXML":
   378  			z.VersioningConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.VersioningConfigXML)
   379  			if err != nil {
   380  				err = msgp.WrapError(err, "VersioningConfigXML")
   381  				return
   382  			}
   383  		case "EncryptionConfigXML":
   384  			z.EncryptionConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.EncryptionConfigXML)
   385  			if err != nil {
   386  				err = msgp.WrapError(err, "EncryptionConfigXML")
   387  				return
   388  			}
   389  		case "TaggingConfigXML":
   390  			z.TaggingConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.TaggingConfigXML)
   391  			if err != nil {
   392  				err = msgp.WrapError(err, "TaggingConfigXML")
   393  				return
   394  			}
   395  		case "QuotaConfigJSON":
   396  			z.QuotaConfigJSON, bts, err = msgp.ReadBytesBytes(bts, z.QuotaConfigJSON)
   397  			if err != nil {
   398  				err = msgp.WrapError(err, "QuotaConfigJSON")
   399  				return
   400  			}
   401  		case "ReplicationConfigXML":
   402  			z.ReplicationConfigXML, bts, err = msgp.ReadBytesBytes(bts, z.ReplicationConfigXML)
   403  			if err != nil {
   404  				err = msgp.WrapError(err, "ReplicationConfigXML")
   405  				return
   406  			}
   407  		case "BucketTargetsConfigJSON":
   408  			z.BucketTargetsConfigJSON, bts, err = msgp.ReadBytesBytes(bts, z.BucketTargetsConfigJSON)
   409  			if err != nil {
   410  				err = msgp.WrapError(err, "BucketTargetsConfigJSON")
   411  				return
   412  			}
   413  		case "BucketTargetsConfigMetaJSON":
   414  			z.BucketTargetsConfigMetaJSON, bts, err = msgp.ReadBytesBytes(bts, z.BucketTargetsConfigMetaJSON)
   415  			if err != nil {
   416  				err = msgp.WrapError(err, "BucketTargetsConfigMetaJSON")
   417  				return
   418  			}
   419  		default:
   420  			bts, err = msgp.Skip(bts)
   421  			if err != nil {
   422  				err = msgp.WrapError(err)
   423  				return
   424  			}
   425  		}
   426  	}
   427  	o = bts
   428  	return
   429  }
   430  
   431  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   432  func (z *BucketMetadata) Msgsize() (s int) {
   433  	s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 8 + msgp.TimeSize + 12 + msgp.BoolSize + 17 + msgp.BytesPrefixSize + len(z.PolicyConfigJSON) + 22 + msgp.BytesPrefixSize + len(z.NotificationConfigXML) + 19 + msgp.BytesPrefixSize + len(z.LifecycleConfigXML) + 20 + msgp.BytesPrefixSize + len(z.ObjectLockConfigXML) + 20 + msgp.BytesPrefixSize + len(z.VersioningConfigXML) + 20 + msgp.BytesPrefixSize + len(z.EncryptionConfigXML) + 17 + msgp.BytesPrefixSize + len(z.TaggingConfigXML) + 16 + msgp.BytesPrefixSize + len(z.QuotaConfigJSON) + 21 + msgp.BytesPrefixSize + len(z.ReplicationConfigXML) + 24 + msgp.BytesPrefixSize + len(z.BucketTargetsConfigJSON) + 28 + msgp.BytesPrefixSize + len(z.BucketTargetsConfigMetaJSON)
   434  	return
   435  }