github.com/kata-containers/runtime@v0.0.0-20210505125100-04f29832a923/virtcontainers/pkg/firecracker/client/models/error.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  	strfmt "github.com/go-openapi/strfmt"
    10  
    11  	"github.com/go-openapi/swag"
    12  )
    13  
    14  // Error error
    15  // swagger:model Error
    16  type Error struct {
    17  
    18  	// A description of the error condition
    19  	// Read Only: true
    20  	FaultMessage string `json:"fault_message,omitempty"`
    21  }
    22  
    23  // Validate validates this error
    24  func (m *Error) Validate(formats strfmt.Registry) error {
    25  	return nil
    26  }
    27  
    28  // MarshalBinary interface implementation
    29  func (m *Error) MarshalBinary() ([]byte, error) {
    30  	if m == nil {
    31  		return nil, nil
    32  	}
    33  	return swag.WriteJSON(m)
    34  }
    35  
    36  // UnmarshalBinary interface implementation
    37  func (m *Error) UnmarshalBinary(b []byte) error {
    38  	var res Error
    39  	if err := swag.ReadJSON(b, &res); err != nil {
    40  		return err
    41  	}
    42  	*m = res
    43  	return nil
    44  }