/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.kinesisvideo.model; import java.io.Serializable; /** *

* A description of the stream's edge configuration that will be used to sync * with the Edge Agent IoT Greengrass component. The Edge Agent component will * run on an IoT Hub Device setup at your premise. *

*/ public class EdgeConfig implements Serializable { /** *

* The "Internet of Things (IoT) Thing" Arn of the stream. *

*

* Constraints:
* Length: 1 - 1024
* Pattern: arn:[a-z\d-]+:iot:[a-z0-9-]+:[0-9]+:thing/[a-zA-Z0-9_.-]+ *
*/ private String hubDeviceArn; /** *

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as credentials to * access the local media files streamed on the camera. *

*/ private RecorderConfig recorderConfig; /** *

* The uploader configuration contains the ScheduleExpression * details that are used to schedule upload jobs for the recorded media * files from the Edge Agent to a Kinesis Video Stream. *

*/ private UploaderConfig uploaderConfig; /** *

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size configuration ( * LocalSizeConfig) details that are used to make the deletion. *

*/ private DeletionConfig deletionConfig; /** *

* The "Internet of Things (IoT) Thing" Arn of the stream. *

*

* Constraints:
* Length: 1 - 1024
* Pattern: arn:[a-z\d-]+:iot:[a-z0-9-]+:[0-9]+:thing/[a-zA-Z0-9_.-]+ *
* * @return

* The "Internet of Things (IoT) Thing" Arn of the stream. *

*/ public String getHubDeviceArn() { return hubDeviceArn; } /** *

* The "Internet of Things (IoT) Thing" Arn of the stream. *

*

* Constraints:
* Length: 1 - 1024
* Pattern: arn:[a-z\d-]+:iot:[a-z0-9-]+:[0-9]+:thing/[a-zA-Z0-9_.-]+ *
* * @param hubDeviceArn

* The "Internet of Things (IoT) Thing" Arn of the stream. *

*/ public void setHubDeviceArn(String hubDeviceArn) { this.hubDeviceArn = hubDeviceArn; } /** *

* The "Internet of Things (IoT) Thing" Arn of the stream. *

*

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

* Constraints:
* Length: 1 - 1024
* Pattern: arn:[a-z\d-]+:iot:[a-z0-9-]+:[0-9]+:thing/[a-zA-Z0-9_.-]+ *
* * @param hubDeviceArn

* The "Internet of Things (IoT) Thing" Arn of the stream. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EdgeConfig withHubDeviceArn(String hubDeviceArn) { this.hubDeviceArn = hubDeviceArn; return this; } /** *

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as credentials to * access the local media files streamed on the camera. *

* * @return

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as * credentials to access the local media files streamed on the * camera. *

*/ public RecorderConfig getRecorderConfig() { return recorderConfig; } /** *

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as credentials to * access the local media files streamed on the camera. *

* * @param recorderConfig

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as * credentials to access the local media files streamed on the * camera. *

*/ public void setRecorderConfig(RecorderConfig recorderConfig) { this.recorderConfig = recorderConfig; } /** *

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as credentials to * access the local media files streamed on the camera. *

*

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

* The recorder configuration consists of the local * MediaSourceConfig details, that are used as * credentials to access the local media files streamed on the * camera. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EdgeConfig withRecorderConfig(RecorderConfig recorderConfig) { this.recorderConfig = recorderConfig; return this; } /** *

* The uploader configuration contains the ScheduleExpression * details that are used to schedule upload jobs for the recorded media * files from the Edge Agent to a Kinesis Video Stream. *

* * @return

* The uploader configuration contains the * ScheduleExpression details that are used to schedule * upload jobs for the recorded media files from the Edge Agent to a * Kinesis Video Stream. *

*/ public UploaderConfig getUploaderConfig() { return uploaderConfig; } /** *

* The uploader configuration contains the ScheduleExpression * details that are used to schedule upload jobs for the recorded media * files from the Edge Agent to a Kinesis Video Stream. *

* * @param uploaderConfig

* The uploader configuration contains the * ScheduleExpression details that are used to * schedule upload jobs for the recorded media files from the * Edge Agent to a Kinesis Video Stream. *

*/ public void setUploaderConfig(UploaderConfig uploaderConfig) { this.uploaderConfig = uploaderConfig; } /** *

* The uploader configuration contains the ScheduleExpression * details that are used to schedule upload jobs for the recorded media * files from the Edge Agent to a Kinesis Video Stream. *

*

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

* The uploader configuration contains the * ScheduleExpression details that are used to * schedule upload jobs for the recorded media files from the * Edge Agent to a Kinesis Video Stream. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EdgeConfig withUploaderConfig(UploaderConfig uploaderConfig) { this.uploaderConfig = uploaderConfig; return this; } /** *

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size configuration ( * LocalSizeConfig) details that are used to make the deletion. *

* * @return

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size configuration ( * LocalSizeConfig) details that are used to make the * deletion. *

*/ public DeletionConfig getDeletionConfig() { return deletionConfig; } /** *

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size configuration ( * LocalSizeConfig) details that are used to make the deletion. *

* * @param deletionConfig

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size * configuration (LocalSizeConfig) details that are * used to make the deletion. *

*/ public void setDeletionConfig(DeletionConfig deletionConfig) { this.deletionConfig = deletionConfig; } /** *

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size configuration ( * LocalSizeConfig) details that are used to make the deletion. *

*

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

* The deletion configuration is made up of the retention time ( * EdgeRetentionInHours) and local size * configuration (LocalSizeConfig) details that are * used to make the deletion. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EdgeConfig withDeletionConfig(DeletionConfig deletionConfig) { this.deletionConfig = deletionConfig; 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 (getHubDeviceArn() != null) sb.append("HubDeviceArn: " + getHubDeviceArn() + ","); if (getRecorderConfig() != null) sb.append("RecorderConfig: " + getRecorderConfig() + ","); if (getUploaderConfig() != null) sb.append("UploaderConfig: " + getUploaderConfig() + ","); if (getDeletionConfig() != null) sb.append("DeletionConfig: " + getDeletionConfig()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHubDeviceArn() == null) ? 0 : getHubDeviceArn().hashCode()); hashCode = prime * hashCode + ((getRecorderConfig() == null) ? 0 : getRecorderConfig().hashCode()); hashCode = prime * hashCode + ((getUploaderConfig() == null) ? 0 : getUploaderConfig().hashCode()); hashCode = prime * hashCode + ((getDeletionConfig() == null) ? 0 : getDeletionConfig().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EdgeConfig == false) return false; EdgeConfig other = (EdgeConfig) obj; if (other.getHubDeviceArn() == null ^ this.getHubDeviceArn() == null) return false; if (other.getHubDeviceArn() != null && other.getHubDeviceArn().equals(this.getHubDeviceArn()) == false) return false; if (other.getRecorderConfig() == null ^ this.getRecorderConfig() == null) return false; if (other.getRecorderConfig() != null && other.getRecorderConfig().equals(this.getRecorderConfig()) == false) return false; if (other.getUploaderConfig() == null ^ this.getUploaderConfig() == null) return false; if (other.getUploaderConfig() != null && other.getUploaderConfig().equals(this.getUploaderConfig()) == false) return false; if (other.getDeletionConfig() == null ^ this.getDeletionConfig() == null) return false; if (other.getDeletionConfig() != null && other.getDeletionConfig().equals(this.getDeletionConfig()) == false) return false; return true; } }