001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.dto.html5;
014
015import java.net.*;
016
017import org.apache.juneau.*;
018import org.apache.juneau.annotation.*;
019import org.apache.juneau.internal.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#the-audio-element">&lt;audio&gt;</a>
023 * element.
024 *
025 * <h5 class='section'>See Also:</h5><ul>
026 *    <li class='link'><a class="doclink" href="../../../../../index.html#jd.Html5">Overview &gt; juneau-dto &gt; HTML5</a>
027 * </ul>
028 */
029@Bean(typeName="audio")
030@FluentSetters
031public class Audio extends HtmlElementContainer {
032
033   /**
034    * Creates an empty {@link Audio} element.
035    */
036   public Audio() {}
037
038   /**
039    * Creates an {@link Audio} element with the specified {@link Audio#src(Object)} attribute.
040    *
041    * @param src The {@link Audio#src(Object)} attribute.
042    */
043   public Audio(String src) {
044      src(src);
045   }
046
047   /**
048    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay">autoplay</a>
049    * attribute.
050    *
051    * <p>
052    * Hint that the media resource can be started automatically when the page is loaded.
053    *
054    * @param autoplay
055    *    The new value for this attribute.
056    *    Typically a {@link Boolean} or {@link String}.
057    * @return This object.
058    */
059   public final Audio autoplay(Object autoplay) {
060      attr("autoplay", deminimize(autoplay, "autoplay"));
061      return this;
062   }
063
064   /**
065    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls">controls</a>
066    * attribute.
067    *
068    * <p>
069    * Show user agent controls.
070    *
071    * @param controls
072    *    The new value for this attribute.
073    *    Typically a {@link Boolean} or {@link String}.
074    * @return This object.
075    */
076   public final Audio controls(Object controls) {
077      attr("controls", deminimize(controls, "controls"));
078      return this;
079   }
080
081   /**
082    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-crossorigin">crossorigin</a>
083    * attribute.
084    *
085    * <p>
086    * How the element handles cross-origin requests.
087    *
088    * @param crossorigin The new value for this attribute.
089    * @return This object.
090    */
091   public final Audio crossorigin(String crossorigin) {
092      attr("crossorigin", crossorigin);
093      return this;
094   }
095
096   /**
097    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop">loop</a> attribute.
098    *
099    * <p>
100    * Whether to loop the media resource.
101    *
102    * @param loop
103    *    The new value for this attribute.
104    *    Typically a {@link Boolean} or {@link String}.
105    * @return This object.
106    */
107   public final Audio loop(Object loop) {
108      attr("loop", loop);
109      return this;
110   }
111
112   /**
113    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-mediagroup">mediagroup</a>
114    * attribute.
115    *
116    * <p>
117    * Groups media elements together with an implicit MediaController.
118    *
119    * @param mediagroup The new value for this attribute.
120    * @return This object.
121    */
122   public final Audio mediagroup(String mediagroup) {
123      attr("mediagroup", mediagroup);
124      return this;
125   }
126
127   /**
128    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-muted">muted</a>
129    * attribute.
130    *
131    * <p>
132    * Whether to mute the media resource by default.
133    *
134    * @param muted
135    *    The new value for this attribute.
136    *    Typically a {@link Boolean} or {@link String}.
137    * @return This object.
138    */
139   public final Audio muted(Object muted) {
140      attr("muted", muted);
141      return this;
142   }
143
144   /**
145    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload">preload</a>
146    * attribute.
147    *
148    * <p>
149    * Hints how much buffering the media resource will likely need.
150    *
151    * @param preload The new value for this attribute.
152    * @return This object.
153    */
154   public final Audio preload(Object preload) {
155      attr("preload", preload);
156      return this;
157   }
158
159   /**
160    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-src">src</a> attribute.
161    *
162    * <p>
163    * Address of the resource.
164    *
165    * <p>
166    * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}.
167    * Strings must be valid URIs.
168    *
169    * <p>
170    * URIs defined by {@link UriResolver} can be used for values.
171    *
172    * @param src
173    *    The new value for this attribute.
174    *    Typically a {@link URL} or {@link String}.
175    * @return This object.
176    */
177   public final Audio src(Object src) {
178      attrUri("src", src);
179      return this;
180   }
181
182
183   //-----------------------------------------------------------------------------------------------------------------
184   // Overridden methods
185   //-----------------------------------------------------------------------------------------------------------------
186
187   // <FluentSetters>
188
189   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
190   public Audio _class(String _class) {
191      super._class(_class);
192      return this;
193   }
194
195   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
196   public Audio accesskey(String accesskey) {
197      super.accesskey(accesskey);
198      return this;
199   }
200
201   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
202   public Audio contenteditable(Object contenteditable) {
203      super.contenteditable(contenteditable);
204      return this;
205   }
206
207   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
208   public Audio dir(String dir) {
209      super.dir(dir);
210      return this;
211   }
212
213   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
214   public Audio hidden(Object hidden) {
215      super.hidden(hidden);
216      return this;
217   }
218
219   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
220   public Audio id(String id) {
221      super.id(id);
222      return this;
223   }
224
225   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
226   public Audio lang(String lang) {
227      super.lang(lang);
228      return this;
229   }
230
231   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
232   public Audio onabort(String onabort) {
233      super.onabort(onabort);
234      return this;
235   }
236
237   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
238   public Audio onblur(String onblur) {
239      super.onblur(onblur);
240      return this;
241   }
242
243   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
244   public Audio oncancel(String oncancel) {
245      super.oncancel(oncancel);
246      return this;
247   }
248
249   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
250   public Audio oncanplay(String oncanplay) {
251      super.oncanplay(oncanplay);
252      return this;
253   }
254
255   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
256   public Audio oncanplaythrough(String oncanplaythrough) {
257      super.oncanplaythrough(oncanplaythrough);
258      return this;
259   }
260
261   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
262   public Audio onchange(String onchange) {
263      super.onchange(onchange);
264      return this;
265   }
266
267   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
268   public Audio onclick(String onclick) {
269      super.onclick(onclick);
270      return this;
271   }
272
273   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
274   public Audio oncuechange(String oncuechange) {
275      super.oncuechange(oncuechange);
276      return this;
277   }
278
279   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
280   public Audio ondblclick(String ondblclick) {
281      super.ondblclick(ondblclick);
282      return this;
283   }
284
285   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
286   public Audio ondurationchange(String ondurationchange) {
287      super.ondurationchange(ondurationchange);
288      return this;
289   }
290
291   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
292   public Audio onemptied(String onemptied) {
293      super.onemptied(onemptied);
294      return this;
295   }
296
297   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
298   public Audio onended(String onended) {
299      super.onended(onended);
300      return this;
301   }
302
303   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
304   public Audio onerror(String onerror) {
305      super.onerror(onerror);
306      return this;
307   }
308
309   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
310   public Audio onfocus(String onfocus) {
311      super.onfocus(onfocus);
312      return this;
313   }
314
315   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
316   public Audio oninput(String oninput) {
317      super.oninput(oninput);
318      return this;
319   }
320
321   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
322   public Audio oninvalid(String oninvalid) {
323      super.oninvalid(oninvalid);
324      return this;
325   }
326
327   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
328   public Audio onkeydown(String onkeydown) {
329      super.onkeydown(onkeydown);
330      return this;
331   }
332
333   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
334   public Audio onkeypress(String onkeypress) {
335      super.onkeypress(onkeypress);
336      return this;
337   }
338
339   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
340   public Audio onkeyup(String onkeyup) {
341      super.onkeyup(onkeyup);
342      return this;
343   }
344
345   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
346   public Audio onload(String onload) {
347      super.onload(onload);
348      return this;
349   }
350
351   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
352   public Audio onloadeddata(String onloadeddata) {
353      super.onloadeddata(onloadeddata);
354      return this;
355   }
356
357   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
358   public Audio onloadedmetadata(String onloadedmetadata) {
359      super.onloadedmetadata(onloadedmetadata);
360      return this;
361   }
362
363   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
364   public Audio onloadstart(String onloadstart) {
365      super.onloadstart(onloadstart);
366      return this;
367   }
368
369   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
370   public Audio onmousedown(String onmousedown) {
371      super.onmousedown(onmousedown);
372      return this;
373   }
374
375   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
376   public Audio onmouseenter(String onmouseenter) {
377      super.onmouseenter(onmouseenter);
378      return this;
379   }
380
381   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
382   public Audio onmouseleave(String onmouseleave) {
383      super.onmouseleave(onmouseleave);
384      return this;
385   }
386
387   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
388   public Audio onmousemove(String onmousemove) {
389      super.onmousemove(onmousemove);
390      return this;
391   }
392
393   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
394   public Audio onmouseout(String onmouseout) {
395      super.onmouseout(onmouseout);
396      return this;
397   }
398
399   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
400   public Audio onmouseover(String onmouseover) {
401      super.onmouseover(onmouseover);
402      return this;
403   }
404
405   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
406   public Audio onmouseup(String onmouseup) {
407      super.onmouseup(onmouseup);
408      return this;
409   }
410
411   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
412   public Audio onmousewheel(String onmousewheel) {
413      super.onmousewheel(onmousewheel);
414      return this;
415   }
416
417   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
418   public Audio onpause(String onpause) {
419      super.onpause(onpause);
420      return this;
421   }
422
423   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
424   public Audio onplay(String onplay) {
425      super.onplay(onplay);
426      return this;
427   }
428
429   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
430   public Audio onplaying(String onplaying) {
431      super.onplaying(onplaying);
432      return this;
433   }
434
435   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
436   public Audio onprogress(String onprogress) {
437      super.onprogress(onprogress);
438      return this;
439   }
440
441   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
442   public Audio onratechange(String onratechange) {
443      super.onratechange(onratechange);
444      return this;
445   }
446
447   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
448   public Audio onreset(String onreset) {
449      super.onreset(onreset);
450      return this;
451   }
452
453   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
454   public Audio onresize(String onresize) {
455      super.onresize(onresize);
456      return this;
457   }
458
459   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
460   public Audio onscroll(String onscroll) {
461      super.onscroll(onscroll);
462      return this;
463   }
464
465   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
466   public Audio onseeked(String onseeked) {
467      super.onseeked(onseeked);
468      return this;
469   }
470
471   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
472   public Audio onseeking(String onseeking) {
473      super.onseeking(onseeking);
474      return this;
475   }
476
477   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
478   public Audio onselect(String onselect) {
479      super.onselect(onselect);
480      return this;
481   }
482
483   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
484   public Audio onshow(String onshow) {
485      super.onshow(onshow);
486      return this;
487   }
488
489   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
490   public Audio onstalled(String onstalled) {
491      super.onstalled(onstalled);
492      return this;
493   }
494
495   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
496   public Audio onsubmit(String onsubmit) {
497      super.onsubmit(onsubmit);
498      return this;
499   }
500
501   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
502   public Audio onsuspend(String onsuspend) {
503      super.onsuspend(onsuspend);
504      return this;
505   }
506
507   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
508   public Audio ontimeupdate(String ontimeupdate) {
509      super.ontimeupdate(ontimeupdate);
510      return this;
511   }
512
513   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
514   public Audio ontoggle(String ontoggle) {
515      super.ontoggle(ontoggle);
516      return this;
517   }
518
519   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
520   public Audio onvolumechange(String onvolumechange) {
521      super.onvolumechange(onvolumechange);
522      return this;
523   }
524
525   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
526   public Audio onwaiting(String onwaiting) {
527      super.onwaiting(onwaiting);
528      return this;
529   }
530
531   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
532   public Audio spellcheck(Object spellcheck) {
533      super.spellcheck(spellcheck);
534      return this;
535   }
536
537   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
538   public Audio style(String style) {
539      super.style(style);
540      return this;
541   }
542
543   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
544   public Audio tabindex(Object tabindex) {
545      super.tabindex(tabindex);
546      return this;
547   }
548
549   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
550   public Audio title(String title) {
551      super.title(title);
552      return this;
553   }
554
555   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
556   public Audio translate(Object translate) {
557      super.translate(translate);
558      return this;
559   }
560
561   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElementContainer */
562   public Audio child(Object child) {
563      super.child(child);
564      return this;
565   }
566
567   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElementContainer */
568   public Audio children(Object...children) {
569      super.children(children);
570      return this;
571   }
572
573   // </FluentSetters>
574}