github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/retention_execution.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  // RetentionExecution retention execution
    16  //
    17  // swagger:model RetentionExecution
    18  type RetentionExecution struct {
    19  
    20  	// dry run
    21  	DryRun bool `json:"dry_run,omitempty"`
    22  
    23  	// end time
    24  	EndTime string `json:"end_time,omitempty"`
    25  
    26  	// id
    27  	ID int64 `json:"id,omitempty"`
    28  
    29  	// policy id
    30  	PolicyID int64 `json:"policy_id,omitempty"`
    31  
    32  	// start time
    33  	StartTime string `json:"start_time,omitempty"`
    34  
    35  	// status
    36  	Status string `json:"status,omitempty"`
    37  
    38  	// trigger
    39  	Trigger string `json:"trigger,omitempty"`
    40  }
    41  
    42  // Validate validates this retention execution
    43  func (m *RetentionExecution) Validate(formats strfmt.Registry) error {
    44  	return nil
    45  }
    46  
    47  // ContextValidate validates this retention execution based on context it is used
    48  func (m *RetentionExecution) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    49  	return nil
    50  }
    51  
    52  // MarshalBinary interface implementation
    53  func (m *RetentionExecution) MarshalBinary() ([]byte, error) {
    54  	if m == nil {
    55  		return nil, nil
    56  	}
    57  	return swag.WriteJSON(m)
    58  }
    59  
    60  // UnmarshalBinary interface implementation
    61  func (m *RetentionExecution) UnmarshalBinary(b []byte) error {
    62  	var res RetentionExecution
    63  	if err := swag.ReadJSON(b, &res); err != nil {
    64  		return err
    65  	}
    66  	*m = res
    67  	return nil
    68  }