All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.securityhub.model.Range Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.securityhub.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Identifies where the sensitive data begins and ends. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Range implements Serializable, Cloneable, StructuredPojo { /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

*/ private Long start; /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

*/ private Long end; /** *

* In the line where the sensitive data starts, the column within the line where the sensitive data starts. *

*/ private Long startColumn; /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

* * @param start * The number of lines (for a line range) or characters (for an offset range) from the beginning of the file * to the end of the sensitive data. */ public void setStart(Long start) { this.start = start; } /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

* * @return The number of lines (for a line range) or characters (for an offset range) from the beginning of the file * to the end of the sensitive data. */ public Long getStart() { return this.start; } /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

* * @param start * The number of lines (for a line range) or characters (for an offset range) from the beginning of the file * to the end of the sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Range withStart(Long start) { setStart(start); return this; } /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

* * @param end * The number of lines (for a line range) or characters (for an offset range) from the beginning of the file * to the end of the sensitive data. */ public void setEnd(Long end) { this.end = end; } /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

* * @return The number of lines (for a line range) or characters (for an offset range) from the beginning of the file * to the end of the sensitive data. */ public Long getEnd() { return this.end; } /** *

* The number of lines (for a line range) or characters (for an offset range) from the beginning of the file to the * end of the sensitive data. *

* * @param end * The number of lines (for a line range) or characters (for an offset range) from the beginning of the file * to the end of the sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Range withEnd(Long end) { setEnd(end); return this; } /** *

* In the line where the sensitive data starts, the column within the line where the sensitive data starts. *

* * @param startColumn * In the line where the sensitive data starts, the column within the line where the sensitive data starts. */ public void setStartColumn(Long startColumn) { this.startColumn = startColumn; } /** *

* In the line where the sensitive data starts, the column within the line where the sensitive data starts. *

* * @return In the line where the sensitive data starts, the column within the line where the sensitive data starts. */ public Long getStartColumn() { return this.startColumn; } /** *

* In the line where the sensitive data starts, the column within the line where the sensitive data starts. *

* * @param startColumn * In the line where the sensitive data starts, the column within the line where the sensitive data starts. * @return Returns a reference to this object so that method calls can be chained together. */ public Range withStartColumn(Long startColumn) { setStartColumn(startColumn); 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 (getStart() != null) sb.append("Start: ").append(getStart()).append(","); if (getEnd() != null) sb.append("End: ").append(getEnd()).append(","); if (getStartColumn() != null) sb.append("StartColumn: ").append(getStartColumn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Range == false) return false; Range other = (Range) obj; if (other.getStart() == null ^ this.getStart() == null) return false; if (other.getStart() != null && other.getStart().equals(this.getStart()) == false) return false; if (other.getEnd() == null ^ this.getEnd() == null) return false; if (other.getEnd() != null && other.getEnd().equals(this.getEnd()) == false) return false; if (other.getStartColumn() == null ^ this.getStartColumn() == null) return false; if (other.getStartColumn() != null && other.getStartColumn().equals(this.getStartColumn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStart() == null) ? 0 : getStart().hashCode()); hashCode = prime * hashCode + ((getEnd() == null) ? 0 : getEnd().hashCode()); hashCode = prime * hashCode + ((getStartColumn() == null) ? 0 : getStartColumn().hashCode()); return hashCode; } @Override public Range clone() { try { return (Range) 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.securityhub.model.transform.RangeMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy