github.com/minio/console@v1.4.1/models/bucket_object.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // This file is part of MinIO Console Server
     4  // Copyright (c) 2023 MinIO, Inc.
     5  //
     6  // This program is free software: you can redistribute it and/or modify
     7  // it under the terms of the GNU Affero General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // This program is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  // GNU Affero General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU Affero General Public License
    17  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    18  //
    19  
    20  package models
    21  
    22  // This file was generated by the swagger tool.
    23  // Editing this file might prove futile when you re-run the swagger generate command
    24  
    25  import (
    26  	"context"
    27  
    28  	"github.com/go-openapi/strfmt"
    29  	"github.com/go-openapi/swag"
    30  )
    31  
    32  // BucketObject bucket object
    33  //
    34  // swagger:model bucketObject
    35  type BucketObject struct {
    36  
    37  	// content type
    38  	ContentType string `json:"content_type,omitempty"`
    39  
    40  	// etag
    41  	Etag string `json:"etag,omitempty"`
    42  
    43  	// expiration
    44  	Expiration string `json:"expiration,omitempty"`
    45  
    46  	// expiration rule id
    47  	ExpirationRuleID string `json:"expiration_rule_id,omitempty"`
    48  
    49  	// is delete marker
    50  	IsDeleteMarker bool `json:"is_delete_marker,omitempty"`
    51  
    52  	// is latest
    53  	IsLatest bool `json:"is_latest,omitempty"`
    54  
    55  	// last modified
    56  	LastModified string `json:"last_modified,omitempty"`
    57  
    58  	// legal hold status
    59  	LegalHoldStatus string `json:"legal_hold_status,omitempty"`
    60  
    61  	// metadata
    62  	Metadata map[string]string `json:"metadata,omitempty"`
    63  
    64  	// name
    65  	Name string `json:"name,omitempty"`
    66  
    67  	// retention mode
    68  	RetentionMode string `json:"retention_mode,omitempty"`
    69  
    70  	// retention until date
    71  	RetentionUntilDate string `json:"retention_until_date,omitempty"`
    72  
    73  	// size
    74  	Size int64 `json:"size,omitempty"`
    75  
    76  	// tags
    77  	Tags map[string]string `json:"tags,omitempty"`
    78  
    79  	// user metadata
    80  	UserMetadata map[string]string `json:"user_metadata,omitempty"`
    81  
    82  	// user tags
    83  	UserTags map[string]string `json:"user_tags,omitempty"`
    84  
    85  	// version id
    86  	VersionID string `json:"version_id,omitempty"`
    87  }
    88  
    89  // Validate validates this bucket object
    90  func (m *BucketObject) Validate(formats strfmt.Registry) error {
    91  	return nil
    92  }
    93  
    94  // ContextValidate validates this bucket object based on context it is used
    95  func (m *BucketObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    96  	return nil
    97  }
    98  
    99  // MarshalBinary interface implementation
   100  func (m *BucketObject) MarshalBinary() ([]byte, error) {
   101  	if m == nil {
   102  		return nil, nil
   103  	}
   104  	return swag.WriteJSON(m)
   105  }
   106  
   107  // UnmarshalBinary interface implementation
   108  func (m *BucketObject) UnmarshalBinary(b []byte) error {
   109  	var res BucketObject
   110  	if err := swag.ReadJSON(b, &res); err != nil {
   111  		return err
   112  	}
   113  	*m = res
   114  	return nil
   115  }