//
// Copyright 2020 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package fm;

message MessagingClientEvent {

  int64 project_number = 1;

  string message_id = 2;

  string instance_id = 3;

  enum MessageType {
    UNKNOWN = 0;
    DATA_MESSAGE = 1;
    TOPIC = 2;
    DISPLAY_NOTIFICATION = 3;
  }

  MessageType message_type = 4;

  enum SDKPlatform {
    UNKNOWN_OS = 0;
    ANDROID = 1;
    IOS = 2;
    WEB = 3;
  }

  SDKPlatform sdk_platform = 5;

  string package_name = 6;

  enum Event {
    UNKNOWN_EVENT = 0;
    MESSAGE_DELIVERED = 1;
    MESSAGE_OPEN = 2;
  }

  Event event = 12;

  string analytics_label = 13;

  int64 campaign_id = 14;

  string composer_label = 15;
}

message MessagingClientEventExtension {
  MessagingClientEvent messaging_client_event = 1;
}
