// Copyright (c) 2020, DCSO GmbH

syntax = "proto3";

package api;

option go_package = "github.com/DCSO/fever/stenosis/api";

// HateoasLink defines a HATEOAS link.
message HateoasLink {
	// Href maps link element can be mapped to an HTTP link.
	string href = 1;
	// Rel conveys the relation type.
	string rel = 2;
	// Type defines the HTTP method for the link element.
	string type = 3; 
	// Length is an optional element recommended for "enclosure" relations.
	int64 length = 4;
}

// Hateoas wraps a slice of (optional) HateoasLinks.
message Hateoas {
  // XLinks to avoid mingling with the automatic name assignment while 
  // maintaining REST API stability towards DCSO's portal.
  repeated HateoasLink _links = 1;
}
