blob: 5cf4e70e308e58ae640fd8555da7370c86014a3d [file] [log] [blame]
Scott Bakeredbb2322018-05-08 11:46:25 -07001option app_label = "simpleexampleservice";
2option name = "simpleexampleservice";
3
4message SimpleExampleService (Service){
5 option verbose_name = "Simple Example Service";
Scott Baker58723222019-01-24 07:56:12 -08006 option description = "Service that demonstrates integration with Kubernetes compute resources";
7
8 required string service_message = 1 [
9 help_text = "Service Message to display in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080010 max_length = 254];
Scott Baker58723222019-01-24 07:56:12 -080011 optional string service_secret = 2 [
Scott Baker8838dfe2019-03-12 14:28:57 -070012 help_text = "Service Secret to place in a file"];
Scott Bakeredbb2322018-05-08 11:46:25 -070013}
14
Scott Baker58723222019-01-24 07:56:12 -080015// Note: Named ColorNew to prevent name collision with ExampleService's Color.
16
Scott Bakeredbb2322018-05-08 11:46:25 -070017message ColorNew (XOSBase){
18 option verbose_name = "Color";
Scott Baker58723222019-01-24 07:56:12 -080019 option description = "An html color code that may be used to color a web page";
20
21 required string name = 1 [
22 help_text = "Name for this color",
Scott Baker06f77ad2019-03-08 13:37:54 -080023 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080024 required string html_code = 2 [
25 help_text = "HTML Code for this color",
Scott Baker06f77ad2019-03-08 13:37:54 -080026 max_length = 256];
Scott Bakeredbb2322018-05-08 11:46:25 -070027}
28
Scott Bakered94fc42018-12-20 06:57:49 -080029// Note: Named ServiceInstanceWithCompute2 to prevent name collision with ExampleService.ServiceInstanceWithCompute.
30// Expect this model to eventually move to the core.
31
32message ServiceInstanceWithCompute2 (ServiceInstance) {
Scott Baker58723222019-01-24 07:56:12 -080033 option description = "ServiceInstance with relation to a ComputeServiceInstance";
34
35 optional manytoone compute_instance->ComputeServiceInstance:service_instance_with_computes = 1:1001 [
36 help_text = "ComputeServiceInstance that holds compute resources for this ServiceInstance",
Scott Baker8838dfe2019-03-12 14:28:57 -070037 db_index=True];
Scott Bakeredbb2322018-05-08 11:46:25 -070038}
39
Scott Bakered94fc42018-12-20 06:57:49 -080040message SimpleExampleServiceInstance (ServiceInstanceWithCompute2){
Scott Bakeredbb2322018-05-08 11:46:25 -070041 option verbose_name = "Example Service Instance";
Scott Baker58723222019-01-24 07:56:12 -080042 option description = "Tenancy in SimpleExampleService, represents a web server that serves one page";
43
44 required string tenant_message = 1 [
45 help_text = "Tenant Message to Display",
Scott Baker06f77ad2019-03-08 13:37:54 -080046 max_length = 254];
Scott Baker58723222019-01-24 07:56:12 -080047 optional manytoone foreground_color->ColorNew:serviceinstance_foreground_colors = 2:1001 [
48 help_text = "Foreground color to use in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080049 db_index = True];
Scott Baker58723222019-01-24 07:56:12 -080050 optional manytoone background_color->ColorNew:serviceinstance_background_colors = 3:1002 [
51 help_text = "Background color to use in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080052 db_index = True];
Scott Baker58723222019-01-24 07:56:12 -080053 optional string tenant_secret = 4 [
Scott Baker8838dfe2019-03-12 14:28:57 -070054 help_text = "Tenant Secret to place in a file"];
Scott Bakeredbb2322018-05-08 11:46:25 -070055}
56
Scott Baker58723222019-01-24 07:56:12 -080057// Note: Named EmbeddedImageNew to prevent name collision with ExampleService's EmbeddedImage.
58
Scott Bakeredbb2322018-05-08 11:46:25 -070059message EmbeddedImageNew (XOSBase){
60 option verbose_name = "Embedded Image";
Scott Baker58723222019-01-24 07:56:12 -080061 option description = "An embedded image that may be placed in a web page";
62
63 required string name = 1 [
64 help_text = "Name for this image",
Scott Baker06f77ad2019-03-08 13:37:54 -080065 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080066 required string url = 2 [
67 help_text = "URL for this image",
Scott Baker06f77ad2019-03-08 13:37:54 -080068 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080069 optional manytoone serviceinstance->SimpleExampleServiceInstance:embedded_images = 3:1001 [
70 help_text = "ServiceInstance that represents the web page where this embedded image should be placed",
Scott Baker06f77ad2019-03-08 13:37:54 -080071 db_index = True];
Scott Bakeredbb2322018-05-08 11:46:25 -070072}