/* * 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.rekognition.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *

* Allows you to update a stream processor. You can change some settings and * regions of interest and delete certain parameters. *

*/ public class UpdateStreamProcessorRequest extends AmazonWebServiceRequest implements Serializable { /** *

* Name of the stream processor that you want to update. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*/ private String name; /** *

* The stream processor settings that you want to update. Label detection * settings can be updated to detect different labels with a different * minimum confidence. *

*/ private StreamProcessorSettingsForUpdate settingsForUpdate; /** *

* Specifies locations in the frames where Amazon Rekognition checks for * objects or people. This is an optional parameter for label detection * stream processors. *

*/ private java.util.List regionsOfInterestForUpdate; /** *

* Shows whether you are sharing data with Rekognition to improve model * performance. You can choose this option at the account level or on a * per-stream basis. Note that if you opt out at the account level this * setting is ignored on individual streams. *

*/ private StreamProcessorDataSharingPreference dataSharingPreferenceForUpdate; /** *

* A list of parameters you want to delete from the stream processor. *

*/ private java.util.List parametersToDelete; /** *

* Name of the stream processor that you want to update. *

*

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

* Name of the stream processor that you want to update. *

*/ public String getName() { return name; } /** *

* Name of the stream processor that you want to update. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
* * @param name

* Name of the stream processor that you want to update. *

*/ public void setName(String name) { this.name = name; } /** *

* Name of the stream processor that you want to update. *

*

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

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
* * @param name

* Name of the stream processor that you want to update. *

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

* The stream processor settings that you want to update. Label detection * settings can be updated to detect different labels with a different * minimum confidence. *

* * @return

* The stream processor settings that you want to update. Label * detection settings can be updated to detect different labels with * a different minimum confidence. *

*/ public StreamProcessorSettingsForUpdate getSettingsForUpdate() { return settingsForUpdate; } /** *

* The stream processor settings that you want to update. Label detection * settings can be updated to detect different labels with a different * minimum confidence. *

* * @param settingsForUpdate

* The stream processor settings that you want to update. Label * detection settings can be updated to detect different labels * with a different minimum confidence. *

*/ public void setSettingsForUpdate(StreamProcessorSettingsForUpdate settingsForUpdate) { this.settingsForUpdate = settingsForUpdate; } /** *

* The stream processor settings that you want to update. Label detection * settings can be updated to detect different labels with a different * minimum confidence. *

*

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

* The stream processor settings that you want to update. Label * detection settings can be updated to detect different labels * with a different minimum confidence. *

* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateStreamProcessorRequest withSettingsForUpdate( StreamProcessorSettingsForUpdate settingsForUpdate) { this.settingsForUpdate = settingsForUpdate; return this; } /** *

* Specifies locations in the frames where Amazon Rekognition checks for * objects or people. This is an optional parameter for label detection * stream processors. *

* * @return

* Specifies locations in the frames where Amazon Rekognition checks * for objects or people. This is an optional parameter for label * detection stream processors. *

*/ public java.util.List getRegionsOfInterestForUpdate() { return regionsOfInterestForUpdate; } /** *

* Specifies locations in the frames where Amazon Rekognition checks for * objects or people. This is an optional parameter for label detection * stream processors. *

* * @param regionsOfInterestForUpdate

* Specifies locations in the frames where Amazon Rekognition * checks for objects or people. This is an optional parameter * for label detection stream processors. *

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

* Specifies locations in the frames where Amazon Rekognition checks for * objects or people. This is an optional parameter for label detection * stream processors. *

*

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

* Specifies locations in the frames where Amazon Rekognition * checks for objects or people. This is an optional parameter * for label detection stream processors. *

* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateStreamProcessorRequest withRegionsOfInterestForUpdate( RegionOfInterest... regionsOfInterestForUpdate) { if (getRegionsOfInterestForUpdate() == null) { this.regionsOfInterestForUpdate = new java.util.ArrayList( regionsOfInterestForUpdate.length); } for (RegionOfInterest value : regionsOfInterestForUpdate) { this.regionsOfInterestForUpdate.add(value); } return this; } /** *

* Specifies locations in the frames where Amazon Rekognition checks for * objects or people. This is an optional parameter for label detection * stream processors. *

*

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

* Specifies locations in the frames where Amazon Rekognition * checks for objects or people. This is an optional parameter * for label detection stream processors. *

* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateStreamProcessorRequest withRegionsOfInterestForUpdate( java.util.Collection regionsOfInterestForUpdate) { setRegionsOfInterestForUpdate(regionsOfInterestForUpdate); return this; } /** *

* Shows whether you are sharing data with Rekognition to improve model * performance. You can choose this option at the account level or on a * per-stream basis. Note that if you opt out at the account level this * setting is ignored on individual streams. *

* * @return

* Shows whether you are sharing data with Rekognition to improve * model performance. You can choose this option at the account * level or on a per-stream basis. Note that if you opt out at the * account level this setting is ignored on individual streams. *

*/ public StreamProcessorDataSharingPreference getDataSharingPreferenceForUpdate() { return dataSharingPreferenceForUpdate; } /** *

* Shows whether you are sharing data with Rekognition to improve model * performance. You can choose this option at the account level or on a * per-stream basis. Note that if you opt out at the account level this * setting is ignored on individual streams. *

* * @param dataSharingPreferenceForUpdate

* Shows whether you are sharing data with Rekognition to improve * model performance. You can choose this option at the account * level or on a per-stream basis. Note that if you opt out at * the account level this setting is ignored on individual * streams. *

*/ public void setDataSharingPreferenceForUpdate( StreamProcessorDataSharingPreference dataSharingPreferenceForUpdate) { this.dataSharingPreferenceForUpdate = dataSharingPreferenceForUpdate; } /** *

* Shows whether you are sharing data with Rekognition to improve model * performance. You can choose this option at the account level or on a * per-stream basis. Note that if you opt out at the account level this * setting is ignored on individual streams. *

*

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

* Shows whether you are sharing data with Rekognition to improve * model performance. You can choose this option at the account * level or on a per-stream basis. Note that if you opt out at * the account level this setting is ignored on individual * streams. *

* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateStreamProcessorRequest withDataSharingPreferenceForUpdate( StreamProcessorDataSharingPreference dataSharingPreferenceForUpdate) { this.dataSharingPreferenceForUpdate = dataSharingPreferenceForUpdate; return this; } /** *

* A list of parameters you want to delete from the stream processor. *

* * @return

* A list of parameters you want to delete from the stream * processor. *

*/ public java.util.List getParametersToDelete() { return parametersToDelete; } /** *

* A list of parameters you want to delete from the stream processor. *

* * @param parametersToDelete

* A list of parameters you want to delete from the stream * processor. *

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

* A list of parameters you want to delete from the stream processor. *

*

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

* A list of parameters you want to delete from the stream * processor. *

* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateStreamProcessorRequest withParametersToDelete(String... parametersToDelete) { if (getParametersToDelete() == null) { this.parametersToDelete = new java.util.ArrayList(parametersToDelete.length); } for (String value : parametersToDelete) { this.parametersToDelete.add(value); } return this; } /** *

* A list of parameters you want to delete from the stream processor. *

*

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

* A list of parameters you want to delete from the stream * processor. *

* @return A reference to this updated object so that method calls can be * chained together. */ public UpdateStreamProcessorRequest withParametersToDelete( java.util.Collection parametersToDelete) { setParametersToDelete(parametersToDelete); 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 (getName() != null) sb.append("Name: " + getName() + ","); if (getSettingsForUpdate() != null) sb.append("SettingsForUpdate: " + getSettingsForUpdate() + ","); if (getRegionsOfInterestForUpdate() != null) sb.append("RegionsOfInterestForUpdate: " + getRegionsOfInterestForUpdate() + ","); if (getDataSharingPreferenceForUpdate() != null) sb.append("DataSharingPreferenceForUpdate: " + getDataSharingPreferenceForUpdate() + ","); if (getParametersToDelete() != null) sb.append("ParametersToDelete: " + getParametersToDelete()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSettingsForUpdate() == null) ? 0 : getSettingsForUpdate().hashCode()); hashCode = prime * hashCode + ((getRegionsOfInterestForUpdate() == null) ? 0 : getRegionsOfInterestForUpdate() .hashCode()); hashCode = prime * hashCode + ((getDataSharingPreferenceForUpdate() == null) ? 0 : getDataSharingPreferenceForUpdate().hashCode()); hashCode = prime * hashCode + ((getParametersToDelete() == null) ? 0 : getParametersToDelete().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateStreamProcessorRequest == false) return false; UpdateStreamProcessorRequest other = (UpdateStreamProcessorRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSettingsForUpdate() == null ^ this.getSettingsForUpdate() == null) return false; if (other.getSettingsForUpdate() != null && other.getSettingsForUpdate().equals(this.getSettingsForUpdate()) == false) return false; if (other.getRegionsOfInterestForUpdate() == null ^ this.getRegionsOfInterestForUpdate() == null) return false; if (other.getRegionsOfInterestForUpdate() != null && other.getRegionsOfInterestForUpdate().equals( this.getRegionsOfInterestForUpdate()) == false) return false; if (other.getDataSharingPreferenceForUpdate() == null ^ this.getDataSharingPreferenceForUpdate() == null) return false; if (other.getDataSharingPreferenceForUpdate() != null && other.getDataSharingPreferenceForUpdate().equals( this.getDataSharingPreferenceForUpdate()) == false) return false; if (other.getParametersToDelete() == null ^ this.getParametersToDelete() == null) return false; if (other.getParametersToDelete() != null && other.getParametersToDelete().equals(this.getParametersToDelete()) == false) return false; return true; } }