/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the iot-2015-05-28.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.IoT.Model
{
///
/// Container for the parameters to the CreateJob operation.
/// Creates a job.
///
///
///
/// Requires permission to access the CreateJob
/// action.
///
///
public partial class CreateJobRequest : AmazonIoTRequest
{
private AbortConfig _abortConfig;
private string _description;
private List _destinationPackageVersions = new List();
private string _document;
private Dictionary _documentParameters = new Dictionary();
private string _documentSource;
private JobExecutionsRetryConfig _jobExecutionsRetryConfig;
private JobExecutionsRolloutConfig _jobExecutionsRolloutConfig;
private string _jobId;
private string _jobTemplateArn;
private string _namespaceId;
private PresignedUrlConfig _presignedUrlConfig;
private SchedulingConfig _schedulingConfig;
private List _tags = new List();
private List _targets = new List();
private TargetSelection _targetSelection;
private TimeoutConfig _timeoutConfig;
///
/// Gets and sets the property AbortConfig.
///
/// Allows you to create the criteria to abort a job.
///
///
public AbortConfig AbortConfig
{
get { return this._abortConfig; }
set { this._abortConfig = value; }
}
// Check to see if AbortConfig property is set
internal bool IsSetAbortConfig()
{
return this._abortConfig != null;
}
///
/// Gets and sets the property Description.
///
/// A short text description of the job.
///
///
[AWSProperty(Max=2028)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property DestinationPackageVersions.
///
/// The package version Amazon Resource Names (ARNs) that are installed on the device
/// when the job successfully completes.
///
///
///
/// Note:The following Length Constraints relates to a single string. Up to five
/// strings are allowed.
///
///
public List DestinationPackageVersions
{
get { return this._destinationPackageVersions; }
set { this._destinationPackageVersions = value; }
}
// Check to see if DestinationPackageVersions property is set
internal bool IsSetDestinationPackageVersions()
{
return this._destinationPackageVersions != null && this._destinationPackageVersions.Count > 0;
}
///
/// Gets and sets the property Document.
///
/// The job document. Required if you don't specify a value for documentSource
.
///
///
[AWSProperty(Max=32768)]
public string Document
{
get { return this._document; }
set { this._document = value; }
}
// Check to see if Document property is set
internal bool IsSetDocument()
{
return this._document != null;
}
///
/// Gets and sets the property DocumentParameters.
///
/// Parameters of an Amazon Web Services managed template that you can specify to create
/// the job document.
///
///
///
/// documentParameters
can only be used when creating jobs from Amazon Web
/// Services managed templates. This parameter can't be used with custom job templates
/// or to create jobs from them.
///
///
///
public Dictionary DocumentParameters
{
get { return this._documentParameters; }
set { this._documentParameters = value; }
}
// Check to see if DocumentParameters property is set
internal bool IsSetDocumentParameters()
{
return this._documentParameters != null && this._documentParameters.Count > 0;
}
///
/// Gets and sets the property DocumentSource.
///
/// An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object
/// URL and is required if you don't specify a value for document
.
///
///
///
/// For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0
///
///
///
///
/// For more information, see Methods
/// for accessing a bucket.
///
///
[AWSProperty(Min=1, Max=1350)]
public string DocumentSource
{
get { return this._documentSource; }
set { this._documentSource = value; }
}
// Check to see if DocumentSource property is set
internal bool IsSetDocumentSource()
{
return this._documentSource != null;
}
///
/// Gets and sets the property JobExecutionsRetryConfig.
///
/// Allows you to create the criteria to retry a job.
///
///
public JobExecutionsRetryConfig JobExecutionsRetryConfig
{
get { return this._jobExecutionsRetryConfig; }
set { this._jobExecutionsRetryConfig = value; }
}
// Check to see if JobExecutionsRetryConfig property is set
internal bool IsSetJobExecutionsRetryConfig()
{
return this._jobExecutionsRetryConfig != null;
}
///
/// Gets and sets the property JobExecutionsRolloutConfig.
///
/// Allows you to create a staged rollout of the job.
///
///
public JobExecutionsRolloutConfig JobExecutionsRolloutConfig
{
get { return this._jobExecutionsRolloutConfig; }
set { this._jobExecutionsRolloutConfig = value; }
}
// Check to see if JobExecutionsRolloutConfig property is set
internal bool IsSetJobExecutionsRolloutConfig()
{
return this._jobExecutionsRolloutConfig != null;
}
///
/// Gets and sets the property JobId.
///
/// A job identifier which must be unique for your Amazon Web Services account. We recommend
/// using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.
///
///
[AWSProperty(Required=true, Min=1, Max=64)]
public string JobId
{
get { return this._jobId; }
set { this._jobId = value; }
}
// Check to see if JobId property is set
internal bool IsSetJobId()
{
return this._jobId != null;
}
///
/// Gets and sets the property JobTemplateArn.
///
/// The ARN of the job template used to create the job.
///
///
[AWSProperty(Min=1, Max=1600)]
public string JobTemplateArn
{
get { return this._jobTemplateArn; }
set { this._jobTemplateArn = value; }
}
// Check to see if JobTemplateArn property is set
internal bool IsSetJobTemplateArn()
{
return this._jobTemplateArn != null;
}
///
/// Gets and sets the property 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.
///
///
///
public string NamespaceId
{
get { return this._namespaceId; }
set { this._namespaceId = value; }
}
// Check to see if NamespaceId property is set
internal bool IsSetNamespaceId()
{
return this._namespaceId != null;
}
///
/// Gets and sets the property PresignedUrlConfig.
///
/// Configuration information for pre-signed S3 URLs.
///
///
public PresignedUrlConfig PresignedUrlConfig
{
get { return this._presignedUrlConfig; }
set { this._presignedUrlConfig = value; }
}
// Check to see if PresignedUrlConfig property is set
internal bool IsSetPresignedUrlConfig()
{
return this._presignedUrlConfig != null;
}
///
/// Gets and sets the property SchedulingConfig.
///
/// The configuration that allows you to schedule a job for a future date and time in
/// addition to specifying the end behavior for each job execution.
///
///
public SchedulingConfig SchedulingConfig
{
get { return this._schedulingConfig; }
set { this._schedulingConfig = value; }
}
// Check to see if SchedulingConfig property is set
internal bool IsSetSchedulingConfig()
{
return this._schedulingConfig != null;
}
///
/// Gets and sets the property Tags.
///
/// Metadata which can be used to manage the job.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property Targets.
///
/// A list of things and thing groups to which the job should be sent.
///
///
[AWSProperty(Required=true, Min=1)]
public List Targets
{
get { return this._targets; }
set { this._targets = value; }
}
// Check to see if Targets property is set
internal bool IsSetTargets()
{
return this._targets != null && this._targets.Count > 0;
}
///
/// Gets and sets the property TargetSelection.
///
/// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after
/// all those things specified as targets have completed the job (SNAPSHOT). If continuous,
/// the job may also be run on a thing when a change is detected in a target. For example,
/// a job will run on a thing when the thing is added to a target group, even after the
/// job was completed by all things originally in the group.
///
///
///
/// We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing
/// group targets. By using continuous jobs, devices that join the group receive the job
/// execution even after the job has been created.
///
///
///
public TargetSelection TargetSelection
{
get { return this._targetSelection; }
set { this._targetSelection = value; }
}
// Check to see if TargetSelection property is set
internal bool IsSetTargetSelection()
{
return this._targetSelection != null;
}
///
/// Gets and sets the property TimeoutConfig.
///
/// Specifies the amount of time each device has to finish its execution of the job. The
/// timer is started when the job execution status is set to IN_PROGRESS
.
/// If the job execution status is not set to another terminal state before the time expires,
/// it will be automatically set to TIMED_OUT
.
///
///
public TimeoutConfig TimeoutConfig
{
get { return this._timeoutConfig; }
set { this._timeoutConfig = value; }
}
// Check to see if TimeoutConfig property is set
internal bool IsSetTimeoutConfig()
{
return this._timeoutConfig != null;
}
}
}