/* * 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.iot.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Deletes a logging level. *
** Requires permission to access the DeleteV2LoggingLevel action. *
*/ public class DeleteV2LoggingLevelRequest extends AmazonWebServiceRequest implements Serializable { /** *
* The type of resource for which you are configuring logging. Must be
* THING_Group
.
*
* Constraints:
* Allowed Values: DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP,
* PRINCIPAL_ID
*/
private String targetType;
/**
*
* The name of the resource for which you are configuring logging. *
*/ private String targetName; /** *
* The type of resource for which you are configuring logging. Must be
* THING_Group
.
*
* Constraints:
* Allowed Values: DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP,
* PRINCIPAL_ID
*
* @return
* The type of resource for which you are configuring logging. Must
* be THING_Group
.
*
* The type of resource for which you are configuring logging. Must be
* THING_Group
.
*
* Constraints:
* Allowed Values: DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP,
* PRINCIPAL_ID
*
* @param targetType
* The type of resource for which you are configuring logging.
* Must be THING_Group
.
*
* The type of resource for which you are configuring logging. Must be
* THING_Group
.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP,
* PRINCIPAL_ID
*
* @param targetType
* The type of resource for which you are configuring logging.
* Must be THING_Group
.
*
* The type of resource for which you are configuring logging. Must be
* THING_Group
.
*
* Constraints:
* Allowed Values: DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP,
* PRINCIPAL_ID
*
* @param targetType
* The type of resource for which you are configuring logging.
* Must be THING_Group
.
*
* The type of resource for which you are configuring logging. Must be
* THING_Group
.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP,
* PRINCIPAL_ID
*
* @param targetType
* The type of resource for which you are configuring logging.
* Must be THING_Group
.
*
* The name of the resource for which you are configuring logging. *
* * @return* The name of the resource for which you are configuring logging. *
*/ public String getTargetName() { return targetName; } /** ** The name of the resource for which you are configuring logging. *
* * @param targetName* The name of the resource for which you are configuring * logging. *
*/ public void setTargetName(String targetName) { this.targetName = targetName; } /** ** The name of the resource for which you are configuring logging. *
** Returns a reference to this object so that method calls can be chained * together. * * @param targetName
* The name of the resource for which you are configuring * logging. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DeleteV2LoggingLevelRequest withTargetName(String targetName) { this.targetName = targetName; 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 (getTargetType() != null) sb.append("targetType: " + getTargetType() + ","); if (getTargetName() != null) sb.append("targetName: " + getTargetName()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTargetType() == null) ? 0 : getTargetType().hashCode()); hashCode = prime * hashCode + ((getTargetName() == null) ? 0 : getTargetName().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteV2LoggingLevelRequest == false) return false; DeleteV2LoggingLevelRequest other = (DeleteV2LoggingLevelRequest) obj; if (other.getTargetType() == null ^ this.getTargetType() == null) return false; if (other.getTargetType() != null && other.getTargetType().equals(this.getTargetType()) == false) return false; if (other.getTargetName() == null ^ this.getTargetName() == null) return false; if (other.getTargetName() != null && other.getTargetName().equals(this.getTargetName()) == false) return false; return true; } }