From 0d85c90e04294b03cb63ecbf9423c6088838f085 Mon Sep 17 00:00:00 2001 From: Keyur Shah Date: Mon, 18 Nov 2024 10:47:49 -0800 Subject: [PATCH] Create no-op impl of the v3 observations api. (#1457) --- internal/proto/service/mixer.pb.go | 548 +++++++++--------- internal/proto/service/mixer_grpc.pb.go | 39 +- internal/proto/v3/observation.pb.go | 334 +++++++++++ internal/server/datasource/datasource.go | 1 + internal/server/handler_v3.go | 7 + internal/server/spanner/datasource.go | 5 + proto/service/mixer.proto | 8 + proto/v3/observation.proto | 48 ++ tools/migration_testing/mixer_api_requests.py | 18 + 9 files changed, 740 insertions(+), 268 deletions(-) create mode 100644 internal/proto/v3/observation.pb.go create mode 100644 proto/v3/observation.proto diff --git a/internal/proto/service/mixer.pb.go b/internal/proto/service/mixer.pb.go index 613304375..364fa258f 100644 --- a/internal/proto/service/mixer.pb.go +++ b/internal/proto/service/mixer.pb.go @@ -22,7 +22,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v3.21.12 +// protoc v3.20.3 // source: service/mixer.proto package service @@ -79,14 +79,24 @@ var file_service_mixer_proto_rawDesc = []byte{ 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9c, 0x4d, 0x0a, 0x05, 0x4d, 0x69, 0x78, 0x65, 0x72, 0x12, - 0x64, 0x0a, 0x06, 0x56, 0x33, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x5a, 0x0d, 0x3a, 0x01, - 0x2a, 0x22, 0x08, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x2f, 0x76, 0x33, - 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x56, 0x32, 0x53, 0x70, 0x61, 0x72, 0x71, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x76, 0x33, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa6, 0x4e, 0x0a, 0x05, + 0x4d, 0x69, 0x78, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x06, 0x56, 0x33, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x5a, 0x0d, 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x12, 0x08, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0d, + 0x56, 0x33, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x5a, 0x14, + 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x08, 0x56, 0x32, 0x53, 0x70, 0x61, 0x72, 0x71, 0x6c, 0x12, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x71, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, @@ -706,267 +716,271 @@ var file_service_mixer_proto_rawDesc = []byte{ var file_service_mixer_proto_goTypes = []interface{}{ (*v3.NodeRequest)(nil), // 0: datacommons.v3.NodeRequest - (*proto.SparqlRequest)(nil), // 1: datacommons.SparqlRequest - (*v2.ResolveRequest)(nil), // 2: datacommons.v2.ResolveRequest - (*v2.NodeRequest)(nil), // 3: datacommons.v2.NodeRequest - (*v2.EventRequest)(nil), // 4: datacommons.v2.EventRequest - (*v2.ObservationRequest)(nil), // 5: datacommons.v2.ObservationRequest - (*proto.QueryRequest)(nil), // 6: datacommons.QueryRequest - (*proto.GetPropertyLabelsRequest)(nil), // 7: datacommons.GetPropertyLabelsRequest - (*proto.GetPropertyValuesRequest)(nil), // 8: datacommons.GetPropertyValuesRequest - (*proto.GetTriplesRequest)(nil), // 9: datacommons.GetTriplesRequest - (*proto.GetPlacesInRequest)(nil), // 10: datacommons.GetPlacesInRequest - (*proto.GetStatsRequest)(nil), // 11: datacommons.GetStatsRequest - (*proto.GetStatValueRequest)(nil), // 12: datacommons.GetStatValueRequest - (*proto.GetStatSeriesRequest)(nil), // 13: datacommons.GetStatSeriesRequest - (*proto.GetStatAllRequest)(nil), // 14: datacommons.GetStatAllRequest - (*proto.GetLocationsRankingsRequest)(nil), // 15: datacommons.GetLocationsRankingsRequest - (*proto.GetRelatedLocationsRequest)(nil), // 16: datacommons.GetRelatedLocationsRequest - (*proto.GetBioPageDataRequest)(nil), // 17: datacommons.GetBioPageDataRequest - (*proto.TranslateRequest)(nil), // 18: datacommons.TranslateRequest - (*proto.SearchRequest)(nil), // 19: datacommons.SearchRequest - (*proto.GetVersionRequest)(nil), // 20: datacommons.GetVersionRequest - (*proto.GetPlaceStatsVarRequest)(nil), // 21: datacommons.GetPlaceStatsVarRequest - (*proto.GetPlaceStatVarsRequest)(nil), // 22: datacommons.GetPlaceStatVarsRequest - (*proto.GetEntityStatVarsUnionRequest)(nil), // 23: datacommons.GetEntityStatVarsUnionRequest - (*proto.GetPlaceStatDateWithinPlaceRequest)(nil), // 24: datacommons.GetPlaceStatDateWithinPlaceRequest - (*proto.GetStatDateWithinPlaceRequest)(nil), // 25: datacommons.GetStatDateWithinPlaceRequest - (*proto.GetImportTableDataRequest)(nil), // 26: datacommons.GetImportTableDataRequest - (*v1.PropertiesRequest)(nil), // 27: datacommons.v1.PropertiesRequest - (*v1.BulkPropertiesRequest)(nil), // 28: datacommons.v1.BulkPropertiesRequest - (*v1.PropertyValuesRequest)(nil), // 29: datacommons.v1.PropertyValuesRequest - (*v1.LinkedPropertyValuesRequest)(nil), // 30: datacommons.v1.LinkedPropertyValuesRequest - (*v1.BulkPropertyValuesRequest)(nil), // 31: datacommons.v1.BulkPropertyValuesRequest - (*v1.BulkLinkedPropertyValuesRequest)(nil), // 32: datacommons.v1.BulkLinkedPropertyValuesRequest - (*v1.TriplesRequest)(nil), // 33: datacommons.v1.TriplesRequest - (*v1.BulkTriplesRequest)(nil), // 34: datacommons.v1.BulkTriplesRequest - (*v1.VariablesRequest)(nil), // 35: datacommons.v1.VariablesRequest - (*v1.BulkVariablesRequest)(nil), // 36: datacommons.v1.BulkVariablesRequest - (*v1.PlaceInfoRequest)(nil), // 37: datacommons.v1.PlaceInfoRequest - (*v1.BulkPlaceInfoRequest)(nil), // 38: datacommons.v1.BulkPlaceInfoRequest - (*v1.VariableInfoRequest)(nil), // 39: datacommons.v1.VariableInfoRequest - (*v1.BulkVariableInfoRequest)(nil), // 40: datacommons.v1.BulkVariableInfoRequest - (*v1.VariableGroupInfoRequest)(nil), // 41: datacommons.v1.VariableGroupInfoRequest - (*v1.BulkVariableGroupInfoRequest)(nil), // 42: datacommons.v1.BulkVariableGroupInfoRequest - (*v1.ObservationsPointRequest)(nil), // 43: datacommons.v1.ObservationsPointRequest - (*v1.BulkObservationsPointRequest)(nil), // 44: datacommons.v1.BulkObservationsPointRequest - (*v1.BulkObservationsPointLinkedRequest)(nil), // 45: datacommons.v1.BulkObservationsPointLinkedRequest - (*v1.ObservationsSeriesRequest)(nil), // 46: datacommons.v1.ObservationsSeriesRequest - (*v1.BulkObservationsSeriesRequest)(nil), // 47: datacommons.v1.BulkObservationsSeriesRequest - (*v1.BulkObservationsSeriesLinkedRequest)(nil), // 48: datacommons.v1.BulkObservationsSeriesLinkedRequest - (*v1.DerivedObservationsSeriesRequest)(nil), // 49: datacommons.v1.DerivedObservationsSeriesRequest - (*v1.BulkObservationDatesLinkedRequest)(nil), // 50: datacommons.v1.BulkObservationDatesLinkedRequest - (*v1.BulkObservationExistenceRequest)(nil), // 51: datacommons.v1.BulkObservationExistenceRequest - (*v1.BioPageRequest)(nil), // 52: datacommons.v1.BioPageRequest - (*v1.PlacePageRequest)(nil), // 53: datacommons.v1.PlacePageRequest - (*v1.VariableAncestorsRequest)(nil), // 54: datacommons.v1.VariableAncestorsRequest - (*proto.SearchStatVarRequest)(nil), // 55: datacommons.SearchStatVarRequest - (*v1.EventCollectionRequest)(nil), // 56: datacommons.v1.EventCollectionRequest - (*v1.EventCollectionDateRequest)(nil), // 57: datacommons.v1.EventCollectionDateRequest - (*proto.ResolveEntitiesRequest)(nil), // 58: datacommons.ResolveEntitiesRequest - (*proto.ResolveCoordinatesRequest)(nil), // 59: datacommons.ResolveCoordinatesRequest - (*proto.ResolveIdsRequest)(nil), // 60: datacommons.ResolveIdsRequest - (*proto.FindEntitiesRequest)(nil), // 61: datacommons.FindEntitiesRequest - (*proto.BulkFindEntitiesRequest)(nil), // 62: datacommons.BulkFindEntitiesRequest - (*proto.RecognizePlacesRequest)(nil), // 63: datacommons.RecognizePlacesRequest - (*proto.RecognizeEntitiesRequest)(nil), // 64: datacommons.RecognizeEntitiesRequest - (*proto.UpdateCacheRequest)(nil), // 65: datacommons.UpdateCacheRequest - (*v3.NodeResponse)(nil), // 66: datacommons.v3.NodeResponse - (*proto.QueryResponse)(nil), // 67: datacommons.QueryResponse - (*v2.ResolveResponse)(nil), // 68: datacommons.v2.ResolveResponse - (*v2.NodeResponse)(nil), // 69: datacommons.v2.NodeResponse - (*v2.EventResponse)(nil), // 70: datacommons.v2.EventResponse - (*v2.ObservationResponse)(nil), // 71: datacommons.v2.ObservationResponse - (*proto.PayloadResponse)(nil), // 72: datacommons.PayloadResponse - (*proto.GetPlacesInResponse)(nil), // 73: datacommons.GetPlacesInResponse - (*proto.GetStatsResponse)(nil), // 74: datacommons.GetStatsResponse - (*proto.GetStatValueResponse)(nil), // 75: datacommons.GetStatValueResponse - (*proto.GetStatSeriesResponse)(nil), // 76: datacommons.GetStatSeriesResponse - (*proto.GetStatAllResponse)(nil), // 77: datacommons.GetStatAllResponse - (*proto.GetLocationsRankingsResponse)(nil), // 78: datacommons.GetLocationsRankingsResponse - (*proto.GetRelatedLocationsResponse)(nil), // 79: datacommons.GetRelatedLocationsResponse - (*proto.GraphNodes)(nil), // 80: datacommons.GraphNodes - (*proto.TranslateResponse)(nil), // 81: datacommons.TranslateResponse - (*proto.SearchResponse)(nil), // 82: datacommons.SearchResponse - (*proto.GetVersionResponse)(nil), // 83: datacommons.GetVersionResponse - (*proto.GetPlaceStatsVarResponse)(nil), // 84: datacommons.GetPlaceStatsVarResponse - (*proto.GetPlaceStatVarsResponse)(nil), // 85: datacommons.GetPlaceStatVarsResponse - (*proto.GetEntityStatVarsUnionResponse)(nil), // 86: datacommons.GetEntityStatVarsUnionResponse - (*proto.GetPlaceStatDateWithinPlaceResponse)(nil), // 87: datacommons.GetPlaceStatDateWithinPlaceResponse - (*proto.GetStatDateWithinPlaceResponse)(nil), // 88: datacommons.GetStatDateWithinPlaceResponse - (*proto.GetImportTableDataResponse)(nil), // 89: datacommons.GetImportTableDataResponse - (*v1.PropertiesResponse)(nil), // 90: datacommons.v1.PropertiesResponse - (*v1.BulkPropertiesResponse)(nil), // 91: datacommons.v1.BulkPropertiesResponse - (*v1.PropertyValuesResponse)(nil), // 92: datacommons.v1.PropertyValuesResponse - (*v1.BulkPropertyValuesResponse)(nil), // 93: datacommons.v1.BulkPropertyValuesResponse - (*v1.TriplesResponse)(nil), // 94: datacommons.v1.TriplesResponse - (*v1.BulkTriplesResponse)(nil), // 95: datacommons.v1.BulkTriplesResponse - (*v1.VariablesResponse)(nil), // 96: datacommons.v1.VariablesResponse - (*v1.BulkVariablesResponse)(nil), // 97: datacommons.v1.BulkVariablesResponse - (*v1.PlaceInfoResponse)(nil), // 98: datacommons.v1.PlaceInfoResponse - (*v1.BulkPlaceInfoResponse)(nil), // 99: datacommons.v1.BulkPlaceInfoResponse - (*v1.VariableInfoResponse)(nil), // 100: datacommons.v1.VariableInfoResponse - (*v1.BulkVariableInfoResponse)(nil), // 101: datacommons.v1.BulkVariableInfoResponse - (*v1.VariableGroupInfoResponse)(nil), // 102: datacommons.v1.VariableGroupInfoResponse - (*v1.BulkVariableGroupInfoResponse)(nil), // 103: datacommons.v1.BulkVariableGroupInfoResponse - (*proto.PointStat)(nil), // 104: datacommons.PointStat - (*v1.BulkObservationsPointResponse)(nil), // 105: datacommons.v1.BulkObservationsPointResponse - (*v1.ObservationsSeriesResponse)(nil), // 106: datacommons.v1.ObservationsSeriesResponse - (*v1.BulkObservationsSeriesResponse)(nil), // 107: datacommons.v1.BulkObservationsSeriesResponse - (*v1.DerivedObservationsSeriesResponse)(nil), // 108: datacommons.v1.DerivedObservationsSeriesResponse - (*v1.BulkObservationDatesLinkedResponse)(nil), // 109: datacommons.v1.BulkObservationDatesLinkedResponse - (*v1.BulkObservationExistenceResponse)(nil), // 110: datacommons.v1.BulkObservationExistenceResponse - (*v1.PlacePageResponse)(nil), // 111: datacommons.v1.PlacePageResponse - (*v1.VariableAncestorsResponse)(nil), // 112: datacommons.v1.VariableAncestorsResponse - (*proto.SearchStatVarResponse)(nil), // 113: datacommons.SearchStatVarResponse - (*v1.EventCollectionResponse)(nil), // 114: datacommons.v1.EventCollectionResponse - (*v1.EventCollectionDateResponse)(nil), // 115: datacommons.v1.EventCollectionDateResponse - (*proto.ResolveEntitiesResponse)(nil), // 116: datacommons.ResolveEntitiesResponse - (*proto.ResolveCoordinatesResponse)(nil), // 117: datacommons.ResolveCoordinatesResponse - (*proto.ResolveIdsResponse)(nil), // 118: datacommons.ResolveIdsResponse - (*proto.FindEntitiesResponse)(nil), // 119: datacommons.FindEntitiesResponse - (*proto.BulkFindEntitiesResponse)(nil), // 120: datacommons.BulkFindEntitiesResponse - (*proto.RecognizePlacesResponse)(nil), // 121: datacommons.RecognizePlacesResponse - (*proto.RecognizeEntitiesResponse)(nil), // 122: datacommons.RecognizeEntitiesResponse - (*proto.UpdateCacheResponse)(nil), // 123: datacommons.UpdateCacheResponse + (*v3.ObservationRequest)(nil), // 1: datacommons.v3.ObservationRequest + (*proto.SparqlRequest)(nil), // 2: datacommons.SparqlRequest + (*v2.ResolveRequest)(nil), // 3: datacommons.v2.ResolveRequest + (*v2.NodeRequest)(nil), // 4: datacommons.v2.NodeRequest + (*v2.EventRequest)(nil), // 5: datacommons.v2.EventRequest + (*v2.ObservationRequest)(nil), // 6: datacommons.v2.ObservationRequest + (*proto.QueryRequest)(nil), // 7: datacommons.QueryRequest + (*proto.GetPropertyLabelsRequest)(nil), // 8: datacommons.GetPropertyLabelsRequest + (*proto.GetPropertyValuesRequest)(nil), // 9: datacommons.GetPropertyValuesRequest + (*proto.GetTriplesRequest)(nil), // 10: datacommons.GetTriplesRequest + (*proto.GetPlacesInRequest)(nil), // 11: datacommons.GetPlacesInRequest + (*proto.GetStatsRequest)(nil), // 12: datacommons.GetStatsRequest + (*proto.GetStatValueRequest)(nil), // 13: datacommons.GetStatValueRequest + (*proto.GetStatSeriesRequest)(nil), // 14: datacommons.GetStatSeriesRequest + (*proto.GetStatAllRequest)(nil), // 15: datacommons.GetStatAllRequest + (*proto.GetLocationsRankingsRequest)(nil), // 16: datacommons.GetLocationsRankingsRequest + (*proto.GetRelatedLocationsRequest)(nil), // 17: datacommons.GetRelatedLocationsRequest + (*proto.GetBioPageDataRequest)(nil), // 18: datacommons.GetBioPageDataRequest + (*proto.TranslateRequest)(nil), // 19: datacommons.TranslateRequest + (*proto.SearchRequest)(nil), // 20: datacommons.SearchRequest + (*proto.GetVersionRequest)(nil), // 21: datacommons.GetVersionRequest + (*proto.GetPlaceStatsVarRequest)(nil), // 22: datacommons.GetPlaceStatsVarRequest + (*proto.GetPlaceStatVarsRequest)(nil), // 23: datacommons.GetPlaceStatVarsRequest + (*proto.GetEntityStatVarsUnionRequest)(nil), // 24: datacommons.GetEntityStatVarsUnionRequest + (*proto.GetPlaceStatDateWithinPlaceRequest)(nil), // 25: datacommons.GetPlaceStatDateWithinPlaceRequest + (*proto.GetStatDateWithinPlaceRequest)(nil), // 26: datacommons.GetStatDateWithinPlaceRequest + (*proto.GetImportTableDataRequest)(nil), // 27: datacommons.GetImportTableDataRequest + (*v1.PropertiesRequest)(nil), // 28: datacommons.v1.PropertiesRequest + (*v1.BulkPropertiesRequest)(nil), // 29: datacommons.v1.BulkPropertiesRequest + (*v1.PropertyValuesRequest)(nil), // 30: datacommons.v1.PropertyValuesRequest + (*v1.LinkedPropertyValuesRequest)(nil), // 31: datacommons.v1.LinkedPropertyValuesRequest + (*v1.BulkPropertyValuesRequest)(nil), // 32: datacommons.v1.BulkPropertyValuesRequest + (*v1.BulkLinkedPropertyValuesRequest)(nil), // 33: datacommons.v1.BulkLinkedPropertyValuesRequest + (*v1.TriplesRequest)(nil), // 34: datacommons.v1.TriplesRequest + (*v1.BulkTriplesRequest)(nil), // 35: datacommons.v1.BulkTriplesRequest + (*v1.VariablesRequest)(nil), // 36: datacommons.v1.VariablesRequest + (*v1.BulkVariablesRequest)(nil), // 37: datacommons.v1.BulkVariablesRequest + (*v1.PlaceInfoRequest)(nil), // 38: datacommons.v1.PlaceInfoRequest + (*v1.BulkPlaceInfoRequest)(nil), // 39: datacommons.v1.BulkPlaceInfoRequest + (*v1.VariableInfoRequest)(nil), // 40: datacommons.v1.VariableInfoRequest + (*v1.BulkVariableInfoRequest)(nil), // 41: datacommons.v1.BulkVariableInfoRequest + (*v1.VariableGroupInfoRequest)(nil), // 42: datacommons.v1.VariableGroupInfoRequest + (*v1.BulkVariableGroupInfoRequest)(nil), // 43: datacommons.v1.BulkVariableGroupInfoRequest + (*v1.ObservationsPointRequest)(nil), // 44: datacommons.v1.ObservationsPointRequest + (*v1.BulkObservationsPointRequest)(nil), // 45: datacommons.v1.BulkObservationsPointRequest + (*v1.BulkObservationsPointLinkedRequest)(nil), // 46: datacommons.v1.BulkObservationsPointLinkedRequest + (*v1.ObservationsSeriesRequest)(nil), // 47: datacommons.v1.ObservationsSeriesRequest + (*v1.BulkObservationsSeriesRequest)(nil), // 48: datacommons.v1.BulkObservationsSeriesRequest + (*v1.BulkObservationsSeriesLinkedRequest)(nil), // 49: datacommons.v1.BulkObservationsSeriesLinkedRequest + (*v1.DerivedObservationsSeriesRequest)(nil), // 50: datacommons.v1.DerivedObservationsSeriesRequest + (*v1.BulkObservationDatesLinkedRequest)(nil), // 51: datacommons.v1.BulkObservationDatesLinkedRequest + (*v1.BulkObservationExistenceRequest)(nil), // 52: datacommons.v1.BulkObservationExistenceRequest + (*v1.BioPageRequest)(nil), // 53: datacommons.v1.BioPageRequest + (*v1.PlacePageRequest)(nil), // 54: datacommons.v1.PlacePageRequest + (*v1.VariableAncestorsRequest)(nil), // 55: datacommons.v1.VariableAncestorsRequest + (*proto.SearchStatVarRequest)(nil), // 56: datacommons.SearchStatVarRequest + (*v1.EventCollectionRequest)(nil), // 57: datacommons.v1.EventCollectionRequest + (*v1.EventCollectionDateRequest)(nil), // 58: datacommons.v1.EventCollectionDateRequest + (*proto.ResolveEntitiesRequest)(nil), // 59: datacommons.ResolveEntitiesRequest + (*proto.ResolveCoordinatesRequest)(nil), // 60: datacommons.ResolveCoordinatesRequest + (*proto.ResolveIdsRequest)(nil), // 61: datacommons.ResolveIdsRequest + (*proto.FindEntitiesRequest)(nil), // 62: datacommons.FindEntitiesRequest + (*proto.BulkFindEntitiesRequest)(nil), // 63: datacommons.BulkFindEntitiesRequest + (*proto.RecognizePlacesRequest)(nil), // 64: datacommons.RecognizePlacesRequest + (*proto.RecognizeEntitiesRequest)(nil), // 65: datacommons.RecognizeEntitiesRequest + (*proto.UpdateCacheRequest)(nil), // 66: datacommons.UpdateCacheRequest + (*v3.NodeResponse)(nil), // 67: datacommons.v3.NodeResponse + (*v3.ObservationResponse)(nil), // 68: datacommons.v3.ObservationResponse + (*proto.QueryResponse)(nil), // 69: datacommons.QueryResponse + (*v2.ResolveResponse)(nil), // 70: datacommons.v2.ResolveResponse + (*v2.NodeResponse)(nil), // 71: datacommons.v2.NodeResponse + (*v2.EventResponse)(nil), // 72: datacommons.v2.EventResponse + (*v2.ObservationResponse)(nil), // 73: datacommons.v2.ObservationResponse + (*proto.PayloadResponse)(nil), // 74: datacommons.PayloadResponse + (*proto.GetPlacesInResponse)(nil), // 75: datacommons.GetPlacesInResponse + (*proto.GetStatsResponse)(nil), // 76: datacommons.GetStatsResponse + (*proto.GetStatValueResponse)(nil), // 77: datacommons.GetStatValueResponse + (*proto.GetStatSeriesResponse)(nil), // 78: datacommons.GetStatSeriesResponse + (*proto.GetStatAllResponse)(nil), // 79: datacommons.GetStatAllResponse + (*proto.GetLocationsRankingsResponse)(nil), // 80: datacommons.GetLocationsRankingsResponse + (*proto.GetRelatedLocationsResponse)(nil), // 81: datacommons.GetRelatedLocationsResponse + (*proto.GraphNodes)(nil), // 82: datacommons.GraphNodes + (*proto.TranslateResponse)(nil), // 83: datacommons.TranslateResponse + (*proto.SearchResponse)(nil), // 84: datacommons.SearchResponse + (*proto.GetVersionResponse)(nil), // 85: datacommons.GetVersionResponse + (*proto.GetPlaceStatsVarResponse)(nil), // 86: datacommons.GetPlaceStatsVarResponse + (*proto.GetPlaceStatVarsResponse)(nil), // 87: datacommons.GetPlaceStatVarsResponse + (*proto.GetEntityStatVarsUnionResponse)(nil), // 88: datacommons.GetEntityStatVarsUnionResponse + (*proto.GetPlaceStatDateWithinPlaceResponse)(nil), // 89: datacommons.GetPlaceStatDateWithinPlaceResponse + (*proto.GetStatDateWithinPlaceResponse)(nil), // 90: datacommons.GetStatDateWithinPlaceResponse + (*proto.GetImportTableDataResponse)(nil), // 91: datacommons.GetImportTableDataResponse + (*v1.PropertiesResponse)(nil), // 92: datacommons.v1.PropertiesResponse + (*v1.BulkPropertiesResponse)(nil), // 93: datacommons.v1.BulkPropertiesResponse + (*v1.PropertyValuesResponse)(nil), // 94: datacommons.v1.PropertyValuesResponse + (*v1.BulkPropertyValuesResponse)(nil), // 95: datacommons.v1.BulkPropertyValuesResponse + (*v1.TriplesResponse)(nil), // 96: datacommons.v1.TriplesResponse + (*v1.BulkTriplesResponse)(nil), // 97: datacommons.v1.BulkTriplesResponse + (*v1.VariablesResponse)(nil), // 98: datacommons.v1.VariablesResponse + (*v1.BulkVariablesResponse)(nil), // 99: datacommons.v1.BulkVariablesResponse + (*v1.PlaceInfoResponse)(nil), // 100: datacommons.v1.PlaceInfoResponse + (*v1.BulkPlaceInfoResponse)(nil), // 101: datacommons.v1.BulkPlaceInfoResponse + (*v1.VariableInfoResponse)(nil), // 102: datacommons.v1.VariableInfoResponse + (*v1.BulkVariableInfoResponse)(nil), // 103: datacommons.v1.BulkVariableInfoResponse + (*v1.VariableGroupInfoResponse)(nil), // 104: datacommons.v1.VariableGroupInfoResponse + (*v1.BulkVariableGroupInfoResponse)(nil), // 105: datacommons.v1.BulkVariableGroupInfoResponse + (*proto.PointStat)(nil), // 106: datacommons.PointStat + (*v1.BulkObservationsPointResponse)(nil), // 107: datacommons.v1.BulkObservationsPointResponse + (*v1.ObservationsSeriesResponse)(nil), // 108: datacommons.v1.ObservationsSeriesResponse + (*v1.BulkObservationsSeriesResponse)(nil), // 109: datacommons.v1.BulkObservationsSeriesResponse + (*v1.DerivedObservationsSeriesResponse)(nil), // 110: datacommons.v1.DerivedObservationsSeriesResponse + (*v1.BulkObservationDatesLinkedResponse)(nil), // 111: datacommons.v1.BulkObservationDatesLinkedResponse + (*v1.BulkObservationExistenceResponse)(nil), // 112: datacommons.v1.BulkObservationExistenceResponse + (*v1.PlacePageResponse)(nil), // 113: datacommons.v1.PlacePageResponse + (*v1.VariableAncestorsResponse)(nil), // 114: datacommons.v1.VariableAncestorsResponse + (*proto.SearchStatVarResponse)(nil), // 115: datacommons.SearchStatVarResponse + (*v1.EventCollectionResponse)(nil), // 116: datacommons.v1.EventCollectionResponse + (*v1.EventCollectionDateResponse)(nil), // 117: datacommons.v1.EventCollectionDateResponse + (*proto.ResolveEntitiesResponse)(nil), // 118: datacommons.ResolveEntitiesResponse + (*proto.ResolveCoordinatesResponse)(nil), // 119: datacommons.ResolveCoordinatesResponse + (*proto.ResolveIdsResponse)(nil), // 120: datacommons.ResolveIdsResponse + (*proto.FindEntitiesResponse)(nil), // 121: datacommons.FindEntitiesResponse + (*proto.BulkFindEntitiesResponse)(nil), // 122: datacommons.BulkFindEntitiesResponse + (*proto.RecognizePlacesResponse)(nil), // 123: datacommons.RecognizePlacesResponse + (*proto.RecognizeEntitiesResponse)(nil), // 124: datacommons.RecognizeEntitiesResponse + (*proto.UpdateCacheResponse)(nil), // 125: datacommons.UpdateCacheResponse } var file_service_mixer_proto_depIdxs = []int32{ 0, // 0: datacommons.Mixer.V3Node:input_type -> datacommons.v3.NodeRequest - 1, // 1: datacommons.Mixer.V2Sparql:input_type -> datacommons.SparqlRequest - 2, // 2: datacommons.Mixer.V2Resolve:input_type -> datacommons.v2.ResolveRequest - 3, // 3: datacommons.Mixer.V2Node:input_type -> datacommons.v2.NodeRequest - 4, // 4: datacommons.Mixer.V2Event:input_type -> datacommons.v2.EventRequest - 5, // 5: datacommons.Mixer.V2Observation:input_type -> datacommons.v2.ObservationRequest - 6, // 6: datacommons.Mixer.Query:input_type -> datacommons.QueryRequest - 7, // 7: datacommons.Mixer.GetPropertyLabels:input_type -> datacommons.GetPropertyLabelsRequest - 8, // 8: datacommons.Mixer.GetPropertyValues:input_type -> datacommons.GetPropertyValuesRequest - 9, // 9: datacommons.Mixer.GetTriples:input_type -> datacommons.GetTriplesRequest - 10, // 10: datacommons.Mixer.GetPlacesIn:input_type -> datacommons.GetPlacesInRequest - 11, // 11: datacommons.Mixer.GetStats:input_type -> datacommons.GetStatsRequest - 12, // 12: datacommons.Mixer.GetStatValue:input_type -> datacommons.GetStatValueRequest - 13, // 13: datacommons.Mixer.GetStatSeries:input_type -> datacommons.GetStatSeriesRequest - 14, // 14: datacommons.Mixer.GetStatAll:input_type -> datacommons.GetStatAllRequest - 15, // 15: datacommons.Mixer.GetLocationsRankings:input_type -> datacommons.GetLocationsRankingsRequest - 16, // 16: datacommons.Mixer.GetRelatedLocations:input_type -> datacommons.GetRelatedLocationsRequest - 17, // 17: datacommons.Mixer.GetBioPageData:input_type -> datacommons.GetBioPageDataRequest - 18, // 18: datacommons.Mixer.Translate:input_type -> datacommons.TranslateRequest - 19, // 19: datacommons.Mixer.Search:input_type -> datacommons.SearchRequest - 20, // 20: datacommons.Mixer.GetVersion:input_type -> datacommons.GetVersionRequest - 21, // 21: datacommons.Mixer.GetPlaceStatsVar:input_type -> datacommons.GetPlaceStatsVarRequest - 22, // 22: datacommons.Mixer.GetPlaceStatVars:input_type -> datacommons.GetPlaceStatVarsRequest - 23, // 23: datacommons.Mixer.GetEntityStatVarsUnionV1:input_type -> datacommons.GetEntityStatVarsUnionRequest - 24, // 24: datacommons.Mixer.GetPlaceStatDateWithinPlace:input_type -> datacommons.GetPlaceStatDateWithinPlaceRequest - 25, // 25: datacommons.Mixer.GetStatDateWithinPlace:input_type -> datacommons.GetStatDateWithinPlaceRequest - 26, // 26: datacommons.Mixer.GetImportTableData:input_type -> datacommons.GetImportTableDataRequest - 6, // 27: datacommons.Mixer.QueryV1:input_type -> datacommons.QueryRequest - 27, // 28: datacommons.Mixer.Properties:input_type -> datacommons.v1.PropertiesRequest - 28, // 29: datacommons.Mixer.BulkProperties:input_type -> datacommons.v1.BulkPropertiesRequest - 29, // 30: datacommons.Mixer.PropertyValues:input_type -> datacommons.v1.PropertyValuesRequest - 30, // 31: datacommons.Mixer.LinkedPropertyValues:input_type -> datacommons.v1.LinkedPropertyValuesRequest - 31, // 32: datacommons.Mixer.BulkPropertyValues:input_type -> datacommons.v1.BulkPropertyValuesRequest - 32, // 33: datacommons.Mixer.BulkLinkedPropertyValues:input_type -> datacommons.v1.BulkLinkedPropertyValuesRequest - 33, // 34: datacommons.Mixer.Triples:input_type -> datacommons.v1.TriplesRequest - 34, // 35: datacommons.Mixer.BulkTriples:input_type -> datacommons.v1.BulkTriplesRequest - 35, // 36: datacommons.Mixer.Variables:input_type -> datacommons.v1.VariablesRequest - 36, // 37: datacommons.Mixer.BulkVariables:input_type -> datacommons.v1.BulkVariablesRequest - 37, // 38: datacommons.Mixer.PlaceInfo:input_type -> datacommons.v1.PlaceInfoRequest - 38, // 39: datacommons.Mixer.BulkPlaceInfo:input_type -> datacommons.v1.BulkPlaceInfoRequest - 39, // 40: datacommons.Mixer.VariableInfo:input_type -> datacommons.v1.VariableInfoRequest - 40, // 41: datacommons.Mixer.BulkVariableInfo:input_type -> datacommons.v1.BulkVariableInfoRequest - 41, // 42: datacommons.Mixer.VariableGroupInfo:input_type -> datacommons.v1.VariableGroupInfoRequest - 42, // 43: datacommons.Mixer.BulkVariableGroupInfo:input_type -> datacommons.v1.BulkVariableGroupInfoRequest - 43, // 44: datacommons.Mixer.ObservationsPoint:input_type -> datacommons.v1.ObservationsPointRequest - 44, // 45: datacommons.Mixer.BulkObservationsPoint:input_type -> datacommons.v1.BulkObservationsPointRequest - 45, // 46: datacommons.Mixer.BulkObservationsPointLinked:input_type -> datacommons.v1.BulkObservationsPointLinkedRequest - 46, // 47: datacommons.Mixer.ObservationsSeries:input_type -> datacommons.v1.ObservationsSeriesRequest - 47, // 48: datacommons.Mixer.BulkObservationsSeries:input_type -> datacommons.v1.BulkObservationsSeriesRequest - 48, // 49: datacommons.Mixer.BulkObservationsSeriesLinked:input_type -> datacommons.v1.BulkObservationsSeriesLinkedRequest - 49, // 50: datacommons.Mixer.DerivedObservationsSeries:input_type -> datacommons.v1.DerivedObservationsSeriesRequest - 50, // 51: datacommons.Mixer.BulkObservationDatesLinked:input_type -> datacommons.v1.BulkObservationDatesLinkedRequest - 51, // 52: datacommons.Mixer.BulkObservationExistence:input_type -> datacommons.v1.BulkObservationExistenceRequest - 52, // 53: datacommons.Mixer.BioPage:input_type -> datacommons.v1.BioPageRequest - 53, // 54: datacommons.Mixer.PlacePage:input_type -> datacommons.v1.PlacePageRequest - 54, // 55: datacommons.Mixer.VariableAncestors:input_type -> datacommons.v1.VariableAncestorsRequest - 55, // 56: datacommons.Mixer.SearchStatVar:input_type -> datacommons.SearchStatVarRequest - 56, // 57: datacommons.Mixer.EventCollection:input_type -> datacommons.v1.EventCollectionRequest - 57, // 58: datacommons.Mixer.EventCollectionDate:input_type -> datacommons.v1.EventCollectionDateRequest - 58, // 59: datacommons.Mixer.ResolveEntities:input_type -> datacommons.ResolveEntitiesRequest - 59, // 60: datacommons.Mixer.ResolveCoordinates:input_type -> datacommons.ResolveCoordinatesRequest - 60, // 61: datacommons.Mixer.ResolveIds:input_type -> datacommons.ResolveIdsRequest - 61, // 62: datacommons.Mixer.FindEntities:input_type -> datacommons.FindEntitiesRequest - 62, // 63: datacommons.Mixer.BulkFindEntities:input_type -> datacommons.BulkFindEntitiesRequest - 63, // 64: datacommons.Mixer.RecognizePlaces:input_type -> datacommons.RecognizePlacesRequest - 64, // 65: datacommons.Mixer.RecognizeEntities:input_type -> datacommons.RecognizeEntitiesRequest - 65, // 66: datacommons.Mixer.UpdateCache:input_type -> datacommons.UpdateCacheRequest - 66, // 67: datacommons.Mixer.V3Node:output_type -> datacommons.v3.NodeResponse - 67, // 68: datacommons.Mixer.V2Sparql:output_type -> datacommons.QueryResponse - 68, // 69: datacommons.Mixer.V2Resolve:output_type -> datacommons.v2.ResolveResponse - 69, // 70: datacommons.Mixer.V2Node:output_type -> datacommons.v2.NodeResponse - 70, // 71: datacommons.Mixer.V2Event:output_type -> datacommons.v2.EventResponse - 71, // 72: datacommons.Mixer.V2Observation:output_type -> datacommons.v2.ObservationResponse - 67, // 73: datacommons.Mixer.Query:output_type -> datacommons.QueryResponse - 72, // 74: datacommons.Mixer.GetPropertyLabels:output_type -> datacommons.PayloadResponse - 72, // 75: datacommons.Mixer.GetPropertyValues:output_type -> datacommons.PayloadResponse - 72, // 76: datacommons.Mixer.GetTriples:output_type -> datacommons.PayloadResponse - 73, // 77: datacommons.Mixer.GetPlacesIn:output_type -> datacommons.GetPlacesInResponse - 74, // 78: datacommons.Mixer.GetStats:output_type -> datacommons.GetStatsResponse - 75, // 79: datacommons.Mixer.GetStatValue:output_type -> datacommons.GetStatValueResponse - 76, // 80: datacommons.Mixer.GetStatSeries:output_type -> datacommons.GetStatSeriesResponse - 77, // 81: datacommons.Mixer.GetStatAll:output_type -> datacommons.GetStatAllResponse - 78, // 82: datacommons.Mixer.GetLocationsRankings:output_type -> datacommons.GetLocationsRankingsResponse - 79, // 83: datacommons.Mixer.GetRelatedLocations:output_type -> datacommons.GetRelatedLocationsResponse - 80, // 84: datacommons.Mixer.GetBioPageData:output_type -> datacommons.GraphNodes - 81, // 85: datacommons.Mixer.Translate:output_type -> datacommons.TranslateResponse - 82, // 86: datacommons.Mixer.Search:output_type -> datacommons.SearchResponse - 83, // 87: datacommons.Mixer.GetVersion:output_type -> datacommons.GetVersionResponse - 84, // 88: datacommons.Mixer.GetPlaceStatsVar:output_type -> datacommons.GetPlaceStatsVarResponse - 85, // 89: datacommons.Mixer.GetPlaceStatVars:output_type -> datacommons.GetPlaceStatVarsResponse - 86, // 90: datacommons.Mixer.GetEntityStatVarsUnionV1:output_type -> datacommons.GetEntityStatVarsUnionResponse - 87, // 91: datacommons.Mixer.GetPlaceStatDateWithinPlace:output_type -> datacommons.GetPlaceStatDateWithinPlaceResponse - 88, // 92: datacommons.Mixer.GetStatDateWithinPlace:output_type -> datacommons.GetStatDateWithinPlaceResponse - 89, // 93: datacommons.Mixer.GetImportTableData:output_type -> datacommons.GetImportTableDataResponse - 67, // 94: datacommons.Mixer.QueryV1:output_type -> datacommons.QueryResponse - 90, // 95: datacommons.Mixer.Properties:output_type -> datacommons.v1.PropertiesResponse - 91, // 96: datacommons.Mixer.BulkProperties:output_type -> datacommons.v1.BulkPropertiesResponse - 92, // 97: datacommons.Mixer.PropertyValues:output_type -> datacommons.v1.PropertyValuesResponse - 92, // 98: datacommons.Mixer.LinkedPropertyValues:output_type -> datacommons.v1.PropertyValuesResponse - 93, // 99: datacommons.Mixer.BulkPropertyValues:output_type -> datacommons.v1.BulkPropertyValuesResponse - 93, // 100: datacommons.Mixer.BulkLinkedPropertyValues:output_type -> datacommons.v1.BulkPropertyValuesResponse - 94, // 101: datacommons.Mixer.Triples:output_type -> datacommons.v1.TriplesResponse - 95, // 102: datacommons.Mixer.BulkTriples:output_type -> datacommons.v1.BulkTriplesResponse - 96, // 103: datacommons.Mixer.Variables:output_type -> datacommons.v1.VariablesResponse - 97, // 104: datacommons.Mixer.BulkVariables:output_type -> datacommons.v1.BulkVariablesResponse - 98, // 105: datacommons.Mixer.PlaceInfo:output_type -> datacommons.v1.PlaceInfoResponse - 99, // 106: datacommons.Mixer.BulkPlaceInfo:output_type -> datacommons.v1.BulkPlaceInfoResponse - 100, // 107: datacommons.Mixer.VariableInfo:output_type -> datacommons.v1.VariableInfoResponse - 101, // 108: datacommons.Mixer.BulkVariableInfo:output_type -> datacommons.v1.BulkVariableInfoResponse - 102, // 109: datacommons.Mixer.VariableGroupInfo:output_type -> datacommons.v1.VariableGroupInfoResponse - 103, // 110: datacommons.Mixer.BulkVariableGroupInfo:output_type -> datacommons.v1.BulkVariableGroupInfoResponse - 104, // 111: datacommons.Mixer.ObservationsPoint:output_type -> datacommons.PointStat - 105, // 112: datacommons.Mixer.BulkObservationsPoint:output_type -> datacommons.v1.BulkObservationsPointResponse - 105, // 113: datacommons.Mixer.BulkObservationsPointLinked:output_type -> datacommons.v1.BulkObservationsPointResponse - 106, // 114: datacommons.Mixer.ObservationsSeries:output_type -> datacommons.v1.ObservationsSeriesResponse - 107, // 115: datacommons.Mixer.BulkObservationsSeries:output_type -> datacommons.v1.BulkObservationsSeriesResponse - 107, // 116: datacommons.Mixer.BulkObservationsSeriesLinked:output_type -> datacommons.v1.BulkObservationsSeriesResponse - 108, // 117: datacommons.Mixer.DerivedObservationsSeries:output_type -> datacommons.v1.DerivedObservationsSeriesResponse - 109, // 118: datacommons.Mixer.BulkObservationDatesLinked:output_type -> datacommons.v1.BulkObservationDatesLinkedResponse - 110, // 119: datacommons.Mixer.BulkObservationExistence:output_type -> datacommons.v1.BulkObservationExistenceResponse - 80, // 120: datacommons.Mixer.BioPage:output_type -> datacommons.GraphNodes - 111, // 121: datacommons.Mixer.PlacePage:output_type -> datacommons.v1.PlacePageResponse - 112, // 122: datacommons.Mixer.VariableAncestors:output_type -> datacommons.v1.VariableAncestorsResponse - 113, // 123: datacommons.Mixer.SearchStatVar:output_type -> datacommons.SearchStatVarResponse - 114, // 124: datacommons.Mixer.EventCollection:output_type -> datacommons.v1.EventCollectionResponse - 115, // 125: datacommons.Mixer.EventCollectionDate:output_type -> datacommons.v1.EventCollectionDateResponse - 116, // 126: datacommons.Mixer.ResolveEntities:output_type -> datacommons.ResolveEntitiesResponse - 117, // 127: datacommons.Mixer.ResolveCoordinates:output_type -> datacommons.ResolveCoordinatesResponse - 118, // 128: datacommons.Mixer.ResolveIds:output_type -> datacommons.ResolveIdsResponse - 119, // 129: datacommons.Mixer.FindEntities:output_type -> datacommons.FindEntitiesResponse - 120, // 130: datacommons.Mixer.BulkFindEntities:output_type -> datacommons.BulkFindEntitiesResponse - 121, // 131: datacommons.Mixer.RecognizePlaces:output_type -> datacommons.RecognizePlacesResponse - 122, // 132: datacommons.Mixer.RecognizeEntities:output_type -> datacommons.RecognizeEntitiesResponse - 123, // 133: datacommons.Mixer.UpdateCache:output_type -> datacommons.UpdateCacheResponse - 67, // [67:134] is the sub-list for method output_type - 0, // [0:67] is the sub-list for method input_type + 1, // 1: datacommons.Mixer.V3Observation:input_type -> datacommons.v3.ObservationRequest + 2, // 2: datacommons.Mixer.V2Sparql:input_type -> datacommons.SparqlRequest + 3, // 3: datacommons.Mixer.V2Resolve:input_type -> datacommons.v2.ResolveRequest + 4, // 4: datacommons.Mixer.V2Node:input_type -> datacommons.v2.NodeRequest + 5, // 5: datacommons.Mixer.V2Event:input_type -> datacommons.v2.EventRequest + 6, // 6: datacommons.Mixer.V2Observation:input_type -> datacommons.v2.ObservationRequest + 7, // 7: datacommons.Mixer.Query:input_type -> datacommons.QueryRequest + 8, // 8: datacommons.Mixer.GetPropertyLabels:input_type -> datacommons.GetPropertyLabelsRequest + 9, // 9: datacommons.Mixer.GetPropertyValues:input_type -> datacommons.GetPropertyValuesRequest + 10, // 10: datacommons.Mixer.GetTriples:input_type -> datacommons.GetTriplesRequest + 11, // 11: datacommons.Mixer.GetPlacesIn:input_type -> datacommons.GetPlacesInRequest + 12, // 12: datacommons.Mixer.GetStats:input_type -> datacommons.GetStatsRequest + 13, // 13: datacommons.Mixer.GetStatValue:input_type -> datacommons.GetStatValueRequest + 14, // 14: datacommons.Mixer.GetStatSeries:input_type -> datacommons.GetStatSeriesRequest + 15, // 15: datacommons.Mixer.GetStatAll:input_type -> datacommons.GetStatAllRequest + 16, // 16: datacommons.Mixer.GetLocationsRankings:input_type -> datacommons.GetLocationsRankingsRequest + 17, // 17: datacommons.Mixer.GetRelatedLocations:input_type -> datacommons.GetRelatedLocationsRequest + 18, // 18: datacommons.Mixer.GetBioPageData:input_type -> datacommons.GetBioPageDataRequest + 19, // 19: datacommons.Mixer.Translate:input_type -> datacommons.TranslateRequest + 20, // 20: datacommons.Mixer.Search:input_type -> datacommons.SearchRequest + 21, // 21: datacommons.Mixer.GetVersion:input_type -> datacommons.GetVersionRequest + 22, // 22: datacommons.Mixer.GetPlaceStatsVar:input_type -> datacommons.GetPlaceStatsVarRequest + 23, // 23: datacommons.Mixer.GetPlaceStatVars:input_type -> datacommons.GetPlaceStatVarsRequest + 24, // 24: datacommons.Mixer.GetEntityStatVarsUnionV1:input_type -> datacommons.GetEntityStatVarsUnionRequest + 25, // 25: datacommons.Mixer.GetPlaceStatDateWithinPlace:input_type -> datacommons.GetPlaceStatDateWithinPlaceRequest + 26, // 26: datacommons.Mixer.GetStatDateWithinPlace:input_type -> datacommons.GetStatDateWithinPlaceRequest + 27, // 27: datacommons.Mixer.GetImportTableData:input_type -> datacommons.GetImportTableDataRequest + 7, // 28: datacommons.Mixer.QueryV1:input_type -> datacommons.QueryRequest + 28, // 29: datacommons.Mixer.Properties:input_type -> datacommons.v1.PropertiesRequest + 29, // 30: datacommons.Mixer.BulkProperties:input_type -> datacommons.v1.BulkPropertiesRequest + 30, // 31: datacommons.Mixer.PropertyValues:input_type -> datacommons.v1.PropertyValuesRequest + 31, // 32: datacommons.Mixer.LinkedPropertyValues:input_type -> datacommons.v1.LinkedPropertyValuesRequest + 32, // 33: datacommons.Mixer.BulkPropertyValues:input_type -> datacommons.v1.BulkPropertyValuesRequest + 33, // 34: datacommons.Mixer.BulkLinkedPropertyValues:input_type -> datacommons.v1.BulkLinkedPropertyValuesRequest + 34, // 35: datacommons.Mixer.Triples:input_type -> datacommons.v1.TriplesRequest + 35, // 36: datacommons.Mixer.BulkTriples:input_type -> datacommons.v1.BulkTriplesRequest + 36, // 37: datacommons.Mixer.Variables:input_type -> datacommons.v1.VariablesRequest + 37, // 38: datacommons.Mixer.BulkVariables:input_type -> datacommons.v1.BulkVariablesRequest + 38, // 39: datacommons.Mixer.PlaceInfo:input_type -> datacommons.v1.PlaceInfoRequest + 39, // 40: datacommons.Mixer.BulkPlaceInfo:input_type -> datacommons.v1.BulkPlaceInfoRequest + 40, // 41: datacommons.Mixer.VariableInfo:input_type -> datacommons.v1.VariableInfoRequest + 41, // 42: datacommons.Mixer.BulkVariableInfo:input_type -> datacommons.v1.BulkVariableInfoRequest + 42, // 43: datacommons.Mixer.VariableGroupInfo:input_type -> datacommons.v1.VariableGroupInfoRequest + 43, // 44: datacommons.Mixer.BulkVariableGroupInfo:input_type -> datacommons.v1.BulkVariableGroupInfoRequest + 44, // 45: datacommons.Mixer.ObservationsPoint:input_type -> datacommons.v1.ObservationsPointRequest + 45, // 46: datacommons.Mixer.BulkObservationsPoint:input_type -> datacommons.v1.BulkObservationsPointRequest + 46, // 47: datacommons.Mixer.BulkObservationsPointLinked:input_type -> datacommons.v1.BulkObservationsPointLinkedRequest + 47, // 48: datacommons.Mixer.ObservationsSeries:input_type -> datacommons.v1.ObservationsSeriesRequest + 48, // 49: datacommons.Mixer.BulkObservationsSeries:input_type -> datacommons.v1.BulkObservationsSeriesRequest + 49, // 50: datacommons.Mixer.BulkObservationsSeriesLinked:input_type -> datacommons.v1.BulkObservationsSeriesLinkedRequest + 50, // 51: datacommons.Mixer.DerivedObservationsSeries:input_type -> datacommons.v1.DerivedObservationsSeriesRequest + 51, // 52: datacommons.Mixer.BulkObservationDatesLinked:input_type -> datacommons.v1.BulkObservationDatesLinkedRequest + 52, // 53: datacommons.Mixer.BulkObservationExistence:input_type -> datacommons.v1.BulkObservationExistenceRequest + 53, // 54: datacommons.Mixer.BioPage:input_type -> datacommons.v1.BioPageRequest + 54, // 55: datacommons.Mixer.PlacePage:input_type -> datacommons.v1.PlacePageRequest + 55, // 56: datacommons.Mixer.VariableAncestors:input_type -> datacommons.v1.VariableAncestorsRequest + 56, // 57: datacommons.Mixer.SearchStatVar:input_type -> datacommons.SearchStatVarRequest + 57, // 58: datacommons.Mixer.EventCollection:input_type -> datacommons.v1.EventCollectionRequest + 58, // 59: datacommons.Mixer.EventCollectionDate:input_type -> datacommons.v1.EventCollectionDateRequest + 59, // 60: datacommons.Mixer.ResolveEntities:input_type -> datacommons.ResolveEntitiesRequest + 60, // 61: datacommons.Mixer.ResolveCoordinates:input_type -> datacommons.ResolveCoordinatesRequest + 61, // 62: datacommons.Mixer.ResolveIds:input_type -> datacommons.ResolveIdsRequest + 62, // 63: datacommons.Mixer.FindEntities:input_type -> datacommons.FindEntitiesRequest + 63, // 64: datacommons.Mixer.BulkFindEntities:input_type -> datacommons.BulkFindEntitiesRequest + 64, // 65: datacommons.Mixer.RecognizePlaces:input_type -> datacommons.RecognizePlacesRequest + 65, // 66: datacommons.Mixer.RecognizeEntities:input_type -> datacommons.RecognizeEntitiesRequest + 66, // 67: datacommons.Mixer.UpdateCache:input_type -> datacommons.UpdateCacheRequest + 67, // 68: datacommons.Mixer.V3Node:output_type -> datacommons.v3.NodeResponse + 68, // 69: datacommons.Mixer.V3Observation:output_type -> datacommons.v3.ObservationResponse + 69, // 70: datacommons.Mixer.V2Sparql:output_type -> datacommons.QueryResponse + 70, // 71: datacommons.Mixer.V2Resolve:output_type -> datacommons.v2.ResolveResponse + 71, // 72: datacommons.Mixer.V2Node:output_type -> datacommons.v2.NodeResponse + 72, // 73: datacommons.Mixer.V2Event:output_type -> datacommons.v2.EventResponse + 73, // 74: datacommons.Mixer.V2Observation:output_type -> datacommons.v2.ObservationResponse + 69, // 75: datacommons.Mixer.Query:output_type -> datacommons.QueryResponse + 74, // 76: datacommons.Mixer.GetPropertyLabels:output_type -> datacommons.PayloadResponse + 74, // 77: datacommons.Mixer.GetPropertyValues:output_type -> datacommons.PayloadResponse + 74, // 78: datacommons.Mixer.GetTriples:output_type -> datacommons.PayloadResponse + 75, // 79: datacommons.Mixer.GetPlacesIn:output_type -> datacommons.GetPlacesInResponse + 76, // 80: datacommons.Mixer.GetStats:output_type -> datacommons.GetStatsResponse + 77, // 81: datacommons.Mixer.GetStatValue:output_type -> datacommons.GetStatValueResponse + 78, // 82: datacommons.Mixer.GetStatSeries:output_type -> datacommons.GetStatSeriesResponse + 79, // 83: datacommons.Mixer.GetStatAll:output_type -> datacommons.GetStatAllResponse + 80, // 84: datacommons.Mixer.GetLocationsRankings:output_type -> datacommons.GetLocationsRankingsResponse + 81, // 85: datacommons.Mixer.GetRelatedLocations:output_type -> datacommons.GetRelatedLocationsResponse + 82, // 86: datacommons.Mixer.GetBioPageData:output_type -> datacommons.GraphNodes + 83, // 87: datacommons.Mixer.Translate:output_type -> datacommons.TranslateResponse + 84, // 88: datacommons.Mixer.Search:output_type -> datacommons.SearchResponse + 85, // 89: datacommons.Mixer.GetVersion:output_type -> datacommons.GetVersionResponse + 86, // 90: datacommons.Mixer.GetPlaceStatsVar:output_type -> datacommons.GetPlaceStatsVarResponse + 87, // 91: datacommons.Mixer.GetPlaceStatVars:output_type -> datacommons.GetPlaceStatVarsResponse + 88, // 92: datacommons.Mixer.GetEntityStatVarsUnionV1:output_type -> datacommons.GetEntityStatVarsUnionResponse + 89, // 93: datacommons.Mixer.GetPlaceStatDateWithinPlace:output_type -> datacommons.GetPlaceStatDateWithinPlaceResponse + 90, // 94: datacommons.Mixer.GetStatDateWithinPlace:output_type -> datacommons.GetStatDateWithinPlaceResponse + 91, // 95: datacommons.Mixer.GetImportTableData:output_type -> datacommons.GetImportTableDataResponse + 69, // 96: datacommons.Mixer.QueryV1:output_type -> datacommons.QueryResponse + 92, // 97: datacommons.Mixer.Properties:output_type -> datacommons.v1.PropertiesResponse + 93, // 98: datacommons.Mixer.BulkProperties:output_type -> datacommons.v1.BulkPropertiesResponse + 94, // 99: datacommons.Mixer.PropertyValues:output_type -> datacommons.v1.PropertyValuesResponse + 94, // 100: datacommons.Mixer.LinkedPropertyValues:output_type -> datacommons.v1.PropertyValuesResponse + 95, // 101: datacommons.Mixer.BulkPropertyValues:output_type -> datacommons.v1.BulkPropertyValuesResponse + 95, // 102: datacommons.Mixer.BulkLinkedPropertyValues:output_type -> datacommons.v1.BulkPropertyValuesResponse + 96, // 103: datacommons.Mixer.Triples:output_type -> datacommons.v1.TriplesResponse + 97, // 104: datacommons.Mixer.BulkTriples:output_type -> datacommons.v1.BulkTriplesResponse + 98, // 105: datacommons.Mixer.Variables:output_type -> datacommons.v1.VariablesResponse + 99, // 106: datacommons.Mixer.BulkVariables:output_type -> datacommons.v1.BulkVariablesResponse + 100, // 107: datacommons.Mixer.PlaceInfo:output_type -> datacommons.v1.PlaceInfoResponse + 101, // 108: datacommons.Mixer.BulkPlaceInfo:output_type -> datacommons.v1.BulkPlaceInfoResponse + 102, // 109: datacommons.Mixer.VariableInfo:output_type -> datacommons.v1.VariableInfoResponse + 103, // 110: datacommons.Mixer.BulkVariableInfo:output_type -> datacommons.v1.BulkVariableInfoResponse + 104, // 111: datacommons.Mixer.VariableGroupInfo:output_type -> datacommons.v1.VariableGroupInfoResponse + 105, // 112: datacommons.Mixer.BulkVariableGroupInfo:output_type -> datacommons.v1.BulkVariableGroupInfoResponse + 106, // 113: datacommons.Mixer.ObservationsPoint:output_type -> datacommons.PointStat + 107, // 114: datacommons.Mixer.BulkObservationsPoint:output_type -> datacommons.v1.BulkObservationsPointResponse + 107, // 115: datacommons.Mixer.BulkObservationsPointLinked:output_type -> datacommons.v1.BulkObservationsPointResponse + 108, // 116: datacommons.Mixer.ObservationsSeries:output_type -> datacommons.v1.ObservationsSeriesResponse + 109, // 117: datacommons.Mixer.BulkObservationsSeries:output_type -> datacommons.v1.BulkObservationsSeriesResponse + 109, // 118: datacommons.Mixer.BulkObservationsSeriesLinked:output_type -> datacommons.v1.BulkObservationsSeriesResponse + 110, // 119: datacommons.Mixer.DerivedObservationsSeries:output_type -> datacommons.v1.DerivedObservationsSeriesResponse + 111, // 120: datacommons.Mixer.BulkObservationDatesLinked:output_type -> datacommons.v1.BulkObservationDatesLinkedResponse + 112, // 121: datacommons.Mixer.BulkObservationExistence:output_type -> datacommons.v1.BulkObservationExistenceResponse + 82, // 122: datacommons.Mixer.BioPage:output_type -> datacommons.GraphNodes + 113, // 123: datacommons.Mixer.PlacePage:output_type -> datacommons.v1.PlacePageResponse + 114, // 124: datacommons.Mixer.VariableAncestors:output_type -> datacommons.v1.VariableAncestorsResponse + 115, // 125: datacommons.Mixer.SearchStatVar:output_type -> datacommons.SearchStatVarResponse + 116, // 126: datacommons.Mixer.EventCollection:output_type -> datacommons.v1.EventCollectionResponse + 117, // 127: datacommons.Mixer.EventCollectionDate:output_type -> datacommons.v1.EventCollectionDateResponse + 118, // 128: datacommons.Mixer.ResolveEntities:output_type -> datacommons.ResolveEntitiesResponse + 119, // 129: datacommons.Mixer.ResolveCoordinates:output_type -> datacommons.ResolveCoordinatesResponse + 120, // 130: datacommons.Mixer.ResolveIds:output_type -> datacommons.ResolveIdsResponse + 121, // 131: datacommons.Mixer.FindEntities:output_type -> datacommons.FindEntitiesResponse + 122, // 132: datacommons.Mixer.BulkFindEntities:output_type -> datacommons.BulkFindEntitiesResponse + 123, // 133: datacommons.Mixer.RecognizePlaces:output_type -> datacommons.RecognizePlacesResponse + 124, // 134: datacommons.Mixer.RecognizeEntities:output_type -> datacommons.RecognizeEntitiesResponse + 125, // 135: datacommons.Mixer.UpdateCache:output_type -> datacommons.UpdateCacheResponse + 68, // [68:136] is the sub-list for method output_type + 0, // [0:68] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/internal/proto/service/mixer_grpc.pb.go b/internal/proto/service/mixer_grpc.pb.go index 25c2b7b9b..3300051b5 100644 --- a/internal/proto/service/mixer_grpc.pb.go +++ b/internal/proto/service/mixer_grpc.pb.go @@ -22,7 +22,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v3.20.3 // source: service/mixer.proto package service @@ -45,6 +45,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Mixer_V3Node_FullMethodName = "/datacommons.Mixer/V3Node" + Mixer_V3Observation_FullMethodName = "/datacommons.Mixer/V3Observation" Mixer_V2Sparql_FullMethodName = "/datacommons.Mixer/V2Sparql" Mixer_V2Resolve_FullMethodName = "/datacommons.Mixer/V2Resolve" Mixer_V2Node_FullMethodName = "/datacommons.Mixer/V2Node" @@ -118,6 +119,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MixerClient interface { V3Node(ctx context.Context, in *v3.NodeRequest, opts ...grpc.CallOption) (*v3.NodeResponse, error) + V3Observation(ctx context.Context, in *v3.ObservationRequest, opts ...grpc.CallOption) (*v3.ObservationResponse, error) V2Sparql(ctx context.Context, in *proto.SparqlRequest, opts ...grpc.CallOption) (*proto.QueryResponse, error) V2Resolve(ctx context.Context, in *v2.ResolveRequest, opts ...grpc.CallOption) (*v2.ResolveResponse, error) V2Node(ctx context.Context, in *v2.NodeRequest, opts ...grpc.CallOption) (*v2.NodeResponse, error) @@ -257,6 +259,15 @@ func (c *mixerClient) V3Node(ctx context.Context, in *v3.NodeRequest, opts ...gr return out, nil } +func (c *mixerClient) V3Observation(ctx context.Context, in *v3.ObservationRequest, opts ...grpc.CallOption) (*v3.ObservationResponse, error) { + out := new(v3.ObservationResponse) + err := c.cc.Invoke(ctx, Mixer_V3Observation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *mixerClient) V2Sparql(ctx context.Context, in *proto.SparqlRequest, opts ...grpc.CallOption) (*proto.QueryResponse, error) { out := new(proto.QueryResponse) err := c.cc.Invoke(ctx, Mixer_V2Sparql_FullMethodName, in, out, opts...) @@ -856,6 +867,7 @@ func (c *mixerClient) UpdateCache(ctx context.Context, in *proto.UpdateCacheRequ // for forward compatibility type MixerServer interface { V3Node(context.Context, *v3.NodeRequest) (*v3.NodeResponse, error) + V3Observation(context.Context, *v3.ObservationRequest) (*v3.ObservationResponse, error) V2Sparql(context.Context, *proto.SparqlRequest) (*proto.QueryResponse, error) V2Resolve(context.Context, *v2.ResolveRequest) (*v2.ResolveResponse, error) V2Node(context.Context, *v2.NodeRequest) (*v2.NodeResponse, error) @@ -985,6 +997,9 @@ type UnimplementedMixerServer struct { func (UnimplementedMixerServer) V3Node(context.Context, *v3.NodeRequest) (*v3.NodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method V3Node not implemented") } +func (UnimplementedMixerServer) V3Observation(context.Context, *v3.ObservationRequest) (*v3.ObservationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method V3Observation not implemented") +} func (UnimplementedMixerServer) V2Sparql(context.Context, *proto.SparqlRequest) (*proto.QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method V2Sparql not implemented") } @@ -1213,6 +1228,24 @@ func _Mixer_V3Node_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Mixer_V3Observation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.ObservationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MixerServer).V3Observation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Mixer_V3Observation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MixerServer).V3Observation(ctx, req.(*v3.ObservationRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Mixer_V2Sparql_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(proto.SparqlRequest) if err := dec(in); err != nil { @@ -2412,6 +2445,10 @@ var Mixer_ServiceDesc = grpc.ServiceDesc{ MethodName: "V3Node", Handler: _Mixer_V3Node_Handler, }, + { + MethodName: "V3Observation", + Handler: _Mixer_V3Observation_Handler, + }, { MethodName: "V2Sparql", Handler: _Mixer_V2Sparql_Handler, diff --git a/internal/proto/v3/observation.pb.go b/internal/proto/v3/observation.pb.go new file mode 100644 index 000000000..0780b2bda --- /dev/null +++ b/internal/proto/v3/observation.pb.go @@ -0,0 +1,334 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.20.3 +// source: v3/observation.proto + +package v3 + +import ( + proto "github.com/datacommonsorg/mixer/internal/proto" + v2 "github.com/datacommonsorg/mixer/internal/proto/v2" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ObservationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of statistical variable DCIDs, or a formula expression. + Variable *v2.DcidOrExpression `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"` + // A list of entity DCIDs, or an arrow expression that covers a list of entity + // DCIDs. + Entity *v2.DcidOrExpression `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` + // Date of the observation + // - Not specified: all observations are returned + // - "LATEST": latest obseration of each facet is returned + // - "": a speficied valid ISO 8601 date. Observation corresponding to + // this date is returned. + Date string `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"` + // Value of the observation + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + // [Optional] filter returned observations by facet + Filter *v2.FacetFilter `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + // Fields to return, valid values are: "variable", "entity", "date", "value", "facet" + Select []string `protobuf:"bytes,6,rep,name=select,proto3" json:"select,omitempty"` +} + +func (x *ObservationRequest) Reset() { + *x = ObservationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_v3_observation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservationRequest) ProtoMessage() {} + +func (x *ObservationRequest) ProtoReflect() protoreflect.Message { + mi := &file_v3_observation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservationRequest.ProtoReflect.Descriptor instead. +func (*ObservationRequest) Descriptor() ([]byte, []int) { + return file_v3_observation_proto_rawDescGZIP(), []int{0} +} + +func (x *ObservationRequest) GetVariable() *v2.DcidOrExpression { + if x != nil { + return x.Variable + } + return nil +} + +func (x *ObservationRequest) GetEntity() *v2.DcidOrExpression { + if x != nil { + return x.Entity + } + return nil +} + +func (x *ObservationRequest) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +func (x *ObservationRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ObservationRequest) GetFilter() *v2.FacetFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ObservationRequest) GetSelect() []string { + if x != nil { + return x.Select + } + return nil +} + +type ObservationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Keyed by variable DCID + ByVariable map[string]*v2.VariableObservation `protobuf:"bytes,1,rep,name=by_variable,json=byVariable,proto3" json:"by_variable,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Keyed by facet ID + Facets map[string]*proto.Facet `protobuf:"bytes,2,rep,name=facets,proto3" json:"facets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ObservationResponse) Reset() { + *x = ObservationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_v3_observation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservationResponse) ProtoMessage() {} + +func (x *ObservationResponse) ProtoReflect() protoreflect.Message { + mi := &file_v3_observation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservationResponse.ProtoReflect.Descriptor instead. +func (*ObservationResponse) Descriptor() ([]byte, []int) { + return file_v3_observation_proto_rawDescGZIP(), []int{1} +} + +func (x *ObservationResponse) GetByVariable() map[string]*v2.VariableObservation { + if x != nil { + return x.ByVariable + } + return nil +} + +func (x *ObservationResponse) GetFacets() map[string]*proto.Facet { + if x != nil { + return x.Facets + } + return nil +} + +var File_v3_observation_proto protoreflect.FileDescriptor + +var file_v3_observation_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x76, 0x33, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x14, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x02, 0x0a, 0x12, 0x4f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3c, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x44, 0x63, 0x69, 0x64, 0x4f, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, + 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x63, 0x69, 0x64, 0x4f, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x33, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x22, 0xe7, + 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x62, 0x79, 0x5f, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x42, 0x79, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x62, 0x79, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x47, 0x0a, 0x06, + 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, + 0x61, 0x63, 0x65, 0x74, 0x73, 0x1a, 0x62, 0x0a, 0x0f, 0x42, 0x79, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4d, 0x0a, 0x0b, 0x46, 0x61, 0x63, + 0x65, 0x74, 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, 0x28, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x73, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x78, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_v3_observation_proto_rawDescOnce sync.Once + file_v3_observation_proto_rawDescData = file_v3_observation_proto_rawDesc +) + +func file_v3_observation_proto_rawDescGZIP() []byte { + file_v3_observation_proto_rawDescOnce.Do(func() { + file_v3_observation_proto_rawDescData = protoimpl.X.CompressGZIP(file_v3_observation_proto_rawDescData) + }) + return file_v3_observation_proto_rawDescData +} + +var file_v3_observation_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_v3_observation_proto_goTypes = []interface{}{ + (*ObservationRequest)(nil), // 0: datacommons.v3.ObservationRequest + (*ObservationResponse)(nil), // 1: datacommons.v3.ObservationResponse + nil, // 2: datacommons.v3.ObservationResponse.ByVariableEntry + nil, // 3: datacommons.v3.ObservationResponse.FacetsEntry + (*v2.DcidOrExpression)(nil), // 4: datacommons.v2.DcidOrExpression + (*v2.FacetFilter)(nil), // 5: datacommons.v2.FacetFilter + (*v2.VariableObservation)(nil), // 6: datacommons.v2.VariableObservation + (*proto.Facet)(nil), // 7: datacommons.Facet +} +var file_v3_observation_proto_depIdxs = []int32{ + 4, // 0: datacommons.v3.ObservationRequest.variable:type_name -> datacommons.v2.DcidOrExpression + 4, // 1: datacommons.v3.ObservationRequest.entity:type_name -> datacommons.v2.DcidOrExpression + 5, // 2: datacommons.v3.ObservationRequest.filter:type_name -> datacommons.v2.FacetFilter + 2, // 3: datacommons.v3.ObservationResponse.by_variable:type_name -> datacommons.v3.ObservationResponse.ByVariableEntry + 3, // 4: datacommons.v3.ObservationResponse.facets:type_name -> datacommons.v3.ObservationResponse.FacetsEntry + 6, // 5: datacommons.v3.ObservationResponse.ByVariableEntry.value:type_name -> datacommons.v2.VariableObservation + 7, // 6: datacommons.v3.ObservationResponse.FacetsEntry.value:type_name -> datacommons.Facet + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_v3_observation_proto_init() } +func file_v3_observation_proto_init() { + if File_v3_observation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_v3_observation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v3_observation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v3_observation_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v3_observation_proto_goTypes, + DependencyIndexes: file_v3_observation_proto_depIdxs, + MessageInfos: file_v3_observation_proto_msgTypes, + }.Build() + File_v3_observation_proto = out.File + file_v3_observation_proto_rawDesc = nil + file_v3_observation_proto_goTypes = nil + file_v3_observation_proto_depIdxs = nil +} diff --git a/internal/server/datasource/datasource.go b/internal/server/datasource/datasource.go index c87a04e3e..76f1433cb 100644 --- a/internal/server/datasource/datasource.go +++ b/internal/server/datasource/datasource.go @@ -32,4 +32,5 @@ const ( type DataSource interface { Type() DataSourceType Node(context.Context, *v3.NodeRequest) (*v3.NodeResponse, error) + Observation(context.Context, *v3.ObservationRequest) (*v3.ObservationResponse, error) } diff --git a/internal/server/handler_v3.go b/internal/server/handler_v3.go index e39aea112..9e1a10242 100644 --- a/internal/server/handler_v3.go +++ b/internal/server/handler_v3.go @@ -27,3 +27,10 @@ func (s *Server) V3Node(ctx context.Context, in *pbv3.NodeRequest) ( ) { return s.dataSources.Node(ctx, in) } + +// V3Observation implements API for mixer.V3Observation. +func (s *Server) V3Observation(ctx context.Context, in *pbv3.ObservationRequest) ( + *pbv3.ObservationResponse, error, +) { + return &pbv3.ObservationResponse{}, nil +} diff --git a/internal/server/spanner/datasource.go b/internal/server/spanner/datasource.go index de421237d..150220f50 100644 --- a/internal/server/spanner/datasource.go +++ b/internal/server/spanner/datasource.go @@ -55,3 +55,8 @@ func (sds *SpannerDataSource) Node(ctx context.Context, req *v3.NodeRequest) (*v } return nodeEdgesToNodeResponse(edges), nil } + +// Observation retrieves observation data from Spanner. +func (sds *SpannerDataSource) Observation(ctx context.Context, req *v3.ObservationRequest) (*v3.ObservationResponse, error) { + return nil, nil +} diff --git a/proto/service/mixer.proto b/proto/service/mixer.proto index 44a429373..524051d9d 100644 --- a/proto/service/mixer.proto +++ b/proto/service/mixer.proto @@ -53,6 +53,7 @@ import "v2/observation.proto"; import "v2/resolve.proto"; import "v3/node.proto"; +import "v3/observation.proto"; service Mixer { // ====================== V3 V3 V3 V3 ====================== @@ -64,6 +65,13 @@ service Mixer { }; } + rpc V3Observation(datacommons.v3.ObservationRequest) returns (datacommons.v3.ObservationResponse) { + option (google.api.http) = { + get : "/v3/observation" + additional_bindings : {post : "/v3/observation" body : "*"} + }; + } + // ====================== V2 V2 V2 V2 ====================== rpc V2Sparql(SparqlRequest) returns (QueryResponse) { diff --git a/proto/v3/observation.proto b/proto/v3/observation.proto new file mode 100644 index 000000000..b9cb0d5f7 --- /dev/null +++ b/proto/v3/observation.proto @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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 datacommons.v3; + +option go_package = "github.com/datacommonsorg/mixer/internal/proto/v3"; + +import "v2/observation.proto"; +import "stat.proto"; + +message ObservationRequest { + // A list of statistical variable DCIDs, or a formula expression. + datacommons.v2.DcidOrExpression variable = 1; + // A list of entity DCIDs, or an arrow expression that covers a list of entity + // DCIDs. + datacommons.v2.DcidOrExpression entity = 2; + // Date of the observation + // - Not specified: all observations are returned + // - "LATEST": latest obseration of each facet is returned + // - "": a speficied valid ISO 8601 date. Observation corresponding to + // this date is returned. + string date = 3; + // Value of the observation + string value = 4; + // [Optional] filter returned observations by facet + datacommons.v2.FacetFilter filter = 5; + // Fields to return, valid values are: "variable", "entity", "date", "value", "facet" + repeated string select = 6; +} + +message ObservationResponse { + // Keyed by variable DCID + map by_variable = 1; + // Keyed by facet ID + map facets = 2; +} \ No newline at end of file diff --git a/tools/migration_testing/mixer_api_requests.py b/tools/migration_testing/mixer_api_requests.py index 5b586bacb..055238fe6 100644 --- a/tools/migration_testing/mixer_api_requests.py +++ b/tools/migration_testing/mixer_api_requests.py @@ -372,6 +372,24 @@ def read_json_from_file(file_path): "nodes": "geoId/06", "property": "<-" }), + # V3Observation GET + ("/v3/observation", ["GET"], { + "date": "LATEST", + "variable.dcids": ["Count_Person"], + "entity.dcids": ["country/USA"], + "select": ["entity", "variable", "value", "date"] + }), + # V3Observation POST + ("/v3/observation", ["POST"], { + "date": "LATEST", + "variable": { + "dcids": ["Count_Person"] + }, + "entity": { + "dcids": ["country/USA"] + }, + "select": ["entity", "variable", "value", "date"] + }), ] ERROR_TESTS = [