github.com/minio/console@v1.3.0/models/server_drives.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  // ServerDrives server drives
    33  //
    34  // swagger:model serverDrives
    35  type ServerDrives struct {
    36  
    37  	// available space
    38  	AvailableSpace int64 `json:"availableSpace,omitempty"`
    39  
    40  	// drive path
    41  	DrivePath string `json:"drivePath,omitempty"`
    42  
    43  	// endpoint
    44  	Endpoint string `json:"endpoint,omitempty"`
    45  
    46  	// healing
    47  	Healing bool `json:"healing,omitempty"`
    48  
    49  	// model
    50  	Model string `json:"model,omitempty"`
    51  
    52  	// root disk
    53  	RootDisk bool `json:"rootDisk,omitempty"`
    54  
    55  	// state
    56  	State string `json:"state,omitempty"`
    57  
    58  	// total space
    59  	TotalSpace int64 `json:"totalSpace,omitempty"`
    60  
    61  	// used space
    62  	UsedSpace int64 `json:"usedSpace,omitempty"`
    63  
    64  	// uuid
    65  	UUID string `json:"uuid,omitempty"`
    66  }
    67  
    68  // Validate validates this server drives
    69  func (m *ServerDrives) Validate(formats strfmt.Registry) error {
    70  	return nil
    71  }
    72  
    73  // ContextValidate validates this server drives based on context it is used
    74  func (m *ServerDrives) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    75  	return nil
    76  }
    77  
    78  // MarshalBinary interface implementation
    79  func (m *ServerDrives) MarshalBinary() ([]byte, error) {
    80  	if m == nil {
    81  		return nil, nil
    82  	}
    83  	return swag.WriteJSON(m)
    84  }
    85  
    86  // UnmarshalBinary interface implementation
    87  func (m *ServerDrives) UnmarshalBinary(b []byte) error {
    88  	var res ServerDrives
    89  	if err := swag.ReadJSON(b, &res); err != nil {
    90  		return err
    91  	}
    92  	*m = res
    93  	return nil
    94  }