com.amazonaws.services.ec2.model.CreateVpcEndpointServiceConfigurationRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2014-2019 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;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateVpcEndpointServiceConfigurationRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateVpcEndpointServiceConfigurationRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest {
/**
*
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted. To
* accept a request, use AcceptVpcEndpointConnections.
*
*/
private Boolean acceptanceRequired;
/**
*
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*
*/
private com.amazonaws.internal.SdkInternalList networkLoadBalancerArns;
/**
*
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see
* How to Ensure
* Idempotency.
*
*/
private String clientToken;
/**
*
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted. To
* accept a request, use AcceptVpcEndpointConnections.
*
*
* @param acceptanceRequired
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted.
* To accept a request, use AcceptVpcEndpointConnections.
*/
public void setAcceptanceRequired(Boolean acceptanceRequired) {
this.acceptanceRequired = acceptanceRequired;
}
/**
*
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted. To
* accept a request, use AcceptVpcEndpointConnections.
*
*
* @return Indicate whether requests from service consumers to create an endpoint to your service must be accepted.
* To accept a request, use AcceptVpcEndpointConnections.
*/
public Boolean getAcceptanceRequired() {
return this.acceptanceRequired;
}
/**
*
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted. To
* accept a request, use AcceptVpcEndpointConnections.
*
*
* @param acceptanceRequired
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted.
* To accept a request, use AcceptVpcEndpointConnections.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateVpcEndpointServiceConfigurationRequest withAcceptanceRequired(Boolean acceptanceRequired) {
setAcceptanceRequired(acceptanceRequired);
return this;
}
/**
*
* Indicate whether requests from service consumers to create an endpoint to your service must be accepted. To
* accept a request, use AcceptVpcEndpointConnections.
*
*
* @return Indicate whether requests from service consumers to create an endpoint to your service must be accepted.
* To accept a request, use AcceptVpcEndpointConnections.
*/
public Boolean isAcceptanceRequired() {
return this.acceptanceRequired;
}
/**
*
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*
*
* @return The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*/
public java.util.List getNetworkLoadBalancerArns() {
if (networkLoadBalancerArns == null) {
networkLoadBalancerArns = new com.amazonaws.internal.SdkInternalList();
}
return networkLoadBalancerArns;
}
/**
*
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*
*
* @param networkLoadBalancerArns
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*/
public void setNetworkLoadBalancerArns(java.util.Collection networkLoadBalancerArns) {
if (networkLoadBalancerArns == null) {
this.networkLoadBalancerArns = null;
return;
}
this.networkLoadBalancerArns = new com.amazonaws.internal.SdkInternalList(networkLoadBalancerArns);
}
/**
*
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNetworkLoadBalancerArns(java.util.Collection)} or
* {@link #withNetworkLoadBalancerArns(java.util.Collection)} if you want to override the existing values.
*
*
* @param networkLoadBalancerArns
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateVpcEndpointServiceConfigurationRequest withNetworkLoadBalancerArns(String... networkLoadBalancerArns) {
if (this.networkLoadBalancerArns == null) {
setNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList(networkLoadBalancerArns.length));
}
for (String ele : networkLoadBalancerArns) {
this.networkLoadBalancerArns.add(ele);
}
return this;
}
/**
*
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
*
*
* @param networkLoadBalancerArns
* The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateVpcEndpointServiceConfigurationRequest withNetworkLoadBalancerArns(java.util.Collection networkLoadBalancerArns) {
setNetworkLoadBalancerArns(networkLoadBalancerArns);
return this;
}
/**
*
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see
* How to Ensure
* Idempotency.
*
*
* @param clientToken
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more
* information, see How to Ensure
* Idempotency.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see
* How to Ensure
* Idempotency.
*
*
* @return Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more
* information, see How to Ensure
* Idempotency.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see
* How to Ensure
* Idempotency.
*
*
* @param clientToken
* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more
* information, see How to Ensure
* Idempotency.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateVpcEndpointServiceConfigurationRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request getDryRunRequest() {
Request request = new CreateVpcEndpointServiceConfigurationRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
}
/**
* 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 (getAcceptanceRequired() != null)
sb.append("AcceptanceRequired: ").append(getAcceptanceRequired()).append(",");
if (getNetworkLoadBalancerArns() != null)
sb.append("NetworkLoadBalancerArns: ").append(getNetworkLoadBalancerArns()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateVpcEndpointServiceConfigurationRequest == false)
return false;
CreateVpcEndpointServiceConfigurationRequest other = (CreateVpcEndpointServiceConfigurationRequest) obj;
if (other.getAcceptanceRequired() == null ^ this.getAcceptanceRequired() == null)
return false;
if (other.getAcceptanceRequired() != null && other.getAcceptanceRequired().equals(this.getAcceptanceRequired()) == false)
return false;
if (other.getNetworkLoadBalancerArns() == null ^ this.getNetworkLoadBalancerArns() == null)
return false;
if (other.getNetworkLoadBalancerArns() != null && other.getNetworkLoadBalancerArns().equals(this.getNetworkLoadBalancerArns()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAcceptanceRequired() == null) ? 0 : getAcceptanceRequired().hashCode());
hashCode = prime * hashCode + ((getNetworkLoadBalancerArns() == null) ? 0 : getNetworkLoadBalancerArns().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
return hashCode;
}
@Override
public CreateVpcEndpointServiceConfigurationRequest clone() {
return (CreateVpcEndpointServiceConfigurationRequest) super.clone();
}
}