github.com/weaviate/weaviate@v1.24.6/entities/models/c11y_extension.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  // C11yExtension A resource describing an extension to the contextinoary, containing both the identifier and the definition of the extension
    27  //
    28  // swagger:model C11yExtension
    29  type C11yExtension struct {
    30  
    31  	// The new concept you want to extend. Must be an all-lowercase single word, or a space delimited compound word. Examples: 'foobarium', 'my custom concept'
    32  	// Example: foobarium
    33  	Concept string `json:"concept,omitempty"`
    34  
    35  	// A list of space-delimited words or a sentence describing what the custom concept is about. Avoid using the custom concept itself. An Example definition for the custom concept 'foobarium': would be 'a naturally occurring element which can only be seen by programmers'
    36  	Definition string `json:"definition,omitempty"`
    37  
    38  	// Weight of the definition of the new concept where 1='override existing definition entirely' and 0='ignore custom definition'. Note that if the custom concept is not present in the contextionary yet, the weight cannot be less than 1.
    39  	Weight float32 `json:"weight,omitempty"`
    40  }
    41  
    42  // Validate validates this c11y extension
    43  func (m *C11yExtension) Validate(formats strfmt.Registry) error {
    44  	return nil
    45  }
    46  
    47  // ContextValidate validates this c11y extension based on context it is used
    48  func (m *C11yExtension) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    49  	return nil
    50  }
    51  
    52  // MarshalBinary interface implementation
    53  func (m *C11yExtension) 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 *C11yExtension) UnmarshalBinary(b []byte) error {
    62  	var res C11yExtension
    63  	if err := swag.ReadJSON(b, &res); err != nil {
    64  		return err
    65  	}
    66  	*m = res
    67  	return nil
    68  }