github.com/cilium/cilium@v1.16.2/api/v1/health/models/load_response.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // Copyright Authors of Cilium
     4  // SPDX-License-Identifier: Apache-2.0
     5  
     6  package models
     7  
     8  // This file was generated by the swagger tool.
     9  // Editing this file might prove futile when you re-run the swagger generate command
    10  
    11  import (
    12  	"context"
    13  
    14  	"github.com/go-openapi/strfmt"
    15  	"github.com/go-openapi/swag"
    16  )
    17  
    18  // LoadResponse System load on node
    19  //
    20  // swagger:model LoadResponse
    21  type LoadResponse struct {
    22  
    23  	// Load average over the past 15 minutes
    24  	Last15min string `json:"last15min,omitempty"`
    25  
    26  	// Load average over the past minute
    27  	Last1min string `json:"last1min,omitempty"`
    28  
    29  	// Load average over the past 5 minutes
    30  	Last5min string `json:"last5min,omitempty"`
    31  }
    32  
    33  // Validate validates this load response
    34  func (m *LoadResponse) Validate(formats strfmt.Registry) error {
    35  	return nil
    36  }
    37  
    38  // ContextValidate validates this load response based on context it is used
    39  func (m *LoadResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    40  	return nil
    41  }
    42  
    43  // MarshalBinary interface implementation
    44  func (m *LoadResponse) MarshalBinary() ([]byte, error) {
    45  	if m == nil {
    46  		return nil, nil
    47  	}
    48  	return swag.WriteJSON(m)
    49  }
    50  
    51  // UnmarshalBinary interface implementation
    52  func (m *LoadResponse) UnmarshalBinary(b []byte) error {
    53  	var res LoadResponse
    54  	if err := swag.ReadJSON(b, &res); err != nil {
    55  		return err
    56  	}
    57  	*m = res
    58  	return nil
    59  }