From cd6d1e83e506a24f8d5dd16ef1fcb2d7a87e94be Mon Sep 17 00:00:00 2001 From: Vignesh Date: Mon, 2 Dec 2024 18:16:06 -0500 Subject: [PATCH 1/6] add endpoint --- lib/src/app/data.dart | 30 +++++++++++++++++ test/unit_test/app/data_client_test.dart | 41 ++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/lib/src/app/data.dart b/lib/src/app/data.dart index f7b10484618..81dce31c74a 100644 --- a/lib/src/app/data.dart +++ b/lib/src/app/data.dart @@ -533,6 +533,36 @@ class DataClient { final response = await _datasetClient.listDatasetsByIDs(request); return response.datasets; } + + /// Gets the most recent tabular data captured from the specified data source, + /// as long as it was synced within the last year. + /// + /// For more information, see [Data Client API](https://docs.viam.com/appendix/apis/data-client/). + Future<(DateTime, DateTime, Map)?> getLatestTabularData( + String partId, + String resourceName, + String resourceSubtype, + String methodName, + ) async { + final request = GetLatestTabularDataRequest() + ..partId = partId + ..resourceName = resourceName + ..resourceSubtype = resourceSubtype + ..methodName = methodName; + + final response = await _dataClient.getLatestTabularData(request); + + if (!response.hasPayload() || !response.hasTimeCaptured() || !response.hasTimeSynced()) { + return null; + } + + return ( + response.timeCaptured.toDateTime(), + response.timeSynced.toDateTime(), + response.payload.toStruct().toMap(), + ); + } + } /// {@category Viam SDK} diff --git a/test/unit_test/app/data_client_test.dart b/test/unit_test/app/data_client_test.dart index fbe5ba0a1bf..65488cf598b 100644 --- a/test/unit_test/app/data_client_test.dart +++ b/test/unit_test/app/data_client_test.dart @@ -411,6 +411,47 @@ void main() { }); }); }); + + test('getLatestTabularData', () async { + final timeCaptured = DateTime(2023, 1, 1); + final timeSynced = DateTime(2023, 1, 2); + final payload = Struct()..fields.addAll({ + 'key': Value()..stringValue = 'value' + }); + + when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value( + GetLatestTabularDataResponse() + ..timeCaptured = Timestamp.fromDateTime(timeCaptured) + ..timeSynced = Timestamp.fromDateTime(timeSynced) + ..payload = payload + )); + + final response = await dataClient.getLatestTabularData( + 'part-id', + 'resource-name', + 'resource-subtype', + 'method-name' + ); + + expect(response?.$1, equals(timeCaptured)); + expect(response?.$2, equals(timeSynced)); + expect(response?.$3, equals({'key': 'value'})); + + verify(dataServiceClient.getLatestTabularData(any)).called(1); + + // Test null response + when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => + MockResponseFuture.value(GetLatestTabularDataResponse())); + + final nullResponse = await dataClient.getLatestTabularData( + 'part-id', + 'resource-name', + 'resource-subtype', + 'method-name' + ); + + expect(nullResponse, isNull); + }); group('Filter Utils Tests', () { test('setDateTimeCaptureInterval', () { From 242bef2f35e84dea94d231fa81dd9a59238df595 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Mon, 2 Dec 2024 18:29:47 -0500 Subject: [PATCH 2/6] lint --- lib/src/app/data.dart | 1 - test/unit_test/app/data_client_test.dart | 35 +++++++----------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/lib/src/app/data.dart b/lib/src/app/data.dart index 81dce31c74a..83ca496307e 100644 --- a/lib/src/app/data.dart +++ b/lib/src/app/data.dart @@ -562,7 +562,6 @@ class DataClient { response.payload.toStruct().toMap(), ); } - } /// {@category Viam SDK} diff --git a/test/unit_test/app/data_client_test.dart b/test/unit_test/app/data_client_test.dart index 65488cf598b..8ea3ce0210d 100644 --- a/test/unit_test/app/data_client_test.dart +++ b/test/unit_test/app/data_client_test.dart @@ -411,27 +411,18 @@ void main() { }); }); }); - + test('getLatestTabularData', () async { final timeCaptured = DateTime(2023, 1, 1); final timeSynced = DateTime(2023, 1, 2); - final payload = Struct()..fields.addAll({ - 'key': Value()..stringValue = 'value' - }); + final payload = Struct()..fields.addAll({'key': Value()..stringValue = 'value'}); - when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value( - GetLatestTabularDataResponse() - ..timeCaptured = Timestamp.fromDateTime(timeCaptured) - ..timeSynced = Timestamp.fromDateTime(timeSynced) - ..payload = payload - )); + when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse() + ..timeCaptured = Timestamp.fromDateTime(timeCaptured) + ..timeSynced = Timestamp.fromDateTime(timeSynced) + ..payload = payload)); - final response = await dataClient.getLatestTabularData( - 'part-id', - 'resource-name', - 'resource-subtype', - 'method-name' - ); + final response = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); expect(response?.$1, equals(timeCaptured)); expect(response?.$2, equals(timeSynced)); @@ -440,15 +431,9 @@ void main() { verify(dataServiceClient.getLatestTabularData(any)).called(1); // Test null response - when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => - MockResponseFuture.value(GetLatestTabularDataResponse())); - - final nullResponse = await dataClient.getLatestTabularData( - 'part-id', - 'resource-name', - 'resource-subtype', - 'method-name' - ); + when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse())); + + final nullResponse = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); expect(nullResponse, isNull); }); From 886a4ef76bb586a02a34ce7bc04519c4abcb81c8 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Mon, 2 Dec 2024 18:32:37 -0500 Subject: [PATCH 3/6] bug fix --- lib/src/app/data.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/app/data.dart b/lib/src/app/data.dart index 83ca496307e..c16223042ea 100644 --- a/lib/src/app/data.dart +++ b/lib/src/app/data.dart @@ -559,7 +559,7 @@ class DataClient { return ( response.timeCaptured.toDateTime(), response.timeSynced.toDateTime(), - response.payload.toStruct().toMap(), + response.payload.toMap(), ); } } From d46d0bfb68900e337c8279c5fb62a669daa6e5c5 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Mon, 2 Dec 2024 18:37:45 -0500 Subject: [PATCH 4/6] moved test --- test/unit_test/app/data_client_test.dart | 51 +++++++++++++----------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/test/unit_test/app/data_client_test.dart b/test/unit_test/app/data_client_test.dart index 8ea3ce0210d..c06e4bd7ad5 100644 --- a/test/unit_test/app/data_client_test.dart +++ b/test/unit_test/app/data_client_test.dart @@ -294,6 +294,31 @@ void main() { .removeBinaryDataFromDatasetByIds([BinaryID(fileId: 'fileId', organizationId: 'orgId', locationId: 'locId')], 'dataset'); verify(serviceClient.removeBinaryDataFromDatasetByIDs(any)).called(1); }); + test('getLatestTabularData', () async { + final timeCaptured = DateTime(2023, 1, 1); + final timeSynced = DateTime(2023, 1, 2); + final payload = Struct()..fields.addAll({'key': Value()..stringValue = 'value'}); + + when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse() + ..timeCaptured = Timestamp.fromDateTime(timeCaptured) + ..timeSynced = Timestamp.fromDateTime(timeSynced) + ..payload = payload)); + + final response = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); + + expect(response?.$1, equals(timeCaptured)); + expect(response?.$2, equals(timeSynced)); + expect(response?.$3, equals({'key': 'value'})); + + verify(dataServiceClient.getLatestTabularData(any)).called(1); + + // Test null response + when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse())); + + final nullResponse = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); + + expect(nullResponse, isNull); + }); }); group('DataSync Tests', () { @@ -409,34 +434,12 @@ void main() { final response = await dataClient.listDatasetsByIDs(['dataset-id']); expect(response, equals(expected)); }); - }); - }); - - test('getLatestTabularData', () async { - final timeCaptured = DateTime(2023, 1, 1); - final timeSynced = DateTime(2023, 1, 2); - final payload = Struct()..fields.addAll({'key': Value()..stringValue = 'value'}); - - when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse() - ..timeCaptured = Timestamp.fromDateTime(timeCaptured) - ..timeSynced = Timestamp.fromDateTime(timeSynced) - ..payload = payload)); - - final response = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); - expect(response?.$1, equals(timeCaptured)); - expect(response?.$2, equals(timeSynced)); - expect(response?.$3, equals({'key': 'value'})); - verify(dataServiceClient.getLatestTabularData(any)).called(1); - - // Test null response - when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse())); + }); + }); - final nullResponse = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); - expect(nullResponse, isNull); - }); group('Filter Utils Tests', () { test('setDateTimeCaptureInterval', () { From df91fe2858189ee4e3afa85bd9ec44fc9111f14f Mon Sep 17 00:00:00 2001 From: Vignesh Date: Mon, 2 Dec 2024 18:38:27 -0500 Subject: [PATCH 5/6] moving test --- test/unit_test/app/data_client_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit_test/app/data_client_test.dart b/test/unit_test/app/data_client_test.dart index c06e4bd7ad5..afa80bfcfc2 100644 --- a/test/unit_test/app/data_client_test.dart +++ b/test/unit_test/app/data_client_test.dart @@ -299,7 +299,7 @@ void main() { final timeSynced = DateTime(2023, 1, 2); final payload = Struct()..fields.addAll({'key': Value()..stringValue = 'value'}); - when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse() + when(serviceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse() ..timeCaptured = Timestamp.fromDateTime(timeCaptured) ..timeSynced = Timestamp.fromDateTime(timeSynced) ..payload = payload)); @@ -310,12 +310,12 @@ void main() { expect(response?.$2, equals(timeSynced)); expect(response?.$3, equals({'key': 'value'})); - verify(dataServiceClient.getLatestTabularData(any)).called(1); + verify(serviceClient.getLatestTabularData(any)).called(1); // Test null response - when(dataServiceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse())); + when(serviceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse())); - final nullResponse = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); + final nullResponse = await serviceClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); expect(nullResponse, isNull); }); From 1e8a276dfa598e72e0d1bdf3c9513c573169ed4d Mon Sep 17 00:00:00 2001 From: Vignesh Date: Thu, 5 Dec 2024 20:10:01 -0500 Subject: [PATCH 6/6] working? --- lib/src/app/data.dart | 8 +- test/unit_test/app/data_client_test.dart | 27 +- .../mocks/service_clients_mocks.mocks.dart | 840 ++++++++++++++++-- 3 files changed, 800 insertions(+), 75 deletions(-) diff --git a/lib/src/app/data.dart b/lib/src/app/data.dart index c16223042ea..90348f3abe3 100644 --- a/lib/src/app/data.dart +++ b/lib/src/app/data.dart @@ -538,7 +538,7 @@ class DataClient { /// as long as it was synced within the last year. /// /// For more information, see [Data Client API](https://docs.viam.com/appendix/apis/data-client/). - Future<(DateTime, DateTime, Map)?> getLatestTabularData( + Future<({DateTime timeCaptured, DateTime timeSynced, Map payload})?> getLatestTabularData( String partId, String resourceName, String resourceSubtype, @@ -557,9 +557,9 @@ class DataClient { } return ( - response.timeCaptured.toDateTime(), - response.timeSynced.toDateTime(), - response.payload.toMap(), + timeCaptured: response.timeCaptured.toDateTime(), + timeSynced: response.timeSynced.toDateTime(), + payload: response.payload.toMap(), ); } } diff --git a/test/unit_test/app/data_client_test.dart b/test/unit_test/app/data_client_test.dart index afa80bfcfc2..01f12f1199c 100644 --- a/test/unit_test/app/data_client_test.dart +++ b/test/unit_test/app/data_client_test.dart @@ -14,6 +14,7 @@ import 'package:viam_sdk/src/gen/app/data/v1/data.pb.dart'; import 'package:viam_sdk/src/gen/app/data/v1/data.pbgrpc.dart'; import 'package:viam_sdk/src/gen/google/protobuf/timestamp.pb.dart'; import 'package:viam_sdk/src/media/image.dart'; +import 'package:viam_sdk/src/utils.dart'; import '../mocks/mock_response_future.dart'; import '../mocks/service_clients_mocks.mocks.dart'; @@ -295,27 +296,27 @@ void main() { verify(serviceClient.removeBinaryDataFromDatasetByIDs(any)).called(1); }); test('getLatestTabularData', () async { - final timeCaptured = DateTime(2023, 1, 1); - final timeSynced = DateTime(2023, 1, 2); - final payload = Struct()..fields.addAll({'key': Value()..stringValue = 'value'}); + final timeCaptured = DateTime.utc(2023, 1, 1); + final timeSynced = DateTime.utc(2023, 1, 2); + final Map payload = {'key': 'value'}; - when(serviceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse() - ..timeCaptured = Timestamp.fromDateTime(timeCaptured) - ..timeSynced = Timestamp.fromDateTime(timeSynced) - ..payload = payload)); + when(serviceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse( + timeCaptured: Timestamp.fromDateTime(timeCaptured), + timeSynced: Timestamp.fromDateTime(timeSynced), + payload: payload.toStruct()))); final response = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); - expect(response?.$1, equals(timeCaptured)); - expect(response?.$2, equals(timeSynced)); - expect(response?.$3, equals({'key': 'value'})); + expect(response?.timeCaptured, equals(timeCaptured)); + expect(response?.timeSynced, equals(timeSynced)); + expect(response?.payload, equals({'key': 'value'})); verify(serviceClient.getLatestTabularData(any)).called(1); // Test null response when(serviceClient.getLatestTabularData(any)).thenAnswer((_) => MockResponseFuture.value(GetLatestTabularDataResponse())); - final nullResponse = await serviceClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); + final nullResponse = await dataClient.getLatestTabularData('part-id', 'resource-name', 'resource-subtype', 'method-name'); expect(nullResponse, isNull); }); @@ -434,13 +435,9 @@ void main() { final response = await dataClient.listDatasetsByIDs(['dataset-id']); expect(response, equals(expected)); }); - - }); }); - - group('Filter Utils Tests', () { test('setDateTimeCaptureInterval', () { final filter = Filter(); diff --git a/test/unit_test/mocks/service_clients_mocks.mocks.dart b/test/unit_test/mocks/service_clients_mocks.mocks.dart index 775564e4a5f..06f7319a489 100644 --- a/test/unit_test/mocks/service_clients_mocks.mocks.dart +++ b/test/unit_test/mocks/service_clients_mocks.mocks.dart @@ -779,6 +779,66 @@ class MockRobotServiceClient extends _i1.Mock ), ) as _i4.ResponseFuture<_i9.ShutdownResponse>); + @override + _i4.ResponseFuture<_i9.GetMachineStatusResponse> getMachineStatus( + _i9.GetMachineStatusRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #getMachineStatus, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i9.GetMachineStatusResponse>( + this, + Invocation.method( + #getMachineStatus, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i9.GetMachineStatusResponse>( + this, + Invocation.method( + #getMachineStatus, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i9.GetMachineStatusResponse>); + + @override + _i4.ResponseFuture<_i9.GetVersionResponse> getVersion( + _i9.GetVersionRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #getVersion, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i9.GetVersionResponse>( + this, + Invocation.method( + #getVersion, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i9.GetVersionResponse>( + this, + Invocation.method( + #getVersion, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i9.GetVersionResponse>); + @override _i3.ClientCall $createCall( _i7.ClientMethod? method, @@ -1550,68 +1610,524 @@ class MockAppServiceClient extends _i1.Mock implements _i12.AppServiceClient { ) as _i4.ResponseFuture<_i13.DeleteOrganizationMemberResponse>); @override - _i4.ResponseFuture<_i13.DeleteOrganizationInviteResponse> - deleteOrganizationInvite( - _i13.DeleteOrganizationInviteRequest? request, { + _i4.ResponseFuture<_i13.DeleteOrganizationInviteResponse> + deleteOrganizationInvite( + _i13.DeleteOrganizationInviteRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #deleteOrganizationInvite, + [request], + {#options: options}, + ), + returnValue: + _FakeResponseFuture_2<_i13.DeleteOrganizationInviteResponse>( + this, + Invocation.method( + #deleteOrganizationInvite, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.DeleteOrganizationInviteResponse>( + this, + Invocation.method( + #deleteOrganizationInvite, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.DeleteOrganizationInviteResponse>); + + @override + _i4.ResponseFuture<_i13.ResendOrganizationInviteResponse> + resendOrganizationInvite( + _i13.ResendOrganizationInviteRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #resendOrganizationInvite, + [request], + {#options: options}, + ), + returnValue: + _FakeResponseFuture_2<_i13.ResendOrganizationInviteResponse>( + this, + Invocation.method( + #resendOrganizationInvite, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.ResendOrganizationInviteResponse>( + this, + Invocation.method( + #resendOrganizationInvite, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.ResendOrganizationInviteResponse>); + + @override + _i4.ResponseFuture<_i13.EnableBillingServiceResponse> enableBillingService( + _i13.EnableBillingServiceRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #enableBillingService, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.EnableBillingServiceResponse>( + this, + Invocation.method( + #enableBillingService, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.EnableBillingServiceResponse>( + this, + Invocation.method( + #enableBillingService, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.EnableBillingServiceResponse>); + + @override + _i4.ResponseFuture<_i13.DisableBillingServiceResponse> disableBillingService( + _i13.DisableBillingServiceRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #disableBillingService, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.DisableBillingServiceResponse>( + this, + Invocation.method( + #disableBillingService, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.DisableBillingServiceResponse>( + this, + Invocation.method( + #disableBillingService, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.DisableBillingServiceResponse>); + + @override + _i4.ResponseFuture<_i13.UpdateBillingServiceResponse> updateBillingService( + _i13.UpdateBillingServiceRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #updateBillingService, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.UpdateBillingServiceResponse>( + this, + Invocation.method( + #updateBillingService, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.UpdateBillingServiceResponse>( + this, + Invocation.method( + #updateBillingService, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.UpdateBillingServiceResponse>); + + @override + _i4.ResponseFuture<_i13.GetBillingServiceConfigResponse> + getBillingServiceConfig( + _i13.GetBillingServiceConfigRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #getBillingServiceConfig, + [request], + {#options: options}, + ), + returnValue: + _FakeResponseFuture_2<_i13.GetBillingServiceConfigResponse>( + this, + Invocation.method( + #getBillingServiceConfig, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.GetBillingServiceConfigResponse>( + this, + Invocation.method( + #getBillingServiceConfig, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.GetBillingServiceConfigResponse>); + + @override + _i4.ResponseFuture<_i13.OrganizationSetSupportEmailResponse> + organizationSetSupportEmail( + _i13.OrganizationSetSupportEmailRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #organizationSetSupportEmail, + [request], + {#options: options}, + ), + returnValue: + _FakeResponseFuture_2<_i13.OrganizationSetSupportEmailResponse>( + this, + Invocation.method( + #organizationSetSupportEmail, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.OrganizationSetSupportEmailResponse>( + this, + Invocation.method( + #organizationSetSupportEmail, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.OrganizationSetSupportEmailResponse>); + + @override + _i4.ResponseFuture<_i13.OrganizationGetSupportEmailResponse> + organizationGetSupportEmail( + _i13.OrganizationGetSupportEmailRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #organizationGetSupportEmail, + [request], + {#options: options}, + ), + returnValue: + _FakeResponseFuture_2<_i13.OrganizationGetSupportEmailResponse>( + this, + Invocation.method( + #organizationGetSupportEmail, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.OrganizationGetSupportEmailResponse>( + this, + Invocation.method( + #organizationGetSupportEmail, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.OrganizationGetSupportEmailResponse>); + + @override + _i4.ResponseFuture<_i13.OrganizationSetLogoResponse> organizationSetLogo( + _i13.OrganizationSetLogoRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #organizationSetLogo, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.OrganizationSetLogoResponse>( + this, + Invocation.method( + #organizationSetLogo, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.OrganizationSetLogoResponse>( + this, + Invocation.method( + #organizationSetLogo, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.OrganizationSetLogoResponse>); + + @override + _i4.ResponseFuture<_i13.OrganizationGetLogoResponse> organizationGetLogo( + _i13.OrganizationGetLogoRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #organizationGetLogo, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.OrganizationGetLogoResponse>( + this, + Invocation.method( + #organizationGetLogo, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.OrganizationGetLogoResponse>( + this, + Invocation.method( + #organizationGetLogo, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.OrganizationGetLogoResponse>); + + @override + _i4.ResponseFuture<_i13.EnableAuthServiceResponse> enableAuthService( + _i13.EnableAuthServiceRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #enableAuthService, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.EnableAuthServiceResponse>( + this, + Invocation.method( + #enableAuthService, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.EnableAuthServiceResponse>( + this, + Invocation.method( + #enableAuthService, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.EnableAuthServiceResponse>); + + @override + _i4.ResponseFuture<_i13.DisableAuthServiceResponse> disableAuthService( + _i13.DisableAuthServiceRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #disableAuthService, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.DisableAuthServiceResponse>( + this, + Invocation.method( + #disableAuthService, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.DisableAuthServiceResponse>( + this, + Invocation.method( + #disableAuthService, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.DisableAuthServiceResponse>); + + @override + _i4.ResponseFuture<_i13.CreateOAuthAppResponse> createOAuthApp( + _i13.CreateOAuthAppRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #createOAuthApp, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.CreateOAuthAppResponse>( + this, + Invocation.method( + #createOAuthApp, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.CreateOAuthAppResponse>( + this, + Invocation.method( + #createOAuthApp, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.CreateOAuthAppResponse>); + + @override + _i4.ResponseFuture<_i13.ReadOAuthAppResponse> readOAuthApp( + _i13.ReadOAuthAppRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #readOAuthApp, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.ReadOAuthAppResponse>( + this, + Invocation.method( + #readOAuthApp, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.ReadOAuthAppResponse>( + this, + Invocation.method( + #readOAuthApp, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.ReadOAuthAppResponse>); + + @override + _i4.ResponseFuture<_i13.UpdateOAuthAppResponse> updateOAuthApp( + _i13.UpdateOAuthAppRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #updateOAuthApp, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.UpdateOAuthAppResponse>( + this, + Invocation.method( + #updateOAuthApp, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.UpdateOAuthAppResponse>( + this, + Invocation.method( + #updateOAuthApp, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.UpdateOAuthAppResponse>); + + @override + _i4.ResponseFuture<_i13.DeleteOAuthAppResponse> deleteOAuthApp( + _i13.DeleteOAuthAppRequest? request, { _i3.CallOptions? options, }) => - (super.noSuchMethod( - Invocation.method( - #deleteOrganizationInvite, - [request], - {#options: options}, - ), - returnValue: - _FakeResponseFuture_2<_i13.DeleteOrganizationInviteResponse>( - this, - Invocation.method( - #deleteOrganizationInvite, - [request], - {#options: options}, - ), - ), - returnValueForMissingStub: - _FakeResponseFuture_2<_i13.DeleteOrganizationInviteResponse>( - this, - Invocation.method( - #deleteOrganizationInvite, - [request], - {#options: options}, - ), - ), - ) as _i4.ResponseFuture<_i13.DeleteOrganizationInviteResponse>); + (super.noSuchMethod( + Invocation.method( + #deleteOAuthApp, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.DeleteOAuthAppResponse>( + this, + Invocation.method( + #deleteOAuthApp, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.DeleteOAuthAppResponse>( + this, + Invocation.method( + #deleteOAuthApp, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.DeleteOAuthAppResponse>); @override - _i4.ResponseFuture<_i13.ResendOrganizationInviteResponse> - resendOrganizationInvite( - _i13.ResendOrganizationInviteRequest? request, { + _i4.ResponseFuture<_i13.ListOAuthAppsResponse> listOAuthApps( + _i13.ListOAuthAppsRequest? request, { _i3.CallOptions? options, }) => - (super.noSuchMethod( - Invocation.method( - #resendOrganizationInvite, - [request], - {#options: options}, - ), - returnValue: - _FakeResponseFuture_2<_i13.ResendOrganizationInviteResponse>( - this, - Invocation.method( - #resendOrganizationInvite, - [request], - {#options: options}, - ), - ), - returnValueForMissingStub: - _FakeResponseFuture_2<_i13.ResendOrganizationInviteResponse>( - this, - Invocation.method( - #resendOrganizationInvite, - [request], - {#options: options}, - ), - ), - ) as _i4.ResponseFuture<_i13.ResendOrganizationInviteResponse>); + (super.noSuchMethod( + Invocation.method( + #listOAuthApps, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.ListOAuthAppsResponse>( + this, + Invocation.method( + #listOAuthApps, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.ListOAuthAppsResponse>( + this, + Invocation.method( + #listOAuthApps, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.ListOAuthAppsResponse>); @override _i4.ResponseFuture<_i13.CreateLocationResponse> createLocation( @@ -2631,6 +3147,66 @@ class MockAppServiceClient extends _i1.Mock implements _i12.AppServiceClient { ), ) as _i4.ResponseFuture<_i13.DeleteFragmentResponse>); + @override + _i4.ResponseFuture<_i13.ListMachineFragmentsResponse> listMachineFragments( + _i13.ListMachineFragmentsRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #listMachineFragments, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.ListMachineFragmentsResponse>( + this, + Invocation.method( + #listMachineFragments, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.ListMachineFragmentsResponse>( + this, + Invocation.method( + #listMachineFragments, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.ListMachineFragmentsResponse>); + + @override + _i4.ResponseFuture<_i13.GetFragmentHistoryResponse> getFragmentHistory( + _i13.GetFragmentHistoryRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #getFragmentHistory, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i13.GetFragmentHistoryResponse>( + this, + Invocation.method( + #getFragmentHistory, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i13.GetFragmentHistoryResponse>( + this, + Invocation.method( + #getFragmentHistory, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i13.GetFragmentHistoryResponse>); + @override _i4.ResponseFuture<_i13.AddRoleResponse> addRole( _i13.AddRoleRequest? request, { @@ -3504,6 +4080,66 @@ class MockDataServiceClient extends _i1.Mock implements _i14.DataServiceClient { ), ) as _i4.ResponseFuture<_i15.TabularDataByMQLResponse>); + @override + _i4.ResponseStream<_i15.ExportTabularDataResponse> exportTabularData( + _i15.ExportTabularDataRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #exportTabularData, + [request], + {#options: options}, + ), + returnValue: _FakeResponseStream_3<_i15.ExportTabularDataResponse>( + this, + Invocation.method( + #exportTabularData, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseStream_3<_i15.ExportTabularDataResponse>( + this, + Invocation.method( + #exportTabularData, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseStream<_i15.ExportTabularDataResponse>); + + @override + _i4.ResponseFuture<_i15.GetLatestTabularDataResponse> getLatestTabularData( + _i15.GetLatestTabularDataRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #getLatestTabularData, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i15.GetLatestTabularDataResponse>( + this, + Invocation.method( + #getLatestTabularData, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i15.GetLatestTabularDataResponse>( + this, + Invocation.method( + #getLatestTabularData, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i15.GetLatestTabularDataResponse>); + @override _i4.ResponseFuture<_i15.BinaryDataByFilterResponse> binaryDataByFilter( _i15.BinaryDataByFilterRequest? request, { @@ -3912,6 +4548,36 @@ class MockDataServiceClient extends _i1.Mock implements _i14.DataServiceClient { ), ) as _i4.ResponseFuture<_i15.BoundingBoxLabelsByFilterResponse>); + @override + _i4.ResponseFuture<_i15.UpdateBoundingBoxResponse> updateBoundingBox( + _i15.UpdateBoundingBoxRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #updateBoundingBox, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i15.UpdateBoundingBoxResponse>( + this, + Invocation.method( + #updateBoundingBox, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i15.UpdateBoundingBoxResponse>( + this, + Invocation.method( + #updateBoundingBox, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i15.UpdateBoundingBoxResponse>); + @override _i4.ResponseFuture<_i15.GetDatabaseConnectionResponse> getDatabaseConnection( _i15.GetDatabaseConnectionRequest? request, { @@ -4894,6 +5560,38 @@ class MockBillingServiceClient extends _i1.Mock ), ) as _i4.ResponseStream<_i22.GetInvoicePdfResponse>); + @override + _i4.ResponseFuture<_i22.SendPaymentRequiredEmailResponse> + sendPaymentRequiredEmail( + _i22.SendPaymentRequiredEmailRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #sendPaymentRequiredEmail, + [request], + {#options: options}, + ), + returnValue: + _FakeResponseFuture_2<_i22.SendPaymentRequiredEmailResponse>( + this, + Invocation.method( + #sendPaymentRequiredEmail, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i22.SendPaymentRequiredEmailResponse>( + this, + Invocation.method( + #sendPaymentRequiredEmail, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i22.SendPaymentRequiredEmailResponse>); + @override _i3.ClientCall $createCall( _i7.ClientMethod? method, @@ -5201,6 +5899,36 @@ class MockMLTrainingServiceClient extends _i1.Mock ), ) as _i4.ResponseFuture<_i24.DeleteCompletedTrainingJobResponse>); + @override + _i4.ResponseFuture<_i24.GetTrainingJobLogsResponse> getTrainingJobLogs( + _i24.GetTrainingJobLogsRequest? request, { + _i3.CallOptions? options, + }) => + (super.noSuchMethod( + Invocation.method( + #getTrainingJobLogs, + [request], + {#options: options}, + ), + returnValue: _FakeResponseFuture_2<_i24.GetTrainingJobLogsResponse>( + this, + Invocation.method( + #getTrainingJobLogs, + [request], + {#options: options}, + ), + ), + returnValueForMissingStub: + _FakeResponseFuture_2<_i24.GetTrainingJobLogsResponse>( + this, + Invocation.method( + #getTrainingJobLogs, + [request], + {#options: options}, + ), + ), + ) as _i4.ResponseFuture<_i24.GetTrainingJobLogsResponse>); + @override _i3.ClientCall $createCall( _i7.ClientMethod? method,