github.com/weaviate/weaviate@v1.24.6/entities/models/geo_coordinates.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  // GeoCoordinates geo coordinates
    27  //
    28  // swagger:model GeoCoordinates
    29  type GeoCoordinates struct {
    30  
    31  	// The latitude of the point on earth in decimal form
    32  	Latitude *float32 `json:"latitude,omitempty"`
    33  
    34  	// The longitude of the point on earth in decimal form
    35  	Longitude *float32 `json:"longitude,omitempty"`
    36  }
    37  
    38  // Validate validates this geo coordinates
    39  func (m *GeoCoordinates) Validate(formats strfmt.Registry) error {
    40  	return nil
    41  }
    42  
    43  // ContextValidate validates this geo coordinates based on context it is used
    44  func (m *GeoCoordinates) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    45  	return nil
    46  }
    47  
    48  // MarshalBinary interface implementation
    49  func (m *GeoCoordinates) MarshalBinary() ([]byte, error) {
    50  	if m == nil {
    51  		return nil, nil
    52  	}
    53  	return swag.WriteJSON(m)
    54  }
    55  
    56  // UnmarshalBinary interface implementation
    57  func (m *GeoCoordinates) UnmarshalBinary(b []byte) error {
    58  	var res GeoCoordinates
    59  	if err := swag.ReadJSON(b, &res); err != nil {
    60  		return err
    61  	}
    62  	*m = res
    63  	return nil
    64  }