/**
 * Huan(202110): Deprecated
 *  - use Puppet.Download / Puppet.Upload
 *  - use DownloadResponse & UploadRequest to streaming chunks
 *
 * This file will be removed after Dec 31, 2022
 */
syntax = "proto3";
package wechaty.puppet;

option go_package       = "github.com/wechaty/go-grpc/wechaty/puppet";
option csharp_namespace = "github.wechaty.grpc.puppet";

import "google/protobuf/wrappers.proto";
import "wechaty/puppet/image.proto";

message FileBoxChunk {
  /**
   * Huan(202110): `oneof xxx {}` seems equal with `optional`?
   *  to be confirmed.
   */
  // oneof payload {
  optional bytes data  = 1;
  optional string name = 2;
  // }
}

message MessageImageStreamRequest {
  string    id   = 1;
  ImageType type = 2;
}
message MessageImageStreamResponse {
  FileBoxChunk file_box_chunk = 1;
}

message MessageFileStreamRequest {
  string id = 1;
}
message MessageFileStreamResponse {
  FileBoxChunk file_box_chunk = 1;
}

message MessageSendFileStreamRequest {
  /**
   * Huan(202110): `oneof xxx {}` seems equal with `optional`?
   *  to be confirmed.
   */
  // oneof payload {
  optional string conversation_id      = 1;
  optional FileBoxChunk file_box_chunk = 2;
  // };
}
message MessageSendFileStreamResponse {
  /**
   * @deprecated:
   *  Huan(202109): Wrapper types must not be used going forward.
   *    https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields
   */
  google.protobuf.StringValue id_string_value_deprecated = 1 [deprecated = true]; // Deprecated after Sep 31, 2021, will be removed after Dec 31, 2022
  string id = 2;
}
