github.com/weaviate/weaviate@v1.24.6/entities/models/link.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 // Link link 27 // 28 // swagger:model Link 29 type Link struct { 30 31 // weaviate documentation about this resource group 32 DocumentationHref string `json:"documentationHref,omitempty"` 33 34 // target of the link 35 Href string `json:"href,omitempty"` 36 37 // human readable name of the resource group 38 Name string `json:"name,omitempty"` 39 40 // relationship if both resources are related, e.g. 'next', 'previous', 'parent', etc. 41 Rel string `json:"rel,omitempty"` 42 } 43 44 // Validate validates this link 45 func (m *Link) Validate(formats strfmt.Registry) error { 46 return nil 47 } 48 49 // ContextValidate validates this link based on context it is used 50 func (m *Link) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 51 return nil 52 } 53 54 // MarshalBinary interface implementation 55 func (m *Link) MarshalBinary() ([]byte, error) { 56 if m == nil { 57 return nil, nil 58 } 59 return swag.WriteJSON(m) 60 } 61 62 // UnmarshalBinary interface implementation 63 func (m *Link) UnmarshalBinary(b []byte) error { 64 var res Link 65 if err := swag.ReadJSON(b, &res); err != nil { 66 return err 67 } 68 *m = res 69 return nil 70 }