GenerateOneGatewayWithServerUuid static method

Future<GatewayInfo> GenerateOneGatewayWithServerUuid(
  1. String uuid
)

Implementation

static Future<GatewayInfo> GenerateOneGatewayWithServerUuid(
    String uuid) async {
  String jwt = await getJWT();
  final channel = await Channel.getDefaultIoTManagerChannel();
  final stub = GatewayManagerClient(channel,
      options: CallOptions(metadata: {'jwt': jwt}));
  StringValue stringValue = StringValue();
  stringValue.value = uuid;
  GatewayInfo gatewayInfo =
      await stub.generateOneGatewayWithServerUuid(stringValue);
  print('RegisterUserWithUserInfo: ${gatewayInfo}');
  channel.shutdown();
  return gatewayInfo;
}