syntax = "proto2";

package DataShield;

option java_package = "org.obiba.opal.web.model";

message DataShieldProfileDto {
  required string name = 1;
  required string cluster = 2;
  required bool enabled = 3;
  required bool restrictedAccess = 4;
  optional string rParser = 5;
}

message DataShieldMethodDto {
  required string name = 1;
  extensions 1000 to max;
}

message DataShieldROptionDto {
  required string name = 1;
  required string value = 2;
}

message RFunctionDataShieldMethodDto {
  required string func = 1;
  optional string rPackage = 2;
  optional string version = 3;
  extend DataShieldMethodDto {
    optional RFunctionDataShieldMethodDto method = 1000;
  }
}

message RScriptDataShieldMethodDto {
  required string script = 1;
  extend DataShieldMethodDto {
    optional RScriptDataShieldMethodDto method = 1001;
  }
}

message DataShieldPackageMethodsDto {
  required string name = 1;
  repeated DataShieldMethodDto aggregate = 2;
  repeated DataShieldMethodDto assign = 3;
}