/* * 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; /** *

* The configuration details required to delete the connection of the stream * from the Edge Agent. *

*/ public class DeletionConfig implements Serializable { /** *

* The number of hours that you want to retain the data in the stream on the * Edge Agent. The default value of the retention time is 720 hours, which * translates to 30 days. *

*

* Constraints:
* Range: 1 - 720
*/ private Integer edgeRetentionInHours; /** *

* The value of the local size required in order to delete the edge * configuration. *

*/ private LocalSizeConfig localSizeConfig; /** *

* The boolean value used to indicate whether or not you want * to mark the media for deletion, once it has been uploaded to the Kinesis * Video Stream cloud. The media files can be deleted if any of the deletion * configuration values are set to true, such as when the limit * for the EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure the * uploader schedule such that the media files are not being deleted before * they are initially uploaded to the Amazon Web Services cloud. *

*/ private Boolean deleteAfterUpload; /** *

* The number of hours that you want to retain the data in the stream on the * Edge Agent. The default value of the retention time is 720 hours, which * translates to 30 days. *

*

* Constraints:
* Range: 1 - 720
* * @return

* The number of hours that you want to retain the data in the * stream on the Edge Agent. The default value of the retention time * is 720 hours, which translates to 30 days. *

*/ public Integer getEdgeRetentionInHours() { return edgeRetentionInHours; } /** *

* The number of hours that you want to retain the data in the stream on the * Edge Agent. The default value of the retention time is 720 hours, which * translates to 30 days. *

*

* Constraints:
* Range: 1 - 720
* * @param edgeRetentionInHours

* The number of hours that you want to retain the data in the * stream on the Edge Agent. The default value of the retention * time is 720 hours, which translates to 30 days. *

*/ public void setEdgeRetentionInHours(Integer edgeRetentionInHours) { this.edgeRetentionInHours = edgeRetentionInHours; } /** *

* The number of hours that you want to retain the data in the stream on the * Edge Agent. The default value of the retention time is 720 hours, which * translates to 30 days. *

*

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

* Constraints:
* Range: 1 - 720
* * @param edgeRetentionInHours

* The number of hours that you want to retain the data in the * stream on the Edge Agent. The default value of the retention * time is 720 hours, which translates to 30 days. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DeletionConfig withEdgeRetentionInHours(Integer edgeRetentionInHours) { this.edgeRetentionInHours = edgeRetentionInHours; return this; } /** *

* The value of the local size required in order to delete the edge * configuration. *

* * @return

* The value of the local size required in order to delete the edge * configuration. *

*/ public LocalSizeConfig getLocalSizeConfig() { return localSizeConfig; } /** *

* The value of the local size required in order to delete the edge * configuration. *

* * @param localSizeConfig

* The value of the local size required in order to delete the * edge configuration. *

*/ public void setLocalSizeConfig(LocalSizeConfig localSizeConfig) { this.localSizeConfig = localSizeConfig; } /** *

* The value of the local size required in order to delete the edge * configuration. *

*

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

* The value of the local size required in order to delete the * edge configuration. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DeletionConfig withLocalSizeConfig(LocalSizeConfig localSizeConfig) { this.localSizeConfig = localSizeConfig; return this; } /** *

* The boolean value used to indicate whether or not you want * to mark the media for deletion, once it has been uploaded to the Kinesis * Video Stream cloud. The media files can be deleted if any of the deletion * configuration values are set to true, such as when the limit * for the EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure the * uploader schedule such that the media files are not being deleted before * they are initially uploaded to the Amazon Web Services cloud. *

* * @return

* The boolean value used to indicate whether or not * you want to mark the media for deletion, once it has been * uploaded to the Kinesis Video Stream cloud. The media files can * be deleted if any of the deletion configuration values are set to * true, such as when the limit for the * EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure * the uploader schedule such that the media files are not being * deleted before they are initially uploaded to the Amazon Web * Services cloud. *

*/ public Boolean isDeleteAfterUpload() { return deleteAfterUpload; } /** *

* The boolean value used to indicate whether or not you want * to mark the media for deletion, once it has been uploaded to the Kinesis * Video Stream cloud. The media files can be deleted if any of the deletion * configuration values are set to true, such as when the limit * for the EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure the * uploader schedule such that the media files are not being deleted before * they are initially uploaded to the Amazon Web Services cloud. *

* * @return

* The boolean value used to indicate whether or not * you want to mark the media for deletion, once it has been * uploaded to the Kinesis Video Stream cloud. The media files can * be deleted if any of the deletion configuration values are set to * true, such as when the limit for the * EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure * the uploader schedule such that the media files are not being * deleted before they are initially uploaded to the Amazon Web * Services cloud. *

*/ public Boolean getDeleteAfterUpload() { return deleteAfterUpload; } /** *

* The boolean value used to indicate whether or not you want * to mark the media for deletion, once it has been uploaded to the Kinesis * Video Stream cloud. The media files can be deleted if any of the deletion * configuration values are set to true, such as when the limit * for the EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure the * uploader schedule such that the media files are not being deleted before * they are initially uploaded to the Amazon Web Services cloud. *

* * @param deleteAfterUpload

* The boolean value used to indicate whether or not * you want to mark the media for deletion, once it has been * uploaded to the Kinesis Video Stream cloud. The media files * can be deleted if any of the deletion configuration values are * set to true, such as when the limit for the * EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure * the uploader schedule such that the media files are not being * deleted before they are initially uploaded to the Amazon Web * Services cloud. *

*/ public void setDeleteAfterUpload(Boolean deleteAfterUpload) { this.deleteAfterUpload = deleteAfterUpload; } /** *

* The boolean value used to indicate whether or not you want * to mark the media for deletion, once it has been uploaded to the Kinesis * Video Stream cloud. The media files can be deleted if any of the deletion * configuration values are set to true, such as when the limit * for the EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure the * uploader schedule such that the media files are not being deleted before * they are initially uploaded to the Amazon Web Services cloud. *

*

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

* The boolean value used to indicate whether or not * you want to mark the media for deletion, once it has been * uploaded to the Kinesis Video Stream cloud. The media files * can be deleted if any of the deletion configuration values are * set to true, such as when the limit for the * EdgeRetentionInHours, or the * MaxLocalMediaSizeInMB, has been reached. *

*

* Since the default value is set to true, configure * the uploader schedule such that the media files are not being * deleted before they are initially uploaded to the Amazon Web * Services cloud. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DeletionConfig withDeleteAfterUpload(Boolean deleteAfterUpload) { this.deleteAfterUpload = deleteAfterUpload; 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 (getEdgeRetentionInHours() != null) sb.append("EdgeRetentionInHours: " + getEdgeRetentionInHours() + ","); if (getLocalSizeConfig() != null) sb.append("LocalSizeConfig: " + getLocalSizeConfig() + ","); if (getDeleteAfterUpload() != null) sb.append("DeleteAfterUpload: " + getDeleteAfterUpload()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEdgeRetentionInHours() == null) ? 0 : getEdgeRetentionInHours().hashCode()); hashCode = prime * hashCode + ((getLocalSizeConfig() == null) ? 0 : getLocalSizeConfig().hashCode()); hashCode = prime * hashCode + ((getDeleteAfterUpload() == null) ? 0 : getDeleteAfterUpload().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletionConfig == false) return false; DeletionConfig other = (DeletionConfig) obj; if (other.getEdgeRetentionInHours() == null ^ this.getEdgeRetentionInHours() == null) return false; if (other.getEdgeRetentionInHours() != null && other.getEdgeRetentionInHours().equals(this.getEdgeRetentionInHours()) == false) return false; if (other.getLocalSizeConfig() == null ^ this.getLocalSizeConfig() == null) return false; if (other.getLocalSizeConfig() != null && other.getLocalSizeConfig().equals(this.getLocalSizeConfig()) == false) return false; if (other.getDeleteAfterUpload() == null ^ this.getDeleteAfterUpload() == null) return false; if (other.getDeleteAfterUpload() != null && other.getDeleteAfterUpload().equals(this.getDeleteAfterUpload()) == false) return false; return true; } }