From 86f8aea5def1bfb83c4c22ff885bc7404b9530a6 Mon Sep 17 00:00:00 2001 From: awsmobilesdk Date: Mon, 28 Nov 2022 02:42:08 +0000 Subject: [PATCH] feat(aws-android-sdk-iot): update models to latest --- .../com/amazonaws/services/iot/AWSIot.java | 3 +- .../amazonaws/services/iot/AWSIotClient.java | 3 +- .../model/AssociateTargetsWithJobRequest.java | 4 - .../model/AttachThingPrincipalRequest.java | 3 +- .../services/iot/model/CreateJobRequest.java | 77 +- .../iot/model/DeleteJobExecutionRequest.java | 4 - .../services/iot/model/DeleteJobRequest.java | 4 - .../com/amazonaws/services/iot/model/Job.java | 89 +- .../services/iot/model/JobEndBehavior.java | 64 ++ .../services/iot/model/JobStatus.java | 4 +- .../services/iot/model/JobSummary.java | 12 +- .../ListJobExecutionsForThingRequest.java | 4 - .../services/iot/model/ListJobsRequest.java | 16 +- .../services/iot/model/MqttHeaders.java | 1013 +++++++++++++++++ .../services/iot/model/RepublishAction.java | 80 +- .../services/iot/model/SchedulingConfig.java | 419 +++++++ .../ThingGroupIndexingConfiguration.java | 54 +- .../services/iot/model/UpdateJobRequest.java | 4 - .../services/iot/model/UserProperty.java | 207 ++++ .../transform/CreateJobRequestMarshaller.java | 5 + .../model/transform/JobJsonMarshaller.java | 5 + .../model/transform/JobJsonUnmarshaller.java | 3 + .../transform/MqttHeadersJsonMarshaller.java | 76 ++ .../MqttHeadersJsonUnmarshaller.java | 73 ++ .../RepublishActionJsonMarshaller.java | 5 + .../RepublishActionJsonUnmarshaller.java | 3 + .../SchedulingConfigJsonMarshaller.java | 55 + .../SchedulingConfigJsonUnmarshaller.java | 63 + .../transform/UserPropertyJsonMarshaller.java | 49 + .../UserPropertyJsonUnmarshaller.java | 59 + 30 files changed, 2391 insertions(+), 69 deletions(-) create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobEndBehavior.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/MqttHeaders.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/SchedulingConfig.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UserProperty.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonMarshaller.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonUnmarshaller.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonMarshaller.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonUnmarshaller.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonMarshaller.java create mode 100644 aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonUnmarshaller.java diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/AWSIot.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/AWSIot.java index ceb463c3b3..244f52635e 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/AWSIot.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/AWSIot.java @@ -361,8 +361,7 @@ AttachSecurityProfileResult attachSecurityProfile( /** *

* Attaches the specified principal to the specified thing. A principal can - * be X.509 certificates, IAM users, groups, and roles, Amazon Cognito - * identities or federated identities. + * be X.509 certificates, Amazon Cognito identities or federated identities. *

*

* Requires permission to access the * Attaches the specified principal to the specified thing. A principal can - * be X.509 certificates, IAM users, groups, and roles, Amazon Cognito - * identities or federated identities. + * be X.509 certificates, Amazon Cognito identities or federated identities. *

*

* Requires permission to access the *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -318,7 +317,6 @@ public AssociateTargetsWithJobRequest withComment(String comment) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -362,7 +360,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -409,7 +406,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/AttachThingPrincipalRequest.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/AttachThingPrincipalRequest.java index f6693542ca..f44cf40846 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/AttachThingPrincipalRequest.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/AttachThingPrincipalRequest.java @@ -22,8 +22,7 @@ /** *

* Attaches the specified principal to the specified thing. A principal can be - * X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities - * or federated identities. + * X.509 certificates, Amazon Cognito identities or federated identities. *

*

* Requires permission to access the *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -217,6 +216,14 @@ public class CreateJobRequest extends AmazonWebServiceRequest implements Seriali */ private java.util.Map documentParameters; + /** + *

+ * 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. + *

+ */ + private SchedulingConfig schedulingConfig; + /** *

* A job identifier which must be unique for your Amazon Web Services @@ -1164,7 +1171,6 @@ public CreateJobRequest withTags(java.util.Collection tags) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -1208,7 +1214,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -1255,7 +1260,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -1527,6 +1531,60 @@ public CreateJobRequest cleardocumentParametersEntries() { return this; } + /** + *

+ * 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. + *

+ * + * @return

+ * 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 getSchedulingConfig() { + return 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. + *

+ * + * @param 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 void setSchedulingConfig(SchedulingConfig schedulingConfig) { + this.schedulingConfig = 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. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param 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. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public CreateJobRequest withSchedulingConfig(SchedulingConfig schedulingConfig) { + this.schedulingConfig = schedulingConfig; + return this; + } + /** * Returns a string representation of this object; useful for testing and * debugging. @@ -1567,7 +1625,9 @@ public String toString() { if (getJobExecutionsRetryConfig() != null) sb.append("jobExecutionsRetryConfig: " + getJobExecutionsRetryConfig() + ","); if (getDocumentParameters() != null) - sb.append("documentParameters: " + getDocumentParameters()); + sb.append("documentParameters: " + getDocumentParameters() + ","); + if (getSchedulingConfig() != null) + sb.append("schedulingConfig: " + getSchedulingConfig()); sb.append("}"); return sb.toString(); } @@ -1607,6 +1667,8 @@ public int hashCode() { .hashCode()); hashCode = prime * hashCode + ((getDocumentParameters() == null) ? 0 : getDocumentParameters().hashCode()); + hashCode = prime * hashCode + + ((getSchedulingConfig() == null) ? 0 : getSchedulingConfig().hashCode()); return hashCode; } @@ -1695,6 +1757,11 @@ public boolean equals(Object obj) { if (other.getDocumentParameters() != null && other.getDocumentParameters().equals(this.getDocumentParameters()) == false) return false; + if (other.getSchedulingConfig() == null ^ this.getSchedulingConfig() == null) + return false; + if (other.getSchedulingConfig() != null + && other.getSchedulingConfig().equals(this.getSchedulingConfig()) == false) + return false; return true; } } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobExecutionRequest.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobExecutionRequest.java index 8c60879299..ff9411a26e 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobExecutionRequest.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobExecutionRequest.java @@ -103,7 +103,6 @@ public class DeleteJobExecutionRequest extends AmazonWebServiceRequest implement * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -481,7 +480,6 @@ public DeleteJobExecutionRequest withForce(Boolean force) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -525,7 +523,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -572,7 +569,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobRequest.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobRequest.java index 0ec6692af9..4def0202da 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobRequest.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/DeleteJobRequest.java @@ -94,7 +94,6 @@ public class DeleteJobRequest extends AmazonWebServiceRequest implements Seriali * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -358,7 +357,6 @@ public DeleteJobRequest withForce(Boolean force) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -402,7 +400,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -449,7 +446,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/Job.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/Job.java index 46e5c5c56c..e3aca930ed 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/Job.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/Job.java @@ -73,7 +73,7 @@ public class Job implements Serializable { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED */ private String status; @@ -204,7 +204,6 @@ public class Job implements Serializable { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -253,6 +252,14 @@ public class Job implements Serializable { */ private Boolean isConcurrent; + /** + *

+ * 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. + *

+ */ + private SchedulingConfig schedulingConfig; + /** *

* An ARN identifying the job with format @@ -600,7 +607,7 @@ public Job withTargetSelection(TargetSelection targetSelection) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @return

* The status of the job, one of IN_PROGRESS, @@ -622,7 +629,7 @@ public String getStatus() { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The status of the job, one of IN_PROGRESS, @@ -647,7 +654,7 @@ public void setStatus(String status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The status of the job, one of IN_PROGRESS, @@ -672,7 +679,7 @@ public Job withStatus(String status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The status of the job, one of IN_PROGRESS, @@ -697,7 +704,7 @@ public void setStatus(JobStatus status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The status of the job, one of IN_PROGRESS, @@ -1444,7 +1451,6 @@ public Job withTimeoutConfig(TimeoutConfig timeoutConfig) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -1488,7 +1494,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -1535,7 +1540,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -1894,6 +1898,60 @@ public Job withIsConcurrent(Boolean isConcurrent) { return this; } + /** + *

+ * 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. + *

+ * + * @return

+ * 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 getSchedulingConfig() { + return 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. + *

+ * + * @param 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 void setSchedulingConfig(SchedulingConfig schedulingConfig) { + this.schedulingConfig = 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. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param 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. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public Job withSchedulingConfig(SchedulingConfig schedulingConfig) { + this.schedulingConfig = schedulingConfig; + return this; + } + /** * Returns a string representation of this object; useful for testing and * debugging. @@ -1948,7 +2006,9 @@ public String toString() { if (getDocumentParameters() != null) sb.append("documentParameters: " + getDocumentParameters() + ","); if (getIsConcurrent() != null) - sb.append("isConcurrent: " + getIsConcurrent()); + sb.append("isConcurrent: " + getIsConcurrent() + ","); + if (getSchedulingConfig() != null) + sb.append("schedulingConfig: " + getSchedulingConfig()); sb.append("}"); return sb.toString(); } @@ -1999,6 +2059,8 @@ public int hashCode() { + ((getDocumentParameters() == null) ? 0 : getDocumentParameters().hashCode()); hashCode = prime * hashCode + ((getIsConcurrent() == null) ? 0 : getIsConcurrent().hashCode()); + hashCode = prime * hashCode + + ((getSchedulingConfig() == null) ? 0 : getSchedulingConfig().hashCode()); return hashCode; } @@ -2121,6 +2183,11 @@ public boolean equals(Object obj) { if (other.getIsConcurrent() != null && other.getIsConcurrent().equals(this.getIsConcurrent()) == false) return false; + if (other.getSchedulingConfig() == null ^ this.getSchedulingConfig() == null) + return false; + if (other.getSchedulingConfig() != null + && other.getSchedulingConfig().equals(this.getSchedulingConfig()) == false) + return false; return true; } } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobEndBehavior.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobEndBehavior.java new file mode 100644 index 0000000000..5308715c4d --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobEndBehavior.java @@ -0,0 +1,64 @@ +/* + * Copyright 2010-2022 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.util.HashMap; +import java.util.Map; + +/** + * Job End Behavior + */ +public enum JobEndBehavior { + + STOP_ROLLOUT("STOP_ROLLOUT"), + CANCEL("CANCEL"), + FORCE_CANCEL("FORCE_CANCEL"); + + private String value; + + private JobEndBehavior(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + + private static final Map enumMap; + static { + enumMap = new HashMap(); + enumMap.put("STOP_ROLLOUT", STOP_ROLLOUT); + enumMap.put("CANCEL", CANCEL); + enumMap.put("FORCE_CANCEL", FORCE_CANCEL); + } + + /** + * Use this in place of valueOf. + * + * @param value real value + * @return JobEndBehavior corresponding to the value + */ + public static JobEndBehavior fromValue(String value) { + if (value == null || value.isEmpty()) { + throw new IllegalArgumentException("Value cannot be null or empty!"); + } else if (enumMap.containsKey(value)) { + return enumMap.get(value); + } else { + throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); + } + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobStatus.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobStatus.java index 72357da87a..2f232e6b9e 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobStatus.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobStatus.java @@ -26,7 +26,8 @@ public enum JobStatus { IN_PROGRESS("IN_PROGRESS"), CANCELED("CANCELED"), COMPLETED("COMPLETED"), - DELETION_IN_PROGRESS("DELETION_IN_PROGRESS"); + DELETION_IN_PROGRESS("DELETION_IN_PROGRESS"), + SCHEDULED("SCHEDULED"); private String value; @@ -46,6 +47,7 @@ public String toString() { enumMap.put("CANCELED", CANCELED); enumMap.put("COMPLETED", COMPLETED); enumMap.put("DELETION_IN_PROGRESS", DELETION_IN_PROGRESS); + enumMap.put("SCHEDULED", SCHEDULED); } /** diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobSummary.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobSummary.java index 363c49de19..40da7a98cb 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobSummary.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/JobSummary.java @@ -81,7 +81,7 @@ public class JobSummary implements Serializable { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED */ private String status; @@ -511,7 +511,7 @@ public JobSummary withTargetSelection(TargetSelection targetSelection) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @return

* The job summary status. @@ -529,7 +529,7 @@ public String getStatus() { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The job summary status. @@ -550,7 +550,7 @@ public void setStatus(String status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The job summary status. @@ -571,7 +571,7 @@ public JobSummary withStatus(String status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The job summary status. @@ -592,7 +592,7 @@ public void setStatus(JobStatus status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* The job summary status. diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobExecutionsForThingRequest.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobExecutionsForThingRequest.java index ad78838db1..4ac2fde75a 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobExecutionsForThingRequest.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobExecutionsForThingRequest.java @@ -73,7 +73,6 @@ public class ListJobExecutionsForThingRequest extends AmazonWebServiceRequest im * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -294,7 +293,6 @@ public ListJobExecutionsForThingRequest withStatus(JobExecutionStatus status) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -338,7 +336,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -385,7 +382,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobsRequest.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobsRequest.java index b1ed9b41dd..77db554e51 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobsRequest.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListJobsRequest.java @@ -38,7 +38,7 @@ public class ListJobsRequest extends AmazonWebServiceRequest implements Serializ *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED */ private String status; @@ -122,7 +122,6 @@ public class ListJobsRequest extends AmazonWebServiceRequest implements Serializ * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -135,7 +134,7 @@ public class ListJobsRequest extends AmazonWebServiceRequest implements Serializ *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @return

* An optional filter that lets you search for jobs that have the @@ -155,7 +154,7 @@ public String getStatus() { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* An optional filter that lets you search for jobs that have the @@ -178,7 +177,7 @@ public void setStatus(String status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* An optional filter that lets you search for jobs that have the @@ -201,7 +200,7 @@ public ListJobsRequest withStatus(String status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* An optional filter that lets you search for jobs that have the @@ -224,7 +223,7 @@ public void setStatus(JobStatus status) { *

* Constraints:
* Allowed Values: IN_PROGRESS, CANCELED, COMPLETED, - * DELETION_IN_PROGRESS + * DELETION_IN_PROGRESS, SCHEDULED * * @param status

* An optional filter that lets you search for jobs that have the @@ -704,7 +703,6 @@ public ListJobsRequest withThingGroupId(String thingGroupId) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -748,7 +746,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -795,7 +792,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/MqttHeaders.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/MqttHeaders.java new file mode 100644 index 0000000000..f2b29b621c --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/MqttHeaders.java @@ -0,0 +1,1013 @@ +/* + * Copyright 2010-2022 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; + +/** + *

+ * Specifies MQTT Version 5.0 headers information. For more information, see + * MQTT from Amazon Web Services IoT Core Developer Guide. + *

+ */ +public class MqttHeaders implements Serializable { + /** + *

+ * An Enum string value that indicates whether the payload is + * formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String payloadFormatIndicator; + + /** + *

+ * A UTF-8 encoded string that describes the content of the publishing + * message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String contentType; + + /** + *

+ * A UTF-8 encoded string that's used as the topic name for a response + * message. The response topic is used to describe the topic which the + * receiver should publish to as part of the request-response flow. The + * topic must not contain wildcard characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String responseTopic; + + /** + *

+ * The base64-encoded binary data used by the sender of the request message + * to identify which request the response message is for when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String correlationData; + + /** + *

+ * A user-defined integer value that will persist a message at the message + * broker for a specified amount of time to ensure that the message will + * expire if it's no longer relevant to the subscriber. The value of + * messageExpiry represents the number of seconds before it + * expires. For more information about the limits of + * messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and + * quotas from the Amazon Web Services Reference Guide. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String messageExpiry; + + /** + *

+ * An array of key-value pairs that you define in the MQTT5 header. + *

+ */ + private java.util.List userProperties; + + /** + *

+ * An Enum string value that indicates whether the payload is + * formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * An Enum string value that indicates whether the + * payload is formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 + * specification. + *

+ *

+ * Supports substitution templates. + *

+ */ + public String getPayloadFormatIndicator() { + return payloadFormatIndicator; + } + + /** + *

+ * An Enum string value that indicates whether the payload is + * formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param payloadFormatIndicator

+ * An Enum string value that indicates whether the + * payload is formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 + * specification. + *

+ *

+ * Supports substitution templates. + *

+ */ + public void setPayloadFormatIndicator(String payloadFormatIndicator) { + this.payloadFormatIndicator = payloadFormatIndicator; + } + + /** + *

+ * An Enum string value that indicates whether the payload is + * formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param payloadFormatIndicator

+ * An Enum string value that indicates whether the + * payload is formatted as UTF-8. + *

+ *

+ * Valid values are UNSPECIFIED_BYTES and + * UTF8_DATA. + *

+ *

+ * For more information, see Payload Format Indicator from the MQTT Version 5.0 + * specification. + *

+ *

+ * Supports substitution templates. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withPayloadFormatIndicator(String payloadFormatIndicator) { + this.payloadFormatIndicator = payloadFormatIndicator; + return this; + } + + /** + *

+ * A UTF-8 encoded string that describes the content of the publishing + * message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * A UTF-8 encoded string that describes the content of the + * publishing message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ */ + public String getContentType() { + return contentType; + } + + /** + *

+ * A UTF-8 encoded string that describes the content of the publishing + * message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param contentType

+ * A UTF-8 encoded string that describes the content of the + * publishing message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ */ + public void setContentType(String contentType) { + this.contentType = contentType; + } + + /** + *

+ * A UTF-8 encoded string that describes the content of the publishing + * message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param contentType

+ * A UTF-8 encoded string that describes the content of the + * publishing message. + *

+ *

+ * For more information, see Content Type from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + *

+ * A UTF-8 encoded string that's used as the topic name for a response + * message. The response topic is used to describe the topic which the + * receiver should publish to as part of the request-response flow. The + * topic must not contain wildcard characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * A UTF-8 encoded string that's used as the topic name for a + * response message. The response topic is used to describe the + * topic which the receiver should publish to as part of the + * request-response flow. The topic must not contain wildcard + * characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ */ + public String getResponseTopic() { + return responseTopic; + } + + /** + *

+ * A UTF-8 encoded string that's used as the topic name for a response + * message. The response topic is used to describe the topic which the + * receiver should publish to as part of the request-response flow. The + * topic must not contain wildcard characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param responseTopic

+ * A UTF-8 encoded string that's used as the topic name for a + * response message. The response topic is used to describe the + * topic which the receiver should publish to as part of the + * request-response flow. The topic must not contain wildcard + * characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ */ + public void setResponseTopic(String responseTopic) { + this.responseTopic = responseTopic; + } + + /** + *

+ * A UTF-8 encoded string that's used as the topic name for a response + * message. The response topic is used to describe the topic which the + * receiver should publish to as part of the request-response flow. The + * topic must not contain wildcard characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param responseTopic

+ * A UTF-8 encoded string that's used as the topic name for a + * response message. The response topic is used to describe the + * topic which the receiver should publish to as part of the + * request-response flow. The topic must not contain wildcard + * characters. + *

+ *

+ * For more information, see Response Topic from the MQTT Version 5.0 specification. + *

+ *

+ * Supports substitution templates. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withResponseTopic(String responseTopic) { + this.responseTopic = responseTopic; + return this; + } + + /** + *

+ * The base64-encoded binary data used by the sender of the request message + * to identify which request the response message is for when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * The base64-encoded binary data used by the sender of the request + * message to identify which request the response message is for + * when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ */ + public String getCorrelationData() { + return correlationData; + } + + /** + *

+ * The base64-encoded binary data used by the sender of the request message + * to identify which request the response message is for when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param correlationData

+ * The base64-encoded binary data used by the sender of the + * request message to identify which request the response message + * is for when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 + * specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ */ + public void setCorrelationData(String correlationData) { + this.correlationData = correlationData; + } + + /** + *

+ * The base64-encoded binary data used by the sender of the request message + * to identify which request the response message is for when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param correlationData

+ * The base64-encoded binary data used by the sender of the + * request message to identify which request the response message + * is for when it's received. + *

+ *

+ * For more information, see Correlation Data from the MQTT Version 5.0 + * specification. + *

+ * + *

+ * This binary data must be based64-encoded. + *

+ *
+ *

+ * Supports substitution templates. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withCorrelationData(String correlationData) { + this.correlationData = correlationData; + return this; + } + + /** + *

+ * A user-defined integer value that will persist a message at the message + * broker for a specified amount of time to ensure that the message will + * expire if it's no longer relevant to the subscriber. The value of + * messageExpiry represents the number of seconds before it + * expires. For more information about the limits of + * messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and + * quotas from the Amazon Web Services Reference Guide. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * A user-defined integer value that will persist a message at the + * message broker for a specified amount of time to ensure that the + * message will expire if it's no longer relevant to the subscriber. + * The value of messageExpiry represents the number of + * seconds before it expires. For more information about the limits + * of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits + * and quotas from the Amazon Web Services Reference Guide. + *

+ *

+ * Supports substitution templates. + *

+ */ + public String getMessageExpiry() { + return messageExpiry; + } + + /** + *

+ * A user-defined integer value that will persist a message at the message + * broker for a specified amount of time to ensure that the message will + * expire if it's no longer relevant to the subscriber. The value of + * messageExpiry represents the number of seconds before it + * expires. For more information about the limits of + * messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and + * quotas from the Amazon Web Services Reference Guide. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param messageExpiry

+ * A user-defined integer value that will persist a message at + * the message broker for a specified amount of time to ensure + * that the message will expire if it's no longer relevant to the + * subscriber. The value of messageExpiry represents + * the number of seconds before it expires. For more information + * about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol + * limits and quotas from the Amazon Web Services Reference + * Guide. + *

+ *

+ * Supports substitution templates. + *

+ */ + public void setMessageExpiry(String messageExpiry) { + this.messageExpiry = messageExpiry; + } + + /** + *

+ * A user-defined integer value that will persist a message at the message + * broker for a specified amount of time to ensure that the message will + * expire if it's no longer relevant to the subscriber. The value of + * messageExpiry represents the number of seconds before it + * expires. For more information about the limits of + * messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and + * quotas from the Amazon Web Services Reference Guide. + *

+ *

+ * Supports substitution templates. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param messageExpiry

+ * A user-defined integer value that will persist a message at + * the message broker for a specified amount of time to ensure + * that the message will expire if it's no longer relevant to the + * subscriber. The value of messageExpiry represents + * the number of seconds before it expires. For more information + * about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol + * limits and quotas from the Amazon Web Services Reference + * Guide. + *

+ *

+ * Supports substitution templates. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withMessageExpiry(String messageExpiry) { + this.messageExpiry = messageExpiry; + return this; + } + + /** + *

+ * An array of key-value pairs that you define in the MQTT5 header. + *

+ * + * @return

+ * An array of key-value pairs that you define in the MQTT5 header. + *

+ */ + public java.util.List getUserProperties() { + return userProperties; + } + + /** + *

+ * An array of key-value pairs that you define in the MQTT5 header. + *

+ * + * @param userProperties

+ * An array of key-value pairs that you define in the MQTT5 + * header. + *

+ */ + public void setUserProperties(java.util.Collection userProperties) { + if (userProperties == null) { + this.userProperties = null; + return; + } + + this.userProperties = new java.util.ArrayList(userProperties); + } + + /** + *

+ * An array of key-value pairs that you define in the MQTT5 header. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param userProperties

+ * An array of key-value pairs that you define in the MQTT5 + * header. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withUserProperties(UserProperty... userProperties) { + if (getUserProperties() == null) { + this.userProperties = new java.util.ArrayList(userProperties.length); + } + for (UserProperty value : userProperties) { + this.userProperties.add(value); + } + return this; + } + + /** + *

+ * An array of key-value pairs that you define in the MQTT5 header. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param userProperties

+ * An array of key-value pairs that you define in the MQTT5 + * header. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MqttHeaders withUserProperties(java.util.Collection userProperties) { + setUserProperties(userProperties); + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getPayloadFormatIndicator() != null) + sb.append("payloadFormatIndicator: " + getPayloadFormatIndicator() + ","); + if (getContentType() != null) + sb.append("contentType: " + getContentType() + ","); + if (getResponseTopic() != null) + sb.append("responseTopic: " + getResponseTopic() + ","); + if (getCorrelationData() != null) + sb.append("correlationData: " + getCorrelationData() + ","); + if (getMessageExpiry() != null) + sb.append("messageExpiry: " + getMessageExpiry() + ","); + if (getUserProperties() != null) + sb.append("userProperties: " + getUserProperties()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime + * hashCode + + ((getPayloadFormatIndicator() == null) ? 0 : getPayloadFormatIndicator() + .hashCode()); + hashCode = prime * hashCode + + ((getContentType() == null) ? 0 : getContentType().hashCode()); + hashCode = prime * hashCode + + ((getResponseTopic() == null) ? 0 : getResponseTopic().hashCode()); + hashCode = prime * hashCode + + ((getCorrelationData() == null) ? 0 : getCorrelationData().hashCode()); + hashCode = prime * hashCode + + ((getMessageExpiry() == null) ? 0 : getMessageExpiry().hashCode()); + hashCode = prime * hashCode + + ((getUserProperties() == null) ? 0 : getUserProperties().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof MqttHeaders == false) + return false; + MqttHeaders other = (MqttHeaders) obj; + + if (other.getPayloadFormatIndicator() == null ^ this.getPayloadFormatIndicator() == null) + return false; + if (other.getPayloadFormatIndicator() != null + && other.getPayloadFormatIndicator().equals(this.getPayloadFormatIndicator()) == false) + return false; + if (other.getContentType() == null ^ this.getContentType() == null) + return false; + if (other.getContentType() != null + && other.getContentType().equals(this.getContentType()) == false) + return false; + if (other.getResponseTopic() == null ^ this.getResponseTopic() == null) + return false; + if (other.getResponseTopic() != null + && other.getResponseTopic().equals(this.getResponseTopic()) == false) + return false; + if (other.getCorrelationData() == null ^ this.getCorrelationData() == null) + return false; + if (other.getCorrelationData() != null + && other.getCorrelationData().equals(this.getCorrelationData()) == false) + return false; + if (other.getMessageExpiry() == null ^ this.getMessageExpiry() == null) + return false; + if (other.getMessageExpiry() != null + && other.getMessageExpiry().equals(this.getMessageExpiry()) == false) + return false; + if (other.getUserProperties() == null ^ this.getUserProperties() == null) + return false; + if (other.getUserProperties() != null + && other.getUserProperties().equals(this.getUserProperties()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/RepublishAction.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/RepublishAction.java index 99f7fdd9df..51603d27ff 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/RepublishAction.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/RepublishAction.java @@ -48,6 +48,15 @@ public class RepublishAction implements Serializable { */ private Integer qos; + /** + *

+ * MQTT Version 5.0 headers information. For more information, see + * MQTT from the Amazon Web Services IoT Core Developer Guide. + *

+ */ + private MqttHeaders headers; + /** *

* The ARN of the IAM role that grants access. @@ -198,6 +207,68 @@ public RepublishAction withQos(Integer qos) { return this; } + /** + *

+ * MQTT Version 5.0 headers information. For more information, see + * MQTT from the Amazon Web Services IoT Core Developer Guide. + *

+ * + * @return

+ * MQTT Version 5.0 headers information. For more information, see + * MQTT from the Amazon Web Services IoT Core Developer Guide. + *

+ */ + public MqttHeaders getHeaders() { + return headers; + } + + /** + *

+ * MQTT Version 5.0 headers information. For more information, see + * MQTT from the Amazon Web Services IoT Core Developer Guide. + *

+ * + * @param headers

+ * MQTT Version 5.0 headers information. For more information, + * see MQTT from the Amazon Web Services IoT Core Developer + * Guide. + *

+ */ + public void setHeaders(MqttHeaders headers) { + this.headers = headers; + } + + /** + *

+ * MQTT Version 5.0 headers information. For more information, see + * MQTT from the Amazon Web Services IoT Core Developer Guide. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param headers

+ * MQTT Version 5.0 headers information. For more information, + * see MQTT from the Amazon Web Services IoT Core Developer + * Guide. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public RepublishAction withHeaders(MqttHeaders headers) { + this.headers = headers; + return this; + } + /** * Returns a string representation of this object; useful for testing and * debugging. @@ -214,7 +285,9 @@ public String toString() { if (getTopic() != null) sb.append("topic: " + getTopic() + ","); if (getQos() != null) - sb.append("qos: " + getQos()); + sb.append("qos: " + getQos() + ","); + if (getHeaders() != null) + sb.append("headers: " + getHeaders()); sb.append("}"); return sb.toString(); } @@ -227,6 +300,7 @@ public int hashCode() { hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getTopic() == null) ? 0 : getTopic().hashCode()); hashCode = prime * hashCode + ((getQos() == null) ? 0 : getQos().hashCode()); + hashCode = prime * hashCode + ((getHeaders() == null) ? 0 : getHeaders().hashCode()); return hashCode; } @@ -253,6 +327,10 @@ public boolean equals(Object obj) { return false; if (other.getQos() != null && other.getQos().equals(this.getQos()) == false) return false; + if (other.getHeaders() == null ^ this.getHeaders() == null) + return false; + if (other.getHeaders() != null && other.getHeaders().equals(this.getHeaders()) == false) + return false; return true; } } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/SchedulingConfig.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/SchedulingConfig.java new file mode 100644 index 0000000000..38119eb6c0 --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/SchedulingConfig.java @@ -0,0 +1,419 @@ +/* + * Copyright 2010-2022 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; + +/** + *

+ * Specifies the date and time that a job will begin the rollout of the job + * document to all devices in the target group. Additionally, you can specify + * the end behavior for each job execution when it reaches the scheduled end + * time. + *

+ */ +public class SchedulingConfig implements Serializable { + /** + *

+ * The time a job will begin rollout of the job document to all devices in + * the target group for a job. The startTime can be scheduled + * up to a year in advance and must be scheduled a minimum of thirty minutes + * from the current time. + *

+ *

+ * Constraints:
+ * Length: 1 - 64
+ */ + private String startTime; + + /** + *

+ * The time a job will stop rollout of the job document to all devices in + * the target group for a job. The endTime must take place no + * later than two years from the current time and be scheduled a minimum of + * thirty minutes from the current time. The minimum duration between + * startTime and endTime is thirty minutes. The + * maximum duration between startTime and endTime + * is two years. + *

+ *

+ * Constraints:
+ * Length: 1 - 64
+ */ + private String endTime; + + /** + *

+ * Specifies the end behavior for all job executions after a job reaches the + * selected endTime. If endTime is not selected + * when creating the job, then endBehavior does not apply. + *

+ *

+ * Constraints:
+ * Allowed Values: STOP_ROLLOUT, CANCEL, FORCE_CANCEL + */ + private String endBehavior; + + /** + *

+ * The time a job will begin rollout of the job document to all devices in + * the target group for a job. The startTime can be scheduled + * up to a year in advance and must be scheduled a minimum of thirty minutes + * from the current time. + *

+ *

+ * Constraints:
+ * Length: 1 - 64
+ * + * @return

+ * The time a job will begin rollout of the job document to all + * devices in the target group for a job. The startTime + * can be scheduled up to a year in advance and must be scheduled a + * minimum of thirty minutes from the current time. + *

+ */ + public String getStartTime() { + return startTime; + } + + /** + *

+ * The time a job will begin rollout of the job document to all devices in + * the target group for a job. The startTime can be scheduled + * up to a year in advance and must be scheduled a minimum of thirty minutes + * from the current time. + *

+ *

+ * Constraints:
+ * Length: 1 - 64
+ * + * @param startTime

+ * The time a job will begin rollout of the job document to all + * devices in the target group for a job. The + * startTime can be scheduled up to a year in + * advance and must be scheduled a minimum of thirty minutes from + * the current time. + *

+ */ + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + /** + *

+ * The time a job will begin rollout of the job document to all devices in + * the target group for a job. The startTime can be scheduled + * up to a year in advance and must be scheduled a minimum of thirty minutes + * from the current time. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 1 - 64
+ * + * @param startTime

+ * The time a job will begin rollout of the job document to all + * devices in the target group for a job. The + * startTime can be scheduled up to a year in + * advance and must be scheduled a minimum of thirty minutes from + * the current time. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public SchedulingConfig withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + *

+ * The time a job will stop rollout of the job document to all devices in + * the target group for a job. The endTime must take place no + * later than two years from the current time and be scheduled a minimum of + * thirty minutes from the current time. The minimum duration between + * startTime and endTime is thirty minutes. The + * maximum duration between startTime and endTime + * is two years. + *

+ *

+ * Constraints:
+ * Length: 1 - 64
+ * + * @return

+ * The time a job will stop rollout of the job document to all + * devices in the target group for a job. The endTime + * must take place no later than two years from the current time and + * be scheduled a minimum of thirty minutes from the current time. + * The minimum duration between startTime and + * endTime is thirty minutes. The maximum duration + * between startTime and endTime is two + * years. + *

+ */ + public String getEndTime() { + return endTime; + } + + /** + *

+ * The time a job will stop rollout of the job document to all devices in + * the target group for a job. The endTime must take place no + * later than two years from the current time and be scheduled a minimum of + * thirty minutes from the current time. The minimum duration between + * startTime and endTime is thirty minutes. The + * maximum duration between startTime and endTime + * is two years. + *

+ *

+ * Constraints:
+ * Length: 1 - 64
+ * + * @param endTime

+ * The time a job will stop rollout of the job document to all + * devices in the target group for a job. The + * endTime must take place no later than two years + * from the current time and be scheduled a minimum of thirty + * minutes from the current time. The minimum duration between + * startTime and endTime is thirty + * minutes. The maximum duration between startTime + * and endTime is two years. + *

+ */ + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + /** + *

+ * The time a job will stop rollout of the job document to all devices in + * the target group for a job. The endTime must take place no + * later than two years from the current time and be scheduled a minimum of + * thirty minutes from the current time. The minimum duration between + * startTime and endTime is thirty minutes. The + * maximum duration between startTime and endTime + * is two years. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 1 - 64
+ * + * @param endTime

+ * The time a job will stop rollout of the job document to all + * devices in the target group for a job. The + * endTime must take place no later than two years + * from the current time and be scheduled a minimum of thirty + * minutes from the current time. The minimum duration between + * startTime and endTime is thirty + * minutes. The maximum duration between startTime + * and endTime is two years. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public SchedulingConfig withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + *

+ * Specifies the end behavior for all job executions after a job reaches the + * selected endTime. If endTime is not selected + * when creating the job, then endBehavior does not apply. + *

+ *

+ * Constraints:
+ * Allowed Values: STOP_ROLLOUT, CANCEL, FORCE_CANCEL + * + * @return

+ * Specifies the end behavior for all job executions after a job + * reaches the selected endTime. If + * endTime is not selected when creating the job, then + * endBehavior does not apply. + *

+ * @see JobEndBehavior + */ + public String getEndBehavior() { + return endBehavior; + } + + /** + *

+ * Specifies the end behavior for all job executions after a job reaches the + * selected endTime. If endTime is not selected + * when creating the job, then endBehavior does not apply. + *

+ *

+ * Constraints:
+ * Allowed Values: STOP_ROLLOUT, CANCEL, FORCE_CANCEL + * + * @param endBehavior

+ * Specifies the end behavior for all job executions after a job + * reaches the selected endTime. If + * endTime is not selected when creating the job, + * then endBehavior does not apply. + *

+ * @see JobEndBehavior + */ + public void setEndBehavior(String endBehavior) { + this.endBehavior = endBehavior; + } + + /** + *

+ * Specifies the end behavior for all job executions after a job reaches the + * selected endTime. If endTime is not selected + * when creating the job, then endBehavior does not apply. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Allowed Values: STOP_ROLLOUT, CANCEL, FORCE_CANCEL + * + * @param endBehavior

+ * Specifies the end behavior for all job executions after a job + * reaches the selected endTime. If + * endTime is not selected when creating the job, + * then endBehavior does not apply. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see JobEndBehavior + */ + public SchedulingConfig withEndBehavior(String endBehavior) { + this.endBehavior = endBehavior; + return this; + } + + /** + *

+ * Specifies the end behavior for all job executions after a job reaches the + * selected endTime. If endTime is not selected + * when creating the job, then endBehavior does not apply. + *

+ *

+ * Constraints:
+ * Allowed Values: STOP_ROLLOUT, CANCEL, FORCE_CANCEL + * + * @param endBehavior

+ * Specifies the end behavior for all job executions after a job + * reaches the selected endTime. If + * endTime is not selected when creating the job, + * then endBehavior does not apply. + *

+ * @see JobEndBehavior + */ + public void setEndBehavior(JobEndBehavior endBehavior) { + this.endBehavior = endBehavior.toString(); + } + + /** + *

+ * Specifies the end behavior for all job executions after a job reaches the + * selected endTime. If endTime is not selected + * when creating the job, then endBehavior does not apply. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Allowed Values: STOP_ROLLOUT, CANCEL, FORCE_CANCEL + * + * @param endBehavior

+ * Specifies the end behavior for all job executions after a job + * reaches the selected endTime. If + * endTime is not selected when creating the job, + * then endBehavior does not apply. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see JobEndBehavior + */ + public SchedulingConfig withEndBehavior(JobEndBehavior endBehavior) { + this.endBehavior = endBehavior.toString(); + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getStartTime() != null) + sb.append("startTime: " + getStartTime() + ","); + if (getEndTime() != null) + sb.append("endTime: " + getEndTime() + ","); + if (getEndBehavior() != null) + sb.append("endBehavior: " + getEndBehavior()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + hashCode = prime * hashCode + + ((getEndBehavior() == null) ? 0 : getEndBehavior().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof SchedulingConfig == false) + return false; + SchedulingConfig other = (SchedulingConfig) obj; + + if (other.getStartTime() == null ^ this.getStartTime() == null) + return false; + if (other.getStartTime() != null + && other.getStartTime().equals(this.getStartTime()) == false) + return false; + if (other.getEndTime() == null ^ this.getEndTime() == null) + return false; + if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) + return false; + if (other.getEndBehavior() == null ^ this.getEndBehavior() == null) + return false; + if (other.getEndBehavior() != null + && other.getEndBehavior().equals(this.getEndBehavior()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ThingGroupIndexingConfiguration.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ThingGroupIndexingConfiguration.java index 1fa8d0cf1c..d47f66d639 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ThingGroupIndexingConfiguration.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ThingGroupIndexingConfiguration.java @@ -36,7 +36,11 @@ public class ThingGroupIndexingConfiguration implements Serializable { /** *

* Contains fields that are indexed and whose types are already known by the - * Fleet Indexing service. + * Fleet Indexing service. This is an optional field. For more information, + * see Managed fields in the Amazon Web Services IoT Core Developer + * Guide. *

*/ private java.util.List managedFields; @@ -154,12 +158,20 @@ public ThingGroupIndexingConfiguration withThingGroupIndexingMode( /** *

* Contains fields that are indexed and whose types are already known by the - * Fleet Indexing service. + * Fleet Indexing service. This is an optional field. For more information, + * see Managed fields in the Amazon Web Services IoT Core Developer + * Guide. *

* * @return

* Contains fields that are indexed and whose types are already - * known by the Fleet Indexing service. + * known by the Fleet Indexing service. This is an optional field. + * For more information, see Managed fields in the Amazon Web Services IoT Core + * Developer Guide. *

*/ public java.util.List getManagedFields() { @@ -169,12 +181,20 @@ public java.util.List getManagedFields() { /** *

* Contains fields that are indexed and whose types are already known by the - * Fleet Indexing service. + * Fleet Indexing service. This is an optional field. For more information, + * see Managed fields in the Amazon Web Services IoT Core Developer + * Guide. *

* * @param managedFields

* Contains fields that are indexed and whose types are already - * known by the Fleet Indexing service. + * known by the Fleet Indexing service. This is an optional + * field. For more information, see Managed fields in the Amazon Web Services IoT Core + * Developer Guide. *

*/ public void setManagedFields(java.util.Collection managedFields) { @@ -189,7 +209,11 @@ public void setManagedFields(java.util.Collection managedFields) { /** *

* Contains fields that are indexed and whose types are already known by the - * Fleet Indexing service. + * Fleet Indexing service. This is an optional field. For more information, + * see Managed fields in the Amazon Web Services IoT Core Developer + * Guide. *

*

* Returns a reference to this object so that method calls can be chained @@ -197,7 +221,11 @@ public void setManagedFields(java.util.Collection managedFields) { * * @param managedFields

* Contains fields that are indexed and whose types are already - * known by the Fleet Indexing service. + * known by the Fleet Indexing service. This is an optional + * field. For more information, see Managed fields in the Amazon Web Services IoT Core + * Developer Guide. *

* @return A reference to this updated object so that method calls can be * chained together. @@ -215,7 +243,11 @@ public ThingGroupIndexingConfiguration withManagedFields(Field... managedFields) /** *

* Contains fields that are indexed and whose types are already known by the - * Fleet Indexing service. + * Fleet Indexing service. This is an optional field. For more information, + * see Managed fields in the Amazon Web Services IoT Core Developer + * Guide. *

*

* Returns a reference to this object so that method calls can be chained @@ -223,7 +255,11 @@ public ThingGroupIndexingConfiguration withManagedFields(Field... managedFields) * * @param managedFields

* Contains fields that are indexed and whose types are already - * known by the Fleet Indexing service. + * known by the Fleet Indexing service. This is an optional + * field. For more information, see Managed fields in the Amazon Web Services IoT Core + * Developer Guide. *

* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UpdateJobRequest.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UpdateJobRequest.java index a71a39067e..45173fcb6d 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UpdateJobRequest.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UpdateJobRequest.java @@ -103,7 +103,6 @@ public class UpdateJobRequest extends AmazonWebServiceRequest implements Seriali * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/ private String namespaceId; @@ -455,7 +454,6 @@ public UpdateJobRequest withTimeoutConfig(TimeoutConfig timeoutConfig) { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @return

@@ -499,7 +497,6 @@ public String getNamespaceId() { * *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

@@ -546,7 +543,6 @@ public void setNamespaceId(String namespaceId) { * together. *

* Constraints:
- * Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
* * @param namespaceId

diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UserProperty.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UserProperty.java new file mode 100644 index 0000000000..22f057a1ac --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/UserProperty.java @@ -0,0 +1,207 @@ +/* + * Copyright 2010-2022 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; + +/** + *

+ * A key-value pair that you define in the header. Both the key and the value + * are either literal strings or valid substitution templates. + *

+ */ +public class UserProperty implements Serializable { + /** + *

+ * A key to be specified in UserProperty. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String key; + + /** + *

+ * A value to be specified in UserProperty. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ */ + private String value; + + /** + *

+ * A key to be specified in UserProperty. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * A key to be specified in UserProperty. + *

+ */ + public String getKey() { + return key; + } + + /** + *

+ * A key to be specified in UserProperty. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param key

+ * A key to be specified in UserProperty. + *

+ */ + public void setKey(String key) { + this.key = key; + } + + /** + *

+ * A key to be specified in UserProperty. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param key

+ * A key to be specified in UserProperty. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public UserProperty withKey(String key) { + this.key = key; + return this; + } + + /** + *

+ * A value to be specified in UserProperty. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @return

+ * A value to be specified in UserProperty. + *

+ */ + public String getValue() { + return value; + } + + /** + *

+ * A value to be specified in UserProperty. + *

+ *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param value

+ * A value to be specified in UserProperty. + *

+ */ + public void setValue(String value) { + this.value = value; + } + + /** + *

+ * A value to be specified in UserProperty. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 0 - 1024
+ * + * @param value

+ * A value to be specified in UserProperty. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public UserProperty withValue(String value) { + this.value = value; + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getKey() != null) + sb.append("key: " + getKey() + ","); + if (getValue() != null) + sb.append("value: " + getValue()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); + hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof UserProperty == false) + return false; + UserProperty other = (UserProperty) obj; + + if (other.getKey() == null ^ this.getKey() == null) + return false; + if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) + return false; + if (other.getValue() == null ^ this.getValue() == null) + return false; + if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/CreateJobRequestMarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/CreateJobRequestMarshaller.java index 980d7bd388..f133d0f8d1 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/CreateJobRequestMarshaller.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/CreateJobRequestMarshaller.java @@ -160,6 +160,11 @@ public Request marshall(CreateJobRequest createJobRequest) { } jsonWriter.endObject(); } + if (createJobRequest.getSchedulingConfig() != null) { + SchedulingConfig schedulingConfig = createJobRequest.getSchedulingConfig(); + jsonWriter.name("schedulingConfig"); + SchedulingConfigJsonMarshaller.getInstance().marshall(schedulingConfig, jsonWriter); + } jsonWriter.endObject(); jsonWriter.close(); diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonMarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonMarshaller.java index e7985461ed..0b8032ea09 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonMarshaller.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonMarshaller.java @@ -154,6 +154,11 @@ public void marshall(Job job, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.name("isConcurrent"); jsonWriter.value(isConcurrent); } + if (job.getSchedulingConfig() != null) { + SchedulingConfig schedulingConfig = job.getSchedulingConfig(); + jsonWriter.name("schedulingConfig"); + SchedulingConfigJsonMarshaller.getInstance().marshall(schedulingConfig, jsonWriter); + } jsonWriter.endObject(); } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonUnmarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonUnmarshaller.java index cb7ea57d89..e24a16986f 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonUnmarshaller.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/JobJsonUnmarshaller.java @@ -106,6 +106,9 @@ public Job unmarshall(JsonUnmarshallerContext context) throws Exception { } else if (name.equals("isConcurrent")) { job.setIsConcurrent(BooleanJsonUnmarshaller.getInstance() .unmarshall(context)); + } else if (name.equals("schedulingConfig")) { + job.setSchedulingConfig(SchedulingConfigJsonUnmarshaller.getInstance() + .unmarshall(context)); } else { reader.skipValue(); } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonMarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonMarshaller.java new file mode 100644 index 0000000000..b21a7b91b4 --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonMarshaller.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010-2022 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.transform; + +import com.amazonaws.services.iot.model.*; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.json.AwsJsonWriter; + +/** + * JSON marshaller for POJO MqttHeaders + */ +class MqttHeadersJsonMarshaller { + + public void marshall(MqttHeaders mqttHeaders, AwsJsonWriter jsonWriter) throws Exception { + jsonWriter.beginObject(); + if (mqttHeaders.getPayloadFormatIndicator() != null) { + String payloadFormatIndicator = mqttHeaders.getPayloadFormatIndicator(); + jsonWriter.name("payloadFormatIndicator"); + jsonWriter.value(payloadFormatIndicator); + } + if (mqttHeaders.getContentType() != null) { + String contentType = mqttHeaders.getContentType(); + jsonWriter.name("contentType"); + jsonWriter.value(contentType); + } + if (mqttHeaders.getResponseTopic() != null) { + String responseTopic = mqttHeaders.getResponseTopic(); + jsonWriter.name("responseTopic"); + jsonWriter.value(responseTopic); + } + if (mqttHeaders.getCorrelationData() != null) { + String correlationData = mqttHeaders.getCorrelationData(); + jsonWriter.name("correlationData"); + jsonWriter.value(correlationData); + } + if (mqttHeaders.getMessageExpiry() != null) { + String messageExpiry = mqttHeaders.getMessageExpiry(); + jsonWriter.name("messageExpiry"); + jsonWriter.value(messageExpiry); + } + if (mqttHeaders.getUserProperties() != null) { + java.util.List userProperties = mqttHeaders.getUserProperties(); + jsonWriter.name("userProperties"); + jsonWriter.beginArray(); + for (UserProperty userPropertiesItem : userProperties) { + if (userPropertiesItem != null) { + UserPropertyJsonMarshaller.getInstance().marshall(userPropertiesItem, + jsonWriter); + } + } + jsonWriter.endArray(); + } + jsonWriter.endObject(); + } + + private static MqttHeadersJsonMarshaller instance; + + public static MqttHeadersJsonMarshaller getInstance() { + if (instance == null) + instance = new MqttHeadersJsonMarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonUnmarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonUnmarshaller.java new file mode 100644 index 0000000000..4e2ebc3dee --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/MqttHeadersJsonUnmarshaller.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010-2022 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.transform; + +import com.amazonaws.services.iot.model.*; +import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; +import com.amazonaws.transform.*; +import com.amazonaws.util.json.AwsJsonReader; + +/** + * JSON unmarshaller for POJO MqttHeaders + */ +class MqttHeadersJsonUnmarshaller implements Unmarshaller { + + public MqttHeaders unmarshall(JsonUnmarshallerContext context) throws Exception { + AwsJsonReader reader = context.getReader(); + if (!reader.isContainer()) { + reader.skipValue(); + return null; + } + MqttHeaders mqttHeaders = new MqttHeaders(); + reader.beginObject(); + while (reader.hasNext()) { + String name = reader.nextName(); + if (name.equals("payloadFormatIndicator")) { + mqttHeaders.setPayloadFormatIndicator(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("contentType")) { + mqttHeaders.setContentType(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("responseTopic")) { + mqttHeaders.setResponseTopic(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("correlationData")) { + mqttHeaders.setCorrelationData(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("messageExpiry")) { + mqttHeaders.setMessageExpiry(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("userProperties")) { + mqttHeaders.setUserProperties(new ListUnmarshaller( + UserPropertyJsonUnmarshaller.getInstance() + ) + .unmarshall(context)); + } else { + reader.skipValue(); + } + } + reader.endObject(); + return mqttHeaders; + } + + private static MqttHeadersJsonUnmarshaller instance; + + public static MqttHeadersJsonUnmarshaller getInstance() { + if (instance == null) + instance = new MqttHeadersJsonUnmarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonMarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonMarshaller.java index 43f6396aac..a65c827294 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonMarshaller.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonMarshaller.java @@ -42,6 +42,11 @@ public void marshall(RepublishAction republishAction, AwsJsonWriter jsonWriter) jsonWriter.name("qos"); jsonWriter.value(qos); } + if (republishAction.getHeaders() != null) { + MqttHeaders headers = republishAction.getHeaders(); + jsonWriter.name("headers"); + MqttHeadersJsonMarshaller.getInstance().marshall(headers, jsonWriter); + } jsonWriter.endObject(); } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonUnmarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonUnmarshaller.java index 582859684b..6ff86abf1a 100644 --- a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonUnmarshaller.java +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/RepublishActionJsonUnmarshaller.java @@ -45,6 +45,9 @@ public RepublishAction unmarshall(JsonUnmarshallerContext context) throws Except } else if (name.equals("qos")) { republishAction.setQos(IntegerJsonUnmarshaller.getInstance() .unmarshall(context)); + } else if (name.equals("headers")) { + republishAction.setHeaders(MqttHeadersJsonUnmarshaller.getInstance() + .unmarshall(context)); } else { reader.skipValue(); } diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonMarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonMarshaller.java new file mode 100644 index 0000000000..1344dbd3e8 --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonMarshaller.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010-2022 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.transform; + +import com.amazonaws.services.iot.model.*; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.json.AwsJsonWriter; + +/** + * JSON marshaller for POJO SchedulingConfig + */ +class SchedulingConfigJsonMarshaller { + + public void marshall(SchedulingConfig schedulingConfig, AwsJsonWriter jsonWriter) + throws Exception { + jsonWriter.beginObject(); + if (schedulingConfig.getStartTime() != null) { + String startTime = schedulingConfig.getStartTime(); + jsonWriter.name("startTime"); + jsonWriter.value(startTime); + } + if (schedulingConfig.getEndTime() != null) { + String endTime = schedulingConfig.getEndTime(); + jsonWriter.name("endTime"); + jsonWriter.value(endTime); + } + if (schedulingConfig.getEndBehavior() != null) { + String endBehavior = schedulingConfig.getEndBehavior(); + jsonWriter.name("endBehavior"); + jsonWriter.value(endBehavior); + } + jsonWriter.endObject(); + } + + private static SchedulingConfigJsonMarshaller instance; + + public static SchedulingConfigJsonMarshaller getInstance() { + if (instance == null) + instance = new SchedulingConfigJsonMarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonUnmarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonUnmarshaller.java new file mode 100644 index 0000000000..43c8ab70af --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/SchedulingConfigJsonUnmarshaller.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010-2022 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.transform; + +import com.amazonaws.services.iot.model.*; +import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; +import com.amazonaws.transform.*; +import com.amazonaws.util.json.AwsJsonReader; + +/** + * JSON unmarshaller for POJO SchedulingConfig + */ +class SchedulingConfigJsonUnmarshaller implements + Unmarshaller { + + public SchedulingConfig unmarshall(JsonUnmarshallerContext context) throws Exception { + AwsJsonReader reader = context.getReader(); + if (!reader.isContainer()) { + reader.skipValue(); + return null; + } + SchedulingConfig schedulingConfig = new SchedulingConfig(); + reader.beginObject(); + while (reader.hasNext()) { + String name = reader.nextName(); + if (name.equals("startTime")) { + schedulingConfig.setStartTime(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("endTime")) { + schedulingConfig.setEndTime(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("endBehavior")) { + schedulingConfig.setEndBehavior(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else { + reader.skipValue(); + } + } + reader.endObject(); + return schedulingConfig; + } + + private static SchedulingConfigJsonUnmarshaller instance; + + public static SchedulingConfigJsonUnmarshaller getInstance() { + if (instance == null) + instance = new SchedulingConfigJsonUnmarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonMarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonMarshaller.java new file mode 100644 index 0000000000..2ea798afdc --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonMarshaller.java @@ -0,0 +1,49 @@ +/* + * Copyright 2010-2022 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.transform; + +import com.amazonaws.services.iot.model.*; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.json.AwsJsonWriter; + +/** + * JSON marshaller for POJO UserProperty + */ +class UserPropertyJsonMarshaller { + + public void marshall(UserProperty userProperty, AwsJsonWriter jsonWriter) throws Exception { + jsonWriter.beginObject(); + if (userProperty.getKey() != null) { + String key = userProperty.getKey(); + jsonWriter.name("key"); + jsonWriter.value(key); + } + if (userProperty.getValue() != null) { + String value = userProperty.getValue(); + jsonWriter.name("value"); + jsonWriter.value(value); + } + jsonWriter.endObject(); + } + + private static UserPropertyJsonMarshaller instance; + + public static UserPropertyJsonMarshaller getInstance() { + if (instance == null) + instance = new UserPropertyJsonMarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonUnmarshaller.java b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonUnmarshaller.java new file mode 100644 index 0000000000..2ed190f423 --- /dev/null +++ b/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/UserPropertyJsonUnmarshaller.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010-2022 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.transform; + +import com.amazonaws.services.iot.model.*; +import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; +import com.amazonaws.transform.*; +import com.amazonaws.util.json.AwsJsonReader; + +/** + * JSON unmarshaller for POJO UserProperty + */ +class UserPropertyJsonUnmarshaller implements Unmarshaller { + + public UserProperty unmarshall(JsonUnmarshallerContext context) throws Exception { + AwsJsonReader reader = context.getReader(); + if (!reader.isContainer()) { + reader.skipValue(); + return null; + } + UserProperty userProperty = new UserProperty(); + reader.beginObject(); + while (reader.hasNext()) { + String name = reader.nextName(); + if (name.equals("key")) { + userProperty.setKey(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("value")) { + userProperty.setValue(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else { + reader.skipValue(); + } + } + reader.endObject(); + return userProperty; + } + + private static UserPropertyJsonUnmarshaller instance; + + public static UserPropertyJsonUnmarshaller getInstance() { + if (instance == null) + instance = new UserPropertyJsonUnmarshaller(); + return instance; + } +}