![JAR search and dependency download from the Maven repository](/logo.png)
com.amazonaws.services.ec2.model.NetworkInsightsAccessScopeContent Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2019-2024 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Describes the Network Access Scope content.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class NetworkInsightsAccessScopeContent implements Serializable, Cloneable {
/**
*
* The ID of the Network Access Scope.
*
*/
private String networkInsightsAccessScopeId;
/**
*
* The paths to match.
*
*/
private com.amazonaws.internal.SdkInternalList matchPaths;
/**
*
* The paths to exclude.
*
*/
private com.amazonaws.internal.SdkInternalList excludePaths;
/**
*
* The ID of the Network Access Scope.
*
*
* @param networkInsightsAccessScopeId
* The ID of the Network Access Scope.
*/
public void setNetworkInsightsAccessScopeId(String networkInsightsAccessScopeId) {
this.networkInsightsAccessScopeId = networkInsightsAccessScopeId;
}
/**
*
* The ID of the Network Access Scope.
*
*
* @return The ID of the Network Access Scope.
*/
public String getNetworkInsightsAccessScopeId() {
return this.networkInsightsAccessScopeId;
}
/**
*
* The ID of the Network Access Scope.
*
*
* @param networkInsightsAccessScopeId
* The ID of the Network Access Scope.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkInsightsAccessScopeContent withNetworkInsightsAccessScopeId(String networkInsightsAccessScopeId) {
setNetworkInsightsAccessScopeId(networkInsightsAccessScopeId);
return this;
}
/**
*
* The paths to match.
*
*
* @return The paths to match.
*/
public java.util.List getMatchPaths() {
if (matchPaths == null) {
matchPaths = new com.amazonaws.internal.SdkInternalList();
}
return matchPaths;
}
/**
*
* The paths to match.
*
*
* @param matchPaths
* The paths to match.
*/
public void setMatchPaths(java.util.Collection matchPaths) {
if (matchPaths == null) {
this.matchPaths = null;
return;
}
this.matchPaths = new com.amazonaws.internal.SdkInternalList(matchPaths);
}
/**
*
* The paths to match.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setMatchPaths(java.util.Collection)} or {@link #withMatchPaths(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param matchPaths
* The paths to match.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkInsightsAccessScopeContent withMatchPaths(AccessScopePath... matchPaths) {
if (this.matchPaths == null) {
setMatchPaths(new com.amazonaws.internal.SdkInternalList(matchPaths.length));
}
for (AccessScopePath ele : matchPaths) {
this.matchPaths.add(ele);
}
return this;
}
/**
*
* The paths to match.
*
*
* @param matchPaths
* The paths to match.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkInsightsAccessScopeContent withMatchPaths(java.util.Collection matchPaths) {
setMatchPaths(matchPaths);
return this;
}
/**
*
* The paths to exclude.
*
*
* @return The paths to exclude.
*/
public java.util.List getExcludePaths() {
if (excludePaths == null) {
excludePaths = new com.amazonaws.internal.SdkInternalList();
}
return excludePaths;
}
/**
*
* The paths to exclude.
*
*
* @param excludePaths
* The paths to exclude.
*/
public void setExcludePaths(java.util.Collection excludePaths) {
if (excludePaths == null) {
this.excludePaths = null;
return;
}
this.excludePaths = new com.amazonaws.internal.SdkInternalList(excludePaths);
}
/**
*
* The paths to exclude.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExcludePaths(java.util.Collection)} or {@link #withExcludePaths(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param excludePaths
* The paths to exclude.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkInsightsAccessScopeContent withExcludePaths(AccessScopePath... excludePaths) {
if (this.excludePaths == null) {
setExcludePaths(new com.amazonaws.internal.SdkInternalList(excludePaths.length));
}
for (AccessScopePath ele : excludePaths) {
this.excludePaths.add(ele);
}
return this;
}
/**
*
* The paths to exclude.
*
*
* @param excludePaths
* The paths to exclude.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkInsightsAccessScopeContent withExcludePaths(java.util.Collection excludePaths) {
setExcludePaths(excludePaths);
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 (getNetworkInsightsAccessScopeId() != null)
sb.append("NetworkInsightsAccessScopeId: ").append(getNetworkInsightsAccessScopeId()).append(",");
if (getMatchPaths() != null)
sb.append("MatchPaths: ").append(getMatchPaths()).append(",");
if (getExcludePaths() != null)
sb.append("ExcludePaths: ").append(getExcludePaths());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof NetworkInsightsAccessScopeContent == false)
return false;
NetworkInsightsAccessScopeContent other = (NetworkInsightsAccessScopeContent) obj;
if (other.getNetworkInsightsAccessScopeId() == null ^ this.getNetworkInsightsAccessScopeId() == null)
return false;
if (other.getNetworkInsightsAccessScopeId() != null && other.getNetworkInsightsAccessScopeId().equals(this.getNetworkInsightsAccessScopeId()) == false)
return false;
if (other.getMatchPaths() == null ^ this.getMatchPaths() == null)
return false;
if (other.getMatchPaths() != null && other.getMatchPaths().equals(this.getMatchPaths()) == false)
return false;
if (other.getExcludePaths() == null ^ this.getExcludePaths() == null)
return false;
if (other.getExcludePaths() != null && other.getExcludePaths().equals(this.getExcludePaths()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getNetworkInsightsAccessScopeId() == null) ? 0 : getNetworkInsightsAccessScopeId().hashCode());
hashCode = prime * hashCode + ((getMatchPaths() == null) ? 0 : getMatchPaths().hashCode());
hashCode = prime * hashCode + ((getExcludePaths() == null) ? 0 : getExcludePaths().hashCode());
return hashCode;
}
@Override
public NetworkInsightsAccessScopeContent clone() {
try {
return (NetworkInsightsAccessScopeContent) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}