All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.iot20180120.models.CreateOTAFirmwareRequest Maven / Gradle / Ivy

The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.iot20180120.models;

import com.aliyun.tea.*;

public class CreateOTAFirmwareRequest extends TeaModel {
    /**
     * 

The version number of the OTA update package. The value can contain letters, digits, periods (.), hyphens (-), and underscores (_). The version number must be 1 to 64 characters in length.

*

This parameter is required.

* * example: *

2.0.0

*/ @NameInMap("DestVersion") public String destVersion; /** *

The description of the OTA update package. The description must be 1 to 100 characters in length.

* * example: *

OTA function updated

*/ @NameInMap("FirmwareDesc") public String firmwareDesc; /** *

The name of the OTA update package. The name must be unique within an Alibaba Cloud account. The name cannot be modified after the OTA update package is created. The name must be 1 to 40 characters in length, and can contain letters, digits, hyphens (-), underscores (_), and parentheses (). The name must start with a letter or a digit.

*

This parameter is required.

* * example: *

Firmware2

*/ @NameInMap("FirmwareName") public String firmwareName; /** *

The signature of the OTA update package. The value is calculated by using the specified signature algorithm to sign the OTA update package.

*
*

If you add only one file to the OTA update package, you can configure this parameter. If you do not configure this parameter, the MD5 value of the OTA update package in OSS is used as the package signature.

*
* * example: *

93230c3bde425a9d7984a594ac55****

*/ @NameInMap("FirmwareSign") public String firmwareSign; /** *

The size of the OTA update package. Unit: bytes.

*
*

If you add only one file to the OTA update package, you can configure this parameter. If you do not configure this parameter, the size of the OTA update package in OSS is used.

*
* * example: *

900

*/ @NameInMap("FirmwareSize") public Integer firmwareSize; /** *

The URL of the OTA update package. This parameter specifies the storage location of the OTA update package in OSS. You can call the GenerateOTAUploadURL operation to generate a URL for the OTA update package.

*
*

If you add only one file to the OTA update package, you must configure this parameter.

*
*/ @NameInMap("FirmwareUrl") public String firmwareUrl; /** *

The ID of the instance. You can view the ID of the instance on the Overview page in the IoT Platform console.

*
*
    *
  • If your instance has an ID, you must specify the ID for this parameter. Otherwise, the call fails.
  • *
  • If no Overview page or ID is generated for your instance, you do not need to configure this parameter.
  • *
*
* * example: *

iot-cn-0pp1n8t****

*/ @NameInMap("IotInstanceId") public String iotInstanceId; /** *

The name of the OTA module. OTA modules are the updatable units of devices that belong to the same product.

*
*
    *
  • If you do not configure this parameter, the default OTA module is used. The default value indicates that the complete device firmware is updated.
  • *
  • You can call the CreateOTAModule operation to create a custom OTA module. You can call the ListOTAModuleByProduct operation to query the existing OTA modules of a product.
  • *
*
* * example: *

WifiConfigModify

*/ @NameInMap("ModuleName") public String moduleName; @NameInMap("MultiFiles") public java.util.List multiFiles; /** *

Specifies whether to verify the OTA update package before you create a batch update task.

*
    *
  • true The system verifies the OTA update package before you create a batch update task. This is the default value.
  • *
  • false: The system does not verify the OTA update package before you create a batch update task.
  • *
* * example: *

true

*/ @NameInMap("NeedToVerify") public Boolean needToVerify; /** *

The ProductKey of the product to which the OTA update package belongs.

* * example: *

a1uctKe****

*/ @NameInMap("ProductKey") public String productKey; /** *

The signature algorithm of the OTA update package. Set the value to MD5. The value indicates an MD5 signature.

*

Default value: MD5.

* * example: *

MD5

*/ @NameInMap("SignMethod") public String signMethod; /** *

The version number of the OTA module of the device to be updated.

*

You can call the QueryDeviceDetail operation and view the FirmwareVersion parameter in the response.

*
*
    *
  • If you set the Type parameter to 1, you must configure this parameter, and the value cannot be the same as the update package version that is specified by the DestVersion parameter.
  • *
  • If you set the Type parameter to 0, this parameter is optional.
  • *
*
* * example: *

1.0.0

*/ @NameInMap("SrcVersion") public String srcVersion; /** *

The type of the OTA update package. Valid values:

*
    *
  • 0: The uploaded file contains a full update package. IoT Platform pushes the full update package to a device for update.
  • *
  • 1: The uploaded file contains only the differences between the latest update package and the previous update package. IoT Platform pushes only the differences to a device for update.
  • *
*

Default value: 0.

* * example: *

0

*/ @NameInMap("Type") public Integer type; /** *

The custom information that you want to send to a device. The format of the custom information has no limits. However, the information cannot exceed 4,096 characters in length.

*

After you add the OTA update package and create an update task, IoT Platform sends the custom information to the specified device when IoT Platform pushes an update notification.

*/ @NameInMap("Udi") public String udi; public static CreateOTAFirmwareRequest build(java.util.Map map) throws Exception { CreateOTAFirmwareRequest self = new CreateOTAFirmwareRequest(); return TeaModel.build(map, self); } public CreateOTAFirmwareRequest setDestVersion(String destVersion) { this.destVersion = destVersion; return this; } public String getDestVersion() { return this.destVersion; } public CreateOTAFirmwareRequest setFirmwareDesc(String firmwareDesc) { this.firmwareDesc = firmwareDesc; return this; } public String getFirmwareDesc() { return this.firmwareDesc; } public CreateOTAFirmwareRequest setFirmwareName(String firmwareName) { this.firmwareName = firmwareName; return this; } public String getFirmwareName() { return this.firmwareName; } public CreateOTAFirmwareRequest setFirmwareSign(String firmwareSign) { this.firmwareSign = firmwareSign; return this; } public String getFirmwareSign() { return this.firmwareSign; } public CreateOTAFirmwareRequest setFirmwareSize(Integer firmwareSize) { this.firmwareSize = firmwareSize; return this; } public Integer getFirmwareSize() { return this.firmwareSize; } public CreateOTAFirmwareRequest setFirmwareUrl(String firmwareUrl) { this.firmwareUrl = firmwareUrl; return this; } public String getFirmwareUrl() { return this.firmwareUrl; } public CreateOTAFirmwareRequest setIotInstanceId(String iotInstanceId) { this.iotInstanceId = iotInstanceId; return this; } public String getIotInstanceId() { return this.iotInstanceId; } public CreateOTAFirmwareRequest setModuleName(String moduleName) { this.moduleName = moduleName; return this; } public String getModuleName() { return this.moduleName; } public CreateOTAFirmwareRequest setMultiFiles(java.util.List multiFiles) { this.multiFiles = multiFiles; return this; } public java.util.List getMultiFiles() { return this.multiFiles; } public CreateOTAFirmwareRequest setNeedToVerify(Boolean needToVerify) { this.needToVerify = needToVerify; return this; } public Boolean getNeedToVerify() { return this.needToVerify; } public CreateOTAFirmwareRequest setProductKey(String productKey) { this.productKey = productKey; return this; } public String getProductKey() { return this.productKey; } public CreateOTAFirmwareRequest setSignMethod(String signMethod) { this.signMethod = signMethod; return this; } public String getSignMethod() { return this.signMethod; } public CreateOTAFirmwareRequest setSrcVersion(String srcVersion) { this.srcVersion = srcVersion; return this; } public String getSrcVersion() { return this.srcVersion; } public CreateOTAFirmwareRequest setType(Integer type) { this.type = type; return this; } public Integer getType() { return this.type; } public CreateOTAFirmwareRequest setUdi(String udi) { this.udi = udi; return this; } public String getUdi() { return this.udi; } public static class CreateOTAFirmwareRequestMultiFiles extends TeaModel { /** *

The MD5 value of the file.

*
*

If you want to add multiple files to the OTA update package, you can configure this parameter. If you do not configure this parameter, the MD5 value of the file in OSS is used.

*
* * example: *

93230c3bde425a9d7984a594ac56***

*/ @NameInMap("FileMd5") public String fileMd5; /** *

The name of the file in the update package. The name must be 1 to 32 characters in length. You can specify up to 20 file names. Each name must be unique in the OTA update package.

*
*

If you want to add multiple files to the OTA update package, you must configure this parameter.

*
* * example: *

Firmware1

*/ @NameInMap("Name") public String name; /** *

The signature of the file. The value is calculated by using the specified signature algorithm to sign the file.

*
*

If you want to add multiple files to the OTA update package, you can configure this parameter. If you do not configure this parameter, the MD5 value of the file in OSS is used as the file signature.

*
* * example: *

93230c3bde425a9d7984a594ac45****

*/ @NameInMap("SignValue") public String signValue; /** *

The size of the file in the OTA update package. Unit: bytes.

*
*

If you want to add multiple files to the OTA update package, you can configure this parameter. If you do not configure this parameter, the size of the file in OSS is used.

*
* * example: *

200

*/ @NameInMap("Size") public Integer size; /** *

The URL of the file. This parameter specifies the storage location of the file in OSS. You can call the GenerateOTAUploadURL operation to generate a URL for each file in the OTA update package.

*
*

If you want to add multiple files to the OTA update package, you must configure this parameter.

*
*/ @NameInMap("Url") public String url; public static CreateOTAFirmwareRequestMultiFiles build(java.util.Map map) throws Exception { CreateOTAFirmwareRequestMultiFiles self = new CreateOTAFirmwareRequestMultiFiles(); return TeaModel.build(map, self); } public CreateOTAFirmwareRequestMultiFiles setFileMd5(String fileMd5) { this.fileMd5 = fileMd5; return this; } public String getFileMd5() { return this.fileMd5; } public CreateOTAFirmwareRequestMultiFiles setName(String name) { this.name = name; return this; } public String getName() { return this.name; } public CreateOTAFirmwareRequestMultiFiles setSignValue(String signValue) { this.signValue = signValue; return this; } public String getSignValue() { return this.signValue; } public CreateOTAFirmwareRequestMultiFiles setSize(Integer size) { this.size = size; return this; } public Integer getSize() { return this.size; } public CreateOTAFirmwareRequestMultiFiles setUrl(String url) { this.url = url; return this; } public String getUrl() { return this.url; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy