@@ -568,6 +568,21 @@ public class StartTranscriptionJobRequest extends AmazonWebServiceRequest implem
568568 */
569569 private java .util .Map <String , LanguageIdSettings > languageIdSettings ;
570570
571+ /**
572+ * <p>
573+ * Enables toxic speech detection in your transcript. If you include
574+ * <code>ToxicityDetection</code> in your request, you must also include
575+ * <code>ToxicityCategories</code>.
576+ * </p>
577+ * <p>
578+ * For information on the types of toxic speech Amazon Transcribe can
579+ * detect, see <a href=
580+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
581+ * >Detecting toxic speech</a>.
582+ * </p>
583+ */
584+ private java .util .List <ToxicityDetectionSettings > toxicityDetection ;
585+
571586 /**
572587 * <p>
573588 * A unique name, chosen by you, for your transcription job. The name that
@@ -4172,6 +4187,149 @@ public StartTranscriptionJobRequest clearLanguageIdSettingsEntries() {
41724187 return this ;
41734188 }
41744189
4190+ /**
4191+ * <p>
4192+ * Enables toxic speech detection in your transcript. If you include
4193+ * <code>ToxicityDetection</code> in your request, you must also include
4194+ * <code>ToxicityCategories</code>.
4195+ * </p>
4196+ * <p>
4197+ * For information on the types of toxic speech Amazon Transcribe can
4198+ * detect, see <a href=
4199+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4200+ * >Detecting toxic speech</a>.
4201+ * </p>
4202+ *
4203+ * @return <p>
4204+ * Enables toxic speech detection in your transcript. If you include
4205+ * <code>ToxicityDetection</code> in your request, you must also
4206+ * include <code>ToxicityCategories</code>.
4207+ * </p>
4208+ * <p>
4209+ * For information on the types of toxic speech Amazon Transcribe
4210+ * can detect, see <a href=
4211+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4212+ * >Detecting toxic speech</a>.
4213+ * </p>
4214+ */
4215+ public java .util .List <ToxicityDetectionSettings > getToxicityDetection () {
4216+ return toxicityDetection ;
4217+ }
4218+
4219+ /**
4220+ * <p>
4221+ * Enables toxic speech detection in your transcript. If you include
4222+ * <code>ToxicityDetection</code> in your request, you must also include
4223+ * <code>ToxicityCategories</code>.
4224+ * </p>
4225+ * <p>
4226+ * For information on the types of toxic speech Amazon Transcribe can
4227+ * detect, see <a href=
4228+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4229+ * >Detecting toxic speech</a>.
4230+ * </p>
4231+ *
4232+ * @param toxicityDetection <p>
4233+ * Enables toxic speech detection in your transcript. If you
4234+ * include <code>ToxicityDetection</code> in your request, you
4235+ * must also include <code>ToxicityCategories</code>.
4236+ * </p>
4237+ * <p>
4238+ * For information on the types of toxic speech Amazon Transcribe
4239+ * can detect, see <a href=
4240+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4241+ * >Detecting toxic speech</a>.
4242+ * </p>
4243+ */
4244+ public void setToxicityDetection (
4245+ java .util .Collection <ToxicityDetectionSettings > toxicityDetection ) {
4246+ if (toxicityDetection == null ) {
4247+ this .toxicityDetection = null ;
4248+ return ;
4249+ }
4250+
4251+ this .toxicityDetection = new java .util .ArrayList <ToxicityDetectionSettings >(
4252+ toxicityDetection );
4253+ }
4254+
4255+ /**
4256+ * <p>
4257+ * Enables toxic speech detection in your transcript. If you include
4258+ * <code>ToxicityDetection</code> in your request, you must also include
4259+ * <code>ToxicityCategories</code>.
4260+ * </p>
4261+ * <p>
4262+ * For information on the types of toxic speech Amazon Transcribe can
4263+ * detect, see <a href=
4264+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4265+ * >Detecting toxic speech</a>.
4266+ * </p>
4267+ * <p>
4268+ * Returns a reference to this object so that method calls can be chained
4269+ * together.
4270+ *
4271+ * @param toxicityDetection <p>
4272+ * Enables toxic speech detection in your transcript. If you
4273+ * include <code>ToxicityDetection</code> in your request, you
4274+ * must also include <code>ToxicityCategories</code>.
4275+ * </p>
4276+ * <p>
4277+ * For information on the types of toxic speech Amazon Transcribe
4278+ * can detect, see <a href=
4279+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4280+ * >Detecting toxic speech</a>.
4281+ * </p>
4282+ * @return A reference to this updated object so that method calls can be
4283+ * chained together.
4284+ */
4285+ public StartTranscriptionJobRequest withToxicityDetection (
4286+ ToxicityDetectionSettings ... toxicityDetection ) {
4287+ if (getToxicityDetection () == null ) {
4288+ this .toxicityDetection = new java .util .ArrayList <ToxicityDetectionSettings >(
4289+ toxicityDetection .length );
4290+ }
4291+ for (ToxicityDetectionSettings value : toxicityDetection ) {
4292+ this .toxicityDetection .add (value );
4293+ }
4294+ return this ;
4295+ }
4296+
4297+ /**
4298+ * <p>
4299+ * Enables toxic speech detection in your transcript. If you include
4300+ * <code>ToxicityDetection</code> in your request, you must also include
4301+ * <code>ToxicityCategories</code>.
4302+ * </p>
4303+ * <p>
4304+ * For information on the types of toxic speech Amazon Transcribe can
4305+ * detect, see <a href=
4306+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4307+ * >Detecting toxic speech</a>.
4308+ * </p>
4309+ * <p>
4310+ * Returns a reference to this object so that method calls can be chained
4311+ * together.
4312+ *
4313+ * @param toxicityDetection <p>
4314+ * Enables toxic speech detection in your transcript. If you
4315+ * include <code>ToxicityDetection</code> in your request, you
4316+ * must also include <code>ToxicityCategories</code>.
4317+ * </p>
4318+ * <p>
4319+ * For information on the types of toxic speech Amazon Transcribe
4320+ * can detect, see <a href=
4321+ * "https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html"
4322+ * >Detecting toxic speech</a>.
4323+ * </p>
4324+ * @return A reference to this updated object so that method calls can be
4325+ * chained together.
4326+ */
4327+ public StartTranscriptionJobRequest withToxicityDetection (
4328+ java .util .Collection <ToxicityDetectionSettings > toxicityDetection ) {
4329+ setToxicityDetection (toxicityDetection );
4330+ return this ;
4331+ }
4332+
41754333 /**
41764334 * Returns a string representation of this object; useful for testing and
41774335 * debugging.
@@ -4220,7 +4378,9 @@ public String toString() {
42204378 if (getTags () != null )
42214379 sb .append ("Tags: " + getTags () + "," );
42224380 if (getLanguageIdSettings () != null )
4223- sb .append ("LanguageIdSettings: " + getLanguageIdSettings ());
4381+ sb .append ("LanguageIdSettings: " + getLanguageIdSettings () + "," );
4382+ if (getToxicityDetection () != null )
4383+ sb .append ("ToxicityDetection: " + getToxicityDetection ());
42244384 sb .append ("}" );
42254385 return sb .toString ();
42264386 }
@@ -4267,6 +4427,8 @@ public int hashCode() {
42674427 hashCode = prime * hashCode + ((getTags () == null ) ? 0 : getTags ().hashCode ());
42684428 hashCode = prime * hashCode
42694429 + ((getLanguageIdSettings () == null ) ? 0 : getLanguageIdSettings ().hashCode ());
4430+ hashCode = prime * hashCode
4431+ + ((getToxicityDetection () == null ) ? 0 : getToxicityDetection ().hashCode ());
42704432 return hashCode ;
42714433 }
42724434
@@ -4375,6 +4537,11 @@ public boolean equals(Object obj) {
43754537 if (other .getLanguageIdSettings () != null
43764538 && other .getLanguageIdSettings ().equals (this .getLanguageIdSettings ()) == false )
43774539 return false ;
4540+ if (other .getToxicityDetection () == null ^ this .getToxicityDetection () == null )
4541+ return false ;
4542+ if (other .getToxicityDetection () != null
4543+ && other .getToxicityDetection ().equals (this .getToxicityDetection ()) == false )
4544+ return false ;
43784545 return true ;
43794546 }
43804547}
0 commit comments