github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/immutable_selector.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  // ImmutableSelector immutable selector
    16  //
    17  // swagger:model ImmutableSelector
    18  type ImmutableSelector struct {
    19  
    20  	// decoration
    21  	Decoration string `json:"decoration,omitempty"`
    22  
    23  	// extras
    24  	Extras string `json:"extras,omitempty"`
    25  
    26  	// kind
    27  	Kind string `json:"kind,omitempty"`
    28  
    29  	// pattern
    30  	Pattern string `json:"pattern,omitempty"`
    31  }
    32  
    33  // Validate validates this immutable selector
    34  func (m *ImmutableSelector) Validate(formats strfmt.Registry) error {
    35  	return nil
    36  }
    37  
    38  // ContextValidate validates this immutable selector based on context it is used
    39  func (m *ImmutableSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    40  	return nil
    41  }
    42  
    43  // MarshalBinary interface implementation
    44  func (m *ImmutableSelector) 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 *ImmutableSelector) UnmarshalBinary(b []byte) error {
    53  	var res ImmutableSelector
    54  	if err := swag.ReadJSON(b, &res); err != nil {
    55  		return err
    56  	}
    57  	*m = res
    58  	return nil
    59  }