github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/platform.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  // Platform platform
    16  //
    17  // swagger:model Platform
    18  type Platform struct {
    19  
    20  	// The features of the OS that the artifact applys to
    21  	OsFeatures []string `json:"'os.features'"`
    22  
    23  	// The version of the OS that the artifact applys to
    24  	OsVersion string `json:"'os.version',omitempty"`
    25  
    26  	// The architecture that the artifact applys to
    27  	Architecture string `json:"architecture,omitempty"`
    28  
    29  	// The OS that the artifact applys to
    30  	Os string `json:"os,omitempty"`
    31  
    32  	// The variant of the CPU
    33  	Variant string `json:"variant,omitempty"`
    34  }
    35  
    36  // Validate validates this platform
    37  func (m *Platform) Validate(formats strfmt.Registry) error {
    38  	return nil
    39  }
    40  
    41  // ContextValidate validates this platform based on context it is used
    42  func (m *Platform) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    43  	return nil
    44  }
    45  
    46  // MarshalBinary interface implementation
    47  func (m *Platform) 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 *Platform) UnmarshalBinary(b []byte) error {
    56  	var res Platform
    57  	if err := swag.ReadJSON(b, &res); err != nil {
    58  		return err
    59  	}
    60  	*m = res
    61  	return nil
    62  }