From 8420a41d1346603b1ebca55aa525e9d47084b938 Mon Sep 17 00:00:00 2001 From: Michael Primeaux Date: Sun, 17 Nov 2024 15:33:30 -0600 Subject: [PATCH] feature: Documentation and proto changes. (#5) - feature: Added detailed documentation to all `.proto` files to describe the purpose and expected use of each message. - feature: Added `csharp_namespace` option to the `proto` files to specify the C# namespace for generated files. - feature: Added `map extensions` to the `entity_metadata.proto` file to allow for custom metadata to be added to entities. - debt: Changed `option objc_class_prefix` to `TPB` to match the project name. --- CHANGELOG/CHANGELOG-1.x.md | 19 +++- compass_heading.pb.go | 86 ++++++++++------ compass_heading.proto | 40 ++++++-- country.pb.go | 68 ++++++++----- country.proto | 34 +++++-- country_subdivision.pb.go | 44 ++++---- country_subdivision.proto | 24 +++-- email_address.pb.go | 47 +++++---- email_address.proto | 24 +++-- entity_metadata.pb.go | 197 +++++++++++++++++++++++------------- entity_metadata.proto | 66 ++++++++---- geofence.pb.go | 46 +++++---- geofence.proto | 20 +++- geographic_region.pb.go | 75 ++++++++------ geographic_region.proto | 42 +++++--- geospatial_coordinate.pb.go | 73 +++++++------ geospatial_coordinate.proto | 35 ++++--- geospatial_elevation.pb.go | 74 ++++++++------ geospatial_elevation.proto | 34 +++++-- geospatial_location.pb.go | 113 ++++++++++++--------- geospatial_location.proto | 49 +++++---- map_point.pb.go | 65 +++++++----- map_point.proto | 34 ++++--- polygon.pb.go | 56 ++++++---- polygon.proto | 33 ++++-- radial_geofence.pb.go | 60 ++++++----- radial_geofence.proto | 26 +++-- temporal_range.pb.go | 68 +++++++------ temporal_range.proto | 30 ++++-- time_zone.pb.go | 87 +++++++++------- time_zone.proto | 34 +++++-- uri.pb.go | 77 +++++++++----- uri.proto | 42 ++++++-- url.pb.go | 89 ++++++++++------ url.proto | 50 ++++++--- version.pb.go | 56 ++++++---- version.proto | 27 +++-- 37 files changed, 1315 insertions(+), 729 deletions(-) diff --git a/CHANGELOG/CHANGELOG-1.x.md b/CHANGELOG/CHANGELOG-1.x.md index adc22a5..71a924d 100644 --- a/CHANGELOG/CHANGELOG-1.x.md +++ b/CHANGELOG/CHANGELOG-1.x.md @@ -17,6 +17,22 @@ Date format: `YYYY-MM-DD` ### Fixed ### Security +--- +## [1.23.0] - 2024-11-17 + +### Added +- **FEATURE:** Added detailed documentation to all `.proto` files to describe the purpose and expected use of each message. +- **FEATURE:** Added `csharp_namespace` option to the `protoc` command to specify the C# namespace for generated files. +- **FEATURE:** Added `map extensions` to the `entity_metadata.proto` file to allow for custom metadata to be added to entities. + +### Changed +- **DEBT:** Changed `option objc_class_prefix` to `TPB` to match the project name. + +### Deprecated +### Removed +### Fixed +### Security + --- ## [1.22.0] - 2024-11-17 @@ -29,7 +45,8 @@ Date format: `YYYY-MM-DD` ### Fixed ### Security -[Unreleased]: https://github.com/sixafter/nanoid/compare/v1.22.0..HEAD +[Unreleased]: https://github.com/sixafter/nanoid/compare/v1.23.0..HEAD +[1.23.0]: https://github.com/sixafter/nanoid/compare/v1.22.0...v1.23.0 [1.22.0]: https://github.com/sixafter/nanoid/compare/v1.0.1...v1.22.0 [MUST]: https://datatracker.ietf.org/doc/html/rfc2119 diff --git a/compass_heading.pb.go b/compass_heading.pb.go index 246b122..e93091e 100644 --- a/compass_heading.pb.go +++ b/compass_heading.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,26 +38,40 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// The heading of an object in the Compass Geodetic System (CGS). +// The `CompassHeading` message represents the orientation of an object +// in the Compass Geodetic System (CGS). This can be used in geolocation +// systems, navigation tools, or applications requiring orientation data. type CompassHeading struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The heading (measured in degrees) relative to magnetic north. + // Values range from 0 to 360, where 0 indicates north, 90 indicates east, + // 180 indicates south, and 270 indicates west. MagneticHeading float32 `protobuf:"fixed32,1,opt,name=magnetic_heading,json=magneticHeading,proto3" json:"magnetic_heading,omitempty"` // The heading (measured in degrees) relative to true north. + // This compensates for the local magnetic declination. + // Similar to `magnetic_heading`, values range from 0 to 360. TrueHeading float32 `protobuf:"fixed32,2,opt,name=true_heading,json=trueHeading,proto3" json:"true_heading,omitempty"` // The maximum deviation (measured in degrees) between the reported heading - // and the true geomagnetic heading. + // and the true geomagnetic heading. A lower value indicates higher accuracy. + // This property is essential for assessing the reliability of the heading data. HeadingAccuracy float32 `protobuf:"fixed32,3,opt,name=heading_accuracy,json=headingAccuracy,proto3" json:"heading_accuracy,omitempty"` - // The time at which this heading was determined. + // The time at which this heading measurement was taken. + // This is useful for correlating heading data with other time-based + // measurements or events. Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // The geomagnetic data (measured in microteslas) for the x-axis. + // The geomagnetic field strength (measured in microteslas) along the x-axis. + // This represents the horizontal magnetic component and can be used to derive + // the magnetic field vector in combination with `y` and `z`. X float32 `protobuf:"fixed32,5,opt,name=x,proto3" json:"x,omitempty"` - // The geomagnetic data (measured in microteslas) for the y-axis. + // The geomagnetic field strength (measured in microteslas) along the y-axis. + // This represents the horizontal magnetic component perpendicular to the `x`-axis. Y float32 `protobuf:"fixed32,6,opt,name=y,proto3" json:"y,omitempty"` - // The geomagnetic data (measured in microteslas) for the z-axis. + // The geomagnetic field strength (measured in microteslas) along the z-axis. + // This represents the vertical magnetic component and is crucial for + // determining the three-dimensional magnetic vector. Z float32 `protobuf:"fixed32,7,opt,name=z,proto3" json:"z,omitempty"` } @@ -141,30 +158,33 @@ var File_compass_heading_proto protoreflect.FileDescriptor var file_compass_heading_proto_rawDesc = []byte{ 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xed, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, - 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x61, 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x6d, 0x61, - 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, - 0x0c, 0x74, 0x72, 0x75, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x65, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x29, 0x0a, 0x10, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x75, - 0x72, 0x61, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, - 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, - 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x7a, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x7a, 0x42, - 0x55, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, - 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, - 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x10, 0x6d, + 0x61, 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x6d, 0x61, 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x48, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x65, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x72, + 0x75, 0x65, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x10, 0x68, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x75, + 0x72, 0x61, 0x63, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0c, + 0x0a, 0x01, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, + 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x7a, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x7a, 0x42, 0x75, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x13, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, + 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -181,11 +201,11 @@ func file_compass_heading_proto_rawDescGZIP() []byte { var file_compass_heading_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_compass_heading_proto_goTypes = []any{ - (*CompassHeading)(nil), // 0: types.CompassHeading + (*CompassHeading)(nil), // 0: sixafter.types.CompassHeading (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } var file_compass_heading_proto_depIdxs = []int32{ - 1, // 0: types.CompassHeading.timestamp:type_name -> google.protobuf.Timestamp + 1, // 0: sixafter.types.CompassHeading.timestamp:type_name -> google.protobuf.Timestamp 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/compass_heading.proto b/compass_heading.proto index f57ad13..6697642 100644 --- a/compass_heading.proto +++ b/compass_heading.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -12,41 +15,56 @@ // See the License for the specific language governing permissions and // limitations under the License. -syntax="proto3"; +syntax = "proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package = "github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "CompassHeadingProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "google/protobuf/timestamp.proto"; -// The heading of an object in the Compass Geodetic System (CGS). +// The `CompassHeading` message represents the orientation of an object +// in the Compass Geodetic System (CGS). This can be used in geolocation +// systems, navigation tools, or applications requiring orientation data. message CompassHeading { // The heading (measured in degrees) relative to magnetic north. + // Values range from 0 to 360, where 0 indicates north, 90 indicates east, + // 180 indicates south, and 270 indicates west. float magnetic_heading = 1; // The heading (measured in degrees) relative to true north. + // This compensates for the local magnetic declination. + // Similar to `magnetic_heading`, values range from 0 to 360. float true_heading = 2; // The maximum deviation (measured in degrees) between the reported heading - // and the true geomagnetic heading. + // and the true geomagnetic heading. A lower value indicates higher accuracy. + // This property is essential for assessing the reliability of the heading data. float heading_accuracy = 3; - // The time at which this heading was determined. + // The time at which this heading measurement was taken. + // This is useful for correlating heading data with other time-based + // measurements or events. google.protobuf.Timestamp timestamp = 4; - // The geomagnetic data (measured in microteslas) for the x-axis. + // The geomagnetic field strength (measured in microteslas) along the x-axis. + // This represents the horizontal magnetic component and can be used to derive + // the magnetic field vector in combination with `y` and `z`. float x = 5; - // The geomagnetic data (measured in microteslas) for the y-axis. + // The geomagnetic field strength (measured in microteslas) along the y-axis. + // This represents the horizontal magnetic component perpendicular to the `x`-axis. float y = 6; - // The geomagnetic data (measured in microteslas) for the z-axis. + // The geomagnetic field strength (measured in microteslas) along the z-axis. + // This represents the vertical magnetic component and is crucial for + // determining the three-dimensional magnetic vector. float z = 7; -} \ No newline at end of file +} diff --git a/country.pb.go b/country.pb.go index 1453544..d4b442b 100644 --- a/country.pb.go +++ b/country.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,21 +37,31 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A country as defined by the ISO-3166-1 standard. +// The `Country` message represents a country as defined by the ISO-3166-1 standard. +// It is commonly used for internationalization, geolocation, and regulatory purposes. type Country struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the country. + // The commonly used name of the country. + // Example: "United States". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The formal name of the country. + // The formal or official name of the country. + // Example: "United States of America". FormalName string `protobuf:"bytes,2,opt,name=formal_name,json=formalName,proto3" json:"formal_name,omitempty"` - // The alphabetic 2-code for the country. + // The ISO 3166-1 alpha-2 code for the country. + // This is a two-letter country code commonly used in international standards and systems. + // Example: "US" for the United States. AlphabeticCode_2 string `protobuf:"bytes,3,opt,name=alphabetic_code_2,json=alphabeticCode2,proto3" json:"alphabetic_code_2,omitempty"` - // The alphabetic 3-code for the country. + // The ISO 3166-1 alpha-3 code for the country. + // This is a three-letter country code that offers more specificity than the alpha-2 code. + // Example: "USA" for the United States. AlphabeticCode_3 string `protobuf:"bytes,4,opt,name=alphabetic_code_3,json=alphabeticCode3,proto3" json:"alphabetic_code_3,omitempty"` - // The numeric code for the country. + // The ISO 3166-1 numeric code for the country. + // This is a three-digit code that is language-neutral and often used in databases or systems + // where numeric identifiers are preferred. + // Example: 840 for the United States. NumericCode uint32 `protobuf:"varint,5,opt,name=numeric_code,json=numericCode,proto3" json:"numeric_code,omitempty"` } @@ -121,24 +134,27 @@ var File_country_proto protoreflect.FileDescriptor var file_country_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xb9, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x62, 0x65, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x32, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x43, 0x6f, - 0x64, 0x65, 0x32, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, - 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x33, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, - 0x64, 0x65, 0x42, 0x4e, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, - 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, + 0xb9, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x5f, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x32, 0x12, 0x2a, 0x0a, 0x11, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, + 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, + 0x74, 0x69, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x33, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x6e, 0x0a, 0x12, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x42, 0x0c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, + 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, + 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, + 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, + 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -155,7 +171,7 @@ func file_country_proto_rawDescGZIP() []byte { var file_country_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_country_proto_goTypes = []any{ - (*Country)(nil), // 0: types.Country + (*Country)(nil), // 0: sixafter.types.Country } var file_country_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/country.proto b/country.proto index f8b4c3f..fc0fbc2 100644 --- a/country.proto +++ b/country.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,30 +17,41 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "CountryProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// A country as defined by the ISO-3166-1 standard. +// The `Country` message represents a country as defined by the ISO-3166-1 standard. +// It is commonly used for internationalization, geolocation, and regulatory purposes. message Country { - // The name of the country. + // The commonly used name of the country. + // Example: "United States". string name = 1; - // The formal name of the country. + // The formal or official name of the country. + // Example: "United States of America". string formal_name = 2; - // The alphabetic 2-code for the country. + // The ISO 3166-1 alpha-2 code for the country. + // This is a two-letter country code commonly used in international standards and systems. + // Example: "US" for the United States. string alphabetic_code_2 = 3; - // The alphabetic 3-code for the country. + // The ISO 3166-1 alpha-3 code for the country. + // This is a three-letter country code that offers more specificity than the alpha-2 code. + // Example: "USA" for the United States. string alphabetic_code_3 = 4; - // The numeric code for the country. + // The ISO 3166-1 numeric code for the country. + // This is a three-digit code that is language-neutral and often used in databases or systems + // where numeric identifiers are preferred. + // Example: 840 for the United States. uint32 numeric_code = 5; -} \ No newline at end of file +} diff --git a/country_subdivision.pb.go b/country_subdivision.pb.go index 6df908a..ea47d65 100644 --- a/country_subdivision.pb.go +++ b/country_subdivision.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,15 +37,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A subdivision as defined by the ISO-3166-2 standard. +// The `CountrySubdivision` message represents a subdivision of a country, +// such as a state, province, or territory, as defined by the ISO-3166-2 standard. +// This is commonly used for addressing, geolocation, and administrative purposes. type CountrySubdivision struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the country. + // The name of the subdivision. + // Example: "Texas". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The formal name of the country. + // The ISO 3166-2 code for the subdivision. + // This is a code that uniquely identifies the subdivision within its country. + // Example: "US-TX" for Texas in the United States. Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` } @@ -94,18 +102,20 @@ var File_country_subdivision_proto protoreflect.FileDescriptor var file_country_subdivision_proto_rawDesc = []byte{ 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x64, 0x69, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x75, 0x62, - 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x42, 0x59, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x53, - 0x75, 0x62, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, - 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, - 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x75, 0x62, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x0a, 0x12, 0x63, 0x6f, 0x6d, + 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, + 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x75, 0x62, 0x64, 0x69, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, + 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -122,7 +132,7 @@ func file_country_subdivision_proto_rawDescGZIP() []byte { var file_country_subdivision_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_country_subdivision_proto_goTypes = []any{ - (*CountrySubdivision)(nil), // 0: types.CountrySubdivision + (*CountrySubdivision)(nil), // 0: sixafter.types.CountrySubdivision } var file_country_subdivision_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/country_subdivision.proto b/country_subdivision.proto index 4dfae82..4724616 100644 --- a/country_subdivision.proto +++ b/country_subdivision.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,20 +17,27 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "CountrySubdivisionProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// A subdivision as defined by the ISO-3166-2 standard. +// The `CountrySubdivision` message represents a subdivision of a country, +// such as a state, province, or territory, as defined by the ISO-3166-2 standard. +// This is commonly used for addressing, geolocation, and administrative purposes. message CountrySubdivision { - // The name of the country. + + // The name of the subdivision. + // Example: "Texas". string name = 1; - // The formal name of the country. + // The ISO 3166-2 code for the subdivision. + // This is a code that uniquely identifies the subdivision within its country. + // Example: "US-TX" for Texas in the United States. string code = 2; -} \ No newline at end of file +} diff --git a/email_address.pb.go b/email_address.pb.go index b56158d..154dbfe 100644 --- a/email_address.pb.go +++ b/email_address.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,15 +37,22 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// An electronic mail (email) address as defined by RFC 5322. +// The `EmailAddress` message represents an electronic mail (email) address +// as defined by RFC 5322. It separates the email address into its two main +// components: the local part and the domain part. type EmailAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The local part. + // The local part of the email address. + // This is the portion of the address before the "@" symbol. + // Example: "john.doe" in the email address "john.doe@example.com". LocalPart string `protobuf:"bytes,1,opt,name=local_part,json=localPart,proto3" json:"local_part,omitempty"` - // The domain part. + // The domain part of the email address. + // This is the portion of the address after the "@" symbol. + // It identifies the mail server responsible for accepting emails for the address. + // Example: "example.com" in the email address "john.doe@example.com". DomainPart string `protobuf:"bytes,2,opt,name=domain_part,json=domainPart,proto3" json:"domain_part,omitempty"` } @@ -94,18 +104,21 @@ var File_email_address_proto protoreflect.FileDescriptor var file_email_address_proto_rawDesc = []byte{ 0x0a, 0x13, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0c, - 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x42, 0x53, 0x0a, 0x12, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x42, 0x11, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, - 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x50, 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x70, + 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x50, 0x61, 0x72, 0x74, 0x42, 0x73, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x11, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, + 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, + 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -122,7 +135,7 @@ func file_email_address_proto_rawDescGZIP() []byte { var file_email_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_email_address_proto_goTypes = []any{ - (*EmailAddress)(nil), // 0: types.EmailAddress + (*EmailAddress)(nil), // 0: sixafter.types.EmailAddress } var file_email_address_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/email_address.proto b/email_address.proto index 1a93565..c443fbf 100644 --- a/email_address.proto +++ b/email_address.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,20 +17,29 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "EmailAddressProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// An electronic mail (email) address as defined by RFC 5322. +// The `EmailAddress` message represents an electronic mail (email) address +// as defined by RFC 5322. It separates the email address into its two main +// components: the local part and the domain part. message EmailAddress { - // The local part. + + // The local part of the email address. + // This is the portion of the address before the "@" symbol. + // Example: "john.doe" in the email address "john.doe@example.com". string local_part = 1; - // The domain part. + // The domain part of the email address. + // This is the portion of the address after the "@" symbol. + // It identifies the mail server responsible for accepting emails for the address. + // Example: "example.com" in the email address "john.doe@example.com". string domain_part = 2; } diff --git a/entity_metadata.pb.go b/entity_metadata.pb.go index 5f0041a..71183dc 100644 --- a/entity_metadata.pb.go +++ b/entity_metadata.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,29 +38,54 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// The `EntityMetadata` message represents metadata associated with an entity. +// This includes timestamps, versioning, and additional descriptive properties, +// providing a comprehensive overview of the entity's lifecycle and characteristics. type EntityMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The timestamp at which the related entity was created. + // The timestamp at which the entity was created. + // Example: "2024-11-17T12:34:56Z" for an entity created on November 17, 2024. CreatedOn *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_on,json=createdOn,proto3" json:"created_on,omitempty"` - // The timestamp at which the related entity was last modified. + // The timestamp at which the entity was last modified. + // Example: "2024-11-18T08:20:45Z" for an entity last updated on November 18, 2024. ModifiedOn *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=modified_on,json=modifiedOn,proto3" json:"modified_on,omitempty"` - // A Boolean value indicating whether the related entity is deleted. - Deleted bool `protobuf:"varint,3,opt,name=deleted,proto3" json:"deleted,omitempty"` - // A Boolean value indicating the ephemeral nature of the entity. - Ephemeral bool `protobuf:"varint,4,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` - // A Boolean value indicating if the entity can be synchronized with external sources. - Replicable bool `protobuf:"varint,5,opt,name=replicable,proto3" json:"replicable,omitempty"` - // A Boolean value indicating if the entity is immutable. - Immutable bool `protobuf:"varint,6,opt,name=immutable,proto3" json:"immutable,omitempty"` + // The timestamp at which the entity was deleted, if applicable. + // Example: "2024-11-19T15:00:00Z" for an entity marked as deleted on November 19, 2024. + DeletedOn *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=deleted_on,json=deletedOn,proto3" json:"deleted_on,omitempty"` + // Indicates whether the entity is ephemeral. + // An ephemeral entity is temporary and may not be persisted or stored long-term. + // Example: `true` for a session-based entity. + IsEphemeral bool `protobuf:"varint,4,opt,name=is_ephemeral,json=isEphemeral,proto3" json:"is_ephemeral,omitempty"` + // Indicates whether the entity can be replicated with external sources. + // Example: `true` for an entity designed to synchronize with external systems. + IsReplicable bool `protobuf:"varint,5,opt,name=is_replicable,json=isReplicable,proto3" json:"is_replicable,omitempty"` + // Indicates whether the entity is immutable. + // An immutable entity cannot be modified after creation. + // Example: `true` for a cryptographic hash record. + IsImmutable bool `protobuf:"varint,6,opt,name=is_immutable,json=isImmutable,proto3" json:"is_immutable,omitempty"` // The Semantic Version v2.0 compliant version of the entity. + // This provides versioning information for tracking changes and compatibility. + // Example: Version `1.0.0` for the initial release of the entity. Version *Version `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"` - // A set of tags. - Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` - // A Boolean value indicating if the entity was synthesized (or is synthetic). - Synthesized bool `protobuf:"varint,9,opt,name=synthesized,proto3" json:"synthesized,omitempty"` + // Indicates whether the entity was synthesized (or is synthetic). + // A synthetic entity is derived or generated, rather than directly created by users. + // Example: `true` for an entity generated by machine learning algorithms. + IsSynthetic bool `protobuf:"varint,8,opt,name=is_synthetic,json=isSynthetic,proto3" json:"is_synthetic,omitempty"` + // A list of tags associated with the entity. + // Tags provide descriptive labels for categorization or search. + // Tags must have: + // - A minimum length of 1 character + // - A maximum length of 256 characters + // - A pattern matching "^[a-zA-Z0-9_-]+$" (alphanumeric, underscores, and hyphens). + // Example: `["finance", "report2024"]` for an entity tagged as a 2024 finance report. + Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` + // Custom extensions for additional metadata in key-value format. + // The keys and values are strings, allowing flexible metadata descriptions. + // Example: `{"source": "API", "priority": "high"}` for an entity from the API with high priority. + Extensions map[string]string `protobuf:"bytes,10,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *EntityMetadata) Reset() { @@ -104,30 +132,30 @@ func (x *EntityMetadata) GetModifiedOn() *timestamppb.Timestamp { return nil } -func (x *EntityMetadata) GetDeleted() bool { +func (x *EntityMetadata) GetDeletedOn() *timestamppb.Timestamp { if x != nil { - return x.Deleted + return x.DeletedOn } - return false + return nil } -func (x *EntityMetadata) GetEphemeral() bool { +func (x *EntityMetadata) GetIsEphemeral() bool { if x != nil { - return x.Ephemeral + return x.IsEphemeral } return false } -func (x *EntityMetadata) GetReplicable() bool { +func (x *EntityMetadata) GetIsReplicable() bool { if x != nil { - return x.Replicable + return x.IsReplicable } return false } -func (x *EntityMetadata) GetImmutable() bool { +func (x *EntityMetadata) GetIsImmutable() bool { if x != nil { - return x.Immutable + return x.IsImmutable } return false } @@ -139,6 +167,13 @@ func (x *EntityMetadata) GetVersion() *Version { return nil } +func (x *EntityMetadata) GetIsSynthetic() bool { + if x != nil { + return x.IsSynthetic + } + return false +} + func (x *EntityMetadata) GetTags() []string { if x != nil { return x.Tags @@ -146,49 +181,64 @@ func (x *EntityMetadata) GetTags() []string { return nil } -func (x *EntityMetadata) GetSynthesized() bool { +func (x *EntityMetadata) GetExtensions() map[string]string { if x != nil { - return x.Synthesized + return x.Extensions } - return false + return nil } var File_entity_metadata_proto protoreflect.FileDescriptor var file_entity_metadata_proto_rawDesc = []byte{ 0x0a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, - 0x02, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, - 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, - 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x28, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, - 0x0b, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x64, 0x42, - 0x55, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x13, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, - 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, - 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x04, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x4f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, + 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, + 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x69, 0x78, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x12, 0x4e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x42, 0x75, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x13, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, + 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, + 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, + 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -203,21 +253,24 @@ func file_entity_metadata_proto_rawDescGZIP() []byte { return file_entity_metadata_proto_rawDescData } -var file_entity_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_entity_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_entity_metadata_proto_goTypes = []any{ - (*EntityMetadata)(nil), // 0: types.EntityMetadata - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp - (*Version)(nil), // 2: types.Version + (*EntityMetadata)(nil), // 0: sixafter.types.EntityMetadata + nil, // 1: sixafter.types.EntityMetadata.ExtensionsEntry + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*Version)(nil), // 3: sixafter.types.Version } var file_entity_metadata_proto_depIdxs = []int32{ - 1, // 0: types.EntityMetadata.created_on:type_name -> google.protobuf.Timestamp - 1, // 1: types.EntityMetadata.modified_on:type_name -> google.protobuf.Timestamp - 2, // 2: types.EntityMetadata.version:type_name -> types.Version - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: sixafter.types.EntityMetadata.created_on:type_name -> google.protobuf.Timestamp + 2, // 1: sixafter.types.EntityMetadata.modified_on:type_name -> google.protobuf.Timestamp + 2, // 2: sixafter.types.EntityMetadata.deleted_on:type_name -> google.protobuf.Timestamp + 3, // 3: sixafter.types.EntityMetadata.version:type_name -> sixafter.types.Version + 1, // 4: sixafter.types.EntityMetadata.extensions:type_name -> sixafter.types.EntityMetadata.ExtensionsEntry + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_entity_metadata_proto_init() } @@ -232,7 +285,7 @@ func file_entity_metadata_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_entity_metadata_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/entity_metadata.proto b/entity_metadata.proto index 9ee7f39..2c08f4d 100644 --- a/entity_metadata.proto +++ b/entity_metadata.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,44 +17,71 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "EntityMetadataProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "google/protobuf/timestamp.proto"; import "version.proto"; +// The `EntityMetadata` message represents metadata associated with an entity. +// This includes timestamps, versioning, and additional descriptive properties, +// providing a comprehensive overview of the entity's lifecycle and characteristics. message EntityMetadata { - // The timestamp at which the related entity was created. + + // The timestamp at which the entity was created. + // Example: "2024-11-17T12:34:56Z" for an entity created on November 17, 2024. google.protobuf.Timestamp created_on = 1; - // The timestamp at which the related entity was last modified. + // The timestamp at which the entity was last modified. + // Example: "2024-11-18T08:20:45Z" for an entity last updated on November 18, 2024. google.protobuf.Timestamp modified_on = 2; - // A Boolean value indicating whether the related entity is deleted. - bool deleted = 3; + // The timestamp at which the entity was deleted, if applicable. + // Example: "2024-11-19T15:00:00Z" for an entity marked as deleted on November 19, 2024. + google.protobuf.Timestamp deleted_on = 3; - // A Boolean value indicating the ephemeral nature of the entity. - bool ephemeral = 4; + // Indicates whether the entity is ephemeral. + // An ephemeral entity is temporary and may not be persisted or stored long-term. + // Example: `true` for a session-based entity. + bool is_ephemeral = 4; - // A Boolean value indicating if the entity can be synchronized with external sources. - bool replicable = 5; + // Indicates whether the entity can be replicated with external sources. + // Example: `true` for an entity designed to synchronize with external systems. + bool is_replicable = 5; - // A Boolean value indicating if the entity is immutable. - bool immutable = 6; + // Indicates whether the entity is immutable. + // An immutable entity cannot be modified after creation. + // Example: `true` for a cryptographic hash record. + bool is_immutable = 6; // The Semantic Version v2.0 compliant version of the entity. + // This provides versioning information for tracking changes and compatibility. + // Example: Version `1.0.0` for the initial release of the entity. Version version = 7; - // A set of tags. - repeated string tags = 8; + // Indicates whether the entity was synthesized (or is synthetic). + // A synthetic entity is derived or generated, rather than directly created by users. + // Example: `true` for an entity generated by machine learning algorithms. + bool is_synthetic = 8; - // A Boolean value indicating if the entity was synthesized (or is synthetic). - bool synthesized = 9; -} + // A list of tags associated with the entity. + // Tags provide descriptive labels for categorization or search. + // Tags must have: + // - A minimum length of 1 character + // - A maximum length of 256 characters + // - A pattern matching "^[a-zA-Z0-9_-]+$" (alphanumeric, underscores, and hyphens). + // Example: `["finance", "report2024"]` for an entity tagged as a 2024 finance report. + repeated string tags = 9; + // Custom extensions for additional metadata in key-value format. + // The keys and values are strings, allowing flexible metadata descriptions. + // Example: `{"source": "API", "priority": "high"}` for an entity from the API with high priority. + map extensions = 10; +} diff --git a/geofence.pb.go b/geofence.pb.go index 4c3582c..770cd63 100644 --- a/geofence.pb.go +++ b/geofence.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,15 +37,21 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A geofence is a virtual perimeter for a real-world geographic area. +// The `Geofence` message represents a virtual boundary around a geographic area. +// Geofences are used in applications such as location-based services, navigation, +// and geo-restriction. type Geofence struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The name of the geofence. + // Example: "Campus Zone", "Restricted Area". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The set of polygons that define the geofence. + // A geofence may consist of one or more polygons, where each polygon represents + // a distinct area. The polygons can define complex, multi-vertex boundaries. + // Example: A campus geofence with multiple disconnected zones. Polygon []*Polygon `protobuf:"bytes,2,rep,name=polygon,proto3" json:"polygon,omitempty"` } @@ -94,18 +103,21 @@ var File_geofence_proto protoreflect.FileDescriptor var file_geofence_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x67, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x0d, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x66, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, - 0x42, 0x4f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0d, 0x47, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, - 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x1a, 0x0d, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x51, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x31, 0x0a, 0x07, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x6f, 0x6c, 0x79, 0x67, + 0x6f, 0x6e, 0x42, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0d, 0x47, 0x65, 0x6f, 0x66, 0x65, 0x6e, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, + 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -122,11 +134,11 @@ func file_geofence_proto_rawDescGZIP() []byte { var file_geofence_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_geofence_proto_goTypes = []any{ - (*Geofence)(nil), // 0: types.Geofence - (*Polygon)(nil), // 1: types.Polygon + (*Geofence)(nil), // 0: sixafter.types.Geofence + (*Polygon)(nil), // 1: sixafter.types.Polygon } var file_geofence_proto_depIdxs = []int32{ - 1, // 0: types.Geofence.polygon:type_name -> types.Polygon + 1, // 0: sixafter.types.Geofence.polygon:type_name -> sixafter.types.Polygon 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/geofence.proto b/geofence.proto index c28cfdc..e236f58 100644 --- a/geofence.proto +++ b/geofence.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,23 +17,30 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "GeofenceProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "polygon.proto"; -// A geofence is a virtual perimeter for a real-world geographic area. +// The `Geofence` message represents a virtual boundary around a geographic area. +// Geofences are used in applications such as location-based services, navigation, +// and geo-restriction. message Geofence { // The name of the geofence. + // Example: "Campus Zone", "Restricted Area". string name = 1; // The set of polygons that define the geofence. + // A geofence may consist of one or more polygons, where each polygon represents + // a distinct area. The polygons can define complex, multi-vertex boundaries. + // Example: A campus geofence with multiple disconnected zones. repeated Polygon polygon = 2; -} \ No newline at end of file +} diff --git a/geographic_region.pb.go b/geographic_region.pb.go index 1ac83a5..9998ee3 100644 --- a/geographic_region.pb.go +++ b/geographic_region.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,24 +37,33 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// ISO 3166-2 is part of the ISO 3166 standard published by the International -// Organization for Standardization (ISO), and defines codes for identifying -// the principal subdivisions (e.g., provinces or states) of all countries -// coded in ISO 3166-1 +// The `GeographicRegion` message represents a region as defined by the ISO 3166-2 standard. +// ISO 3166-2 defines codes for identifying the principal subdivisions (e.g., states or provinces) +// of countries coded in ISO 3166-1. This message can be used in applications requiring +// geographic or administrative classification. type GeographicRegion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the region. + // The commonly used name of the region. + // Example: "Texas". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The formal name of the region. + // The formal or official name of the region. + // Example: "State of Texas". FormalName string `protobuf:"bytes,2,opt,name=formal_name,json=formalName,proto3" json:"formal_name,omitempty"` - // The numeric code for the region. + // The numeric code for the region as defined in the ISO 3166-2 standard. + // This code is often used in databases or systems where numeric identifiers + // are preferred for regional classification. + // Example: 48 (numeric code for Texas in the United States, if applicable). NumericCode uint32 `protobuf:"varint,3,opt,name=numeric_code,json=numericCode,proto3" json:"numeric_code,omitempty"` - // The country for the region. + // The country to which the region belongs. + // This should use the ISO 3166-1 alpha-2 code of the country. + // Example: "US" for the United States. Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` - // The country subdivision for the region. + // The country subdivision code for the region. + // This should use the ISO 3166-2 code for the specific subdivision. + // Example: "US-TX" for Texas in the United States. CountrySubdivision string `protobuf:"bytes,5,opt,name=country_subdivision,json=countrySubdivision,proto3" json:"country_subdivision,omitempty"` } @@ -124,25 +136,28 @@ var File_geographic_region_proto protoreflect.FileDescriptor var file_geographic_region_proto_rawDesc = []byte{ 0x0a, 0x17, 0x67, 0x65, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x22, 0xb5, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, - 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x75, 0x62, - 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x57, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x15, - 0x47, 0x65, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, - 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x10, 0x47, 0x65, + 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x65, 0x72, + 0x69, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x64, + 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x75, 0x62, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x77, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x15, 0x47, 0x65, 0x6f, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, + 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, + 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -159,7 +174,7 @@ func file_geographic_region_proto_rawDescGZIP() []byte { var file_geographic_region_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_geographic_region_proto_goTypes = []any{ - (*GeographicRegion)(nil), // 0: types.GeographicRegion + (*GeographicRegion)(nil), // 0: sixafter.types.GeographicRegion } var file_geographic_region_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/geographic_region.proto b/geographic_region.proto index 0d09da3..9972c92 100644 --- a/geographic_region.proto +++ b/geographic_region.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) - +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,32 +17,43 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "GeographicRegionProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// ISO 3166-2 is part of the ISO 3166 standard published by the International -// Organization for Standardization (ISO), and defines codes for identifying -// the principal subdivisions (e.g., provinces or states) of all countries -// coded in ISO 3166-1 +// The `GeographicRegion` message represents a region as defined by the ISO 3166-2 standard. +// ISO 3166-2 defines codes for identifying the principal subdivisions (e.g., states or provinces) +// of countries coded in ISO 3166-1. This message can be used in applications requiring +// geographic or administrative classification. message GeographicRegion { - // The name of the region. + + // The commonly used name of the region. + // Example: "Texas". string name = 1; - // The formal name of the region. + // The formal or official name of the region. + // Example: "State of Texas". string formal_name = 2; - // The numeric code for the region. + // The numeric code for the region as defined in the ISO 3166-2 standard. + // This code is often used in databases or systems where numeric identifiers + // are preferred for regional classification. + // Example: 48 (numeric code for Texas in the United States, if applicable). uint32 numeric_code = 3; - // The country for the region. + // The country to which the region belongs. + // This should use the ISO 3166-1 alpha-2 code of the country. + // Example: "US" for the United States. string country = 4; - // The country subdivision for the region. + // The country subdivision code for the region. + // This should use the ISO 3166-2 code for the specific subdivision. + // Example: "US-TX" for Texas in the United States. string country_subdivision = 5; -} \ No newline at end of file +} diff --git a/geospatial_coordinate.pb.go b/geospatial_coordinate.pb.go index 1172582..5e9016c 100644 --- a/geospatial_coordinate.pb.go +++ b/geospatial_coordinate.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,20 +37,27 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Represents a geospatial, or global positioning satellite (GPS), coordinate. +// The `GeospatialCoordinate` message represents a geospatial location, +// defined by latitude, longitude, and elevation. This is commonly used +// in geolocation, navigation, and geographic information systems (GIS). type GeospatialCoordinate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Distance north or south of the equator measured in degrees up to 90 - // degrees. + // The latitude of the geospatial coordinate. + // Latitude measures the distance north or south of the equator and is + // expressed in degrees ranging from -90 (south) to +90 (north). + // Example: 32.9829 for Westlake, Texas. Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"` - // Distance measured in degrees east or west from an imaginary line (called - // the prime meridian) that is measured from the North Pole to the South Pole - // and that passes through Greenwich, England. + // The longitude of the geospatial coordinate. + // Longitude measures the distance east or west of the prime meridian, + // expressed in degrees ranging from -180 to +180. + // Example: -97.1876 for Westlake, Texas. Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` - // The geospatial elevation. + // The elevation of the geospatial coordinate relative to sea level. + // This includes additional geospatial information such as altitude or height. + // Example: Elevation of 212 meters for Westlake, Texas. Elevation *GeospatialElevation `protobuf:"bytes,3,opt,name=elevation,proto3" json:"elevation,omitempty"` } @@ -106,25 +116,28 @@ var File_geospatial_coordinate_proto protoreflect.FileDescriptor var file_geospatial_coordinate_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6f, - 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1a, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, - 0x5f, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x43, - 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, - 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5a, 0x0a, - 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x42, 0x18, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, - 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, - 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, + 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1a, 0x67, + 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x47, 0x65, + 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x41, 0x0a, 0x09, + 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6c, 0x65, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x7b, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x19, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, + 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, + 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, + 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, + 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -141,11 +154,11 @@ func file_geospatial_coordinate_proto_rawDescGZIP() []byte { var file_geospatial_coordinate_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_geospatial_coordinate_proto_goTypes = []any{ - (*GeospatialCoordinate)(nil), // 0: types.GeospatialCoordinate - (*GeospatialElevation)(nil), // 1: types.GeospatialElevation + (*GeospatialCoordinate)(nil), // 0: sixafter.types.GeospatialCoordinate + (*GeospatialElevation)(nil), // 1: sixafter.types.GeospatialElevation } var file_geospatial_coordinate_proto_depIdxs = []int32{ - 1, // 0: types.GeospatialCoordinate.elevation:type_name -> types.GeospatialElevation + 1, // 0: sixafter.types.GeospatialCoordinate.elevation:type_name -> sixafter.types.GeospatialElevation 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/geospatial_coordinate.proto b/geospatial_coordinate.proto index a36e8d7..dea5471 100644 --- a/geospatial_coordinate.proto +++ b/geospatial_coordinate.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,29 +17,37 @@ syntax = "proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; -option java_outer_classname = "GeospatialElevationProto"; -option objc_class_prefix = "TYP"; +option java_outer_classname = "GeospatialCoordinateProto"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "geospatial_elevation.proto"; -// Represents a geospatial, or global positioning satellite (GPS), coordinate. +// The `GeospatialCoordinate` message represents a geospatial location, +// defined by latitude, longitude, and elevation. This is commonly used +// in geolocation, navigation, and geographic information systems (GIS). message GeospatialCoordinate { - // Distance north or south of the equator measured in degrees up to 90 - // degrees. + + // The latitude of the geospatial coordinate. + // Latitude measures the distance north or south of the equator and is + // expressed in degrees ranging from -90 (south) to +90 (north). + // Example: 32.9829 for Westlake, Texas. double latitude = 1; - // Distance measured in degrees east or west from an imaginary line (called - // the prime meridian) that is measured from the North Pole to the South Pole - // and that passes through Greenwich, England. + // The longitude of the geospatial coordinate. + // Longitude measures the distance east or west of the prime meridian, + // expressed in degrees ranging from -180 to +180. + // Example: -97.1876 for Westlake, Texas. double longitude = 2; - // The geospatial elevation. + // The elevation of the geospatial coordinate relative to sea level. + // This includes additional geospatial information such as altitude or height. + // Example: Elevation of 212 meters for Westlake, Texas. GeospatialElevation elevation = 3; } - diff --git a/geospatial_elevation.pb.go b/geospatial_elevation.pb.go index 12b1571..95b4665 100644 --- a/geospatial_elevation.pb.go +++ b/geospatial_elevation.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,14 +37,17 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A reference system or an approximation of the Earth's surface against -// which positional measurements are made for computing locations. +// The `GeodeticDatum` enum defines the reference system or surface +// against which the elevation is measured. These reference systems are +// approximations of the Earth's surface. type GeospatialElevation_GeodeticDatum int32 const ( - // The altitude above mean sea level associated with a location, measured in meters. + // The altitude above mean sea level (MSL), measured in meters. + // This is a commonly used datum for everyday elevation measurements. GeospatialElevation_SEA_LEVEL GeospatialElevation_GeodeticDatum = 0 - // The altitude as a height above the World Geodetic System 1984 (WGS84) ellipsoid, measured in meters. + // The altitude as a height above the World Geodetic System 1984 (WGS84) + // ellipsoid, measured in meters. This is commonly used in GPS systems. GeospatialElevation_WGS_84 GeospatialElevation_GeodeticDatum = 1 ) @@ -84,15 +90,20 @@ func (GeospatialElevation_GeodeticDatum) EnumDescriptor() ([]byte, []int) { return file_geospatial_elevation_proto_rawDescGZIP(), []int{0, 0} } -// The vertical direction, between a reference datum and a point or object. +// The `GeospatialElevation` message represents the vertical direction +// or height of a point relative to a specified reference datum. This +// is commonly used in geolocation, mapping, and geographic information systems (GIS). type GeospatialElevation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A reference point. - Datum GeospatialElevation_GeodeticDatum `protobuf:"varint,1,opt,name=datum,proto3,enum=types.GeospatialElevation_GeodeticDatum" json:"datum,omitempty"` - // The positive or negative vertical elevation in relation to the datum. + // The geodetic datum used as the reference point for the elevation measurement. + // Example: `SEA_LEVEL` for altitude above mean sea level. + Datum GeospatialElevation_GeodeticDatum `protobuf:"varint,1,opt,name=datum,proto3,enum=sixafter.types.GeospatialElevation_GeodeticDatum" json:"datum,omitempty"` + // The altitude or vertical elevation of the point, measured in meters. + // This value can be positive (above the datum) or negative (below the datum). + // Example: An altitude of 212 meters above sea level for Westlake, Texas. Altitude float64 `protobuf:"fixed64,2,opt,name=altitude,proto3" json:"altitude,omitempty"` } @@ -144,24 +155,27 @@ var File_geospatial_elevation_proto protoreflect.FileDescriptor var file_geospatial_elevation_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x6c, 0x65, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, - 0x61, 0x6c, 0x45, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, 0x64, - 0x61, 0x74, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6c, 0x65, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6f, 0x64, 0x65, 0x74, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x75, 0x6d, 0x52, 0x05, 0x64, 0x61, 0x74, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x61, - 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, - 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x2a, 0x0a, 0x0d, 0x47, 0x65, 0x6f, 0x64, 0x65, - 0x74, 0x69, 0x63, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x41, 0x5f, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x47, 0x53, 0x5f, 0x38, - 0x34, 0x10, 0x01, 0x42, 0x5a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x18, 0x47, 0x65, 0x6f, 0x73, 0x70, - 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, + 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xa6, 0x01, 0x0a, + 0x13, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6c, 0x65, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x05, 0x64, 0x61, 0x74, 0x75, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, + 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6f, 0x64, 0x65, 0x74, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x52, 0x05, 0x64, 0x61, 0x74, 0x75, 0x6d, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x2a, 0x0a, 0x0d, 0x47, 0x65, 0x6f, + 0x64, 0x65, 0x74, 0x69, 0x63, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, + 0x41, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x47, 0x53, + 0x5f, 0x38, 0x34, 0x10, 0x01, 0x42, 0x7a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x18, 0x47, 0x65, 0x6f, + 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, + 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -179,11 +193,11 @@ func file_geospatial_elevation_proto_rawDescGZIP() []byte { var file_geospatial_elevation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_geospatial_elevation_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_geospatial_elevation_proto_goTypes = []any{ - (GeospatialElevation_GeodeticDatum)(0), // 0: types.GeospatialElevation.GeodeticDatum - (*GeospatialElevation)(nil), // 1: types.GeospatialElevation + (GeospatialElevation_GeodeticDatum)(0), // 0: sixafter.types.GeospatialElevation.GeodeticDatum + (*GeospatialElevation)(nil), // 1: sixafter.types.GeospatialElevation } var file_geospatial_elevation_proto_depIdxs = []int32{ - 0, // 0: types.GeospatialElevation.datum:type_name -> types.GeospatialElevation.GeodeticDatum + 0, // 0: sixafter.types.GeospatialElevation.datum:type_name -> sixafter.types.GeospatialElevation.GeodeticDatum 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/geospatial_elevation.proto b/geospatial_elevation.proto index ca227e1..9a76b30 100644 --- a/geospatial_elevation.proto +++ b/geospatial_elevation.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,29 +17,40 @@ syntax = "proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "GeospatialElevationProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// The vertical direction, between a reference datum and a point or object. +// The `GeospatialElevation` message represents the vertical direction +// or height of a point relative to a specified reference datum. This +// is commonly used in geolocation, mapping, and geographic information systems (GIS). message GeospatialElevation { - // A reference system or an approximation of the Earth's surface against - // which positional measurements are made for computing locations. + + // The `GeodeticDatum` enum defines the reference system or surface + // against which the elevation is measured. These reference systems are + // approximations of the Earth's surface. enum GeodeticDatum { - // The altitude above mean sea level associated with a location, measured in meters. + // The altitude above mean sea level (MSL), measured in meters. + // This is a commonly used datum for everyday elevation measurements. SEA_LEVEL = 0; - // The altitude as a height above the World Geodetic System 1984 (WGS84) ellipsoid, measured in meters. + + // The altitude as a height above the World Geodetic System 1984 (WGS84) + // ellipsoid, measured in meters. This is commonly used in GPS systems. WGS_84 = 1; } - // A reference point. + // The geodetic datum used as the reference point for the elevation measurement. + // Example: `SEA_LEVEL` for altitude above mean sea level. GeodeticDatum datum = 1; - // The positive or negative vertical elevation in relation to the datum. + // The altitude or vertical elevation of the point, measured in meters. + // This value can be positive (above the datum) or negative (below the datum). + // Example: An altitude of 212 meters above sea level for Westlake, Texas. double altitude = 2; } diff --git a/geospatial_location.pb.go b/geospatial_location.pb.go index 078a42b..c9f67f9 100644 --- a/geospatial_location.pb.go +++ b/geospatial_location.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,31 +38,37 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Spatial or temporal scale refers to the extent of the area or the duration -// of time. +// The `GeospatialLocation` message represents a spatial or temporal scale, +// combining geographical coordinates, heading, movement, and timestamp. +// It is commonly used in location-based services, navigation systems, and +// applications requiring geospatial data. type GeospatialLocation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The geographical coordinate information. + // The geographical coordinate information of the location. + // Includes latitude, longitude, and elevation as defined in the `GeospatialCoordinate` message. Coordinate *GeospatialCoordinate `protobuf:"bytes,1,opt,name=coordinate,proto3" json:"coordinate,omitempty"` - // The azimuth (orientation) of the user’s device, relative to true or - // magnetic north. + // The azimuth (orientation) of the device relative to true or magnetic north. + // Defined using the `CompassHeading` message, it represents the heading + // of the device at the time of measurement. Heading *CompassHeading `protobuf:"bytes,2,opt,name=heading,proto3" json:"heading,omitempty"` - // The direction in which the device is traveling, measured in degrees and - // relative to due north. + // The direction in which the device is traveling, measured in degrees + // relative to true north (0°). This reflects the course or trajectory + // of the device's movement. // - // Course information reflects the speed and direction in which a device is - // moving and is available only on devices with GPS hardware. Don’t confuse - // course information with heading information. Course direction reflects the - // direction in which the device is moving and is independent of the device’s - // physical orientation. The most common use of course information is in - // navigation apps. + // **Note:** Course direction is different from heading. Course measures + // the direction the device is moving (e.g., forward travel), independent + // of its physical orientation. Heading reflects the device's orientation. + // Example: 90° indicates the device is moving east. Course float64 `protobuf:"fixed64,3,opt,name=course,proto3" json:"course,omitempty"` - // The instantaneous speed of the device, measured in meters per second. + // The instantaneous speed of the device, measured in meters per second (m/s). + // Example: A speed of 3.5 m/s (12.6 km/h or 7.8 mph) indicates the device + // is moving at a walking pace. Speed float32 `protobuf:"fixed32,4,opt,name=speed,proto3" json:"speed,omitempty"` - // The time at which this location was determined. + // The time at which this geospatial location data was recorded. + // Example: Timestamp of "2024-11-17T15:00:00Z" represents 3:00 PM UTC on November 17, 2024. Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -132,34 +141,38 @@ var File_geospatial_location_proto protoreflect.FileDescriptor var file_geospatial_location_proto_rawDesc = []byte{ 0x0a, 0x19, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x65, 0x6f, 0x73, - 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x6f, 0x73, - 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, - 0x0a, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, 0x70, - 0x61, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, - 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x63, 0x6f, - 0x75, 0x72, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x59, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x17, 0x47, 0x65, 0x6f, 0x73, - 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xfc, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x69, + 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, + 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x52, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x72, 0x73, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, + 0x73, 0x70, 0x65, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x79, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x17, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, + 0x6c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, + 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, + 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -176,15 +189,15 @@ func file_geospatial_location_proto_rawDescGZIP() []byte { var file_geospatial_location_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_geospatial_location_proto_goTypes = []any{ - (*GeospatialLocation)(nil), // 0: types.GeospatialLocation - (*GeospatialCoordinate)(nil), // 1: types.GeospatialCoordinate - (*CompassHeading)(nil), // 2: types.CompassHeading + (*GeospatialLocation)(nil), // 0: sixafter.types.GeospatialLocation + (*GeospatialCoordinate)(nil), // 1: sixafter.types.GeospatialCoordinate + (*CompassHeading)(nil), // 2: sixafter.types.CompassHeading (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_geospatial_location_proto_depIdxs = []int32{ - 1, // 0: types.GeospatialLocation.coordinate:type_name -> types.GeospatialCoordinate - 2, // 1: types.GeospatialLocation.heading:type_name -> types.CompassHeading - 3, // 2: types.GeospatialLocation.timestamp:type_name -> google.protobuf.Timestamp + 1, // 0: sixafter.types.GeospatialLocation.coordinate:type_name -> sixafter.types.GeospatialCoordinate + 2, // 1: sixafter.types.GeospatialLocation.heading:type_name -> sixafter.types.CompassHeading + 3, // 2: sixafter.types.GeospatialLocation.timestamp:type_name -> google.protobuf.Timestamp 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name diff --git a/geospatial_location.proto b/geospatial_location.proto index f3eb322..8700369 100644 --- a/geospatial_location.proto +++ b/geospatial_location.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,44 +17,52 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "GeospatialLocationProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "google/protobuf/timestamp.proto"; import "compass_heading.proto"; import "geospatial_coordinate.proto"; -// Spatial or temporal scale refers to the extent of the area or the duration -// of time. +// The `GeospatialLocation` message represents a spatial or temporal scale, +// combining geographical coordinates, heading, movement, and timestamp. +// It is commonly used in location-based services, navigation systems, and +// applications requiring geospatial data. message GeospatialLocation { - // The geographical coordinate information. + + // The geographical coordinate information of the location. + // Includes latitude, longitude, and elevation as defined in the `GeospatialCoordinate` message. GeospatialCoordinate coordinate = 1; - // The azimuth (orientation) of the user’s device, relative to true or - // magnetic north. + // The azimuth (orientation) of the device relative to true or magnetic north. + // Defined using the `CompassHeading` message, it represents the heading + // of the device at the time of measurement. CompassHeading heading = 2; - // The direction in which the device is traveling, measured in degrees and - // relative to due north. + // The direction in which the device is traveling, measured in degrees + // relative to true north (0°). This reflects the course or trajectory + // of the device's movement. // - // Course information reflects the speed and direction in which a device is - // moving and is available only on devices with GPS hardware. Don’t confuse - // course information with heading information. Course direction reflects the - // direction in which the device is moving and is independent of the device’s - // physical orientation. The most common use of course information is in - // navigation apps. + // **Note:** Course direction is different from heading. Course measures + // the direction the device is moving (e.g., forward travel), independent + // of its physical orientation. Heading reflects the device's orientation. + // Example: 90° indicates the device is moving east. double course = 3; - // The instantaneous speed of the device, measured in meters per second. + // The instantaneous speed of the device, measured in meters per second (m/s). + // Example: A speed of 3.5 m/s (12.6 km/h or 7.8 mph) indicates the device + // is moving at a walking pace. float speed = 4; - // The time at which this location was determined. + // The time at which this geospatial location data was recorded. + // Example: Timestamp of "2024-11-17T15:00:00Z" represents 3:00 PM UTC on November 17, 2024. google.protobuf.Timestamp timestamp = 5; -} \ No newline at end of file +} diff --git a/map_point.pb.go b/map_point.pb.go index 6edf9ef..a884c0b 100644 --- a/map_point.pb.go +++ b/map_point.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,21 +37,26 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// If you project the curved surface of the globe onto a flat surface, what you -// get is a two-dimensional version of a map where longitude lines appear to be -// parallel. Such maps are often used to show the entire surface of the globe -// all at once. A map_point data structure represents a point on this -// two-dimensional map. +// The `MapPoint` message represents a point on a two-dimensional map, +// derived from projecting the curved surface of the globe onto a flat surface. +// This structure is commonly used in mapping, GIS, and location-based applications. type MapPoint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The location of the point along the x-axis of the map. + // The x-coordinate of the map point. + // Represents the horizontal position on the two-dimensional map. + // Example: A value of 200.5 could represent a position on a Mercator projection. X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"` - // The location of the point along the y-axis of the map. + // The y-coordinate of the map point. + // Represents the vertical position on the two-dimensional map. + // Example: A value of 150.2 could represent a position on a Mercator projection. Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"` - // The geospatial coordinate that corresponds to the specified map point. + // The geospatial coordinate that corresponds to the map point. + // Provides the latitude, longitude, and elevation information for the point. + // Example: A map point with `x=200.5` and `y=150.2` could correspond to + // `latitude=32.9829` and `longitude=-97.1876` for Westlake, Texas. Coordinate *GeospatialCoordinate `protobuf:"bytes,3,opt,name=coordinate,proto3" json:"coordinate,omitempty"` } @@ -107,21 +115,24 @@ var File_map_point_proto protoreflect.FileDescriptor var file_map_point_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1b, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, - 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x50, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, - 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x12, 0x3b, 0x0a, - 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, - 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x0a, - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x42, 0x4f, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x42, 0x0d, 0x4d, 0x61, 0x70, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, - 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, - 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x1a, 0x1b, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, + 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, + 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x52, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x0a, 0x12, + 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x42, 0x0d, 0x4d, 0x61, 0x70, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, + 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, + 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, + 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -138,11 +149,11 @@ func file_map_point_proto_rawDescGZIP() []byte { var file_map_point_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_map_point_proto_goTypes = []any{ - (*MapPoint)(nil), // 0: types.MapPoint - (*GeospatialCoordinate)(nil), // 1: types.GeospatialCoordinate + (*MapPoint)(nil), // 0: sixafter.types.MapPoint + (*GeospatialCoordinate)(nil), // 1: sixafter.types.GeospatialCoordinate } var file_map_point_proto_depIdxs = []int32{ - 1, // 0: types.MapPoint.coordinate:type_name -> types.GeospatialCoordinate + 1, // 0: sixafter.types.MapPoint.coordinate:type_name -> sixafter.types.GeospatialCoordinate 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/map_point.proto b/map_point.proto index a69c0c2..783beba 100644 --- a/map_point.proto +++ b/map_point.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,29 +17,36 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "MapPointProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "geospatial_coordinate.proto"; -// If you project the curved surface of the globe onto a flat surface, what you -// get is a two-dimensional version of a map where longitude lines appear to be -// parallel. Such maps are often used to show the entire surface of the globe -// all at once. A map_point data structure represents a point on this -// two-dimensional map. +// The `MapPoint` message represents a point on a two-dimensional map, +// derived from projecting the curved surface of the globe onto a flat surface. +// This structure is commonly used in mapping, GIS, and location-based applications. message MapPoint { - // The location of the point along the x-axis of the map. + + // The x-coordinate of the map point. + // Represents the horizontal position on the two-dimensional map. + // Example: A value of 200.5 could represent a position on a Mercator projection. float x = 1; - // The location of the point along the y-axis of the map. + // The y-coordinate of the map point. + // Represents the vertical position on the two-dimensional map. + // Example: A value of 150.2 could represent a position on a Mercator projection. float y = 2; - // The geospatial coordinate that corresponds to the specified map point. + // The geospatial coordinate that corresponds to the map point. + // Provides the latitude, longitude, and elevation information for the point. + // Example: A map point with `x=200.5` and `y=150.2` could correspond to + // `latitude=32.9829` and `longitude=-97.1876` for Westlake, Texas. GeospatialCoordinate coordinate = 3; -} \ No newline at end of file +} diff --git a/polygon.pb.go b/polygon.pb.go index d274c6d..e24ebba 100644 --- a/polygon.pb.go +++ b/polygon.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,17 +37,25 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A closed polygon shape. -// -// The points you add to this overlay are connected end-to-end in the order you -// provide them. The first and last points are connected to each other to create -// a closed shape. +// The `Polygon` message represents a closed geometric shape on a map. +// The shape is defined by a series of points that are connected end-to-end, +// with the first and last points also connected to form a closed shape. +// This structure is commonly used in mapping applications, GIS, and geofencing. type Polygon struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A set of map points. + // The set of points that define the polygon. + // Each point is represented by a `MapPoint` message, which specifies the + // location on the map. The points should be provided in the order they are + // connected. + // + // Example: A triangle may have three points: + // - Point 1: `x=0, y=0` + // - Point 2: `x=10, y=0` + // - Point 3: `x=5, y=5` + // The first point is automatically connected to the last point to close the shape. Points []*MapPoint `protobuf:"bytes,1,rep,name=points,proto3" json:"points,omitempty"` } @@ -89,17 +100,20 @@ var File_polygon_proto protoreflect.FileDescriptor var file_polygon_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x07, 0x50, 0x6f, 0x6c, 0x79, 0x67, - 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x61, 0x70, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x4e, 0x0a, 0x12, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x42, 0x0c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, - 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, - 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, + 0x0f, 0x6d, 0x61, 0x70, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x3b, 0x0a, 0x07, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x69, + 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x61, 0x70, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x6e, 0x0a, + 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x42, 0x0c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, + 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, + 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, + 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -116,11 +130,11 @@ func file_polygon_proto_rawDescGZIP() []byte { var file_polygon_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_polygon_proto_goTypes = []any{ - (*Polygon)(nil), // 0: types.Polygon - (*MapPoint)(nil), // 1: types.MapPoint + (*Polygon)(nil), // 0: sixafter.types.Polygon + (*MapPoint)(nil), // 1: sixafter.types.MapPoint } var file_polygon_proto_depIdxs = []int32{ - 1, // 0: types.Polygon.points:type_name -> types.MapPoint + 1, // 0: sixafter.types.Polygon.points:type_name -> sixafter.types.MapPoint 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/polygon.proto b/polygon.proto index 06e2d6a..06f6c3e 100644 --- a/polygon.proto +++ b/polygon.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,23 +17,33 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "PolygonProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "map_point.proto"; -// A closed polygon shape. -// -// The points you add to this overlay are connected end-to-end in the order you -// provide them. The first and last points are connected to each other to create -// a closed shape. +// The `Polygon` message represents a closed geometric shape on a map. +// The shape is defined by a series of points that are connected end-to-end, +// with the first and last points also connected to form a closed shape. +// This structure is commonly used in mapping applications, GIS, and geofencing. message Polygon { - // A set of map points. + + // The set of points that define the polygon. + // Each point is represented by a `MapPoint` message, which specifies the + // location on the map. The points should be provided in the order they are + // connected. + // + // Example: A triangle may have three points: + // - Point 1: `x=0, y=0` + // - Point 2: `x=10, y=0` + // - Point 3: `x=5, y=5` + // The first point is automatically connected to the last point to close the shape. repeated MapPoint points = 1; -} \ No newline at end of file +} diff --git a/radial_geofence.pb.go b/radial_geofence.pb.go index 05a01a1..d31f057 100644 --- a/radial_geofence.pb.go +++ b/radial_geofence.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,17 +37,25 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A geofence is a virtual perimeter for a real-world geographic area. +// The `RadialGeofence` message represents a circular geofence. +// A geofence is a virtual perimeter defined for a real-world geographic area. +// The radial geofence is defined by a center point and a radius, forming a circular boundary. +// It is commonly used in applications like location-based alerts, tracking, and geofencing. type RadialGeofence struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The name of this geofence. + // Example: "Warehouse Perimeter", "Restricted Zone". Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The geospatial coordinate representing the center of a circle. + // The geospatial coordinate representing the center of the circular geofence. + // This is the point around which the radius is applied to form the boundary. + // Example: The center coordinate for Westlake, Texas, with latitude `32.9829` and longitude `-97.1876`. Center *GeospatialCoordinate `protobuf:"bytes,2,opt,name=center,proto3" json:"center,omitempty"` - // A distance measurement (measured in meters) from the coordinate. + // The radius of the circular geofence, measured in meters. + // This defines the distance from the center point to the boundary of the geofence. + // Example: A radius of `500` meters creates a circular geofence with a 1-kilometer diameter. Radius float64 `protobuf:"fixed64,3,opt,name=radius,proto3" json:"radius,omitempty"` } @@ -103,22 +114,25 @@ var File_radial_geofence_proto protoreflect.FileDescriptor var file_radial_geofence_proto_rawDesc = []byte{ 0x0a, 0x15, 0x72, 0x61, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x67, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1b, - 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x71, 0x0a, 0x0e, 0x52, - 0x61, 0x64, 0x69, 0x61, 0x6c, 0x47, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, 0x70, 0x61, - 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x06, - 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x42, 0x55, - 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x42, 0x13, 0x52, 0x61, 0x64, 0x69, 0x61, 0x6c, 0x47, 0x65, 0x6f, 0x66, - 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, - 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1b, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7a, 0x0a, 0x0e, 0x52, 0x61, 0x64, 0x69, 0x61, 0x6c, 0x47, 0x65, + 0x6f, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6f, 0x73, + 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x52, 0x06, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64, 0x69, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, + 0x42, 0x75, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x13, 0x52, 0x61, 0x64, 0x69, 0x61, 0x6c, 0x47, 0x65, + 0x6f, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, + 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, + 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, + 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -135,11 +149,11 @@ func file_radial_geofence_proto_rawDescGZIP() []byte { var file_radial_geofence_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_radial_geofence_proto_goTypes = []any{ - (*RadialGeofence)(nil), // 0: types.RadialGeofence - (*GeospatialCoordinate)(nil), // 1: types.GeospatialCoordinate + (*RadialGeofence)(nil), // 0: sixafter.types.RadialGeofence + (*GeospatialCoordinate)(nil), // 1: sixafter.types.GeospatialCoordinate } var file_radial_geofence_proto_depIdxs = []int32{ - 1, // 0: types.RadialGeofence.center:type_name -> types.GeospatialCoordinate + 1, // 0: sixafter.types.RadialGeofence.center:type_name -> sixafter.types.GeospatialCoordinate 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/radial_geofence.proto b/radial_geofence.proto index 48ef934..30cfd2b 100644 --- a/radial_geofence.proto +++ b/radial_geofence.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,26 +17,35 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "RadialGeofenceProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "geospatial_coordinate.proto"; -// A geofence is a virtual perimeter for a real-world geographic area. +// The `RadialGeofence` message represents a circular geofence. +// A geofence is a virtual perimeter defined for a real-world geographic area. +// The radial geofence is defined by a center point and a radius, forming a circular boundary. +// It is commonly used in applications like location-based alerts, tracking, and geofencing. message RadialGeofence { // The name of this geofence. + // Example: "Warehouse Perimeter", "Restricted Zone". string name = 1; - // The geospatial coordinate representing the center of a circle. + // The geospatial coordinate representing the center of the circular geofence. + // This is the point around which the radius is applied to form the boundary. + // Example: The center coordinate for Westlake, Texas, with latitude `32.9829` and longitude `-97.1876`. GeospatialCoordinate center = 2; - // A distance measurement (measured in meters) from the coordinate. + // The radius of the circular geofence, measured in meters. + // This defines the distance from the center point to the boundary of the geofence. + // Example: A radius of `500` meters creates a circular geofence with a 1-kilometer diameter. double radius = 3; -} \ No newline at end of file +} diff --git a/temporal_range.pb.go b/temporal_range.pb.go index 247da2b..b97bcb3 100644 --- a/temporal_range.pb.go +++ b/temporal_range.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,18 +39,23 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Spatial or temporal scale refers to the extent of the area or the duration -// of time. +// The `TemporalRange` message represents a time range defined by a starting +// reference point (epoch) and a duration. It is commonly used in time-based +// applications such as scheduling, analytics, and temporal data analysis. type TemporalRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // In chronology and periodization, an epoch or reference epoch is an instant - // in time chosen as the origin of a particular calendar era. The "epoch" - // serves as a reference point from which time is measured. + // The starting point of the temporal range, known as the epoch. + // This timestamp serves as the reference point from which the duration is + // measured. + // Example: "2024-11-17T00:00:00Z" for a midnight reference point in UTC. Epoch *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - // A temporal duration. + // The duration of the temporal range, measured as the time span from the + // epoch. This represents the length of the time range. + // Example: A duration of `3600 seconds` (1 hour) indicates a range lasting + // one hour from the epoch. Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` } @@ -99,25 +107,27 @@ var File_temporal_range_proto protoreflect.FileDescriptor var file_temporal_range_proto_rawDesc = []byte{ 0x0a, 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, - 0x0a, 0x0d, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x30, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x54, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x12, - 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, - 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x0d, 0x54, 0x65, 0x6d, 0x70, 0x6f, + 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x74, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x12, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, + 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, + 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, + 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, + 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -134,13 +144,13 @@ func file_temporal_range_proto_rawDescGZIP() []byte { var file_temporal_range_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_temporal_range_proto_goTypes = []any{ - (*TemporalRange)(nil), // 0: types.TemporalRange + (*TemporalRange)(nil), // 0: sixafter.types.TemporalRange (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp (*durationpb.Duration)(nil), // 2: google.protobuf.Duration } var file_temporal_range_proto_depIdxs = []int32{ - 1, // 0: types.TemporalRange.epoch:type_name -> google.protobuf.Timestamp - 2, // 1: types.TemporalRange.duration:type_name -> google.protobuf.Duration + 1, // 0: sixafter.types.TemporalRange.epoch:type_name -> google.protobuf.Timestamp + 2, // 1: sixafter.types.TemporalRange.duration:type_name -> google.protobuf.Duration 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name diff --git a/temporal_range.proto b/temporal_range.proto index 92e5495..b0d1963 100644 --- a/temporal_range.proto +++ b/temporal_range.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,26 +17,33 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "TemporalRangeProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -// Spatial or temporal scale refers to the extent of the area or the duration -// of time. +// The `TemporalRange` message represents a time range defined by a starting +// reference point (epoch) and a duration. It is commonly used in time-based +// applications such as scheduling, analytics, and temporal data analysis. message TemporalRange { - // In chronology and periodization, an epoch or reference epoch is an instant - // in time chosen as the origin of a particular calendar era. The "epoch" - // serves as a reference point from which time is measured. + + // The starting point of the temporal range, known as the epoch. + // This timestamp serves as the reference point from which the duration is + // measured. + // Example: "2024-11-17T00:00:00Z" for a midnight reference point in UTC. google.protobuf.Timestamp epoch = 1; - // A temporal duration. + // The duration of the temporal range, measured as the time span from the + // epoch. This represents the length of the time range. + // Example: A duration of `3600 seconds` (1 hour) indicates a range lasting + // one hour from the epoch. google.protobuf.Duration duration = 2; -} \ No newline at end of file +} diff --git a/time_zone.pb.go b/time_zone.pb.go index 1c903f2..8ab67da 100644 --- a/time_zone.pb.go +++ b/time_zone.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,18 +37,26 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A time zone is an area which observes a uniform standard time for legal, -// commercial and social purposes. +// The `TimeZone` message represents a time zone, which is an area +// observing a uniform standard time for legal, commercial, and social purposes. type TimeZone struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The name of the time zone. + // Example: "America/New_York". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The common abbreviation for the time zone. + // Example: "EST" for Eastern Standard Time or "EDT" for Eastern Daylight Time. Abbreviation string `protobuf:"bytes,2,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"` - // The Standard Time (STD) offset from UTC in hours and minutes. + // The Standard Time (STD) offset from UTC, in hours and minutes. + // This represents the time zone's offset when daylight saving time is not in effect. + // Example: For "America/New_York", the standard time offset is UTC-5. UtcOffsetStd *TimeZone_TimeOffset `protobuf:"bytes,3,opt,name=utc_offset_std,json=utcOffsetStd,proto3" json:"utc_offset_std,omitempty"` - // The Daylight Saving Time (DST) offset from UTC in hours and minutes. + // The Daylight Saving Time (DST) offset from UTC, in hours and minutes. + // This represents the time zone's offset when daylight saving time is in effect. + // Example: For "America/New_York", the daylight saving time offset is UTC-4. UtcOffsetDst *TimeZone_TimeOffset `protobuf:"bytes,4,opt,name=utc_offset_dst,json=utcOffsetDst,proto3" json:"utc_offset_dst,omitempty"` } @@ -107,14 +118,18 @@ func (x *TimeZone) GetUtcOffsetDst() *TimeZone_TimeOffset { return nil } +// The `TimeOffset` message represents a time offset from Coordinated +// Universal Time (UTC) in terms of hours and minutes. type TimeZone_TimeOffset struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The offset in hours. + // The offset from UTC in whole hours. + // Example: -5 for UTC-5 (Eastern Standard Time). Hours int32 `protobuf:"varint,1,opt,name=hours,proto3" json:"hours,omitempty"` - // The offset in minutes. + // The additional offset from UTC in minutes. + // Example: 30 for UTC+5:30 (India Standard Time). Minutes int32 `protobuf:"varint,2,opt,name=minutes,proto3" json:"minutes,omitempty"` } @@ -166,29 +181,33 @@ var File_time_zone_proto protoreflect.FileDescriptor var file_time_zone_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x84, 0x02, 0x0a, 0x08, 0x54, 0x69, 0x6d, - 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x62, 0x62, - 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, - 0x0e, 0x75, 0x74, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x52, 0x0c, 0x75, 0x74, 0x63, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x53, 0x74, 0x64, 0x12, - 0x40, 0x0a, 0x0e, 0x75, 0x74, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x73, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x22, 0x96, 0x02, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0e, 0x75, 0x74, 0x63, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x52, 0x0c, 0x75, 0x74, 0x63, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x44, 0x73, - 0x74, 0x1a, 0x3c, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x68, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x42, - 0x4f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x74, 0x52, 0x0c, 0x75, 0x74, 0x63, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x53, 0x74, + 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x75, 0x74, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, + 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x69, 0x78, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x5a, + 0x6f, 0x6e, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x0c, + 0x75, 0x74, 0x63, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x44, 0x73, 0x74, 0x1a, 0x3c, 0x0a, 0x0a, + 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x6f, + 0x75, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x6f, 0x75, 0x72, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x42, 0x6f, 0x0a, 0x12, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x42, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, + 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, + 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, + 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, + 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -205,12 +224,12 @@ func file_time_zone_proto_rawDescGZIP() []byte { var file_time_zone_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_time_zone_proto_goTypes = []any{ - (*TimeZone)(nil), // 0: types.TimeZone - (*TimeZone_TimeOffset)(nil), // 1: types.TimeZone.TimeOffset + (*TimeZone)(nil), // 0: sixafter.types.TimeZone + (*TimeZone_TimeOffset)(nil), // 1: sixafter.types.TimeZone.TimeOffset } var file_time_zone_proto_depIdxs = []int32{ - 1, // 0: types.TimeZone.utc_offset_std:type_name -> types.TimeZone.TimeOffset - 1, // 1: types.TimeZone.utc_offset_dst:type_name -> types.TimeZone.TimeOffset + 1, // 0: sixafter.types.TimeZone.utc_offset_std:type_name -> sixafter.types.TimeZone.TimeOffset + 1, // 1: sixafter.types.TimeZone.utc_offset_dst:type_name -> sixafter.types.TimeZone.TimeOffset 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name diff --git a/time_zone.proto b/time_zone.proto index d152860..a1bc39f 100644 --- a/time_zone.proto +++ b/time_zone.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,34 +17,47 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "TimeZoneProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// A time zone is an area which observes a uniform standard time for legal, -// commercial and social purposes. +// The `TimeZone` message represents a time zone, which is an area +// observing a uniform standard time for legal, commercial, and social purposes. message TimeZone { + // The `TimeOffset` message represents a time offset from Coordinated + // Universal Time (UTC) in terms of hours and minutes. message TimeOffset { - // The offset in hours. + // The offset from UTC in whole hours. + // Example: -5 for UTC-5 (Eastern Standard Time). int32 hours = 1; - // The offset in minutes. + // The additional offset from UTC in minutes. + // Example: 30 for UTC+5:30 (India Standard Time). int32 minutes = 2; } + // The name of the time zone. + // Example: "America/New_York". string name = 1; + // The common abbreviation for the time zone. + // Example: "EST" for Eastern Standard Time or "EDT" for Eastern Daylight Time. string abbreviation = 2; - // The Standard Time (STD) offset from UTC in hours and minutes. + // The Standard Time (STD) offset from UTC, in hours and minutes. + // This represents the time zone's offset when daylight saving time is not in effect. + // Example: For "America/New_York", the standard time offset is UTC-5. TimeOffset utc_offset_std = 3; - // The Daylight Saving Time (DST) offset from UTC in hours and minutes. + // The Daylight Saving Time (DST) offset from UTC, in hours and minutes. + // This represents the time zone's offset when daylight saving time is in effect. + // Example: For "America/New_York", the daylight saving time offset is UTC-4. TimeOffset utc_offset_dst = 4; } diff --git a/uri.pb.go b/uri.pb.go index 5cf8f84..379e363 100644 --- a/uri.pb.go +++ b/uri.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,27 +37,42 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Represents a Uniform Resource Identifier (URI) as defined by s defined by +// The `Uri` message represents a Uniform Resource Identifier (URI) as defined by // [RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax](http://www.ietf.org/rfc/rfc2396.txt), // amended by [RFC 2732: Format for Literal IPv6 Addresses in URLs](http://www.ietf.org/rfc/rfc2732.txt). +// A URI is a compact string used to identify a resource in a generic syntax. type Uri struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The scheme component of this URI. + // The scheme component of the URI. + // Example: "https", "ftp", or "mailto". Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` - // The fragment component of this URI. + // The fragment component of the URI. + // This is the optional part of the URI that follows a "#" and provides an identifier + // to a secondary resource. + // Example: "section1" in "https://example.com/page#section1". Fragment string `protobuf:"bytes,2,opt,name=fragment,proto3" json:"fragment,omitempty"` - // The host component of this URI. + // The host component of the URI. + // This identifies the domain name or IP address of the resource. + // Example: "example.com" or "192.168.1.1". Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` - // The port number of this URI. + // The port number of the URI. + // This is the optional number that specifies the communication port. + // Example: 443 for HTTPS. Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` - // The query component of this URI. + // The query component of the URI. + // This contains optional parameters appended to the URI, following a "?". + // Example: "id=123&name=test" in "https://example.com/page?id=123&name=test". Query string `protobuf:"bytes,5,opt,name=query,proto3" json:"query,omitempty"` - // The authority component of this URI. + // The authority component of the URI. + // This typically includes the host and port, and optionally the user-information. + // Example: "user@example.com:8080" in "https://user@example.com:8080/resource". Authority string `protobuf:"bytes,6,opt,name=authority,proto3" json:"authority,omitempty"` - // The user-information component of this URI. + // The user-information component of the URI. + // This is the optional part before the host that provides user credentials. + // Example: "user:password" in "https://user:password@example.com". UserInfo string `protobuf:"bytes,7,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` } @@ -140,24 +158,27 @@ func (x *Uri) GetUserInfo() string { var File_uri_proto protoreflect.FileDescriptor var file_uri_proto_rawDesc = []byte{ - 0x0a, 0x09, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x03, 0x55, 0x72, 0x69, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x4a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, - 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x08, 0x55, - 0x72, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, - 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x09, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x03, + 0x55, 0x72, 0x69, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x42, 0x6a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x08, 0x55, 0x72, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, + 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, + 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, + 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -174,7 +195,7 @@ func file_uri_proto_rawDescGZIP() []byte { var file_uri_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_uri_proto_goTypes = []any{ - (*Uri)(nil), // 0: types.Uri + (*Uri)(nil), // 0: sixafter.types.Uri } var file_uri_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/uri.proto b/uri.proto index 48e8b57..5f13b2c 100644 --- a/uri.proto +++ b/uri.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,37 +17,54 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "UriProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// Represents a Uniform Resource Identifier (URI) as defined by s defined by +// The `Uri` message represents a Uniform Resource Identifier (URI) as defined by // [RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax](http://www.ietf.org/rfc/rfc2396.txt), // amended by [RFC 2732: Format for Literal IPv6 Addresses in URLs](http://www.ietf.org/rfc/rfc2732.txt). +// A URI is a compact string used to identify a resource in a generic syntax. message Uri { - // The scheme component of this URI. + + // The scheme component of the URI. + // Example: "https", "ftp", or "mailto". string scheme = 1; - // The fragment component of this URI. + // The fragment component of the URI. + // This is the optional part of the URI that follows a "#" and provides an identifier + // to a secondary resource. + // Example: "section1" in "https://example.com/page#section1". string fragment = 2; - // The host component of this URI. + // The host component of the URI. + // This identifies the domain name or IP address of the resource. + // Example: "example.com" or "192.168.1.1". string host = 3; - // The port number of this URI. + // The port number of the URI. + // This is the optional number that specifies the communication port. + // Example: 443 for HTTPS. int32 port = 4; - // The query component of this URI. + // The query component of the URI. + // This contains optional parameters appended to the URI, following a "?". + // Example: "id=123&name=test" in "https://example.com/page?id=123&name=test". string query = 5; - // The authority component of this URI. + // The authority component of the URI. + // This typically includes the host and port, and optionally the user-information. + // Example: "user@example.com:8080" in "https://user@example.com:8080/resource". string authority = 6; - // The user-information component of this URI. + // The user-information component of the URI. + // This is the optional part before the host that provides user credentials. + // Example: "user:password" in "https://user:password@example.com". string user_info = 7; } diff --git a/url.pb.go b/url.pb.go index 02cefa0..954ad2e 100644 --- a/url.pb.go +++ b/url.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,29 +37,48 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Represents a Uniform Resource Locator (URL). +// The `Url` message represents a Uniform Resource Locator (URL), which is a specific +// type of Uniform Resource Identifier (URI) used to locate resources on the web. +// A URL consists of various components like protocol, host, path, query, and more. type Url struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The protocol component of this URI. + // The protocol (or scheme) component of the URL. + // Example: "https", "http", or "ftp". Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` - // The host component of this URL. + // The host component of the URL. + // This specifies the domain name or IP address of the resource. + // Example: "example.com" or "192.168.1.1". Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` - // The path component of this URL. + // The path component of the URL. + // This represents the hierarchical location of the resource on the host. + // Example: "/resources/images" in "https://example.com/resources/images". Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - // The port number of this URL. + // The port number of the URL. + // This specifies the communication port for the connection. + // Example: 443 for HTTPS, 80 for HTTP. Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` - // The file component of this URL. + // The file component of the URL. + // This is the specific file or resource being requested. + // Example: "image.png" in "https://example.com/resources/image.png". File string `protobuf:"bytes,5,opt,name=file,proto3" json:"file,omitempty"` - // The query component of this URL. + // The query component of the URL. + // This contains optional parameters appended to the URL, following a "?". + // Example: "id=123&name=test" in "https://example.com/page?id=123&name=test". Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"` - // The authority component of this URL. + // The authority component of the URL. + // This typically includes the host, port, and optionally the user-information. + // Example: "user@example.com:8080" in "https://user@example.com:8080/resource". Authority string `protobuf:"bytes,7,opt,name=authority,proto3" json:"authority,omitempty"` - // The user-information component of this URL. + // The user-information component of the URL. + // This is the optional part before the host that provides user credentials. + // Example: "user:password" in "https://user:password@example.com". UserInfo string `protobuf:"bytes,8,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` - // The ref, also known as the anchor, component of this URL. + // The ref (also known as anchor) component of the URL. + // This identifies a secondary resource within the primary resource. + // Example: "section1" in "https://example.com/page#section1". Ref string `protobuf:"bytes,9,opt,name=ref,proto3" json:"ref,omitempty"` } @@ -156,26 +178,29 @@ func (x *Url) GetRef() string { var File_url_proto protoreflect.FileDescriptor var file_url_proto_rawDesc = []byte{ - 0x0a, 0x09, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x42, 0x4a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, - 0x08, 0x55, 0x72, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, - 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x09, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x69, 0x78, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x03, + 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, + 0x65, 0x66, 0x42, 0x6a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x08, 0x55, 0x72, 0x6c, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, + 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, + 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -192,7 +217,7 @@ func file_url_proto_rawDescGZIP() []byte { var file_url_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_url_proto_goTypes = []any{ - (*Url)(nil), // 0: types.Url + (*Url)(nil), // 0: sixafter.types.Url } var file_url_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/url.proto b/url.proto index e042866..058e95e 100644 --- a/url.proto +++ b/url.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,41 +17,62 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "UrlProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// Represents a Uniform Resource Locator (URL). +// The `Url` message represents a Uniform Resource Locator (URL), which is a specific +// type of Uniform Resource Identifier (URI) used to locate resources on the web. +// A URL consists of various components like protocol, host, path, query, and more. message Url { - // The protocol component of this URI. + + // The protocol (or scheme) component of the URL. + // Example: "https", "http", or "ftp". string protocol = 1; - // The host component of this URL. + // The host component of the URL. + // This specifies the domain name or IP address of the resource. + // Example: "example.com" or "192.168.1.1". string host = 2; - // The path component of this URL. + // The path component of the URL. + // This represents the hierarchical location of the resource on the host. + // Example: "/resources/images" in "https://example.com/resources/images". string path = 3; - // The port number of this URL. + // The port number of the URL. + // This specifies the communication port for the connection. + // Example: 443 for HTTPS, 80 for HTTP. int32 port = 4; - // The file component of this URL. + // The file component of the URL. + // This is the specific file or resource being requested. + // Example: "image.png" in "https://example.com/resources/image.png". string file = 5; - // The query component of this URL. + // The query component of the URL. + // This contains optional parameters appended to the URL, following a "?". + // Example: "id=123&name=test" in "https://example.com/page?id=123&name=test". string query = 6; - // The authority component of this URL. + // The authority component of the URL. + // This typically includes the host, port, and optionally the user-information. + // Example: "user@example.com:8080" in "https://user@example.com:8080/resource". string authority = 7; - // The user-information component of this URL. + // The user-information component of the URL. + // This is the optional part before the host that provides user credentials. + // Example: "user:password" in "https://user:password@example.com". string user_info = 8; - // The ref, also known as the anchor, component of this URL. + // The ref (also known as anchor) component of the URL. + // This identifies a secondary resource within the primary resource. + // Example: "section1" in "https://example.com/page#section1". string ref = 9; } diff --git a/version.pb.go b/version.pb.go index 460dd9d..5d50ff3 100644 --- a/version.pb.go +++ b/version.pb.go @@ -1,4 +1,7 @@ -// Copyright 2020 SIX AFTER, LLC (SIX AFTER) +// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) +// +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,17 +37,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A Semantic Versioning 2.0.0 compliant version number. -// See https://semver.org -// See the Backus-Naur form at https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions +// The `Version` message represents a Semantic Versioning 2.0.0 compliant version number. +// For details, see: https://semver.org type Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The major version number. + // // Major version zero (0.y.z) is for initial development. Anything MAY change // at any time. The public API SHOULD NOT be considered stable. Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` + // Minor version number. + // // Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible // functionality is introduced to the public API. It MUST be incremented if any // public API functionality is marked as deprecated. It MAY be incremented if @@ -52,10 +58,14 @@ type Version struct { // code. It MAY include patch level changes. Patch version MUST be reset to 0 when // minor version is incremented. Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` + // Patch version number. + // // Patch version Z (x.y.Z | x > 0) MUST be incremented if only backwards compatible // bug fixes are introduced. A bug fix is defined as an internal change that fixes // incorrect behavior. Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` + // The pre-release version identifier. + // // A pre-release version MAY be denoted by appending a hyphen and a series of dot // separated identifiers immediately following the patch version. Identifiers MUST // comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT @@ -67,6 +77,8 @@ type Version struct { // // Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92, 1.0.0-x-y-z.–. Prerelease string `protobuf:"bytes,4,opt,name=prerelease,proto3" json:"prerelease,omitempty"` + // The build metadata identifier. + // // Build metadata MAY be denoted by appending a plus sign and a series of dot separated // identifiers immediately following the patch or pre-release version. Identifiers MUST // comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT be @@ -149,22 +161,24 @@ var File_version_proto protoreflect.FileDescriptor var file_version_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x72, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x72, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x4e, 0x0a, 0x12, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x42, 0x0c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, - 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, - 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x54, 0x59, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x0e, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, + 0x92, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1e, 0x0a, + 0x0a, 0x70, 0x72, 0x65, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x6e, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x78, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x42, 0x0c, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x78, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, + 0x03, 0x54, 0x50, 0x42, 0xaa, 0x02, 0x1d, 0x53, 0x69, 0x78, 0x41, 0x66, 0x74, 0x65, 0x72, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -181,7 +195,7 @@ func file_version_proto_rawDescGZIP() []byte { var file_version_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_version_proto_goTypes = []any{ - (*Version)(nil), // 0: types.Version + (*Version)(nil), // 0: sixafter.types.Version } var file_version_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/version.proto b/version.proto index 8cc7c25..7ef453d 100644 --- a/version.proto +++ b/version.proto @@ -1,5 +1,8 @@ // Copyright 2020-2024 SIX AFTER, INC (SIX AFTER) // +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER) +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,24 +17,28 @@ syntax="proto3"; -package types; -option go_package="github.com/sixafter/types;types"; +package sixafter.types; +option go_package="github.com/sixafter/types;types"; option cc_enable_arenas = true; option java_package = "com.sixafter.types"; option java_multiple_files = true; option java_outer_classname = "VersionProto"; -option objc_class_prefix = "TYP"; +option objc_class_prefix = "TPB"; +option csharp_namespace = "SixAfter.Types.WellKnownTypes"; -// A Semantic Versioning 2.0.0 compliant version number. -// See https://semver.org -// See the Backus-Naur form at https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions +// The `Version` message represents a Semantic Versioning 2.0.0 compliant version number. +// For details, see: https://semver.org message Version { + // The major version number. + // // Major version zero (0.y.z) is for initial development. Anything MAY change // at any time. The public API SHOULD NOT be considered stable. uint32 major = 1; + // Minor version number. + // // Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible // functionality is introduced to the public API. It MUST be incremented if any // public API functionality is marked as deprecated. It MAY be incremented if @@ -40,11 +47,15 @@ message Version { // minor version is incremented. uint32 minor = 2; + // Patch version number. + // // Patch version Z (x.y.Z | x > 0) MUST be incremented if only backwards compatible // bug fixes are introduced. A bug fix is defined as an internal change that fixes // incorrect behavior. uint32 patch = 3; + // The pre-release version identifier. + // // A pre-release version MAY be denoted by appending a hyphen and a series of dot // separated identifiers immediately following the patch version. Identifiers MUST // comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT @@ -57,6 +68,8 @@ message Version { // Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92, 1.0.0-x-y-z.–. string prerelease = 4; + // The build metadata identifier. + // // Build metadata MAY be denoted by appending a plus sign and a series of dot separated // identifiers immediately following the patch or pre-release version. Identifiers MUST // comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT be @@ -68,4 +81,4 @@ message Version { // Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85, // 1.0.0+21AF26D3—-117B344092BD. string build_metadata = 5; -} \ No newline at end of file +}