github.com/minio/console@v1.4.1/models/rewind_item.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  // RewindItem rewind item
    33  //
    34  // swagger:model rewindItem
    35  type RewindItem struct {
    36  
    37  	// action
    38  	Action string `json:"action,omitempty"`
    39  
    40  	// delete flag
    41  	DeleteFlag bool `json:"delete_flag,omitempty"`
    42  
    43  	// is latest
    44  	IsLatest bool `json:"is_latest,omitempty"`
    45  
    46  	// last modified
    47  	LastModified string `json:"last_modified,omitempty"`
    48  
    49  	// name
    50  	Name string `json:"name,omitempty"`
    51  
    52  	// size
    53  	Size int64 `json:"size,omitempty"`
    54  
    55  	// version id
    56  	VersionID string `json:"version_id,omitempty"`
    57  }
    58  
    59  // Validate validates this rewind item
    60  func (m *RewindItem) Validate(formats strfmt.Registry) error {
    61  	return nil
    62  }
    63  
    64  // ContextValidate validates this rewind item based on context it is used
    65  func (m *RewindItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    66  	return nil
    67  }
    68  
    69  // MarshalBinary interface implementation
    70  func (m *RewindItem) MarshalBinary() ([]byte, error) {
    71  	if m == nil {
    72  		return nil, nil
    73  	}
    74  	return swag.WriteJSON(m)
    75  }
    76  
    77  // UnmarshalBinary interface implementation
    78  func (m *RewindItem) UnmarshalBinary(b []byte) error {
    79  	var res RewindItem
    80  	if err := swag.ReadJSON(b, &res); err != nil {
    81  		return err
    82  	}
    83  	*m = res
    84  	return nil
    85  }