syntax = "proto3";

package com.wixpress.appservice.api;
import "wix/api/validations.proto";
import "wix/api/entity.proto";
import "wix/api/annotations.proto";

message Monitoring {

  enum Type {
    UNKNOWN_PROVIDER = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
    SENTRY = 1;
    PANORAMA = 2;
  }

  message Project {
    // Group id (e.g. com.wixpress)
    string group_id = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];

    // Short artifact id
    string artifact_id = 2 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];

    // Build fingerprint
    string fingerprint = 3 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];
  }
  
  message SentryOptions {
    // The sentry DSN
    string dsn = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 255];
  }
  
  message PanoramaOptions {
    // Sentry config
    SentryOptions sentry = 1;

    // Project config
    Project project = 2;
  }

  // Provider type
  Type type = 1;

  oneof options {
    option (.wix.api.aligned_with_enum).field = "type";

    // Sentry provider options
    SentryOptions sentry_options = 2;

    // Panorama provider options
    PanoramaOptions panorama_options = 3;
  }
}
