github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/metrics.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  // Metrics metrics
    16  //
    17  // swagger:model Metrics
    18  type Metrics struct {
    19  
    20  	// The count of error task
    21  	ErrorTaskCount int64 `json:"error_task_count,omitempty"`
    22  
    23  	// The count of pending task
    24  	PendingTaskCount int64 `json:"pending_task_count,omitempty"`
    25  
    26  	// The count of running task
    27  	RunningTaskCount int64 `json:"running_task_count,omitempty"`
    28  
    29  	// The count of scheduled task
    30  	ScheduledTaskCount int64 `json:"scheduled_task_count,omitempty"`
    31  
    32  	// The count of stopped task
    33  	StoppedTaskCount int64 `json:"stopped_task_count,omitempty"`
    34  
    35  	// The count of success task
    36  	SuccessTaskCount int64 `json:"success_task_count,omitempty"`
    37  
    38  	// The count of task
    39  	TaskCount int64 `json:"task_count,omitempty"`
    40  }
    41  
    42  // Validate validates this metrics
    43  func (m *Metrics) Validate(formats strfmt.Registry) error {
    44  	return nil
    45  }
    46  
    47  // ContextValidate validates this metrics based on context it is used
    48  func (m *Metrics) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    49  	return nil
    50  }
    51  
    52  // MarshalBinary interface implementation
    53  func (m *Metrics) 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 *Metrics) UnmarshalBinary(b []byte) error {
    62  	var res Metrics
    63  	if err := swag.ReadJSON(b, &res); err != nil {
    64  		return err
    65  	}
    66  	*m = res
    67  	return nil
    68  }