github.com/crowdsecurity/crowdsec@v1.6.1/pkg/models/metrics_bouncer_info.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package models
     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  // MetricsBouncerInfo MetricsBouncerInfo
    16  //
    17  // Software version info (so we can warn users about out-of-date software). The software name and the version are "guessed" from the user-agent
    18  //
    19  // swagger:model MetricsBouncerInfo
    20  type MetricsBouncerInfo struct {
    21  
    22  	// name of the component
    23  	CustomName string `json:"custom_name,omitempty"`
    24  
    25  	// last bouncer pull date
    26  	LastPull string `json:"last_pull,omitempty"`
    27  
    28  	// bouncer type (firewall, php ...)
    29  	Name string `json:"name,omitempty"`
    30  
    31  	// software version
    32  	Version string `json:"version,omitempty"`
    33  }
    34  
    35  // Validate validates this metrics bouncer info
    36  func (m *MetricsBouncerInfo) Validate(formats strfmt.Registry) error {
    37  	return nil
    38  }
    39  
    40  // ContextValidate validates this metrics bouncer info based on context it is used
    41  func (m *MetricsBouncerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    42  	return nil
    43  }
    44  
    45  // MarshalBinary interface implementation
    46  func (m *MetricsBouncerInfo) MarshalBinary() ([]byte, error) {
    47  	if m == nil {
    48  		return nil, nil
    49  	}
    50  	return swag.WriteJSON(m)
    51  }
    52  
    53  // UnmarshalBinary interface implementation
    54  func (m *MetricsBouncerInfo) UnmarshalBinary(b []byte) error {
    55  	var res MetricsBouncerInfo
    56  	if err := swag.ReadJSON(b, &res); err != nil {
    57  		return err
    58  	}
    59  	*m = res
    60  	return nil
    61  }