From cab7297c9ea1a461f7fede1cd5a72ffb43d71c02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 14:06:32 -0400 Subject: [PATCH] Automated Protos Update (#217) * [WORKFLOW] Updating protos from viamrobotics/api, commit: b135219f13de8df7474c320bcacac38cc20390af * add SetRPM to flutter SDK (#220) --------- Co-authored-by: viambot Co-authored-by: martha-johnston <106617924+martha-johnston@users.noreply.github.com> --- lib/src/components/motor/client.dart | 9 + lib/src/components/motor/motor.dart | 4 + lib/src/components/motor/service.dart | 7 + lib/src/gen/app/v1/app.pb.dart | 263 ++++++++++++++++-- lib/src/gen/app/v1/app.pbenum.dart | 19 ++ lib/src/gen/app/v1/app.pbgrpc.dart | 20 ++ lib/src/gen/app/v1/app.pbjson.dart | 87 +++++- lib/src/gen/app/v1/end_user.pb.dart | 188 ++++++++++++- lib/src/gen/app/v1/end_user.pbgrpc.dart | 20 ++ lib/src/gen/app/v1/end_user.pbjson.dart | 39 ++- lib/src/gen/app/v1/robot.pbjson.dart | 9 +- lib/src/gen/component/motor/v1/motor.pb.dart | 115 ++++++++ .../gen/component/motor/v1/motor.pbgrpc.dart | 20 ++ .../gen/component/motor/v1/motor.pbjson.dart | 24 ++ lib/src/gen/service/slam/v1/slam.pb.dart | 33 --- lib/src/gen/service/slam/v1/slam.pbjson.dart | 5 +- test/unit_test/components/motor_test.dart | 35 +++ 17 files changed, 821 insertions(+), 76 deletions(-) diff --git a/lib/src/components/motor/client.dart b/lib/src/components/motor/client.dart index e8fc747c03..37092b059e 100644 --- a/lib/src/components/motor/client.dart +++ b/lib/src/components/motor/client.dart @@ -49,6 +49,15 @@ class MotorClient extends Motor implements ResourceRPCClient { await client.goTo(request); } + @override + Future setRPM(double rpm, {Map? extra}) async { + final request = SetRPMRequest() + ..name = name + ..rpm = rpm + ..extra = extra?.toStruct() ?? Struct(); + await client.setRPM(request); + } + @override Future resetZeroPosition(double offset, {Map? extra}) async { final request = ResetZeroPositionRequest() diff --git a/lib/src/components/motor/motor.dart b/lib/src/components/motor/motor.dart index 964259e253..9ae4b0f0d9 100644 --- a/lib/src/components/motor/motor.dart +++ b/lib/src/components/motor/motor.dart @@ -35,6 +35,10 @@ abstract class Motor extends Resource { /// the [Motor] towards the specified position. Future goTo(double rpm, double positionRevolutions, {Map? extra}); + /// Spin the [Motor] indefinitely at the specified speed, in revolutions per minute. + /// If [rpm] is positive, the motor will spin forwards, and if [rpm] is negative, the motor will spin backwards. + Future setRPM(double rpm, {Map? extra}); + /// Set the current position (modified by [offset]) to be the new zero (home) position. Future resetZeroPosition(double offset, {Map? extra}); diff --git a/lib/src/components/motor/service.dart b/lib/src/components/motor/service.dart index 7fcaa47947..1a759f1a61 100644 --- a/lib/src/components/motor/service.dart +++ b/lib/src/components/motor/service.dart @@ -69,6 +69,13 @@ class MotorService extends MotorServiceBase { return GoToResponse(); } + @override + Future setRPM(ServiceCall call, SetRPMRequest request) async { + final motor = _fromManager(request.name); + await motor.setRPM(request.rpm, extra: request.extra.toMap()); + return SetRPMResponse(); + } + @override Future isPowered(ServiceCall call, IsPoweredRequest request) async { final motor = _fromManager(request.name); diff --git a/lib/src/gen/app/v1/app.pb.dart b/lib/src/gen/app/v1/app.pb.dart index e079cdc04e..f504db5f21 100644 --- a/lib/src/gen/app/v1/app.pb.dart +++ b/lib/src/gen/app/v1/app.pb.dart @@ -5171,6 +5171,7 @@ class Fragment extends $pb.GeneratedMessage { $core.int? robotPartCount, $core.int? organizationCount, $core.bool? onlyUsedByOwner, + FragmentVisibility? visibility, }) { final $result = create(); if (id != null) { @@ -5203,6 +5204,9 @@ class Fragment extends $pb.GeneratedMessage { if (onlyUsedByOwner != null) { $result.onlyUsedByOwner = onlyUsedByOwner; } + if (visibility != null) { + $result.visibility = visibility; + } return $result; } Fragment._() : super(); @@ -5220,6 +5224,7 @@ class Fragment extends $pb.GeneratedMessage { ..a<$core.int>(9, _omitFieldNames ? '' : 'robotPartCount', $pb.PbFieldType.O3) ..a<$core.int>(10, _omitFieldNames ? '' : 'organizationCount', $pb.PbFieldType.O3) ..aOB(11, _omitFieldNames ? '' : 'onlyUsedByOwner') + ..e(12, _omitFieldNames ? '' : 'visibility', $pb.PbFieldType.OE, defaultOrMaker: FragmentVisibility.FRAGMENT_VISIBILITY_UNSPECIFIED, valueOf: FragmentVisibility.valueOf, enumValues: FragmentVisibility.values) ..hasRequiredFields = false ; @@ -5340,12 +5345,23 @@ class Fragment extends $pb.GeneratedMessage { $core.bool hasOnlyUsedByOwner() => $_has(9); @$pb.TagNumber(11) void clearOnlyUsedByOwner() => clearField(11); + + /// the visibility of a fragment; public, private or unlisted + @$pb.TagNumber(12) + FragmentVisibility get visibility => $_getN(10); + @$pb.TagNumber(12) + set visibility(FragmentVisibility v) { setField(12, v); } + @$pb.TagNumber(12) + $core.bool hasVisibility() => $_has(10); + @$pb.TagNumber(12) + void clearVisibility() => clearField(12); } class ListFragmentsRequest extends $pb.GeneratedMessage { factory ListFragmentsRequest({ $core.String? organizationId, $core.bool? showPublic, + $core.Iterable? fragmentVisibility, }) { final $result = create(); if (organizationId != null) { @@ -5354,6 +5370,9 @@ class ListFragmentsRequest extends $pb.GeneratedMessage { if (showPublic != null) { $result.showPublic = showPublic; } + if (fragmentVisibility != null) { + $result.fragmentVisibility.addAll(fragmentVisibility); + } return $result; } ListFragmentsRequest._() : super(); @@ -5363,6 +5382,7 @@ class ListFragmentsRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListFragmentsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'organizationId') ..aOB(2, _omitFieldNames ? '' : 'showPublic') + ..pc(3, _omitFieldNames ? '' : 'fragmentVisibility', $pb.PbFieldType.KE, valueOf: FragmentVisibility.valueOf, enumValues: FragmentVisibility.values, defaultEnumValue: FragmentVisibility.FRAGMENT_VISIBILITY_UNSPECIFIED) ..hasRequiredFields = false ; @@ -5404,6 +5424,9 @@ class ListFragmentsRequest extends $pb.GeneratedMessage { $core.bool hasShowPublic() => $_has(1); @$pb.TagNumber(2) void clearShowPublic() => clearField(2); + + @$pb.TagNumber(3) + $core.List get fragmentVisibility => $_getList(2); } class ListFragmentsResponse extends $pb.GeneratedMessage { @@ -5690,6 +5713,7 @@ class UpdateFragmentRequest extends $pb.GeneratedMessage { $core.String? name, $7.Struct? config, $core.bool? public, + FragmentVisibility? visibility, }) { final $result = create(); if (id != null) { @@ -5704,6 +5728,9 @@ class UpdateFragmentRequest extends $pb.GeneratedMessage { if (public != null) { $result.public = public; } + if (visibility != null) { + $result.visibility = visibility; + } return $result; } UpdateFragmentRequest._() : super(); @@ -5715,6 +5742,7 @@ class UpdateFragmentRequest extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'name') ..aOM<$7.Struct>(3, _omitFieldNames ? '' : 'config', subBuilder: $7.Struct.create) ..aOB(4, _omitFieldNames ? '' : 'public') + ..e(5, _omitFieldNames ? '' : 'visibility', $pb.PbFieldType.OE, defaultOrMaker: FragmentVisibility.FRAGMENT_VISIBILITY_UNSPECIFIED, valueOf: FragmentVisibility.valueOf, enumValues: FragmentVisibility.values) ..hasRequiredFields = false ; @@ -5776,6 +5804,15 @@ class UpdateFragmentRequest extends $pb.GeneratedMessage { $core.bool hasPublic() => $_has(3); @$pb.TagNumber(4) void clearPublic() => clearField(4); + + @$pb.TagNumber(5) + FragmentVisibility get visibility => $_getN(4); + @$pb.TagNumber(5) + set visibility(FragmentVisibility v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasVisibility() => $_has(4); + @$pb.TagNumber(5) + void clearVisibility() => clearField(5); } class UpdateFragmentResponse extends $pb.GeneratedMessage { @@ -7559,17 +7596,80 @@ class MLModelMetadata extends $pb.GeneratedMessage { $core.List<$core.String> get versions => $_getList(0); } +class MLTrainingVersion extends $pb.GeneratedMessage { + factory MLTrainingVersion({ + $core.String? version, + $6.Timestamp? createdOn, + }) { + final $result = create(); + if (version != null) { + $result.version = version; + } + if (createdOn != null) { + $result.createdOn = createdOn; + } + return $result; + } + MLTrainingVersion._() : super(); + factory MLTrainingVersion.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MLTrainingVersion.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MLTrainingVersion', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'version') + ..aOM<$6.Timestamp>(2, _omitFieldNames ? '' : 'createdOn', subBuilder: $6.Timestamp.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') + MLTrainingVersion clone() => MLTrainingVersion()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + MLTrainingVersion copyWith(void Function(MLTrainingVersion) updates) => super.copyWith((message) => updates(message as MLTrainingVersion)) as MLTrainingVersion; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MLTrainingVersion create() => MLTrainingVersion._(); + MLTrainingVersion createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MLTrainingVersion getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MLTrainingVersion? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get version => $_getSZ(0); + @$pb.TagNumber(1) + set version($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasVersion() => $_has(0); + @$pb.TagNumber(1) + void clearVersion() => clearField(1); + + @$pb.TagNumber(2) + $6.Timestamp get createdOn => $_getN(1); + @$pb.TagNumber(2) + set createdOn($6.Timestamp v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasCreatedOn() => $_has(1); + @$pb.TagNumber(2) + void clearCreatedOn() => clearField(2); + @$pb.TagNumber(2) + $6.Timestamp ensureCreatedOn() => $_ensure(1); +} + class MLTrainingMetadata extends $pb.GeneratedMessage { factory MLTrainingMetadata({ - $core.Iterable<$core.String>? versions, $0.ModelType? modelType, $0.ModelFramework? modelFramework, $core.bool? draft, + $core.Iterable? versions, }) { final $result = create(); - if (versions != null) { - $result.versions.addAll(versions); - } if (modelType != null) { $result.modelType = modelType; } @@ -7579,6 +7679,9 @@ class MLTrainingMetadata extends $pb.GeneratedMessage { if (draft != null) { $result.draft = draft; } + if (versions != null) { + $result.versions.addAll(versions); + } return $result; } MLTrainingMetadata._() : super(); @@ -7586,10 +7689,10 @@ class MLTrainingMetadata extends $pb.GeneratedMessage { factory MLTrainingMetadata.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MLTrainingMetadata', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) - ..pPS(1, _omitFieldNames ? '' : 'versions') ..e<$0.ModelType>(2, _omitFieldNames ? '' : 'modelType', $pb.PbFieldType.OE, defaultOrMaker: $0.ModelType.MODEL_TYPE_UNSPECIFIED, valueOf: $0.ModelType.valueOf, enumValues: $0.ModelType.values) ..e<$0.ModelFramework>(3, _omitFieldNames ? '' : 'modelFramework', $pb.PbFieldType.OE, defaultOrMaker: $0.ModelFramework.MODEL_FRAMEWORK_UNSPECIFIED, valueOf: $0.ModelFramework.valueOf, enumValues: $0.ModelFramework.values) ..aOB(4, _omitFieldNames ? '' : 'draft') + ..pc(5, _omitFieldNames ? '' : 'versions', $pb.PbFieldType.PM, subBuilder: MLTrainingVersion.create) ..hasRequiredFields = false ; @@ -7614,36 +7717,36 @@ class MLTrainingMetadata extends $pb.GeneratedMessage { static MLTrainingMetadata getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static MLTrainingMetadata? _defaultInstance; - /// A list of package versions for ML training source distribution - @$pb.TagNumber(1) - $core.List<$core.String> get versions => $_getList(0); - @$pb.TagNumber(2) - $0.ModelType get modelType => $_getN(1); + $0.ModelType get modelType => $_getN(0); @$pb.TagNumber(2) set modelType($0.ModelType v) { setField(2, v); } @$pb.TagNumber(2) - $core.bool hasModelType() => $_has(1); + $core.bool hasModelType() => $_has(0); @$pb.TagNumber(2) void clearModelType() => clearField(2); @$pb.TagNumber(3) - $0.ModelFramework get modelFramework => $_getN(2); + $0.ModelFramework get modelFramework => $_getN(1); @$pb.TagNumber(3) set modelFramework($0.ModelFramework v) { setField(3, v); } @$pb.TagNumber(3) - $core.bool hasModelFramework() => $_has(2); + $core.bool hasModelFramework() => $_has(1); @$pb.TagNumber(3) void clearModelFramework() => clearField(3); @$pb.TagNumber(4) - $core.bool get draft => $_getBF(3); + $core.bool get draft => $_getBF(2); @$pb.TagNumber(4) - set draft($core.bool v) { $_setBool(3, v); } + set draft($core.bool v) { $_setBool(2, v); } @$pb.TagNumber(4) - $core.bool hasDraft() => $_has(3); + $core.bool hasDraft() => $_has(2); @$pb.TagNumber(4) void clearDraft() => clearField(4); + + /// A list of package versions for ML training source distribution + @$pb.TagNumber(5) + $core.List get versions => $_getList(3); } enum RegistryItem_Metadata { @@ -10155,6 +10258,134 @@ class DeleteKeyResponse extends $pb.GeneratedMessage { static DeleteKeyResponse? _defaultInstance; } +class RenameKeyRequest extends $pb.GeneratedMessage { + factory RenameKeyRequest({ + $core.String? id, + $core.String? name, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (name != null) { + $result.name = name; + } + return $result; + } + RenameKeyRequest._() : super(); + factory RenameKeyRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RenameKeyRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RenameKeyRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RenameKeyRequest clone() => RenameKeyRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RenameKeyRequest copyWith(void Function(RenameKeyRequest) updates) => super.copyWith((message) => updates(message as RenameKeyRequest)) as RenameKeyRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RenameKeyRequest create() => RenameKeyRequest._(); + RenameKeyRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RenameKeyRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RenameKeyRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); +} + +class RenameKeyResponse extends $pb.GeneratedMessage { + factory RenameKeyResponse({ + $core.String? id, + $core.String? name, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (name != null) { + $result.name = name; + } + return $result; + } + RenameKeyResponse._() : super(); + factory RenameKeyResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RenameKeyResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RenameKeyResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RenameKeyResponse clone() => RenameKeyResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RenameKeyResponse copyWith(void Function(RenameKeyResponse) updates) => super.copyWith((message) => updates(message as RenameKeyResponse)) as RenameKeyResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RenameKeyResponse create() => RenameKeyResponse._(); + RenameKeyResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RenameKeyResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RenameKeyResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); +} + class AuthorizationDetails extends $pb.GeneratedMessage { factory AuthorizationDetails({ $core.String? authorizationType, diff --git a/lib/src/gen/app/v1/app.pbenum.dart b/lib/src/gen/app/v1/app.pbenum.dart index 57d46e6b15..398139498f 100644 --- a/lib/src/gen/app/v1/app.pbenum.dart +++ b/lib/src/gen/app/v1/app.pbenum.dart @@ -13,6 +13,25 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +class FragmentVisibility extends $pb.ProtobufEnum { + static const FragmentVisibility FRAGMENT_VISIBILITY_UNSPECIFIED = FragmentVisibility._(0, _omitEnumNames ? '' : 'FRAGMENT_VISIBILITY_UNSPECIFIED'); + static const FragmentVisibility FRAGMENT_VISIBILITY_PRIVATE = FragmentVisibility._(1, _omitEnumNames ? '' : 'FRAGMENT_VISIBILITY_PRIVATE'); + static const FragmentVisibility FRAGMENT_VISIBILITY_PUBLIC = FragmentVisibility._(2, _omitEnumNames ? '' : 'FRAGMENT_VISIBILITY_PUBLIC'); + static const FragmentVisibility FRAGMENT_VISIBILITY_PUBLIC_UNLISTED = FragmentVisibility._(3, _omitEnumNames ? '' : 'FRAGMENT_VISIBILITY_PUBLIC_UNLISTED'); + + static const $core.List values = [ + FRAGMENT_VISIBILITY_UNSPECIFIED, + FRAGMENT_VISIBILITY_PRIVATE, + FRAGMENT_VISIBILITY_PUBLIC, + FRAGMENT_VISIBILITY_PUBLIC_UNLISTED, + ]; + + static final $core.Map<$core.int, FragmentVisibility> _byValue = $pb.ProtobufEnum.initByValue(values); + static FragmentVisibility? valueOf($core.int value) => _byValue[value]; + + const FragmentVisibility._($core.int v, $core.String n) : super(v, n); +} + class RegistryItemStatus extends $pb.ProtobufEnum { static const RegistryItemStatus REGISTRY_ITEM_STATUS_UNSPECIFIED = RegistryItemStatus._(0, _omitEnumNames ? '' : 'REGISTRY_ITEM_STATUS_UNSPECIFIED'); static const RegistryItemStatus REGISTRY_ITEM_STATUS_PUBLISHED = RegistryItemStatus._(1, _omitEnumNames ? '' : 'REGISTRY_ITEM_STATUS_PUBLISHED'); diff --git a/lib/src/gen/app/v1/app.pbgrpc.dart b/lib/src/gen/app/v1/app.pbgrpc.dart index 61c3f65a98..28dfde44ec 100644 --- a/lib/src/gen/app/v1/app.pbgrpc.dart +++ b/lib/src/gen/app/v1/app.pbgrpc.dart @@ -289,6 +289,10 @@ class AppServiceClient extends $grpc.Client { '/viam.app.v1.AppService/ListKeys', ($2.ListKeysRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $2.ListKeysResponse.fromBuffer(value)); + static final _$renameKey = $grpc.ClientMethod<$2.RenameKeyRequest, $2.RenameKeyResponse>( + '/viam.app.v1.AppService/RenameKey', + ($2.RenameKeyRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.RenameKeyResponse.fromBuffer(value)); static final _$rotateKey = $grpc.ClientMethod<$2.RotateKeyRequest, $2.RotateKeyResponse>( '/viam.app.v1.AppService/RotateKey', ($2.RotateKeyRequest value) => value.writeToBuffer(), @@ -572,6 +576,10 @@ class AppServiceClient extends $grpc.Client { return $createUnaryCall(_$listKeys, request, options: options); } + $grpc.ResponseFuture<$2.RenameKeyResponse> renameKey($2.RenameKeyRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$renameKey, request, options: options); + } + $grpc.ResponseFuture<$2.RotateKeyResponse> rotateKey($2.RotateKeyRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$rotateKey, request, options: options); } @@ -1055,6 +1063,13 @@ abstract class AppServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $2.ListKeysRequest.fromBuffer(value), ($2.ListKeysResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.RenameKeyRequest, $2.RenameKeyResponse>( + 'RenameKey', + renameKey_Pre, + false, + false, + ($core.List<$core.int> value) => $2.RenameKeyRequest.fromBuffer(value), + ($2.RenameKeyResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$2.RotateKeyRequest, $2.RotateKeyResponse>( 'RotateKey', rotateKey_Pre, @@ -1335,6 +1350,10 @@ abstract class AppServiceBase extends $grpc.Service { return listKeys(call, await request); } + $async.Future<$2.RenameKeyResponse> renameKey_Pre($grpc.ServiceCall call, $async.Future<$2.RenameKeyRequest> request) async { + return renameKey(call, await request); + } + $async.Future<$2.RotateKeyResponse> rotateKey_Pre($grpc.ServiceCall call, $async.Future<$2.RotateKeyRequest> request) async { return rotateKey(call, await request); } @@ -1410,6 +1429,7 @@ abstract class AppServiceBase extends $grpc.Service { $async.Future<$2.CreateKeyResponse> createKey($grpc.ServiceCall call, $2.CreateKeyRequest request); $async.Future<$2.DeleteKeyResponse> deleteKey($grpc.ServiceCall call, $2.DeleteKeyRequest request); $async.Future<$2.ListKeysResponse> listKeys($grpc.ServiceCall call, $2.ListKeysRequest request); + $async.Future<$2.RenameKeyResponse> renameKey($grpc.ServiceCall call, $2.RenameKeyRequest request); $async.Future<$2.RotateKeyResponse> rotateKey($grpc.ServiceCall call, $2.RotateKeyRequest request); $async.Future<$2.CreateKeyFromExistingKeyAuthorizationsResponse> createKeyFromExistingKeyAuthorizations($grpc.ServiceCall call, $2.CreateKeyFromExistingKeyAuthorizationsRequest request); } diff --git a/lib/src/gen/app/v1/app.pbjson.dart b/lib/src/gen/app/v1/app.pbjson.dart index a86d0770d2..b942bb12c3 100644 --- a/lib/src/gen/app/v1/app.pbjson.dart +++ b/lib/src/gen/app/v1/app.pbjson.dart @@ -13,6 +13,23 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use fragmentVisibilityDescriptor instead') +const FragmentVisibility$json = { + '1': 'FragmentVisibility', + '2': [ + {'1': 'FRAGMENT_VISIBILITY_UNSPECIFIED', '2': 0}, + {'1': 'FRAGMENT_VISIBILITY_PRIVATE', '2': 1}, + {'1': 'FRAGMENT_VISIBILITY_PUBLIC', '2': 2}, + {'1': 'FRAGMENT_VISIBILITY_PUBLIC_UNLISTED', '2': 3}, + ], +}; + +/// Descriptor for `FragmentVisibility`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List fragmentVisibilityDescriptor = $convert.base64Decode( + 'ChJGcmFnbWVudFZpc2liaWxpdHkSIwofRlJBR01FTlRfVklTSUJJTElUWV9VTlNQRUNJRklFRB' + 'AAEh8KG0ZSQUdNRU5UX1ZJU0lCSUxJVFlfUFJJVkFURRABEh4KGkZSQUdNRU5UX1ZJU0lCSUxJ' + 'VFlfUFVCTElDEAISJwojRlJBR01FTlRfVklTSUJJTElUWV9QVUJMSUNfVU5MSVNURUQQAw=='); + @$core.Deprecated('Use registryItemStatusDescriptor instead') const RegistryItemStatus$json = { '1': 'RegistryItemStatus', @@ -1279,6 +1296,7 @@ const Fragment$json = { {'1': 'robot_part_count', '3': 9, '4': 1, '5': 5, '10': 'robotPartCount'}, {'1': 'organization_count', '3': 10, '4': 1, '5': 5, '10': 'organizationCount'}, {'1': 'only_used_by_owner', '3': 11, '4': 1, '5': 8, '10': 'onlyUsedByOwner'}, + {'1': 'visibility', '3': 12, '4': 1, '5': 14, '6': '.viam.app.v1.FragmentVisibility', '10': 'visibility'}, ], }; @@ -1295,7 +1313,8 @@ final $typed_data.Uint8List fragmentDescriptor = $convert.base64Decode( 'YW5pemF0aW9uX25hbWUYByABKAlSEG9yZ2FuaXphdGlvbk5hbWUSKAoQcm9ib3RfcGFydF9jb3' 'VudBgJIAEoBVIOcm9ib3RQYXJ0Q291bnQSLQoSb3JnYW5pemF0aW9uX2NvdW50GAogASgFUhFv' 'cmdhbml6YXRpb25Db3VudBIrChJvbmx5X3VzZWRfYnlfb3duZXIYCyABKAhSD29ubHlVc2VkQn' - 'lPd25lcg=='); + 'lPd25lchI/Cgp2aXNpYmlsaXR5GAwgASgOMh8udmlhbS5hcHAudjEuRnJhZ21lbnRWaXNpYmls' + 'aXR5Ugp2aXNpYmlsaXR5'); @$core.Deprecated('Use listFragmentsRequestDescriptor instead') const ListFragmentsRequest$json = { @@ -1303,13 +1322,16 @@ const ListFragmentsRequest$json = { '2': [ {'1': 'organization_id', '3': 1, '4': 1, '5': 9, '10': 'organizationId'}, {'1': 'show_public', '3': 2, '4': 1, '5': 8, '10': 'showPublic'}, + {'1': 'fragment_visibility', '3': 3, '4': 3, '5': 14, '6': '.viam.app.v1.FragmentVisibility', '10': 'fragmentVisibility'}, ], }; /// Descriptor for `ListFragmentsRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listFragmentsRequestDescriptor = $convert.base64Decode( 'ChRMaXN0RnJhZ21lbnRzUmVxdWVzdBInCg9vcmdhbml6YXRpb25faWQYASABKAlSDm9yZ2FuaX' - 'phdGlvbklkEh8KC3Nob3dfcHVibGljGAIgASgIUgpzaG93UHVibGlj'); + 'phdGlvbklkEh8KC3Nob3dfcHVibGljGAIgASgIUgpzaG93UHVibGljElAKE2ZyYWdtZW50X3Zp' + 'c2liaWxpdHkYAyADKA4yHy52aWFtLmFwcC52MS5GcmFnbWVudFZpc2liaWxpdHlSEmZyYWdtZW' + '50VmlzaWJpbGl0eQ=='); @$core.Deprecated('Use listFragmentsResponseDescriptor instead') const ListFragmentsResponse$json = { @@ -1386,9 +1408,11 @@ const UpdateFragmentRequest$json = { {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'config', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '10': 'config'}, {'1': 'public', '3': 4, '4': 1, '5': 8, '9': 0, '10': 'public', '17': true}, + {'1': 'visibility', '3': 5, '4': 1, '5': 14, '6': '.viam.app.v1.FragmentVisibility', '9': 1, '10': 'visibility', '17': true}, ], '8': [ {'1': '_public'}, + {'1': '_visibility'}, ], }; @@ -1396,7 +1420,9 @@ const UpdateFragmentRequest$json = { final $typed_data.Uint8List updateFragmentRequestDescriptor = $convert.base64Decode( 'ChVVcGRhdGVGcmFnbWVudFJlcXVlc3QSDgoCaWQYASABKAlSAmlkEhIKBG5hbWUYAiABKAlSBG' '5hbWUSLwoGY29uZmlnGAMgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdFIGY29uZmlnEhsK' - 'BnB1YmxpYxgEIAEoCEgAUgZwdWJsaWOIAQFCCQoHX3B1YmxpYw=='); + 'BnB1YmxpYxgEIAEoCEgAUgZwdWJsaWOIAQESRAoKdmlzaWJpbGl0eRgFIAEoDjIfLnZpYW0uYX' + 'BwLnYxLkZyYWdtZW50VmlzaWJpbGl0eUgBUgp2aXNpYmlsaXR5iAEBQgkKB19wdWJsaWNCDQoL' + 'X3Zpc2liaWxpdHk='); @$core.Deprecated('Use updateFragmentResponseDescriptor instead') const UpdateFragmentResponse$json = { @@ -1829,23 +1855,41 @@ const MLModelMetadata$json = { final $typed_data.Uint8List mLModelMetadataDescriptor = $convert.base64Decode( 'Cg9NTE1vZGVsTWV0YWRhdGESGgoIdmVyc2lvbnMYASADKAlSCHZlcnNpb25z'); +@$core.Deprecated('Use mLTrainingVersionDescriptor instead') +const MLTrainingVersion$json = { + '1': 'MLTrainingVersion', + '2': [ + {'1': 'version', '3': 1, '4': 1, '5': 9, '10': 'version'}, + {'1': 'created_on', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdOn'}, + ], +}; + +/// Descriptor for `MLTrainingVersion`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List mLTrainingVersionDescriptor = $convert.base64Decode( + 'ChFNTFRyYWluaW5nVmVyc2lvbhIYCgd2ZXJzaW9uGAEgASgJUgd2ZXJzaW9uEjkKCmNyZWF0ZW' + 'Rfb24YAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkT24='); + @$core.Deprecated('Use mLTrainingMetadataDescriptor instead') const MLTrainingMetadata$json = { '1': 'MLTrainingMetadata', '2': [ - {'1': 'versions', '3': 1, '4': 3, '5': 9, '10': 'versions'}, + {'1': 'versions', '3': 5, '4': 3, '5': 11, '6': '.viam.app.v1.MLTrainingVersion', '10': 'versions'}, {'1': 'model_type', '3': 2, '4': 1, '5': 14, '6': '.viam.app.mltraining.v1.ModelType', '10': 'modelType'}, {'1': 'model_framework', '3': 3, '4': 1, '5': 14, '6': '.viam.app.mltraining.v1.ModelFramework', '10': 'modelFramework'}, {'1': 'draft', '3': 4, '4': 1, '5': 8, '10': 'draft'}, ], + '9': [ + {'1': 1, '2': 2}, + ], }; /// Descriptor for `MLTrainingMetadata`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List mLTrainingMetadataDescriptor = $convert.base64Decode( - 'ChJNTFRyYWluaW5nTWV0YWRhdGESGgoIdmVyc2lvbnMYASADKAlSCHZlcnNpb25zEkAKCm1vZG' - 'VsX3R5cGUYAiABKA4yIS52aWFtLmFwcC5tbHRyYWluaW5nLnYxLk1vZGVsVHlwZVIJbW9kZWxU' - 'eXBlEk8KD21vZGVsX2ZyYW1ld29yaxgDIAEoDjImLnZpYW0uYXBwLm1sdHJhaW5pbmcudjEuTW' - '9kZWxGcmFtZXdvcmtSDm1vZGVsRnJhbWV3b3JrEhQKBWRyYWZ0GAQgASgIUgVkcmFmdA=='); + 'ChJNTFRyYWluaW5nTWV0YWRhdGESOgoIdmVyc2lvbnMYBSADKAsyHi52aWFtLmFwcC52MS5NTF' + 'RyYWluaW5nVmVyc2lvblIIdmVyc2lvbnMSQAoKbW9kZWxfdHlwZRgCIAEoDjIhLnZpYW0uYXBw' + 'Lm1sdHJhaW5pbmcudjEuTW9kZWxUeXBlUgltb2RlbFR5cGUSTwoPbW9kZWxfZnJhbWV3b3JrGA' + 'MgASgOMiYudmlhbS5hcHAubWx0cmFpbmluZy52MS5Nb2RlbEZyYW1ld29ya1IObW9kZWxGcmFt' + 'ZXdvcmsSFAoFZHJhZnQYBCABKAhSBWRyYWZ0SgQIARAC'); @$core.Deprecated('Use registryItemDescriptor instead') const RegistryItem$json = { @@ -2384,6 +2428,33 @@ const DeleteKeyResponse$json = { final $typed_data.Uint8List deleteKeyResponseDescriptor = $convert.base64Decode( 'ChFEZWxldGVLZXlSZXNwb25zZQ=='); +@$core.Deprecated('Use renameKeyRequestDescriptor instead') +const RenameKeyRequest$json = { + '1': 'RenameKeyRequest', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `RenameKeyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List renameKeyRequestDescriptor = $convert.base64Decode( + 'ChBSZW5hbWVLZXlSZXF1ZXN0Eg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1l'); + +@$core.Deprecated('Use renameKeyResponseDescriptor instead') +const RenameKeyResponse$json = { + '1': 'RenameKeyResponse', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `RenameKeyResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List renameKeyResponseDescriptor = $convert.base64Decode( + 'ChFSZW5hbWVLZXlSZXNwb25zZRIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbmFtZQ' + '=='); + @$core.Deprecated('Use authorizationDetailsDescriptor instead') const AuthorizationDetails$json = { '1': 'AuthorizationDetails', diff --git a/lib/src/gen/app/v1/end_user.pb.dart b/lib/src/gen/app/v1/end_user.pb.dart index 1812631013..f6a1675c71 100644 --- a/lib/src/gen/app/v1/end_user.pb.dart +++ b/lib/src/gen/app/v1/end_user.pb.dart @@ -258,7 +258,7 @@ class RegisterAuthApplicationResponse extends $pb.GeneratedMessage { factory RegisterAuthApplicationResponse({ $core.String? applicationId, $core.String? applicationName, - $core.String? secret, + $core.String? clientSecret, }) { final $result = create(); if (applicationId != null) { @@ -267,8 +267,8 @@ class RegisterAuthApplicationResponse extends $pb.GeneratedMessage { if (applicationName != null) { $result.applicationName = applicationName; } - if (secret != null) { - $result.secret = secret; + if (clientSecret != null) { + $result.clientSecret = clientSecret; } return $result; } @@ -279,7 +279,7 @@ class RegisterAuthApplicationResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RegisterAuthApplicationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'applicationId') ..aOS(2, _omitFieldNames ? '' : 'applicationName') - ..aOS(3, _omitFieldNames ? '' : 'secret') + ..aOS(3, _omitFieldNames ? '' : 'clientSecret') ..hasRequiredFields = false ; @@ -323,13 +323,13 @@ class RegisterAuthApplicationResponse extends $pb.GeneratedMessage { void clearApplicationName() => clearField(2); @$pb.TagNumber(3) - $core.String get secret => $_getSZ(2); + $core.String get clientSecret => $_getSZ(2); @$pb.TagNumber(3) - set secret($core.String v) { $_setString(2, v); } + set clientSecret($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) - $core.bool hasSecret() => $_has(2); + $core.bool hasClientSecret() => $_has(2); @$pb.TagNumber(3) - void clearSecret() => clearField(3); + void clearClientSecret() => clearField(3); } class UpdateAuthApplicationRequest extends $pb.GeneratedMessage { @@ -504,6 +504,178 @@ class UpdateAuthApplicationResponse extends $pb.GeneratedMessage { void clearApplicationName() => clearField(2); } +class GetAuthApplicationRequest extends $pb.GeneratedMessage { + factory GetAuthApplicationRequest({ + $core.String? orgId, + $core.String? applicationId, + }) { + final $result = create(); + if (orgId != null) { + $result.orgId = orgId; + } + if (applicationId != null) { + $result.applicationId = applicationId; + } + return $result; + } + GetAuthApplicationRequest._() : super(); + factory GetAuthApplicationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetAuthApplicationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetAuthApplicationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'orgId') + ..aOS(2, _omitFieldNames ? '' : 'applicationId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetAuthApplicationRequest clone() => GetAuthApplicationRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetAuthApplicationRequest copyWith(void Function(GetAuthApplicationRequest) updates) => super.copyWith((message) => updates(message as GetAuthApplicationRequest)) as GetAuthApplicationRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetAuthApplicationRequest create() => GetAuthApplicationRequest._(); + GetAuthApplicationRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetAuthApplicationRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetAuthApplicationRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get orgId => $_getSZ(0); + @$pb.TagNumber(1) + set orgId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOrgId() => $_has(0); + @$pb.TagNumber(1) + void clearOrgId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get applicationId => $_getSZ(1); + @$pb.TagNumber(2) + set applicationId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasApplicationId() => $_has(1); + @$pb.TagNumber(2) + void clearApplicationId() => clearField(2); +} + +class GetAuthApplicationResponse extends $pb.GeneratedMessage { + factory GetAuthApplicationResponse({ + $core.String? applicationId, + $core.String? applicationName, + $core.String? clientSecret, + $core.Iterable<$core.String>? originUris, + $core.Iterable<$core.String>? redirectUris, + $core.String? logoutUri, + }) { + final $result = create(); + if (applicationId != null) { + $result.applicationId = applicationId; + } + if (applicationName != null) { + $result.applicationName = applicationName; + } + if (clientSecret != null) { + $result.clientSecret = clientSecret; + } + if (originUris != null) { + $result.originUris.addAll(originUris); + } + if (redirectUris != null) { + $result.redirectUris.addAll(redirectUris); + } + if (logoutUri != null) { + $result.logoutUri = logoutUri; + } + return $result; + } + GetAuthApplicationResponse._() : super(); + factory GetAuthApplicationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetAuthApplicationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetAuthApplicationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.app.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'applicationId') + ..aOS(2, _omitFieldNames ? '' : 'applicationName') + ..aOS(3, _omitFieldNames ? '' : 'clientSecret') + ..pPS(4, _omitFieldNames ? '' : 'originUris') + ..pPS(5, _omitFieldNames ? '' : 'redirectUris') + ..aOS(6, _omitFieldNames ? '' : 'logoutUri') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetAuthApplicationResponse clone() => GetAuthApplicationResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetAuthApplicationResponse copyWith(void Function(GetAuthApplicationResponse) updates) => super.copyWith((message) => updates(message as GetAuthApplicationResponse)) as GetAuthApplicationResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetAuthApplicationResponse create() => GetAuthApplicationResponse._(); + GetAuthApplicationResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetAuthApplicationResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetAuthApplicationResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get applicationId => $_getSZ(0); + @$pb.TagNumber(1) + set applicationId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasApplicationId() => $_has(0); + @$pb.TagNumber(1) + void clearApplicationId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get applicationName => $_getSZ(1); + @$pb.TagNumber(2) + set applicationName($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasApplicationName() => $_has(1); + @$pb.TagNumber(2) + void clearApplicationName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get clientSecret => $_getSZ(2); + @$pb.TagNumber(3) + set clientSecret($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasClientSecret() => $_has(2); + @$pb.TagNumber(3) + void clearClientSecret() => clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.String> get originUris => $_getList(3); + + @$pb.TagNumber(5) + $core.List<$core.String> get redirectUris => $_getList(4); + + @$pb.TagNumber(6) + $core.String get logoutUri => $_getSZ(5); + @$pb.TagNumber(6) + set logoutUri($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasLogoutUri() => $_has(5); + @$pb.TagNumber(6) + void clearLogoutUri() => clearField(6); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/gen/app/v1/end_user.pbgrpc.dart b/lib/src/gen/app/v1/end_user.pbgrpc.dart index 4ed525213a..e64022b58b 100644 --- a/lib/src/gen/app/v1/end_user.pbgrpc.dart +++ b/lib/src/gen/app/v1/end_user.pbgrpc.dart @@ -37,6 +37,10 @@ class EndUserServiceClient extends $grpc.Client { '/viam.app.v1.EndUserService/UpdateAuthApplication', ($4.UpdateAuthApplicationRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $4.UpdateAuthApplicationResponse.fromBuffer(value)); + static final _$getAuthApplication = $grpc.ClientMethod<$4.GetAuthApplicationRequest, $4.GetAuthApplicationResponse>( + '/viam.app.v1.EndUserService/GetAuthApplication', + ($4.GetAuthApplicationRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.GetAuthApplicationResponse.fromBuffer(value)); EndUserServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -59,6 +63,10 @@ class EndUserServiceClient extends $grpc.Client { $grpc.ResponseFuture<$4.UpdateAuthApplicationResponse> updateAuthApplication($4.UpdateAuthApplicationRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateAuthApplication, request, options: options); } + + $grpc.ResponseFuture<$4.GetAuthApplicationResponse> getAuthApplication($4.GetAuthApplicationRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getAuthApplication, request, options: options); + } } @$pb.GrpcServiceName('viam.app.v1.EndUserService') @@ -94,6 +102,13 @@ abstract class EndUserServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $4.UpdateAuthApplicationRequest.fromBuffer(value), ($4.UpdateAuthApplicationResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$4.GetAuthApplicationRequest, $4.GetAuthApplicationResponse>( + 'GetAuthApplication', + getAuthApplication_Pre, + false, + false, + ($core.List<$core.int> value) => $4.GetAuthApplicationRequest.fromBuffer(value), + ($4.GetAuthApplicationResponse value) => value.writeToBuffer())); } $async.Future<$4.IsLegalAcceptedResponse> isLegalAccepted_Pre($grpc.ServiceCall call, $async.Future<$4.IsLegalAcceptedRequest> request) async { @@ -112,8 +127,13 @@ abstract class EndUserServiceBase extends $grpc.Service { return updateAuthApplication(call, await request); } + $async.Future<$4.GetAuthApplicationResponse> getAuthApplication_Pre($grpc.ServiceCall call, $async.Future<$4.GetAuthApplicationRequest> request) async { + return getAuthApplication(call, await request); + } + $async.Future<$4.IsLegalAcceptedResponse> isLegalAccepted($grpc.ServiceCall call, $4.IsLegalAcceptedRequest request); $async.Future<$4.AcceptLegalResponse> acceptLegal($grpc.ServiceCall call, $4.AcceptLegalRequest request); $async.Future<$4.RegisterAuthApplicationResponse> registerAuthApplication($grpc.ServiceCall call, $4.RegisterAuthApplicationRequest request); $async.Future<$4.UpdateAuthApplicationResponse> updateAuthApplication($grpc.ServiceCall call, $4.UpdateAuthApplicationRequest request); + $async.Future<$4.GetAuthApplicationResponse> getAuthApplication($grpc.ServiceCall call, $4.GetAuthApplicationRequest request); } diff --git a/lib/src/gen/app/v1/end_user.pbjson.dart b/lib/src/gen/app/v1/end_user.pbjson.dart index 6bc23b66de..2c9fb1d812 100644 --- a/lib/src/gen/app/v1/end_user.pbjson.dart +++ b/lib/src/gen/app/v1/end_user.pbjson.dart @@ -78,7 +78,7 @@ const RegisterAuthApplicationResponse$json = { '2': [ {'1': 'application_id', '3': 1, '4': 1, '5': 9, '10': 'applicationId'}, {'1': 'application_name', '3': 2, '4': 1, '5': 9, '10': 'applicationName'}, - {'1': 'secret', '3': 3, '4': 1, '5': 9, '10': 'secret'}, + {'1': 'client_secret', '3': 3, '4': 1, '5': 9, '10': 'clientSecret'}, ], }; @@ -86,7 +86,7 @@ const RegisterAuthApplicationResponse$json = { final $typed_data.Uint8List registerAuthApplicationResponseDescriptor = $convert.base64Decode( 'Ch9SZWdpc3RlckF1dGhBcHBsaWNhdGlvblJlc3BvbnNlEiUKDmFwcGxpY2F0aW9uX2lkGAEgAS' 'gJUg1hcHBsaWNhdGlvbklkEikKEGFwcGxpY2F0aW9uX25hbWUYAiABKAlSD2FwcGxpY2F0aW9u' - 'TmFtZRIWCgZzZWNyZXQYAyABKAlSBnNlY3JldA=='); + 'TmFtZRIjCg1jbGllbnRfc2VjcmV0GAMgASgJUgxjbGllbnRTZWNyZXQ='); @$core.Deprecated('Use updateAuthApplicationRequestDescriptor instead') const UpdateAuthApplicationRequest$json = { @@ -124,3 +124,38 @@ final $typed_data.Uint8List updateAuthApplicationResponseDescriptor = $convert.b 'INYXBwbGljYXRpb25JZBIpChBhcHBsaWNhdGlvbl9uYW1lGAIgASgJUg9hcHBsaWNhdGlvbk5h' 'bWU='); +@$core.Deprecated('Use getAuthApplicationRequestDescriptor instead') +const GetAuthApplicationRequest$json = { + '1': 'GetAuthApplicationRequest', + '2': [ + {'1': 'org_id', '3': 1, '4': 1, '5': 9, '10': 'orgId'}, + {'1': 'application_id', '3': 2, '4': 1, '5': 9, '10': 'applicationId'}, + ], +}; + +/// Descriptor for `GetAuthApplicationRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getAuthApplicationRequestDescriptor = $convert.base64Decode( + 'ChlHZXRBdXRoQXBwbGljYXRpb25SZXF1ZXN0EhUKBm9yZ19pZBgBIAEoCVIFb3JnSWQSJQoOYX' + 'BwbGljYXRpb25faWQYAiABKAlSDWFwcGxpY2F0aW9uSWQ='); + +@$core.Deprecated('Use getAuthApplicationResponseDescriptor instead') +const GetAuthApplicationResponse$json = { + '1': 'GetAuthApplicationResponse', + '2': [ + {'1': 'application_id', '3': 1, '4': 1, '5': 9, '10': 'applicationId'}, + {'1': 'application_name', '3': 2, '4': 1, '5': 9, '10': 'applicationName'}, + {'1': 'client_secret', '3': 3, '4': 1, '5': 9, '10': 'clientSecret'}, + {'1': 'origin_uris', '3': 4, '4': 3, '5': 9, '10': 'originUris'}, + {'1': 'redirect_uris', '3': 5, '4': 3, '5': 9, '10': 'redirectUris'}, + {'1': 'logout_uri', '3': 6, '4': 1, '5': 9, '10': 'logoutUri'}, + ], +}; + +/// Descriptor for `GetAuthApplicationResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getAuthApplicationResponseDescriptor = $convert.base64Decode( + 'ChpHZXRBdXRoQXBwbGljYXRpb25SZXNwb25zZRIlCg5hcHBsaWNhdGlvbl9pZBgBIAEoCVINYX' + 'BwbGljYXRpb25JZBIpChBhcHBsaWNhdGlvbl9uYW1lGAIgASgJUg9hcHBsaWNhdGlvbk5hbWUS' + 'IwoNY2xpZW50X3NlY3JldBgDIAEoCVIMY2xpZW50U2VjcmV0Eh8KC29yaWdpbl91cmlzGAQgAy' + 'gJUgpvcmlnaW5VcmlzEiMKDXJlZGlyZWN0X3VyaXMYBSADKAlSDHJlZGlyZWN0VXJpcxIdCgps' + 'b2dvdXRfdXJpGAYgASgJUglsb2dvdXRVcmk='); + diff --git a/lib/src/gen/app/v1/robot.pbjson.dart b/lib/src/gen/app/v1/robot.pbjson.dart index fcf3c3fdb3..e64c4b6859 100644 --- a/lib/src/gen/app/v1/robot.pbjson.dart +++ b/lib/src/gen/app/v1/robot.pbjson.dart @@ -48,14 +48,13 @@ const RobotConfig$json = { {'1': 'disable_partial_start', '3': 10, '4': 1, '5': 8, '9': 3, '10': 'disablePartialStart', '17': true}, {'1': 'packages', '3': 11, '4': 3, '5': 11, '6': '.viam.app.v1.PackageConfig', '10': 'packages'}, {'1': 'overwrite_fragment_status', '3': 12, '4': 3, '5': 11, '6': '.viam.app.v1.AppValidationStatus', '10': 'overwriteFragmentStatus'}, - {'1': 'enable_web_profile', '3': 13, '4': 1, '5': 8, '9': 4, '10': 'enableWebProfile', '17': true}, + {'1': 'enable_web_profile', '3': 13, '4': 1, '5': 8, '10': 'enableWebProfile'}, ], '8': [ {'1': '_network'}, {'1': '_auth'}, {'1': '_debug'}, {'1': '_disable_partial_start'}, - {'1': '_enable_web_profile'}, ], }; @@ -73,9 +72,9 @@ final $typed_data.Uint8List robotConfigDescriptor = $convert.base64Decode( 'N0YXJ0GAogASgISANSE2Rpc2FibGVQYXJ0aWFsU3RhcnSIAQESNgoIcGFja2FnZXMYCyADKAsy' 'Gi52aWFtLmFwcC52MS5QYWNrYWdlQ29uZmlnUghwYWNrYWdlcxJcChlvdmVyd3JpdGVfZnJhZ2' '1lbnRfc3RhdHVzGAwgAygLMiAudmlhbS5hcHAudjEuQXBwVmFsaWRhdGlvblN0YXR1c1IXb3Zl' - 'cndyaXRlRnJhZ21lbnRTdGF0dXMSMQoSZW5hYmxlX3dlYl9wcm9maWxlGA0gASgISARSEGVuYW' - 'JsZVdlYlByb2ZpbGWIAQFCCgoIX25ldHdvcmtCBwoFX2F1dGhCCAoGX2RlYnVnQhgKFl9kaXNh' - 'YmxlX3BhcnRpYWxfc3RhcnRCFQoTX2VuYWJsZV93ZWJfcHJvZmlsZQ=='); + 'cndyaXRlRnJhZ21lbnRTdGF0dXMSLAoSZW5hYmxlX3dlYl9wcm9maWxlGA0gASgIUhBlbmFibG' + 'VXZWJQcm9maWxlQgoKCF9uZXR3b3JrQgcKBV9hdXRoQggKBl9kZWJ1Z0IYChZfZGlzYWJsZV9w' + 'YXJ0aWFsX3N0YXJ0'); @$core.Deprecated('Use locationSecretDescriptor instead') const LocationSecret$json = { diff --git a/lib/src/gen/component/motor/v1/motor.pb.dart b/lib/src/gen/component/motor/v1/motor.pb.dart index 55be27b65e..c154f3c966 100644 --- a/lib/src/gen/component/motor/v1/motor.pb.dart +++ b/lib/src/gen/component/motor/v1/motor.pb.dart @@ -390,6 +390,121 @@ class GoToResponse extends $pb.GeneratedMessage { static GoToResponse? _defaultInstance; } +class SetRPMRequest extends $pb.GeneratedMessage { + factory SetRPMRequest({ + $core.String? name, + $core.double? rpm, + $2.Struct? extra, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (rpm != null) { + $result.rpm = rpm; + } + if (extra != null) { + $result.extra = extra; + } + return $result; + } + SetRPMRequest._() : super(); + factory SetRPMRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SetRPMRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SetRPMRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.component.motor.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..a<$core.double>(2, _omitFieldNames ? '' : 'rpm', $pb.PbFieldType.OD) + ..aOM<$2.Struct>(99, _omitFieldNames ? '' : 'extra', subBuilder: $2.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') + SetRPMRequest clone() => SetRPMRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SetRPMRequest copyWith(void Function(SetRPMRequest) updates) => super.copyWith((message) => updates(message as SetRPMRequest)) as SetRPMRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetRPMRequest create() => SetRPMRequest._(); + SetRPMRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SetRPMRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SetRPMRequest? _defaultInstance; + + /// Name of a motor + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + /// Speed of motor travel in rotations per minute + @$pb.TagNumber(2) + $core.double get rpm => $_getN(1); + @$pb.TagNumber(2) + set rpm($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasRpm() => $_has(1); + @$pb.TagNumber(2) + void clearRpm() => clearField(2); + + /// Additional arguments to the method + @$pb.TagNumber(99) + $2.Struct get extra => $_getN(2); + @$pb.TagNumber(99) + set extra($2.Struct v) { setField(99, v); } + @$pb.TagNumber(99) + $core.bool hasExtra() => $_has(2); + @$pb.TagNumber(99) + void clearExtra() => clearField(99); + @$pb.TagNumber(99) + $2.Struct ensureExtra() => $_ensure(2); +} + +class SetRPMResponse extends $pb.GeneratedMessage { + factory SetRPMResponse() => create(); + SetRPMResponse._() : super(); + factory SetRPMResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SetRPMResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SetRPMResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.component.motor.v1'), createEmptyInstance: 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') + SetRPMResponse clone() => SetRPMResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SetRPMResponse copyWith(void Function(SetRPMResponse) updates) => super.copyWith((message) => updates(message as SetRPMResponse)) as SetRPMResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetRPMResponse create() => SetRPMResponse._(); + SetRPMResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SetRPMResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SetRPMResponse? _defaultInstance; +} + class ResetZeroPositionRequest extends $pb.GeneratedMessage { factory ResetZeroPositionRequest({ $core.String? name, diff --git a/lib/src/gen/component/motor/v1/motor.pbgrpc.dart b/lib/src/gen/component/motor/v1/motor.pbgrpc.dart index 21aa4ec85e..f0452f05ae 100644 --- a/lib/src/gen/component/motor/v1/motor.pbgrpc.dart +++ b/lib/src/gen/component/motor/v1/motor.pbgrpc.dart @@ -34,6 +34,10 @@ class MotorServiceClient extends $grpc.Client { '/viam.component.motor.v1.MotorService/GoTo', ($0.GoToRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GoToResponse.fromBuffer(value)); + static final _$setRPM = $grpc.ClientMethod<$0.SetRPMRequest, $0.SetRPMResponse>( + '/viam.component.motor.v1.MotorService/SetRPM', + ($0.SetRPMRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SetRPMResponse.fromBuffer(value)); static final _$resetZeroPosition = $grpc.ClientMethod<$0.ResetZeroPositionRequest, $0.ResetZeroPositionResponse>( '/viam.component.motor.v1.MotorService/ResetZeroPosition', ($0.ResetZeroPositionRequest value) => value.writeToBuffer(), @@ -85,6 +89,10 @@ class MotorServiceClient extends $grpc.Client { return $createUnaryCall(_$goTo, request, options: options); } + $grpc.ResponseFuture<$0.SetRPMResponse> setRPM($0.SetRPMRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$setRPM, request, options: options); + } + $grpc.ResponseFuture<$0.ResetZeroPositionResponse> resetZeroPosition($0.ResetZeroPositionRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$resetZeroPosition, request, options: options); } @@ -144,6 +152,13 @@ abstract class MotorServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.GoToRequest.fromBuffer(value), ($0.GoToResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SetRPMRequest, $0.SetRPMResponse>( + 'SetRPM', + setRPM_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SetRPMRequest.fromBuffer(value), + ($0.SetRPMResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.ResetZeroPositionRequest, $0.ResetZeroPositionResponse>( 'ResetZeroPosition', resetZeroPosition_Pre, @@ -214,6 +229,10 @@ abstract class MotorServiceBase extends $grpc.Service { return goTo(call, await request); } + $async.Future<$0.SetRPMResponse> setRPM_Pre($grpc.ServiceCall call, $async.Future<$0.SetRPMRequest> request) async { + return setRPM(call, await request); + } + $async.Future<$0.ResetZeroPositionResponse> resetZeroPosition_Pre($grpc.ServiceCall call, $async.Future<$0.ResetZeroPositionRequest> request) async { return resetZeroPosition(call, await request); } @@ -249,6 +268,7 @@ abstract class MotorServiceBase extends $grpc.Service { $async.Future<$0.SetPowerResponse> setPower($grpc.ServiceCall call, $0.SetPowerRequest request); $async.Future<$0.GoForResponse> goFor($grpc.ServiceCall call, $0.GoForRequest request); $async.Future<$0.GoToResponse> goTo($grpc.ServiceCall call, $0.GoToRequest request); + $async.Future<$0.SetRPMResponse> setRPM($grpc.ServiceCall call, $0.SetRPMRequest request); $async.Future<$0.ResetZeroPositionResponse> resetZeroPosition($grpc.ServiceCall call, $0.ResetZeroPositionRequest request); $async.Future<$0.GetPositionResponse> getPosition($grpc.ServiceCall call, $0.GetPositionRequest request); $async.Future<$0.GetPropertiesResponse> getProperties($grpc.ServiceCall call, $0.GetPropertiesRequest request); diff --git a/lib/src/gen/component/motor/v1/motor.pbjson.dart b/lib/src/gen/component/motor/v1/motor.pbjson.dart index 716212c9ac..b437938420 100644 --- a/lib/src/gen/component/motor/v1/motor.pbjson.dart +++ b/lib/src/gen/component/motor/v1/motor.pbjson.dart @@ -90,6 +90,30 @@ const GoToResponse$json = { final $typed_data.Uint8List goToResponseDescriptor = $convert.base64Decode( 'CgxHb1RvUmVzcG9uc2U='); +@$core.Deprecated('Use setRPMRequestDescriptor instead') +const SetRPMRequest$json = { + '1': 'SetRPMRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'rpm', '3': 2, '4': 1, '5': 1, '10': 'rpm'}, + {'1': 'extra', '3': 99, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '10': 'extra'}, + ], +}; + +/// Descriptor for `SetRPMRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setRPMRequestDescriptor = $convert.base64Decode( + 'Cg1TZXRSUE1SZXF1ZXN0EhIKBG5hbWUYASABKAlSBG5hbWUSEAoDcnBtGAIgASgBUgNycG0SLQ' + 'oFZXh0cmEYYyABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0UgVleHRyYQ=='); + +@$core.Deprecated('Use setRPMResponseDescriptor instead') +const SetRPMResponse$json = { + '1': 'SetRPMResponse', +}; + +/// Descriptor for `SetRPMResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setRPMResponseDescriptor = $convert.base64Decode( + 'Cg5TZXRSUE1SZXNwb25zZQ=='); + @$core.Deprecated('Use resetZeroPositionRequestDescriptor instead') const ResetZeroPositionRequest$json = { '1': 'ResetZeroPositionRequest', diff --git a/lib/src/gen/service/slam/v1/slam.pb.dart b/lib/src/gen/service/slam/v1/slam.pb.dart index d6ad031c57..684d5dcbb0 100644 --- a/lib/src/gen/service/slam/v1/slam.pb.dart +++ b/lib/src/gen/service/slam/v1/slam.pb.dart @@ -14,7 +14,6 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import '../../../common/v1/common.pb.dart' as $1; -import '../../../google/protobuf/struct.pb.dart' as $2; import 'slam.pbenum.dart'; export 'slam.pbenum.dart'; @@ -73,19 +72,11 @@ class GetPositionRequest extends $pb.GeneratedMessage { class GetPositionResponse extends $pb.GeneratedMessage { factory GetPositionResponse({ $1.Pose? pose, - $core.String? componentReference, - $2.Struct? extra, }) { final $result = create(); if (pose != null) { $result.pose = pose; } - if (componentReference != null) { - $result.componentReference = componentReference; - } - if (extra != null) { - $result.extra = extra; - } return $result; } GetPositionResponse._() : super(); @@ -94,8 +85,6 @@ class GetPositionResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetPositionResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.service.slam.v1'), createEmptyInstance: create) ..aOM<$1.Pose>(1, _omitFieldNames ? '' : 'pose', subBuilder: $1.Pose.create) - ..aOS(2, _omitFieldNames ? '' : 'componentReference') - ..aOM<$2.Struct>(99, _omitFieldNames ? '' : 'extra', subBuilder: $2.Struct.create) ..hasRequiredFields = false ; @@ -131,28 +120,6 @@ class GetPositionResponse extends $pb.GeneratedMessage { void clearPose() => clearField(1); @$pb.TagNumber(1) $1.Pose ensurePose() => $_ensure(0); - - /// This is usually the name of the camera that is in the SLAM config - @$pb.TagNumber(2) - $core.String get componentReference => $_getSZ(1); - @$pb.TagNumber(2) - set componentReference($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasComponentReference() => $_has(1); - @$pb.TagNumber(2) - void clearComponentReference() => clearField(2); - - /// Additional information in the response - @$pb.TagNumber(99) - $2.Struct get extra => $_getN(2); - @$pb.TagNumber(99) - set extra($2.Struct v) { setField(99, v); } - @$pb.TagNumber(99) - $core.bool hasExtra() => $_has(2); - @$pb.TagNumber(99) - void clearExtra() => clearField(99); - @$pb.TagNumber(99) - $2.Struct ensureExtra() => $_ensure(2); } class GetPointCloudMapRequest extends $pb.GeneratedMessage { diff --git a/lib/src/gen/service/slam/v1/slam.pbjson.dart b/lib/src/gen/service/slam/v1/slam.pbjson.dart index dfe0cb2cf0..7205f4de36 100644 --- a/lib/src/gen/service/slam/v1/slam.pbjson.dart +++ b/lib/src/gen/service/slam/v1/slam.pbjson.dart @@ -62,16 +62,13 @@ const GetPositionResponse$json = { '1': 'GetPositionResponse', '2': [ {'1': 'pose', '3': 1, '4': 1, '5': 11, '6': '.viam.common.v1.Pose', '10': 'pose'}, - {'1': 'component_reference', '3': 2, '4': 1, '5': 9, '10': 'componentReference'}, - {'1': 'extra', '3': 99, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '10': 'extra'}, ], }; /// Descriptor for `GetPositionResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getPositionResponseDescriptor = $convert.base64Decode( 'ChNHZXRQb3NpdGlvblJlc3BvbnNlEigKBHBvc2UYASABKAsyFC52aWFtLmNvbW1vbi52MS5Qb3' - 'NlUgRwb3NlEi8KE2NvbXBvbmVudF9yZWZlcmVuY2UYAiABKAlSEmNvbXBvbmVudFJlZmVyZW5j' - 'ZRItCgVleHRyYRhjIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RSBWV4dHJh'); + 'NlUgRwb3Nl'); @$core.Deprecated('Use getPointCloudMapRequestDescriptor instead') const GetPointCloudMapRequest$json = { diff --git a/test/unit_test/components/motor_test.dart b/test/unit_test/components/motor_test.dart index 36d2000180..2956b49dac 100644 --- a/test/unit_test/components/motor_test.dart +++ b/test/unit_test/components/motor_test.dart @@ -42,6 +42,13 @@ class FakeMotor extends Motor { this.extra = extra; } + @override + Future setRPM(double rpm, {Map? extra}) async { + powered = true; + isStopped = false; + this.extra = extra; + } + @override Future isMoving({Map? extra}) async { this.extra = extra; @@ -121,6 +128,14 @@ void main() { expect(await motor.isMoving(), false); }); + test('setRPM', () async { + expect(await motor.position(), 0); + expect(await motor.isMoving(), false); + + await motor.setRPM(2); + expect(await motor.isMoving(), true); + }); + test('resetZeroPosition', () async { await motor.resetZeroPosition(20); expect(motor.motorOffset, 20); @@ -247,6 +262,18 @@ void main() { expect(await motor.isMoving(), false); }); + test('setRPM', () async { + final client = MotorServiceClient(channel); + final request = SetRPMRequest() + ..name = name + ..rpm = 3; + + expect(await motor.isMoving(), false); + + await client.setRPM(request); + expect(await motor.isMoving(), true); + }); + test('resetZeroPosition', () async { final client = MotorServiceClient(channel); final request = ResetZeroPositionRequest() @@ -368,6 +395,14 @@ void main() { expect(await client.isMoving(), false); }); + test('setRPM', () async { + final client = MotorClient(name, channel); + expect(await client.isMoving(), false); + + await client.setRPM(2); + expect(await client.isMoving(), true); + }); + test('resetZeroPosition', () async { final client = MotorClient(name, channel); await client.resetZeroPosition(20);