1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/medialive/MediaLive_EXPORTS.h> 8 9 namespace Aws 10 { 11 namespace Utils 12 { 13 namespace Json 14 { 15 class JsonValue; 16 class JsonView; 17 } // namespace Json 18 } // namespace Utils 19 namespace MediaLive 20 { 21 namespace Model 22 { 23 24 /** 25 * Caption Rectangle<p><h3>See Also:</h3> <a 26 * href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionRectangle">AWS 27 * API Reference</a></p> 28 */ 29 class AWS_MEDIALIVE_API CaptionRectangle 30 { 31 public: 32 CaptionRectangle(); 33 CaptionRectangle(Aws::Utils::Json::JsonView jsonValue); 34 CaptionRectangle& operator=(Aws::Utils::Json::JsonView jsonValue); 35 Aws::Utils::Json::JsonValue Jsonize() const; 36 37 38 /** 39 * See the description in leftOffset. 40 For height, specify the entire height of the 41 * rectangle as a percentage of the underlying frame height. For example, \"80\" 42 * means the rectangle height is 80% of the underlying frame height. The topOffset 43 * and rectangleHeight must add up to 100% or less. 44 This field corresponds to 45 * tts:extent - Y in the TTML standard. 46 */ GetHeight()47 inline double GetHeight() const{ return m_height; } 48 49 /** 50 * See the description in leftOffset. 51 For height, specify the entire height of the 52 * rectangle as a percentage of the underlying frame height. For example, \"80\" 53 * means the rectangle height is 80% of the underlying frame height. The topOffset 54 * and rectangleHeight must add up to 100% or less. 55 This field corresponds to 56 * tts:extent - Y in the TTML standard. 57 */ HeightHasBeenSet()58 inline bool HeightHasBeenSet() const { return m_heightHasBeenSet; } 59 60 /** 61 * See the description in leftOffset. 62 For height, specify the entire height of the 63 * rectangle as a percentage of the underlying frame height. For example, \"80\" 64 * means the rectangle height is 80% of the underlying frame height. The topOffset 65 * and rectangleHeight must add up to 100% or less. 66 This field corresponds to 67 * tts:extent - Y in the TTML standard. 68 */ SetHeight(double value)69 inline void SetHeight(double value) { m_heightHasBeenSet = true; m_height = value; } 70 71 /** 72 * See the description in leftOffset. 73 For height, specify the entire height of the 74 * rectangle as a percentage of the underlying frame height. For example, \"80\" 75 * means the rectangle height is 80% of the underlying frame height. The topOffset 76 * and rectangleHeight must add up to 100% or less. 77 This field corresponds to 78 * tts:extent - Y in the TTML standard. 79 */ WithHeight(double value)80 inline CaptionRectangle& WithHeight(double value) { SetHeight(value); return *this;} 81 82 83 /** 84 * Applies only if you plan to convert these source captions to EBU-TT-D or TTML in 85 * an output. (Make sure to leave the default if you don't have either of these 86 * formats in the output.) You can define a display rectangle for the captions that 87 * is smaller than the underlying video frame. You define the rectangle by 88 * specifying the position of the left edge, top edge, bottom edge, and right edge 89 * of the rectangle, all within the underlying video frame. The units for the 90 * measurements are percentages. 91 If you specify a value for one of these fields, 92 * you must specify a value for all of them. 93 For leftOffset, specify the position 94 * of the left edge of the rectangle, as a percentage of the underlying frame 95 * width, and relative to the left edge of the frame. For example, \"10\" means the 96 * measurement is 10% of the underlying frame width. The rectangle left edge starts 97 * at that position from the left edge of the frame. 98 This field corresponds to 99 * tts:origin - X in the TTML standard. 100 */ GetLeftOffset()101 inline double GetLeftOffset() const{ return m_leftOffset; } 102 103 /** 104 * Applies only if you plan to convert these source captions to EBU-TT-D or TTML in 105 * an output. (Make sure to leave the default if you don't have either of these 106 * formats in the output.) You can define a display rectangle for the captions that 107 * is smaller than the underlying video frame. You define the rectangle by 108 * specifying the position of the left edge, top edge, bottom edge, and right edge 109 * of the rectangle, all within the underlying video frame. The units for the 110 * measurements are percentages. 111 If you specify a value for one of these fields, 112 * you must specify a value for all of them. 113 For leftOffset, specify the position 114 * of the left edge of the rectangle, as a percentage of the underlying frame 115 * width, and relative to the left edge of the frame. For example, \"10\" means the 116 * measurement is 10% of the underlying frame width. The rectangle left edge starts 117 * at that position from the left edge of the frame. 118 This field corresponds to 119 * tts:origin - X in the TTML standard. 120 */ LeftOffsetHasBeenSet()121 inline bool LeftOffsetHasBeenSet() const { return m_leftOffsetHasBeenSet; } 122 123 /** 124 * Applies only if you plan to convert these source captions to EBU-TT-D or TTML in 125 * an output. (Make sure to leave the default if you don't have either of these 126 * formats in the output.) You can define a display rectangle for the captions that 127 * is smaller than the underlying video frame. You define the rectangle by 128 * specifying the position of the left edge, top edge, bottom edge, and right edge 129 * of the rectangle, all within the underlying video frame. The units for the 130 * measurements are percentages. 131 If you specify a value for one of these fields, 132 * you must specify a value for all of them. 133 For leftOffset, specify the position 134 * of the left edge of the rectangle, as a percentage of the underlying frame 135 * width, and relative to the left edge of the frame. For example, \"10\" means the 136 * measurement is 10% of the underlying frame width. The rectangle left edge starts 137 * at that position from the left edge of the frame. 138 This field corresponds to 139 * tts:origin - X in the TTML standard. 140 */ SetLeftOffset(double value)141 inline void SetLeftOffset(double value) { m_leftOffsetHasBeenSet = true; m_leftOffset = value; } 142 143 /** 144 * Applies only if you plan to convert these source captions to EBU-TT-D or TTML in 145 * an output. (Make sure to leave the default if you don't have either of these 146 * formats in the output.) You can define a display rectangle for the captions that 147 * is smaller than the underlying video frame. You define the rectangle by 148 * specifying the position of the left edge, top edge, bottom edge, and right edge 149 * of the rectangle, all within the underlying video frame. The units for the 150 * measurements are percentages. 151 If you specify a value for one of these fields, 152 * you must specify a value for all of them. 153 For leftOffset, specify the position 154 * of the left edge of the rectangle, as a percentage of the underlying frame 155 * width, and relative to the left edge of the frame. For example, \"10\" means the 156 * measurement is 10% of the underlying frame width. The rectangle left edge starts 157 * at that position from the left edge of the frame. 158 This field corresponds to 159 * tts:origin - X in the TTML standard. 160 */ WithLeftOffset(double value)161 inline CaptionRectangle& WithLeftOffset(double value) { SetLeftOffset(value); return *this;} 162 163 164 /** 165 * See the description in leftOffset. 166 For topOffset, specify the position of the 167 * top edge of the rectangle, as a percentage of the underlying frame height, and 168 * relative to the top edge of the frame. For example, \"10\" means the measurement 169 * is 10% of the underlying frame height. The rectangle top edge starts at that 170 * position from the top edge of the frame. 171 This field corresponds to tts:origin - 172 * Y in the TTML standard. 173 */ GetTopOffset()174 inline double GetTopOffset() const{ return m_topOffset; } 175 176 /** 177 * See the description in leftOffset. 178 For topOffset, specify the position of the 179 * top edge of the rectangle, as a percentage of the underlying frame height, and 180 * relative to the top edge of the frame. For example, \"10\" means the measurement 181 * is 10% of the underlying frame height. The rectangle top edge starts at that 182 * position from the top edge of the frame. 183 This field corresponds to tts:origin - 184 * Y in the TTML standard. 185 */ TopOffsetHasBeenSet()186 inline bool TopOffsetHasBeenSet() const { return m_topOffsetHasBeenSet; } 187 188 /** 189 * See the description in leftOffset. 190 For topOffset, specify the position of the 191 * top edge of the rectangle, as a percentage of the underlying frame height, and 192 * relative to the top edge of the frame. For example, \"10\" means the measurement 193 * is 10% of the underlying frame height. The rectangle top edge starts at that 194 * position from the top edge of the frame. 195 This field corresponds to tts:origin - 196 * Y in the TTML standard. 197 */ SetTopOffset(double value)198 inline void SetTopOffset(double value) { m_topOffsetHasBeenSet = true; m_topOffset = value; } 199 200 /** 201 * See the description in leftOffset. 202 For topOffset, specify the position of the 203 * top edge of the rectangle, as a percentage of the underlying frame height, and 204 * relative to the top edge of the frame. For example, \"10\" means the measurement 205 * is 10% of the underlying frame height. The rectangle top edge starts at that 206 * position from the top edge of the frame. 207 This field corresponds to tts:origin - 208 * Y in the TTML standard. 209 */ WithTopOffset(double value)210 inline CaptionRectangle& WithTopOffset(double value) { SetTopOffset(value); return *this;} 211 212 213 /** 214 * See the description in leftOffset. 215 For width, specify the entire width of the 216 * rectangle as a percentage of the underlying frame width. For example, \"80\" 217 * means the rectangle width is 80% of the underlying frame width. The leftOffset 218 * and rectangleWidth must add up to 100% or less. 219 This field corresponds to 220 * tts:extent - X in the TTML standard. 221 */ GetWidth()222 inline double GetWidth() const{ return m_width; } 223 224 /** 225 * See the description in leftOffset. 226 For width, specify the entire width of the 227 * rectangle as a percentage of the underlying frame width. For example, \"80\" 228 * means the rectangle width is 80% of the underlying frame width. The leftOffset 229 * and rectangleWidth must add up to 100% or less. 230 This field corresponds to 231 * tts:extent - X in the TTML standard. 232 */ WidthHasBeenSet()233 inline bool WidthHasBeenSet() const { return m_widthHasBeenSet; } 234 235 /** 236 * See the description in leftOffset. 237 For width, specify the entire width of the 238 * rectangle as a percentage of the underlying frame width. For example, \"80\" 239 * means the rectangle width is 80% of the underlying frame width. The leftOffset 240 * and rectangleWidth must add up to 100% or less. 241 This field corresponds to 242 * tts:extent - X in the TTML standard. 243 */ SetWidth(double value)244 inline void SetWidth(double value) { m_widthHasBeenSet = true; m_width = value; } 245 246 /** 247 * See the description in leftOffset. 248 For width, specify the entire width of the 249 * rectangle as a percentage of the underlying frame width. For example, \"80\" 250 * means the rectangle width is 80% of the underlying frame width. The leftOffset 251 * and rectangleWidth must add up to 100% or less. 252 This field corresponds to 253 * tts:extent - X in the TTML standard. 254 */ WithWidth(double value)255 inline CaptionRectangle& WithWidth(double value) { SetWidth(value); return *this;} 256 257 private: 258 259 double m_height; 260 bool m_heightHasBeenSet; 261 262 double m_leftOffset; 263 bool m_leftOffsetHasBeenSet; 264 265 double m_topOffset; 266 bool m_topOffsetHasBeenSet; 267 268 double m_width; 269 bool m_widthHasBeenSet; 270 }; 271 272 } // namespace Model 273 } // namespace MediaLive 274 } // namespace Aws 275