github.com/weaviate/weaviate@v1.24.6/entities/models/phone_number.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 // PhoneNumber phone number 27 // 28 // swagger:model PhoneNumber 29 type PhoneNumber struct { 30 31 // Read-only. The numerical country code (e.g. 49) 32 CountryCode uint64 `json:"countryCode,omitempty"` 33 34 // Optional. The ISO 3166-1 alpha-2 country code. This is used to figure out the correct countryCode and international format if only a national number (e.g. 0123 4567) is provided 35 DefaultCountry string `json:"defaultCountry,omitempty"` 36 37 // The raw input as the phone number is present in your raw data set. It will be parsed into the standardized formats if valid. 38 Input string `json:"input,omitempty"` 39 40 // Read-only. Parsed result in the international format (e.g. +49 123 ...) 41 InternationalFormatted string `json:"internationalFormatted,omitempty"` 42 43 // Read-only. The numerical representation of the national part 44 National uint64 `json:"national,omitempty"` 45 46 // Read-only. Parsed result in the national format (e.g. 0123 456789) 47 NationalFormatted string `json:"nationalFormatted,omitempty"` 48 49 // Read-only. Indicates whether the parsed number is a valid phone number 50 Valid bool `json:"valid,omitempty"` 51 } 52 53 // Validate validates this phone number 54 func (m *PhoneNumber) Validate(formats strfmt.Registry) error { 55 return nil 56 } 57 58 // ContextValidate validates this phone number based on context it is used 59 func (m *PhoneNumber) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 60 return nil 61 } 62 63 // MarshalBinary interface implementation 64 func (m *PhoneNumber) MarshalBinary() ([]byte, error) { 65 if m == nil { 66 return nil, nil 67 } 68 return swag.WriteJSON(m) 69 } 70 71 // UnmarshalBinary interface implementation 72 func (m *PhoneNumber) UnmarshalBinary(b []byte) error { 73 var res PhoneNumber 74 if err := swag.ReadJSON(b, &res); err != nil { 75 return err 76 } 77 *m = res 78 return nil 79 }