blob: 1fe1420bc8291c8b9cb3f5d3ef334a7da8e922a4 [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",
10 blank = False,
11 db_index = False,
12 max_length = 254,
13 null = False];
14 optional string service_secret = 2 [
15 help_text = "Service Secret to place in a file",
16 blank = True,
17 db_index = False,
18 null = False];
Scott Bakeredbb2322018-05-08 11:46:25 -070019}
20
Scott Baker58723222019-01-24 07:56:12 -080021// Note: Named ColorNew to prevent name collision with ExampleService's Color.
22
Scott Bakeredbb2322018-05-08 11:46:25 -070023message ColorNew (XOSBase){
24 option verbose_name = "Color";
Scott Baker58723222019-01-24 07:56:12 -080025 option description = "An html color code that may be used to color a web page";
26
27 required string name = 1 [
28 help_text = "Name for this color",
29 blank = False,
30 db_index = False,
31 max_length = 256,
32 null = False];
33 required string html_code = 2 [
34 help_text = "HTML Code for this color",
35 blank = False,
36 db_index = False,
37 max_length = 256,
38 null = False];
Scott Bakeredbb2322018-05-08 11:46:25 -070039}
40
Scott Bakered94fc42018-12-20 06:57:49 -080041// Note: Named ServiceInstanceWithCompute2 to prevent name collision with ExampleService.ServiceInstanceWithCompute.
42// Expect this model to eventually move to the core.
43
44message ServiceInstanceWithCompute2 (ServiceInstance) {
Scott Baker58723222019-01-24 07:56:12 -080045 option description = "ServiceInstance with relation to a ComputeServiceInstance";
46
47 optional manytoone compute_instance->ComputeServiceInstance:service_instance_with_computes = 1:1001 [
48 help_text = "ComputeServiceInstance that holds compute resources for this ServiceInstance",
49 blank=True,
50 db_index=True,
51 null=True];
Scott Bakeredbb2322018-05-08 11:46:25 -070052}
53
Scott Bakered94fc42018-12-20 06:57:49 -080054message SimpleExampleServiceInstance (ServiceInstanceWithCompute2){
Scott Bakeredbb2322018-05-08 11:46:25 -070055 option verbose_name = "Example Service Instance";
Scott Baker58723222019-01-24 07:56:12 -080056 option description = "Tenancy in SimpleExampleService, represents a web server that serves one page";
57
58 required string tenant_message = 1 [
59 help_text = "Tenant Message to Display",
60 blank = False,
61 db_index = False,
62 max_length = 254,
63 null = False];
64 optional manytoone foreground_color->ColorNew:serviceinstance_foreground_colors = 2:1001 [
65 help_text = "Foreground color to use in web page",
66 db_index = True,
67 null = True,
68 blank = True];
69 optional manytoone background_color->ColorNew:serviceinstance_background_colors = 3:1002 [
70 help_text = "Background color to use in web page",
71 blank = True,
72 db_index = True,
73 null = True];
74 optional string tenant_secret = 4 [
75 help_text = "Tenant Secret to place in a file",
76 blank = True,
77 db_index = False,
78 null = False];
Scott Bakeredbb2322018-05-08 11:46:25 -070079}
80
Scott Baker58723222019-01-24 07:56:12 -080081// Note: Named EmbeddedImageNew to prevent name collision with ExampleService's EmbeddedImage.
82
Scott Bakeredbb2322018-05-08 11:46:25 -070083message EmbeddedImageNew (XOSBase){
84 option verbose_name = "Embedded Image";
Scott Baker58723222019-01-24 07:56:12 -080085 option description = "An embedded image that may be placed in a web page";
86
87 required string name = 1 [
88 help_text = "Name for this image",
89 blank = False,
90 db_index = False,
91 max_length = 256,
92 null = False];
93 required string url = 2 [
94 help_text = "URL for this image",
95 blank = False,
96 db_index = False,
97 max_length = 256,
98 null = False];
99 optional manytoone serviceinstance->SimpleExampleServiceInstance:embedded_images = 3:1001 [
100 help_text = "ServiceInstance that represents the web page where this embedded image should be placed",
101 blank = True,
102 db_index = True,
103 null = True];
Scott Bakeredbb2322018-05-08 11:46:25 -0700104}