Configuration Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.service.Configuration

public class Configuration

Field Summary

Modifier and Type Field and Description
protected final java.lang.String UTC_TIME_DEFAULT
protected ConfigurationContent content

Specifies the configuration content

protected java.lang.String createdTimeUtc

Datetime of configuration created time.

protected java.lang.String etag

A string representing a ETAG

protected java.lang.String id

Configuration name A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.

protected java.util.HashMap<java.lang.String,java.lang.String> labels

Specifies the labels map of the configuration

protected java.lang.String lastUpdatedTimeUtc

Datetime of configuration last updated time.

protected ConfigurationMetrics metrics

Specifies the custom configuration metrics

protected java.lang.Integer priority

Specifies the priority

protected java.lang.String schemaVersion

Specifies the schemaVersion

protected ConfigurationMetrics systemMetrics

Specifies the system configuration metrics

protected java.lang.String targetCondition

Specifies the targetCondition

Constructor Summary

Constructor Description
Configuration(String configurationId)

Create a Configuration instance using the given configuration name

Method Summary

Modifier and Type Method and Description
ConfigurationContent getContent()

Getter for configuration content

java.lang.String getCreatedTimeUtc()

Getter for configuration created time

java.lang.String getEtag()

Getter for eTag

java.lang.String getId()

Getter for configuration name

java.util.HashMap<java.lang.String,java.lang.String> getLabels()

Getter for labels

java.lang.String getLastUpdatedTimeUtc()

Getter for configuration last updated time string

ConfigurationMetrics getMetrics()

Getter for the custom configuration metrics

java.lang.Integer getPriority()

Getter for the configuration priority

java.lang.String getSchemaVersion()

Getter for schema version

ConfigurationMetrics getSystemMetrics()

Getter for the system configuration metrics

java.lang.String getTargetCondition()

Getter for targetCondition

void setContent(ConfigurationContent content)

Setter for the configuration content

void setEtag(String etag)

Setter for the ETAG

void setForceUpdate(Boolean forceUpdate)

Deprecated

This method currently only validates forceUpdate parameter

Setter for force update boolean

void setLabels(HashMap<String,String> labels)

Setter for the labels of the configuration

void setMetrics(ConfigurationMetrics metrics)

Set the configuration metrics of this object

void setPriority(Integer priority)

Setter for the configuration priority

void setTargetCondition(String targetCondition)

Setter for the targetCondition

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

UTC_TIME_DEFAULT

protected final String UTC_TIME_DEFAULT

content

protected ConfigurationContent content

Specifies the configuration content

createdTimeUtc

protected String createdTimeUtc

Datetime of configuration created time.

etag

protected String etag

A string representing a ETAG

id

protected String id

Configuration name A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.

labels

protected HashMap labels

Specifies the labels map of the configuration

lastUpdatedTimeUtc

protected String lastUpdatedTimeUtc

Datetime of configuration last updated time.

metrics

protected ConfigurationMetrics metrics

Specifies the custom configuration metrics

priority

protected Integer priority

Specifies the priority

schemaVersion

protected String schemaVersion

Specifies the schemaVersion

systemMetrics

protected ConfigurationMetrics systemMetrics

Specifies the system configuration metrics

targetCondition

protected String targetCondition

Specifies the targetCondition

Constructor Details

Configuration

public Configuration(String configurationId)

Create a Configuration instance using the given configuration name

Parameters:

configurationId - Name of the configuration (used as configuration id)

Method Details

getContent

public ConfigurationContent getContent()

Getter for configuration content

Returns:

The configuration content object

getCreatedTimeUtc

public String getCreatedTimeUtc()

Getter for configuration created time

Returns:

The string containing the time when the configuration was created

getEtag

public String getEtag()

Getter for eTag

Returns:

The eTag string

getId

public String getId()

Getter for configuration name

Returns:

The configuration string

getLabels

public HashMap getLabels()

Getter for labels

Returns:

The labels map

getLastUpdatedTimeUtc

public String getLastUpdatedTimeUtc()

Getter for configuration last updated time string

Returns:

The string containing the time when the configuration was last updated

getMetrics

public ConfigurationMetrics getMetrics()

Getter for the custom configuration metrics

Returns:

The custom configuration metrics object

getPriority

public Integer getPriority()

Getter for the configuration priority

Returns:

The Integer containing the priority

getSchemaVersion

public String getSchemaVersion()

Getter for schema version

Returns:

The schema version

getSystemMetrics

public ConfigurationMetrics getSystemMetrics()

Getter for the system configuration metrics

Returns:

The system configuration metrics object

getTargetCondition

public String getTargetCondition()

Getter for targetCondition

Returns:

The targetCondition string

setContent

public void setContent(ConfigurationContent content)

Setter for the configuration content

Parameters:

content - configuration content to be set

setEtag

public void setEtag(String etag)

Setter for the ETAG

Parameters:

etag - to be set

setForceUpdate


public void setForceUpdate(Boolean forceUpdate)

Deprecated

This method currently only validates forceUpdate parameter

Setter for force update boolean

Parameters:

forceUpdate -
  • Boolean controlling if the update should be forced or not

Throws:

java.lang.IllegalArgumentException - if the provided argument is null

setLabels

public void setLabels(HashMap labels)

Setter for the labels of the configuration

Parameters:

labels - labels to be set

setMetrics

public void setMetrics(ConfigurationMetrics metrics)

Set the configuration metrics of this object

Parameters:

metrics - the metrics to set

setPriority

public void setPriority(Integer priority)

Setter for the configuration priority

Parameters:

priority - to be set

setTargetCondition

public void setTargetCondition(String targetCondition)

Setter for the targetCondition

Parameters:

targetCondition - targetCondition to be set

Applies to