blob: 6f08c85937505f9007769d78404d657e86a602c3 [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 Baker58723222019-01-24 07:56:12 -080010 db_index = False,
Scott Baker06f77ad2019-03-08 13:37:54 -080011 max_length = 254];
Scott Baker58723222019-01-24 07:56:12 -080012 optional string service_secret = 2 [
13 help_text = "Service Secret to place in a file",
Scott Baker06f77ad2019-03-08 13:37:54 -080014 db_index = False];
Scott Bakeredbb2322018-05-08 11:46:25 -070015}
16
Scott Baker58723222019-01-24 07:56:12 -080017// Note: Named ColorNew to prevent name collision with ExampleService's Color.
18
Scott Bakeredbb2322018-05-08 11:46:25 -070019message ColorNew (XOSBase){
20 option verbose_name = "Color";
Scott Baker58723222019-01-24 07:56:12 -080021 option description = "An html color code that may be used to color a web page";
22
23 required string name = 1 [
24 help_text = "Name for this color",
Scott Baker58723222019-01-24 07:56:12 -080025 db_index = False,
Scott Baker06f77ad2019-03-08 13:37:54 -080026 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080027 required string html_code = 2 [
28 help_text = "HTML Code for this color",
Scott Baker58723222019-01-24 07:56:12 -080029 db_index = False,
Scott Baker06f77ad2019-03-08 13:37:54 -080030 max_length = 256];
Scott Bakeredbb2322018-05-08 11:46:25 -070031}
32
Scott Bakered94fc42018-12-20 06:57:49 -080033// Note: Named ServiceInstanceWithCompute2 to prevent name collision with ExampleService.ServiceInstanceWithCompute.
34// Expect this model to eventually move to the core.
35
36message ServiceInstanceWithCompute2 (ServiceInstance) {
Scott Baker58723222019-01-24 07:56:12 -080037 option description = "ServiceInstance with relation to a ComputeServiceInstance";
38
39 optional manytoone compute_instance->ComputeServiceInstance:service_instance_with_computes = 1:1001 [
40 help_text = "ComputeServiceInstance that holds compute resources for this ServiceInstance",
41 blank=True,
42 db_index=True,
43 null=True];
Scott Bakeredbb2322018-05-08 11:46:25 -070044}
45
Scott Bakered94fc42018-12-20 06:57:49 -080046message SimpleExampleServiceInstance (ServiceInstanceWithCompute2){
Scott Bakeredbb2322018-05-08 11:46:25 -070047 option verbose_name = "Example Service Instance";
Scott Baker58723222019-01-24 07:56:12 -080048 option description = "Tenancy in SimpleExampleService, represents a web server that serves one page";
49
50 required string tenant_message = 1 [
51 help_text = "Tenant Message to Display",
Scott Baker58723222019-01-24 07:56:12 -080052 db_index = False,
Scott Baker06f77ad2019-03-08 13:37:54 -080053 max_length = 254];
Scott Baker58723222019-01-24 07:56:12 -080054 optional manytoone foreground_color->ColorNew:serviceinstance_foreground_colors = 2:1001 [
55 help_text = "Foreground color to use in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080056 db_index = True];
Scott Baker58723222019-01-24 07:56:12 -080057 optional manytoone background_color->ColorNew:serviceinstance_background_colors = 3:1002 [
58 help_text = "Background color to use in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080059 db_index = True];
Scott Baker58723222019-01-24 07:56:12 -080060 optional string tenant_secret = 4 [
61 help_text = "Tenant Secret to place in a file",
Scott Baker06f77ad2019-03-08 13:37:54 -080062 db_index = False];
Scott Bakeredbb2322018-05-08 11:46:25 -070063}
64
Scott Baker58723222019-01-24 07:56:12 -080065// Note: Named EmbeddedImageNew to prevent name collision with ExampleService's EmbeddedImage.
66
Scott Bakeredbb2322018-05-08 11:46:25 -070067message EmbeddedImageNew (XOSBase){
68 option verbose_name = "Embedded Image";
Scott Baker58723222019-01-24 07:56:12 -080069 option description = "An embedded image that may be placed in a web page";
70
71 required string name = 1 [
72 help_text = "Name for this image",
Scott Baker58723222019-01-24 07:56:12 -080073 db_index = False,
Scott Baker06f77ad2019-03-08 13:37:54 -080074 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080075 required string url = 2 [
76 help_text = "URL for this image",
Scott Baker58723222019-01-24 07:56:12 -080077 db_index = False,
Scott Baker06f77ad2019-03-08 13:37:54 -080078 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080079 optional manytoone serviceinstance->SimpleExampleServiceInstance:embedded_images = 3:1001 [
80 help_text = "ServiceInstance that represents the web page where this embedded image should be placed",
Scott Baker06f77ad2019-03-08 13:37:54 -080081 db_index = True];
Scott Bakeredbb2322018-05-08 11:46:25 -070082}