com.amazonaws.services.networkmanager.model.NetworkResourceSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-networkmanager 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.networkmanager.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes a network resource.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class NetworkResourceSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ARN of the gateway.
*
*/
private String registeredGatewayArn;
/**
*
* The ARN of the resource.
*
*/
private String resourceArn;
/**
*
* The resource type.
*
*/
private String resourceType;
/**
*
* Information about the resource, in JSON format. Network Manager gets this information by describing the resource
* using its Describe API call.
*
*/
private String definition;
/**
*
* The value for the Name tag.
*
*/
private String nameTag;
/**
*
* Indicates whether this is a middlebox appliance.
*
*/
private Boolean isMiddlebox;
/**
*
* The ARN of the gateway.
*
*
* @param registeredGatewayArn
* The ARN of the gateway.
*/
public void setRegisteredGatewayArn(String registeredGatewayArn) {
this.registeredGatewayArn = registeredGatewayArn;
}
/**
*
* The ARN of the gateway.
*
*
* @return The ARN of the gateway.
*/
public String getRegisteredGatewayArn() {
return this.registeredGatewayArn;
}
/**
*
* The ARN of the gateway.
*
*
* @param registeredGatewayArn
* The ARN of the gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkResourceSummary withRegisteredGatewayArn(String registeredGatewayArn) {
setRegisteredGatewayArn(registeredGatewayArn);
return this;
}
/**
*
* The ARN of the resource.
*
*
* @param resourceArn
* The ARN of the resource.
*/
public void setResourceArn(String resourceArn) {
this.resourceArn = resourceArn;
}
/**
*
* The ARN of the resource.
*
*
* @return The ARN of the resource.
*/
public String getResourceArn() {
return this.resourceArn;
}
/**
*
* The ARN of the resource.
*
*
* @param resourceArn
* The ARN of the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkResourceSummary withResourceArn(String resourceArn) {
setResourceArn(resourceArn);
return this;
}
/**
*
* The resource type.
*
*
* @param resourceType
* The resource type.
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The resource type.
*
*
* @return The resource type.
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The resource type.
*
*
* @param resourceType
* The resource type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkResourceSummary withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* Information about the resource, in JSON format. Network Manager gets this information by describing the resource
* using its Describe API call.
*
*
* @param definition
* Information about the resource, in JSON format. Network Manager gets this information by describing the
* resource using its Describe API call.
*/
public void setDefinition(String definition) {
this.definition = definition;
}
/**
*
* Information about the resource, in JSON format. Network Manager gets this information by describing the resource
* using its Describe API call.
*
*
* @return Information about the resource, in JSON format. Network Manager gets this information by describing the
* resource using its Describe API call.
*/
public String getDefinition() {
return this.definition;
}
/**
*
* Information about the resource, in JSON format. Network Manager gets this information by describing the resource
* using its Describe API call.
*
*
* @param definition
* Information about the resource, in JSON format. Network Manager gets this information by describing the
* resource using its Describe API call.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkResourceSummary withDefinition(String definition) {
setDefinition(definition);
return this;
}
/**
*
* The value for the Name tag.
*
*
* @param nameTag
* The value for the Name tag.
*/
public void setNameTag(String nameTag) {
this.nameTag = nameTag;
}
/**
*
* The value for the Name tag.
*
*
* @return The value for the Name tag.
*/
public String getNameTag() {
return this.nameTag;
}
/**
*
* The value for the Name tag.
*
*
* @param nameTag
* The value for the Name tag.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkResourceSummary withNameTag(String nameTag) {
setNameTag(nameTag);
return this;
}
/**
*
* Indicates whether this is a middlebox appliance.
*
*
* @param isMiddlebox
* Indicates whether this is a middlebox appliance.
*/
public void setIsMiddlebox(Boolean isMiddlebox) {
this.isMiddlebox = isMiddlebox;
}
/**
*
* Indicates whether this is a middlebox appliance.
*
*
* @return Indicates whether this is a middlebox appliance.
*/
public Boolean getIsMiddlebox() {
return this.isMiddlebox;
}
/**
*
* Indicates whether this is a middlebox appliance.
*
*
* @param isMiddlebox
* Indicates whether this is a middlebox appliance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NetworkResourceSummary withIsMiddlebox(Boolean isMiddlebox) {
setIsMiddlebox(isMiddlebox);
return this;
}
/**
*
* Indicates whether this is a middlebox appliance.
*
*
* @return Indicates whether this is a middlebox appliance.
*/
public Boolean isMiddlebox() {
return this.isMiddlebox;
}
/**
* 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 (getRegisteredGatewayArn() != null)
sb.append("RegisteredGatewayArn: ").append(getRegisteredGatewayArn()).append(",");
if (getResourceArn() != null)
sb.append("ResourceArn: ").append(getResourceArn()).append(",");
if (getResourceType() != null)
sb.append("ResourceType: ").append(getResourceType()).append(",");
if (getDefinition() != null)
sb.append("Definition: ").append(getDefinition()).append(",");
if (getNameTag() != null)
sb.append("NameTag: ").append(getNameTag()).append(",");
if (getIsMiddlebox() != null)
sb.append("IsMiddlebox: ").append(getIsMiddlebox());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof NetworkResourceSummary == false)
return false;
NetworkResourceSummary other = (NetworkResourceSummary) obj;
if (other.getRegisteredGatewayArn() == null ^ this.getRegisteredGatewayArn() == null)
return false;
if (other.getRegisteredGatewayArn() != null && other.getRegisteredGatewayArn().equals(this.getRegisteredGatewayArn()) == false)
return false;
if (other.getResourceArn() == null ^ this.getResourceArn() == null)
return false;
if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false)
return false;
if (other.getResourceType() == null ^ this.getResourceType() == null)
return false;
if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false)
return false;
if (other.getDefinition() == null ^ this.getDefinition() == null)
return false;
if (other.getDefinition() != null && other.getDefinition().equals(this.getDefinition()) == false)
return false;
if (other.getNameTag() == null ^ this.getNameTag() == null)
return false;
if (other.getNameTag() != null && other.getNameTag().equals(this.getNameTag()) == false)
return false;
if (other.getIsMiddlebox() == null ^ this.getIsMiddlebox() == null)
return false;
if (other.getIsMiddlebox() != null && other.getIsMiddlebox().equals(this.getIsMiddlebox()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRegisteredGatewayArn() == null) ? 0 : getRegisteredGatewayArn().hashCode());
hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode());
hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
hashCode = prime * hashCode + ((getDefinition() == null) ? 0 : getDefinition().hashCode());
hashCode = prime * hashCode + ((getNameTag() == null) ? 0 : getNameTag().hashCode());
hashCode = prime * hashCode + ((getIsMiddlebox() == null) ? 0 : getIsMiddlebox().hashCode());
return hashCode;
}
@Override
public NetworkResourceSummary clone() {
try {
return (NetworkResourceSummary) 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.networkmanager.model.transform.NetworkResourceSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}