All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rion.eolaire-model.1.0.2.source-code.eolaire.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";

package truward.orion.user;

option java_package = "com.truward.orion.eolaire.model";
option java_outer_classname = "EolaireModel";

//
// Domain Types
//

message EntityType {
  int64 id = 1;
  string name = 2;
}

message Item {
  int64 id = 1;
  string name = 2;
  int64 itemTypeId = 3;
}

message ItemRelation {
  int64 targetItemId = 1;
  int64 relationTypeId = 2;
  Metadata metadata = 3;
}

message ItemGraph {
  Item item = 1;
  ItemRelation relations = 2;
}

enum VariantType {
  NULL = 0;

  BOOL_FALSE = 1;
  BOOL_TRUE = 2;

  INT32_ZERO = 3;
  INT64_ZERO = 4;
  FLOAT_ZERO = 5;
  DOUBLE_ZERO = 6;

  INT32 = 7;
  INT64 = 8;
  FLOAT = 9;
  DOUBLE = 10;

  STRING = 11;
  BYTES = 12;
}

message VariantValue {
  int32 intValue = 1;
  int64 longValue = 2;
  float floatValue = 3;
  double doubleValue = 4;
  string strValue = 5;
  bytes bytesValue = 7;
}

message MetadataEntry {
  string key = 1;
  VariantType type = 2;
  VariantValue value = 3;
}

message Metadata {
  MetadataEntry entries = 1;
}

/**
 * Optional profile
 */
message ItemProfile {
  int64 itemId = 1;
  string description = 2;
  int64 created = 3;
  int64 updated = 4;
  int64 flags = 5;
  Metadata metadata = 6;
}

//
// Service Messages
//

// Get Items

message GetItemsRequest {
  repeated int64 itemIds = 1;
}

message GetItemsResponse {
  repeated Item items = 2;
}

// Get Item Profile

message GetItemProfileResponse {
  ItemProfile profile = 1;
}

// Get particular entity type by name

message GetEntityTypeResponse {
  EntityType type = 2;
}

// Get all entity types

message GetAllEntityTypesRequest {
  string offsetToken = 1;
  int32 limit = 2;
}

message GetAllEntityTypesResponse {
  string offsetToken = 1;

  repeated EntityType types = 2;
}

// Query items by their types, e.g. get all 'books' or get all 'genres'

message GetItemByTypeRequest {
  string offsetToken = 1;
  int32 limit = 2;

  int64 itemTypeId = 3;
}

message GetItemByTypeResponse {
  string offsetToken = 1;

  repeated int64 itemIds = 2;
}

// Query items by their relations to the other items,
// e.g. get 'books' in 'genre': 'science_fiction'

message GetItemByRelationRequest {
  string offsetToken = 1;
  int32 limit = 2;

  int64 itemId = 3; // e.g. 'science_fiction'
  int64 relationTypeId = 4; // e.g. 'genre'
  int64 relatedItemTypeId = 5; // e.g. 'book' or just everything if omitted
}

message GetItemByRelationResponse {
  string offsetToken = 1;

  repeated int64 itemIds = 2;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy