github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/instance.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  // Instance instance
    16  //
    17  // swagger:model Instance
    18  type Instance struct {
    19  
    20  	// The auth credential data if exists
    21  	AuthInfo map[string]string `json:"auth_info,omitempty"`
    22  
    23  	// The authentication way supported
    24  	AuthMode string `json:"auth_mode,omitempty"`
    25  
    26  	// Whether the instance is default or not
    27  	Default bool `json:"default"`
    28  
    29  	// Description of instance
    30  	Description string `json:"description,omitempty"`
    31  
    32  	// Whether the instance is activated or not
    33  	Enabled bool `json:"enabled"`
    34  
    35  	// The service endpoint of this instance
    36  	Endpoint string `json:"endpoint,omitempty"`
    37  
    38  	// Unique ID
    39  	ID int64 `json:"id,omitempty"`
    40  
    41  	// Whether the instance endpoint is insecure or not
    42  	Insecure bool `json:"insecure"`
    43  
    44  	// Instance name
    45  	Name string `json:"name,omitempty"`
    46  
    47  	// The timestamp of instance setting up
    48  	SetupTimestamp int64 `json:"setup_timestamp,omitempty"`
    49  
    50  	// The health status
    51  	Status string `json:"status,omitempty"`
    52  
    53  	// Based on which driver, identified by ID
    54  	Vendor string `json:"vendor,omitempty"`
    55  }
    56  
    57  // Validate validates this instance
    58  func (m *Instance) Validate(formats strfmt.Registry) error {
    59  	return nil
    60  }
    61  
    62  // ContextValidate validates this instance based on context it is used
    63  func (m *Instance) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    64  	return nil
    65  }
    66  
    67  // MarshalBinary interface implementation
    68  func (m *Instance) MarshalBinary() ([]byte, error) {
    69  	if m == nil {
    70  		return nil, nil
    71  	}
    72  	return swag.WriteJSON(m)
    73  }
    74  
    75  // UnmarshalBinary interface implementation
    76  func (m *Instance) UnmarshalBinary(b []byte) error {
    77  	var res Instance
    78  	if err := swag.ReadJSON(b, &res); err != nil {
    79  		return err
    80  	}
    81  	*m = res
    82  	return nil
    83  }