github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/pkg/platform/api/mono/mono_models/add_on.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package mono_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  // AddOn add on
    16  //
    17  // swagger:model AddOn
    18  type AddOn struct {
    19  
    20  	// category
    21  	Category *string `json:"category,omitempty"`
    22  
    23  	// description
    24  	Description string `json:"description,omitempty"`
    25  
    26  	// enabled
    27  	Enabled bool `json:"enabled,omitempty"`
    28  
    29  	// is default
    30  	IsDefault *bool `json:"isDefault,omitempty"`
    31  
    32  	// name
    33  	Name string `json:"name,omitempty"`
    34  }
    35  
    36  // Validate validates this add on
    37  func (m *AddOn) Validate(formats strfmt.Registry) error {
    38  	return nil
    39  }
    40  
    41  // ContextValidate validates this add on based on context it is used
    42  func (m *AddOn) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    43  	return nil
    44  }
    45  
    46  // MarshalBinary interface implementation
    47  func (m *AddOn) MarshalBinary() ([]byte, error) {
    48  	if m == nil {
    49  		return nil, nil
    50  	}
    51  	return swag.WriteJSON(m)
    52  }
    53  
    54  // UnmarshalBinary interface implementation
    55  func (m *AddOn) UnmarshalBinary(b []byte) error {
    56  	var res AddOn
    57  	if err := swag.ReadJSON(b, &res); err != nil {
    58  		return err
    59  	}
    60  	*m = res
    61  	return nil
    62  }