/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.iot.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Associates a group with a continuous job. The following criteria must be met: *
*
* The job must have been created with the targetSelection
field
* set to "CONTINUOUS".
*
* The job status must currently be "IN_PROGRESS". *
** The total number of targets associated with a job must not exceed 100. *
** Requires permission to access the AssociateTargetsWithJob action. *
*/ public class AssociateTargetsWithJobRequest extends AmazonWebServiceRequest implements Serializable { /** ** A list of thing group ARNs that define the targets of the job. *
*/ private java.util.List* The unique identifier you assigned to this job when it was created. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/
private String jobId;
/**
*
* An optional comment string describing why the job was associated with the * targets. *
*
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*/
private String comment;
/**
*
* The namespace used to indicate that a job is a customer-managed job. *
** When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the * following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*
* Constraints:
* Pattern: [a-zA-Z0-9_-]+
*/
private String namespaceId;
/**
*
* A list of thing group ARNs that define the targets of the job. *
* * @return* A list of thing group ARNs that define the targets of the job. *
*/ public java.util.List* A list of thing group ARNs that define the targets of the job. *
* * @param targets* A list of thing group ARNs that define the targets of the job. *
*/ public void setTargets(java.util.Collection* A list of thing group ARNs that define the targets of the job. *
** Returns a reference to this object so that method calls can be chained * together. * * @param targets
* A list of thing group ARNs that define the targets of the job. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AssociateTargetsWithJobRequest withTargets(String... targets) { if (getTargets() == null) { this.targets = new java.util.ArrayList* A list of thing group ARNs that define the targets of the job. *
** Returns a reference to this object so that method calls can be chained * together. * * @param targets
* A list of thing group ARNs that define the targets of the job. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AssociateTargetsWithJobRequest withTargets(java.util.Collection* The unique identifier you assigned to this job when it was created. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*
* @return
* The unique identifier you assigned to this job when it was * created. *
*/ public String getJobId() { return jobId; } /** ** The unique identifier you assigned to this job when it was created. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*
* @param jobId
* The unique identifier you assigned to this job when it was * created. *
*/ public void setJobId(String jobId) { this.jobId = jobId; } /** ** The unique identifier you assigned to this job when it was created. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*
* @param jobId
* The unique identifier you assigned to this job when it was * created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AssociateTargetsWithJobRequest withJobId(String jobId) { this.jobId = jobId; return this; } /** ** An optional comment string describing why the job was associated with the * targets. *
*
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*
* @return
* An optional comment string describing why the job was associated * with the targets. *
*/ public String getComment() { return comment; } /** ** An optional comment string describing why the job was associated with the * targets. *
*
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*
* @param comment
* An optional comment string describing why the job was * associated with the targets. *
*/ public void setComment(String comment) { this.comment = comment; } /** ** An optional comment string describing why the job was associated with the * targets. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*
* @param comment
* An optional comment string describing why the job was * associated with the targets. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AssociateTargetsWithJobRequest withComment(String comment) { this.comment = comment; return this; } /** ** The namespace used to indicate that a job is a customer-managed job. *
** When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the * following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*
* Constraints:
* Pattern: [a-zA-Z0-9_-]+
*
* @return
* The namespace used to indicate that a job is a customer-managed * job. *
** When you specify a value for this parameter, Amazon Web Services * IoT Core sends jobs notifications to MQTT topics that contain the * value in the following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*
* The namespace used to indicate that a job is a customer-managed job. *
** When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the * following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*
* Constraints:
* Pattern: [a-zA-Z0-9_-]+
*
* @param namespaceId
* The namespace used to indicate that a job is a * customer-managed job. *
** When you specify a value for this parameter, Amazon Web * Services IoT Core sends jobs notifications to MQTT topics that * contain the value in the following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*
* The namespace used to indicate that a job is a customer-managed job. *
** When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the * following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Pattern: [a-zA-Z0-9_-]+
*
* @param namespaceId
* The namespace used to indicate that a job is a * customer-managed job. *
** When you specify a value for this parameter, Amazon Web * Services IoT Core sends jobs notifications to MQTT topics that * contain the value in the following format. *
*
* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
*
* The namespaceId
feature is in public preview.
*