github.com/crowdsecurity/crowdsec@v1.6.1/pkg/modelscapi/metrics_request_machines_item.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package modelscapi
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/go-openapi/strfmt"
    12  	"github.com/go-openapi/swag"
    13  )
    14  
    15  // MetricsRequestMachinesItem MetricsAgentInfo
    16  //
    17  // swagger:model MetricsRequestMachinesItem
    18  type MetricsRequestMachinesItem struct {
    19  
    20  	// last agent push date
    21  	LastPush string `json:"last_push,omitempty"`
    22  
    23  	// last agent update date
    24  	LastUpdate string `json:"last_update,omitempty"`
    25  
    26  	// agent name
    27  	Name string `json:"name,omitempty"`
    28  
    29  	// agent version
    30  	Version string `json:"version,omitempty"`
    31  }
    32  
    33  // Validate validates this metrics request machines item
    34  func (m *MetricsRequestMachinesItem) Validate(formats strfmt.Registry) error {
    35  	return nil
    36  }
    37  
    38  // ContextValidate validates this metrics request machines item based on context it is used
    39  func (m *MetricsRequestMachinesItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    40  	return nil
    41  }
    42  
    43  // MarshalBinary interface implementation
    44  func (m *MetricsRequestMachinesItem) 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 *MetricsRequestMachinesItem) UnmarshalBinary(b []byte) error {
    53  	var res MetricsRequestMachinesItem
    54  	if err := swag.ReadJSON(b, &res); err != nil {
    55  		return err
    56  	}
    57  	*m = res
    58  	return nil
    59  }