diff --git a/lib/src/gen/app/data/v1/data.pb.dart b/lib/src/gen/app/data/v1/data.pb.dart index 338369a14e..6c3984aaf5 100644 --- a/lib/src/gen/app/data/v1/data.pb.dart +++ b/lib/src/gen/app/data/v1/data.pb.dart @@ -1156,6 +1156,171 @@ class TabularDataByMQLResponse extends $pb.GeneratedMessage { $core.List<$core.List<$core.int>> get rawData => $_getList(0); } +/// GetLatestTabularDataRequest requests the most recent tabular data captured from the specified data source. +class GetLatestTabularDataRequest extends $pb.GeneratedMessage { + factory GetLatestTabularDataRequest({ + $core.String? partId, + $core.String? resourceName, + $core.String? methodName, + }) { + final $result = create(); + if (partId != null) { + $result.partId = partId; + } + if (resourceName != null) { + $result.resourceName = resourceName; + } + if (methodName != null) { + $result.methodName = methodName; + } + return $result; + } + GetLatestTabularDataRequest._() : super(); + factory GetLatestTabularDataRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetLatestTabularDataRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetLatestTabularDataRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.data.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'partId') + ..aOS(2, _omitFieldNames ? '' : 'resourceName') + ..aOS(3, _omitFieldNames ? '' : 'methodName') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetLatestTabularDataRequest clone() => GetLatestTabularDataRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetLatestTabularDataRequest copyWith(void Function(GetLatestTabularDataRequest) updates) => super.copyWith((message) => updates(message as GetLatestTabularDataRequest)) as GetLatestTabularDataRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetLatestTabularDataRequest create() => GetLatestTabularDataRequest._(); + GetLatestTabularDataRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetLatestTabularDataRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetLatestTabularDataRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get partId => $_getSZ(0); + @$pb.TagNumber(1) + set partId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPartId() => $_has(0); + @$pb.TagNumber(1) + void clearPartId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get resourceName => $_getSZ(1); + @$pb.TagNumber(2) + set resourceName($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasResourceName() => $_has(1); + @$pb.TagNumber(2) + void clearResourceName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get methodName => $_getSZ(2); + @$pb.TagNumber(3) + set methodName($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasMethodName() => $_has(2); + @$pb.TagNumber(3) + void clearMethodName() => clearField(3); +} + +/// GetLatestTabularDataResponse provides the data, time synced, and time captured of the most recent tabular data captured +/// from the requested data source, as long as it was synced within the last year. +class GetLatestTabularDataResponse extends $pb.GeneratedMessage { + factory GetLatestTabularDataResponse({ + $44.Timestamp? timeCaptured, + $44.Timestamp? timeSynced, + $43.Struct? payload, + }) { + final $result = create(); + if (timeCaptured != null) { + $result.timeCaptured = timeCaptured; + } + if (timeSynced != null) { + $result.timeSynced = timeSynced; + } + if (payload != null) { + $result.payload = payload; + } + return $result; + } + GetLatestTabularDataResponse._() : super(); + factory GetLatestTabularDataResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetLatestTabularDataResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetLatestTabularDataResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.data.v1'), createEmptyInstance: create) + ..aOM<$44.Timestamp>(1, _omitFieldNames ? '' : 'timeCaptured', subBuilder: $44.Timestamp.create) + ..aOM<$44.Timestamp>(2, _omitFieldNames ? '' : 'timeSynced', subBuilder: $44.Timestamp.create) + ..aOM<$43.Struct>(3, _omitFieldNames ? '' : 'payload', subBuilder: $43.Struct.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetLatestTabularDataResponse clone() => GetLatestTabularDataResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetLatestTabularDataResponse copyWith(void Function(GetLatestTabularDataResponse) updates) => super.copyWith((message) => updates(message as GetLatestTabularDataResponse)) as GetLatestTabularDataResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetLatestTabularDataResponse create() => GetLatestTabularDataResponse._(); + GetLatestTabularDataResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetLatestTabularDataResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetLatestTabularDataResponse? _defaultInstance; + + @$pb.TagNumber(1) + $44.Timestamp get timeCaptured => $_getN(0); + @$pb.TagNumber(1) + set timeCaptured($44.Timestamp v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasTimeCaptured() => $_has(0); + @$pb.TagNumber(1) + void clearTimeCaptured() => clearField(1); + @$pb.TagNumber(1) + $44.Timestamp ensureTimeCaptured() => $_ensure(0); + + @$pb.TagNumber(2) + $44.Timestamp get timeSynced => $_getN(1); + @$pb.TagNumber(2) + set timeSynced($44.Timestamp v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasTimeSynced() => $_has(1); + @$pb.TagNumber(2) + void clearTimeSynced() => clearField(2); + @$pb.TagNumber(2) + $44.Timestamp ensureTimeSynced() => $_ensure(1); + + @$pb.TagNumber(3) + $43.Struct get payload => $_getN(2); + @$pb.TagNumber(3) + set payload($43.Struct v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasPayload() => $_has(2); + @$pb.TagNumber(3) + void clearPayload() => clearField(3); + @$pb.TagNumber(3) + $43.Struct ensurePayload() => $_ensure(2); +} + /// BinaryData contains data and metadata associated with binary data. class BinaryData extends $pb.GeneratedMessage { factory BinaryData({ diff --git a/lib/src/gen/app/data/v1/data.pbgrpc.dart b/lib/src/gen/app/data/v1/data.pbgrpc.dart index e3516f5703..150c70ec1f 100644 --- a/lib/src/gen/app/data/v1/data.pbgrpc.dart +++ b/lib/src/gen/app/data/v1/data.pbgrpc.dart @@ -33,6 +33,10 @@ class DataServiceClient extends $grpc.Client { '/viam.app.data.v1.DataService/TabularDataByMQL', ($3.TabularDataByMQLRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $3.TabularDataByMQLResponse.fromBuffer(value)); + static final _$getLatestTabularData = $grpc.ClientMethod<$3.GetLatestTabularDataRequest, $3.GetLatestTabularDataResponse>( + '/viam.app.data.v1.DataService/GetLatestTabularData', + ($3.GetLatestTabularDataRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.GetLatestTabularDataResponse.fromBuffer(value)); static final _$binaryDataByFilter = $grpc.ClientMethod<$3.BinaryDataByFilterRequest, $3.BinaryDataByFilterResponse>( '/viam.app.data.v1.DataService/BinaryDataByFilter', ($3.BinaryDataByFilterRequest value) => value.writeToBuffer(), @@ -124,6 +128,10 @@ class DataServiceClient extends $grpc.Client { return $createUnaryCall(_$tabularDataByMQL, request, options: options); } + $grpc.ResponseFuture<$3.GetLatestTabularDataResponse> getLatestTabularData($3.GetLatestTabularDataRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getLatestTabularData, request, options: options); + } + $grpc.ResponseFuture<$3.BinaryDataByFilterResponse> binaryDataByFilter($3.BinaryDataByFilterRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$binaryDataByFilter, request, options: options); } @@ -223,6 +231,13 @@ abstract class DataServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $3.TabularDataByMQLRequest.fromBuffer(value), ($3.TabularDataByMQLResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.GetLatestTabularDataRequest, $3.GetLatestTabularDataResponse>( + 'GetLatestTabularData', + getLatestTabularData_Pre, + false, + false, + ($core.List<$core.int> value) => $3.GetLatestTabularDataRequest.fromBuffer(value), + ($3.GetLatestTabularDataResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$3.BinaryDataByFilterRequest, $3.BinaryDataByFilterResponse>( 'BinaryDataByFilter', binaryDataByFilter_Pre, @@ -363,6 +378,10 @@ abstract class DataServiceBase extends $grpc.Service { return tabularDataByMQL(call, await request); } + $async.Future<$3.GetLatestTabularDataResponse> getLatestTabularData_Pre($grpc.ServiceCall call, $async.Future<$3.GetLatestTabularDataRequest> request) async { + return getLatestTabularData(call, await request); + } + $async.Future<$3.BinaryDataByFilterResponse> binaryDataByFilter_Pre($grpc.ServiceCall call, $async.Future<$3.BinaryDataByFilterRequest> request) async { return binaryDataByFilter(call, await request); } @@ -438,6 +457,7 @@ abstract class DataServiceBase extends $grpc.Service { $async.Future<$3.TabularDataByFilterResponse> tabularDataByFilter($grpc.ServiceCall call, $3.TabularDataByFilterRequest request); $async.Future<$3.TabularDataBySQLResponse> tabularDataBySQL($grpc.ServiceCall call, $3.TabularDataBySQLRequest request); $async.Future<$3.TabularDataByMQLResponse> tabularDataByMQL($grpc.ServiceCall call, $3.TabularDataByMQLRequest request); + $async.Future<$3.GetLatestTabularDataResponse> getLatestTabularData($grpc.ServiceCall call, $3.GetLatestTabularDataRequest request); $async.Future<$3.BinaryDataByFilterResponse> binaryDataByFilter($grpc.ServiceCall call, $3.BinaryDataByFilterRequest request); $async.Future<$3.BinaryDataByIDsResponse> binaryDataByIDs($grpc.ServiceCall call, $3.BinaryDataByIDsRequest request); $async.Future<$3.DeleteTabularDataResponse> deleteTabularData($grpc.ServiceCall call, $3.DeleteTabularDataRequest request); diff --git a/lib/src/gen/app/data/v1/data.pbjson.dart b/lib/src/gen/app/data/v1/data.pbjson.dart index 9a7c1a2f8e..d30760bd93 100644 --- a/lib/src/gen/app/data/v1/data.pbjson.dart +++ b/lib/src/gen/app/data/v1/data.pbjson.dart @@ -301,6 +301,39 @@ final $typed_data.Uint8List tabularDataByMQLResponseDescriptor = $convert.base64 'ChhUYWJ1bGFyRGF0YUJ5TVFMUmVzcG9uc2USGQoIcmF3X2RhdGEYAiADKAxSB3Jhd0RhdGFKBA' 'gBEAJSBGRhdGE='); +@$core.Deprecated('Use getLatestTabularDataRequestDescriptor instead') +const GetLatestTabularDataRequest$json = { + '1': 'GetLatestTabularDataRequest', + '2': [ + {'1': 'part_id', '3': 1, '4': 1, '5': 9, '10': 'partId'}, + {'1': 'resource_name', '3': 2, '4': 1, '5': 9, '10': 'resourceName'}, + {'1': 'method_name', '3': 3, '4': 1, '5': 9, '10': 'methodName'}, + ], +}; + +/// Descriptor for `GetLatestTabularDataRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getLatestTabularDataRequestDescriptor = $convert.base64Decode( + 'ChtHZXRMYXRlc3RUYWJ1bGFyRGF0YVJlcXVlc3QSFwoHcGFydF9pZBgBIAEoCVIGcGFydElkEi' + 'MKDXJlc291cmNlX25hbWUYAiABKAlSDHJlc291cmNlTmFtZRIfCgttZXRob2RfbmFtZRgDIAEo' + 'CVIKbWV0aG9kTmFtZQ=='); + +@$core.Deprecated('Use getLatestTabularDataResponseDescriptor instead') +const GetLatestTabularDataResponse$json = { + '1': 'GetLatestTabularDataResponse', + '2': [ + {'1': 'time_captured', '3': 1, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timeCaptured'}, + {'1': 'time_synced', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timeSynced'}, + {'1': 'payload', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '10': 'payload'}, + ], +}; + +/// Descriptor for `GetLatestTabularDataResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getLatestTabularDataResponseDescriptor = $convert.base64Decode( + 'ChxHZXRMYXRlc3RUYWJ1bGFyRGF0YVJlc3BvbnNlEj8KDXRpbWVfY2FwdHVyZWQYASABKAsyGi' + '5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgx0aW1lQ2FwdHVyZWQSOwoLdGltZV9zeW5jZWQY' + 'AiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgp0aW1lU3luY2VkEjEKB3BheWxvYW' + 'QYAyABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0UgdwYXlsb2Fk'); + @$core.Deprecated('Use binaryDataDescriptor instead') const BinaryData$json = { '1': 'BinaryData', diff --git a/lib/src/gen/google/longrunning/operations.pb.dart b/lib/src/gen/google/longrunning/operations.pb.dart index f0b16a3c10..29b86f9496 100644 --- a/lib/src/gen/google/longrunning/operations.pb.dart +++ b/lib/src/gen/google/longrunning/operations.pb.dart @@ -145,7 +145,7 @@ class Operation extends $pb.GeneratedMessage { @$pb.TagNumber(4) $11.Status ensureError() => $_ensure(3); - /// The normal response of the operation in case of success. If the original + /// The normal, successful response of the operation. If the original /// method returns no data on success, such as `Delete`, the response is /// `google.protobuf.Empty`. If the original method is standard /// `Get`/`Create`/`Update`, the response should be the resource. For other @@ -165,7 +165,8 @@ class Operation extends $pb.GeneratedMessage { $9.Any ensureResponse() => $_ensure(4); } -/// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. +/// The request message for +/// [Operations.GetOperation][google.longrunning.Operations.GetOperation]. class GetOperationRequest extends $pb.GeneratedMessage { factory GetOperationRequest({ $core.String? name, @@ -217,7 +218,8 @@ class GetOperationRequest extends $pb.GeneratedMessage { void clearName() => clearField(1); } -/// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +/// The request message for +/// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. class ListOperationsRequest extends $pb.GeneratedMessage { factory ListOperationsRequest({ $core.String? filter, @@ -314,7 +316,8 @@ class ListOperationsRequest extends $pb.GeneratedMessage { void clearName() => clearField(4); } -/// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +/// The response message for +/// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. class ListOperationsResponse extends $pb.GeneratedMessage { factory ListOperationsResponse({ $core.Iterable? operations, @@ -375,7 +378,8 @@ class ListOperationsResponse extends $pb.GeneratedMessage { void clearNextPageToken() => clearField(2); } -/// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. +/// The request message for +/// [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. class CancelOperationRequest extends $pb.GeneratedMessage { factory CancelOperationRequest({ $core.String? name, @@ -427,7 +431,8 @@ class CancelOperationRequest extends $pb.GeneratedMessage { void clearName() => clearField(1); } -/// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. +/// The request message for +/// [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. class DeleteOperationRequest extends $pb.GeneratedMessage { factory DeleteOperationRequest({ $core.String? name, @@ -479,7 +484,8 @@ class DeleteOperationRequest extends $pb.GeneratedMessage { void clearName() => clearField(1); } -/// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. +/// The request message for +/// [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. class WaitOperationRequest extends $pb.GeneratedMessage { factory WaitOperationRequest({ $core.String? name, @@ -554,13 +560,12 @@ class WaitOperationRequest extends $pb.GeneratedMessage { /// /// Example: /// -/// rpc LongRunningRecognize(LongRunningRecognizeRequest) -/// returns (google.longrunning.Operation) { -/// option (google.longrunning.operation_info) = { -/// response_type: "LongRunningRecognizeResponse" -/// metadata_type: "LongRunningRecognizeMetadata" -/// }; -/// } +/// rpc Export(ExportRequest) returns (google.longrunning.Operation) { +/// option (google.longrunning.operation_info) = { +/// response_type: "ExportResponse" +/// metadata_type: "ExportMetadata" +/// }; +/// } class OperationInfo extends $pb.GeneratedMessage { factory OperationInfo({ $core.String? responseType, diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 5527458fcc..6652370370 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -117,7 +117,7 @@ extension GetReadingsResponseUtils on GetReadingsResponse { String getVersionMetadata() { const String sdkVersion = 'v0.0.27'; - const String apiTag = 'v0.1.363'; + const String apiTag = 'v0.1.364'; return 'flutter;$sdkVersion;$apiTag'; }