/* * Copyright 2018-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.iottwinmaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The component property group request. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ComponentPropertyGroupRequest implements Serializable, Cloneable, StructuredPojo { /** ** The group type. *
*/ private String groupType; /** ** The property names. *
*/ private java.util.List* The update type. *
*/ private String updateType; /** ** The group type. *
* * @param groupType * The group type. * @see GroupType */ public void setGroupType(String groupType) { this.groupType = groupType; } /** ** The group type. *
* * @return The group type. * @see GroupType */ public String getGroupType() { return this.groupType; } /** ** The group type. *
* * @param groupType * The group type. * @return Returns a reference to this object so that method calls can be chained together. * @see GroupType */ public ComponentPropertyGroupRequest withGroupType(String groupType) { setGroupType(groupType); return this; } /** ** The group type. *
* * @param groupType * The group type. * @return Returns a reference to this object so that method calls can be chained together. * @see GroupType */ public ComponentPropertyGroupRequest withGroupType(GroupType groupType) { this.groupType = groupType.toString(); return this; } /** ** The property names. *
* * @return The property names. */ public java.util.List* The property names. *
* * @param propertyNames * The property names. */ public void setPropertyNames(java.util.Collection* The property names. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPropertyNames(java.util.Collection)} or {@link #withPropertyNames(java.util.Collection)} if you want * to override the existing values. *
* * @param propertyNames * The property names. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentPropertyGroupRequest withPropertyNames(String... propertyNames) { if (this.propertyNames == null) { setPropertyNames(new java.util.ArrayList* The property names. *
* * @param propertyNames * The property names. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentPropertyGroupRequest withPropertyNames(java.util.Collection* The update type. *
* * @param updateType * The update type. * @see PropertyGroupUpdateType */ public void setUpdateType(String updateType) { this.updateType = updateType; } /** ** The update type. *
* * @return The update type. * @see PropertyGroupUpdateType */ public String getUpdateType() { return this.updateType; } /** ** The update type. *
* * @param updateType * The update type. * @return Returns a reference to this object so that method calls can be chained together. * @see PropertyGroupUpdateType */ public ComponentPropertyGroupRequest withUpdateType(String updateType) { setUpdateType(updateType); return this; } /** ** The update type. *
* * @param updateType * The update type. * @return Returns a reference to this object so that method calls can be chained together. * @see PropertyGroupUpdateType */ public ComponentPropertyGroupRequest withUpdateType(PropertyGroupUpdateType updateType) { this.updateType = updateType.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getGroupType() != null) sb.append("GroupType: ").append(getGroupType()).append(","); if (getPropertyNames() != null) sb.append("PropertyNames: ").append(getPropertyNames()).append(","); if (getUpdateType() != null) sb.append("UpdateType: ").append(getUpdateType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ComponentPropertyGroupRequest == false) return false; ComponentPropertyGroupRequest other = (ComponentPropertyGroupRequest) obj; if (other.getGroupType() == null ^ this.getGroupType() == null) return false; if (other.getGroupType() != null && other.getGroupType().equals(this.getGroupType()) == false) return false; if (other.getPropertyNames() == null ^ this.getPropertyNames() == null) return false; if (other.getPropertyNames() != null && other.getPropertyNames().equals(this.getPropertyNames()) == false) return false; if (other.getUpdateType() == null ^ this.getUpdateType() == null) return false; if (other.getUpdateType() != null && other.getUpdateType().equals(this.getUpdateType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGroupType() == null) ? 0 : getGroupType().hashCode()); hashCode = prime * hashCode + ((getPropertyNames() == null) ? 0 : getPropertyNames().hashCode()); hashCode = prime * hashCode + ((getUpdateType() == null) ? 0 : getUpdateType().hashCode()); return hashCode; } @Override public ComponentPropertyGroupRequest clone() { try { return (ComponentPropertyGroupRequest) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.iottwinmaker.model.transform.ComponentPropertyGroupRequestMarshaller.getInstance().marshall(this, protocolMarshaller); } }