github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/robot_sec.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  // RobotSec The response for refresh/update robot account secret.
    16  //
    17  // swagger:model RobotSec
    18  type RobotSec struct {
    19  
    20  	// The secret of the robot
    21  	Secret string `json:"secret,omitempty"`
    22  }
    23  
    24  // Validate validates this robot sec
    25  func (m *RobotSec) Validate(formats strfmt.Registry) error {
    26  	return nil
    27  }
    28  
    29  // ContextValidate validates this robot sec based on context it is used
    30  func (m *RobotSec) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    31  	return nil
    32  }
    33  
    34  // MarshalBinary interface implementation
    35  func (m *RobotSec) MarshalBinary() ([]byte, error) {
    36  	if m == nil {
    37  		return nil, nil
    38  	}
    39  	return swag.WriteJSON(m)
    40  }
    41  
    42  // UnmarshalBinary interface implementation
    43  func (m *RobotSec) UnmarshalBinary(b []byte) error {
    44  	var res RobotSec
    45  	if err := swag.ReadJSON(b, &res); err != nil {
    46  		return err
    47  	}
    48  	*m = res
    49  	return nil
    50  }