xref: /aosp_15_r20/external/googleapis/google/monitoring/dashboard/v1/text.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.monitoring.dashboard.v1;
18
19option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
20option go_package = "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb";
21option java_multiple_files = true;
22option java_outer_classname = "TextProto";
23option java_package = "com.google.monitoring.dashboard.v1";
24option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
25option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
26
27// A widget that displays textual content.
28message Text {
29  // The format type of the text content.
30  enum Format {
31    // Format is unspecified. Defaults to MARKDOWN.
32    FORMAT_UNSPECIFIED = 0;
33
34    // The text contains Markdown formatting.
35    MARKDOWN = 1;
36
37    // The text contains no special formatting.
38    RAW = 2;
39  }
40
41  // Properties that determine how the title and content are styled
42  message TextStyle {
43    // The horizontal alignment of both the title and content on a text widget
44    enum HorizontalAlignment {
45      // No horizontal alignment specified, will default to H_LEFT
46      HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0;
47
48      // Left-align
49      H_LEFT = 1;
50
51      // Center-align
52      H_CENTER = 2;
53
54      // Right-align
55      H_RIGHT = 3;
56    }
57
58    // The vertical alignment of both the title and content on a text widget
59    enum VerticalAlignment {
60      // No vertical alignment specified, will default to V_TOP
61      VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
62
63      // Top-align
64      V_TOP = 1;
65
66      // Center-align
67      V_CENTER = 2;
68
69      // Bottom-align
70      V_BOTTOM = 3;
71    }
72
73    // Specifies padding size around a text widget
74    enum PaddingSize {
75      // No padding size specified, will default to P_EXTRA_SMALL
76      PADDING_SIZE_UNSPECIFIED = 0;
77
78      // Extra small padding
79      P_EXTRA_SMALL = 1;
80
81      // Small padding
82      P_SMALL = 2;
83
84      // Medium padding
85      P_MEDIUM = 3;
86
87      // Large padding
88      P_LARGE = 4;
89
90      // Extra large padding
91      P_EXTRA_LARGE = 5;
92    }
93
94    // Specifies a font size for the title and content of a text widget
95    enum FontSize {
96      // No font size specified, will default to FS_LARGE
97      FONT_SIZE_UNSPECIFIED = 0;
98
99      // Extra small font size
100      FS_EXTRA_SMALL = 1;
101
102      // Small font size
103      FS_SMALL = 2;
104
105      // Medium font size
106      FS_MEDIUM = 3;
107
108      // Large font size
109      FS_LARGE = 4;
110
111      // Extra large font size
112      FS_EXTRA_LARGE = 5;
113    }
114
115    // Specifies where a visual pointer is placed on a text widget (also
116    // sometimes called a "tail")
117    enum PointerLocation {
118      // No visual pointer
119      POINTER_LOCATION_UNSPECIFIED = 0;
120
121      // Placed in the middle of the top of the widget
122      PL_TOP = 1;
123
124      // Placed in the middle of the right side of the widget
125      PL_RIGHT = 2;
126
127      // Placed in the middle of the bottom of the widget
128      PL_BOTTOM = 3;
129
130      // Placed in the middle of the left side of the widget
131      PL_LEFT = 4;
132
133      // Placed on the left side of the top of the widget
134      PL_TOP_LEFT = 5;
135
136      // Placed on the right side of the top of the widget
137      PL_TOP_RIGHT = 6;
138
139      // Placed on the top of the right side of the widget
140      PL_RIGHT_TOP = 7;
141
142      // Placed on the bottom of the right side of the widget
143      PL_RIGHT_BOTTOM = 8;
144
145      // Placed on the right side of the bottom of the widget
146      PL_BOTTOM_RIGHT = 9;
147
148      // Placed on the left side of the bottom of the widget
149      PL_BOTTOM_LEFT = 10;
150
151      // Placed on the bottom of the left side of the widget
152      PL_LEFT_BOTTOM = 11;
153
154      // Placed on the top of the left side of the widget
155      PL_LEFT_TOP = 12;
156    }
157
158    // The background color as a hex string. "#RRGGBB" or "#RGB"
159    string background_color = 1;
160
161    // The text color as a hex string. "#RRGGBB" or "#RGB"
162    string text_color = 2;
163
164    // The horizontal alignment of both the title and content
165    HorizontalAlignment horizontal_alignment = 3;
166
167    // The vertical alignment of both the title and content
168    VerticalAlignment vertical_alignment = 4;
169
170    // The amount of padding around the widget
171    PaddingSize padding = 5;
172
173    // Font sizes for both the title and content. The title will still be larger
174    // relative to the content.
175    FontSize font_size = 6;
176
177    // The pointer location for this widget (also sometimes called a "tail")
178    PointerLocation pointer_location = 7;
179  }
180
181  // The text content to be displayed.
182  string content = 1;
183
184  // How the text content is formatted.
185  Format format = 2;
186
187  // How the text is styled
188  TextStyle style = 3;
189}
190