github.com/weaviate/weaviate@v1.24.6/entities/models/shard_status.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  // Code generated by go-swagger; DO NOT EDIT.
    13  
    14  package models
    15  
    16  // This file was generated by the swagger tool.
    17  // Editing this file might prove futile when you re-run the swagger generate command
    18  
    19  import (
    20  	"context"
    21  
    22  	"github.com/go-openapi/strfmt"
    23  	"github.com/go-openapi/swag"
    24  )
    25  
    26  // ShardStatus The status of a single shard
    27  //
    28  // swagger:model ShardStatus
    29  type ShardStatus struct {
    30  
    31  	// Status of the shard
    32  	Status string `json:"status,omitempty"`
    33  }
    34  
    35  // Validate validates this shard status
    36  func (m *ShardStatus) Validate(formats strfmt.Registry) error {
    37  	return nil
    38  }
    39  
    40  // ContextValidate validates this shard status based on context it is used
    41  func (m *ShardStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    42  	return nil
    43  }
    44  
    45  // MarshalBinary interface implementation
    46  func (m *ShardStatus) MarshalBinary() ([]byte, error) {
    47  	if m == nil {
    48  		return nil, nil
    49  	}
    50  	return swag.WriteJSON(m)
    51  }
    52  
    53  // UnmarshalBinary interface implementation
    54  func (m *ShardStatus) UnmarshalBinary(b []byte) error {
    55  	var res ShardStatus
    56  	if err := swag.ReadJSON(b, &res); err != nil {
    57  		return err
    58  	}
    59  	*m = res
    60  	return nil
    61  }