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

com.amazonaws.services.ec2.model.ServiceConfiguration Maven / Gradle / Ivy

/*
 * Copyright 2013-2018 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 a service configuration for a VPC endpoint service. *

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

* The type of service. *

*/ private com.amazonaws.internal.SdkInternalList serviceType; /** *

* The ID of the service. *

*/ private String serviceId; /** *

* The name of the service. *

*/ private String serviceName; /** *

* The service state. *

*/ private String serviceState; /** *

* In the Availability Zones in which the service is available. *

*/ private com.amazonaws.internal.SdkInternalList availabilityZones; /** *

* Indicates whether requests from other AWS accounts to create an endpoint to the service must first be accepted. *

*/ private Boolean acceptanceRequired; /** *

* The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. *

*/ private com.amazonaws.internal.SdkInternalList networkLoadBalancerArns; /** *

* The DNS names for the service. *

*/ private com.amazonaws.internal.SdkInternalList baseEndpointDnsNames; /** *

* The private DNS name for the service. *

*/ private String privateDnsName; /** *

* The type of service. *

* * @return The type of service. */ public java.util.List getServiceType() { if (serviceType == null) { serviceType = new com.amazonaws.internal.SdkInternalList(); } return serviceType; } /** *

* The type of service. *

* * @param serviceType * The type of service. */ public void setServiceType(java.util.Collection serviceType) { if (serviceType == null) { this.serviceType = null; return; } this.serviceType = new com.amazonaws.internal.SdkInternalList(serviceType); } /** *

* The type of service. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setServiceType(java.util.Collection)} or {@link #withServiceType(java.util.Collection)} if you want to * override the existing values. *

* * @param serviceType * The type of service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withServiceType(ServiceTypeDetail... serviceType) { if (this.serviceType == null) { setServiceType(new com.amazonaws.internal.SdkInternalList(serviceType.length)); } for (ServiceTypeDetail ele : serviceType) { this.serviceType.add(ele); } return this; } /** *

* The type of service. *

* * @param serviceType * The type of service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withServiceType(java.util.Collection serviceType) { setServiceType(serviceType); return this; } /** *

* The ID of the service. *

* * @param serviceId * The ID of the service. */ public void setServiceId(String serviceId) { this.serviceId = serviceId; } /** *

* The ID of the service. *

* * @return The ID of the service. */ public String getServiceId() { return this.serviceId; } /** *

* The ID of the service. *

* * @param serviceId * The ID of the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withServiceId(String serviceId) { setServiceId(serviceId); return this; } /** *

* The name of the service. *

* * @param serviceName * The name of the service. */ public void setServiceName(String serviceName) { this.serviceName = serviceName; } /** *

* The name of the service. *

* * @return The name of the service. */ public String getServiceName() { return this.serviceName; } /** *

* The name of the service. *

* * @param serviceName * The name of the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withServiceName(String serviceName) { setServiceName(serviceName); return this; } /** *

* The service state. *

* * @param serviceState * The service state. * @see ServiceState */ public void setServiceState(String serviceState) { this.serviceState = serviceState; } /** *

* The service state. *

* * @return The service state. * @see ServiceState */ public String getServiceState() { return this.serviceState; } /** *

* The service state. *

* * @param serviceState * The service state. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceState */ public ServiceConfiguration withServiceState(String serviceState) { setServiceState(serviceState); return this; } /** *

* The service state. *

* * @param serviceState * The service state. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceState */ public ServiceConfiguration withServiceState(ServiceState serviceState) { this.serviceState = serviceState.toString(); return this; } /** *

* In the Availability Zones in which the service is available. *

* * @return In the Availability Zones in which the service is available. */ public java.util.List getAvailabilityZones() { if (availabilityZones == null) { availabilityZones = new com.amazonaws.internal.SdkInternalList(); } return availabilityZones; } /** *

* In the Availability Zones in which the service is available. *

* * @param availabilityZones * In the Availability Zones in which the service is available. */ public void setAvailabilityZones(java.util.Collection availabilityZones) { if (availabilityZones == null) { this.availabilityZones = null; return; } this.availabilityZones = new com.amazonaws.internal.SdkInternalList(availabilityZones); } /** *

* In the Availability Zones in which the service is available. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if * you want to override the existing values. *

* * @param availabilityZones * In the Availability Zones in which the service is available. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withAvailabilityZones(String... availabilityZones) { if (this.availabilityZones == null) { setAvailabilityZones(new com.amazonaws.internal.SdkInternalList(availabilityZones.length)); } for (String ele : availabilityZones) { this.availabilityZones.add(ele); } return this; } /** *

* In the Availability Zones in which the service is available. *

* * @param availabilityZones * In the Availability Zones in which the service is available. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withAvailabilityZones(java.util.Collection availabilityZones) { setAvailabilityZones(availabilityZones); return this; } /** *

* Indicates whether requests from other AWS accounts to create an endpoint to the service must first be accepted. *

* * @param acceptanceRequired * Indicates whether requests from other AWS accounts to create an endpoint to the service must first be * accepted. */ public void setAcceptanceRequired(Boolean acceptanceRequired) { this.acceptanceRequired = acceptanceRequired; } /** *

* Indicates whether requests from other AWS accounts to create an endpoint to the service must first be accepted. *

* * @return Indicates whether requests from other AWS accounts to create an endpoint to the service must first be * accepted. */ public Boolean getAcceptanceRequired() { return this.acceptanceRequired; } /** *

* Indicates whether requests from other AWS accounts to create an endpoint to the service must first be accepted. *

* * @param acceptanceRequired * Indicates whether requests from other AWS accounts to create an endpoint to the service must first be * accepted. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withAcceptanceRequired(Boolean acceptanceRequired) { setAcceptanceRequired(acceptanceRequired); return this; } /** *

* Indicates whether requests from other AWS accounts to create an endpoint to the service must first be accepted. *

* * @return Indicates whether requests from other AWS accounts to create an endpoint to the service must first be * accepted. */ public Boolean isAcceptanceRequired() { return this.acceptanceRequired; } /** *

* The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. *

* * @return The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. */ public java.util.List getNetworkLoadBalancerArns() { if (networkLoadBalancerArns == null) { networkLoadBalancerArns = new com.amazonaws.internal.SdkInternalList(); } return networkLoadBalancerArns; } /** *

* The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. *

* * @param networkLoadBalancerArns * The Amazon Resource Names (ARNs) of the Network Load Balancers for the 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 the Network Load Balancers for the 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 the Network Load Balancers for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration 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 the Network Load Balancers for the service. *

* * @param networkLoadBalancerArns * The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withNetworkLoadBalancerArns(java.util.Collection networkLoadBalancerArns) { setNetworkLoadBalancerArns(networkLoadBalancerArns); return this; } /** *

* The DNS names for the service. *

* * @return The DNS names for the service. */ public java.util.List getBaseEndpointDnsNames() { if (baseEndpointDnsNames == null) { baseEndpointDnsNames = new com.amazonaws.internal.SdkInternalList(); } return baseEndpointDnsNames; } /** *

* The DNS names for the service. *

* * @param baseEndpointDnsNames * The DNS names for the service. */ public void setBaseEndpointDnsNames(java.util.Collection baseEndpointDnsNames) { if (baseEndpointDnsNames == null) { this.baseEndpointDnsNames = null; return; } this.baseEndpointDnsNames = new com.amazonaws.internal.SdkInternalList(baseEndpointDnsNames); } /** *

* The DNS names for the service. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBaseEndpointDnsNames(java.util.Collection)} or {@link #withBaseEndpointDnsNames(java.util.Collection)} * if you want to override the existing values. *

* * @param baseEndpointDnsNames * The DNS names for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withBaseEndpointDnsNames(String... baseEndpointDnsNames) { if (this.baseEndpointDnsNames == null) { setBaseEndpointDnsNames(new com.amazonaws.internal.SdkInternalList(baseEndpointDnsNames.length)); } for (String ele : baseEndpointDnsNames) { this.baseEndpointDnsNames.add(ele); } return this; } /** *

* The DNS names for the service. *

* * @param baseEndpointDnsNames * The DNS names for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withBaseEndpointDnsNames(java.util.Collection baseEndpointDnsNames) { setBaseEndpointDnsNames(baseEndpointDnsNames); return this; } /** *

* The private DNS name for the service. *

* * @param privateDnsName * The private DNS name for the service. */ public void setPrivateDnsName(String privateDnsName) { this.privateDnsName = privateDnsName; } /** *

* The private DNS name for the service. *

* * @return The private DNS name for the service. */ public String getPrivateDnsName() { return this.privateDnsName; } /** *

* The private DNS name for the service. *

* * @param privateDnsName * The private DNS name for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceConfiguration withPrivateDnsName(String privateDnsName) { setPrivateDnsName(privateDnsName); 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 (getServiceType() != null) sb.append("ServiceType: ").append(getServiceType()).append(","); if (getServiceId() != null) sb.append("ServiceId: ").append(getServiceId()).append(","); if (getServiceName() != null) sb.append("ServiceName: ").append(getServiceName()).append(","); if (getServiceState() != null) sb.append("ServiceState: ").append(getServiceState()).append(","); if (getAvailabilityZones() != null) sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(","); if (getAcceptanceRequired() != null) sb.append("AcceptanceRequired: ").append(getAcceptanceRequired()).append(","); if (getNetworkLoadBalancerArns() != null) sb.append("NetworkLoadBalancerArns: ").append(getNetworkLoadBalancerArns()).append(","); if (getBaseEndpointDnsNames() != null) sb.append("BaseEndpointDnsNames: ").append(getBaseEndpointDnsNames()).append(","); if (getPrivateDnsName() != null) sb.append("PrivateDnsName: ").append(getPrivateDnsName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceConfiguration == false) return false; ServiceConfiguration other = (ServiceConfiguration) obj; if (other.getServiceType() == null ^ this.getServiceType() == null) return false; if (other.getServiceType() != null && other.getServiceType().equals(this.getServiceType()) == false) return false; if (other.getServiceId() == null ^ this.getServiceId() == null) return false; if (other.getServiceId() != null && other.getServiceId().equals(this.getServiceId()) == false) return false; if (other.getServiceName() == null ^ this.getServiceName() == null) return false; if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == false) return false; if (other.getServiceState() == null ^ this.getServiceState() == null) return false; if (other.getServiceState() != null && other.getServiceState().equals(this.getServiceState()) == false) return false; if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null) return false; if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false) return false; 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.getBaseEndpointDnsNames() == null ^ this.getBaseEndpointDnsNames() == null) return false; if (other.getBaseEndpointDnsNames() != null && other.getBaseEndpointDnsNames().equals(this.getBaseEndpointDnsNames()) == false) return false; if (other.getPrivateDnsName() == null ^ this.getPrivateDnsName() == null) return false; if (other.getPrivateDnsName() != null && other.getPrivateDnsName().equals(this.getPrivateDnsName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServiceType() == null) ? 0 : getServiceType().hashCode()); hashCode = prime * hashCode + ((getServiceId() == null) ? 0 : getServiceId().hashCode()); hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode()); hashCode = prime * hashCode + ((getServiceState() == null) ? 0 : getServiceState().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getAcceptanceRequired() == null) ? 0 : getAcceptanceRequired().hashCode()); hashCode = prime * hashCode + ((getNetworkLoadBalancerArns() == null) ? 0 : getNetworkLoadBalancerArns().hashCode()); hashCode = prime * hashCode + ((getBaseEndpointDnsNames() == null) ? 0 : getBaseEndpointDnsNames().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsName() == null) ? 0 : getPrivateDnsName().hashCode()); return hashCode; } @Override public ServiceConfiguration clone() { try { return (ServiceConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy