Skip to content

Commit

Permalink
Pipeline build v1.47.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Mapped Build Pipeline committed Aug 14, 2024
1 parent d9790a4 commit e36588a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
38 changes: 38 additions & 0 deletions mapped/cloud/types/iso_duration.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2020 Google LLC
// Copyright 2022 Mapped Inc.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package mapped.cloud.types;

option cc_enable_arenas = true;
option java_multiple_files = true;
option java_package = "com.mapped.cloud.types";
option csharp_namespace = "Mapped.Cloud.Types";
option go_package = "go.mapped.dev/pb/cloud/types;types";

// We don't support floating points for those fields because they are vulnerable to precision loss when converting to/from JSON/other langauges.
// Practially we don't want to allow 0.5 years of 0.3 months while fine-grained seconds are representd in milliseconds and nanoseconds.
message IsoDuration {
int32 years = 1;
int32 months = 2;
int32 weeks = 3;
int32 days = 4;
int32 hours = 5;
int32 minutes = 6;
int32 seconds = 7;
int32 milliseconds = 8;
int32 nanoseconds = 9;
}
15 changes: 1 addition & 14 deletions mapped/cloud/types/typed_value.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "mapped/cloud/types/date.proto";
import "mapped/cloud/types/dayofweek.proto";
import "mapped/cloud/types/interval.proto";
import "mapped/cloud/types/money.proto";
import "mapped/cloud/types/iso_duration.proto";
import "mapped/cloud/types/month.proto";
import "mapped/cloud/types/phone_number.proto";
import "mapped/cloud/types/postal_address.proto";
Expand Down Expand Up @@ -50,20 +51,6 @@ message AnyLinkedDataMap {
map<string, AnyLinkedData> map = 1;
}

// We don't support floating points for those fields because they are vulnerable to precision loss when converting to/from JSON/other langauges.
// Practially we don't want to allow 0.5 years of 0.3 months while fine-grained seconds are representd in milliseconds and nanoseconds.
message IsoDuration {
int32 years = 1;
int32 months = 2;
int32 weeks = 3;
int32 days = 4;
int32 hours = 5;
int32 minutes = 6;
int32 seconds = 7;
int32 milliseconds = 8;
int32 nanoseconds = 9;
}

message TypedValue {
oneof value {
bool bool_value = 10;
Expand Down

0 comments on commit e36588a

Please sign in to comment.