@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIPSetId() == null) ? 0 : getIPSetId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getIPSetDescriptors() == null) ? 0 : getIPSetDescriptors().hashCode()); return hashCode; }
/** * <p> * The IP address type (<code>IPV4</code> or <code>IPV6</code>) and the IP address range (in CIDR notation) that web * requests originate from. If the <code>WebACL</code> is associated with a CloudFront distribution and the viewer * did not use an HTTP proxy or a load balancer to send the request, this is the value of the c-ip field in the * CloudFront access logs. * </p> * * @param iPSetDescriptors * The IP address type (<code>IPV4</code> or <code>IPV6</code>) and the IP address range (in CIDR notation) * that web requests originate from. If the <code>WebACL</code> is associated with a CloudFront distribution * and the viewer did not use an HTTP proxy or a load balancer to send the request, this is the value of the * c-ip field in the CloudFront access logs. * @return Returns a reference to this object so that method calls can be chained together. */ public IPSet withIPSetDescriptors(java.util.Collection<IPSetDescriptor> iPSetDescriptors) { setIPSetDescriptors(iPSetDescriptors); return this; }
/** * <p> * The <code>IPSetId</code> for an <code>IPSet</code>. You use <code>IPSetId</code> to get information about an * <code>IPSet</code> (see <a>GetIPSet</a>), update an <code>IPSet</code> (see <a>UpdateIPSet</a>), insert an * <code>IPSet</code> into a <code>Rule</code> or delete one from a <code>Rule</code> (see <a>UpdateRule</a>), and * delete an <code>IPSet</code> from AWS WAF (see <a>DeleteIPSet</a>). * </p> * <p> * <code>IPSetId</code> is returned by <a>CreateIPSet</a> and by <a>ListIPSets</a>. * </p> * * @param iPSetId * The <code>IPSetId</code> for an <code>IPSet</code>. You use <code>IPSetId</code> to get information about * an <code>IPSet</code> (see <a>GetIPSet</a>), update an <code>IPSet</code> (see <a>UpdateIPSet</a>), insert * an <code>IPSet</code> into a <code>Rule</code> or delete one from a <code>Rule</code> (see * <a>UpdateRule</a>), and delete an <code>IPSet</code> from AWS WAF (see <a>DeleteIPSet</a>).</p> * <p> * <code>IPSetId</code> is returned by <a>CreateIPSet</a> and by <a>ListIPSets</a>. * @return Returns a reference to this object so that method calls can be chained together. */ public IPSet withIPSetId(String iPSetId) { setIPSetId(iPSetId); return this; }
public IPSet unmarshall(JsonUnmarshallerContext context) throws Exception { IPSet iPSet = new IPSet(); if (context.testExpression("IPSetId", targetDepth)) { context.nextToken(); iPSet.setIPSetId(context.getUnmarshaller(String.class).unmarshall(context)); iPSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); iPSet.setIPSetDescriptors(new ListUnmarshaller<IPSetDescriptor>(IPSetDescriptorJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIPSet() == null) ? 0 : getIPSet().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetIPSetResult == false) return false; GetIPSetResult other = (GetIPSetResult) obj; if (other.getIPSet() == null ^ this.getIPSet() == null) return false; if (other.getIPSet() != null && other.getIPSet().equals(this.getIPSet()) == false) return false; return true; }
/** * <p> * A friendly name or description of the <a>IPSet</a>. You can't change the name of an <code>IPSet</code> after you * create it. * </p> * * @param name * A friendly name or description of the <a>IPSet</a>. You can't change the name of an <code>IPSet</code> * after you create it. * @return Returns a reference to this object so that method calls can be chained together. */ public IPSet withName(String name) { setName(name); return this; }
public IPSet unmarshall(JsonUnmarshallerContext context) throws Exception { IPSet iPSet = new IPSet(); if (context.testExpression("IPSetId", targetDepth)) { context.nextToken(); iPSet.setIPSetId(context.getUnmarshaller(String.class).unmarshall(context)); iPSet.setName(context.getUnmarshaller(String.class).unmarshall(context)); iPSet.setIPSetDescriptors(new ListUnmarshaller<IPSetDescriptor>(IPSetDescriptorJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIPSet() == null) ? 0 : getIPSet().hashCode()); hashCode = prime * hashCode + ((getChangeToken() == null) ? 0 : getChangeToken().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateIPSetResult == false) return false; CreateIPSetResult other = (CreateIPSetResult) obj; if (other.getIPSet() == null ^ this.getIPSet() == null) return false; if (other.getIPSet() != null && other.getIPSet().equals(this.getIPSet()) == false) return false; if (other.getChangeToken() == null ^ this.getChangeToken() == null) return false; if (other.getChangeToken() != null && other.getChangeToken().equals(this.getChangeToken()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof IPSet == false) return false; IPSet other = (IPSet) obj; if (other.getIPSetId() == null ^ this.getIPSetId() == null) return false; if (other.getIPSetId() != null && other.getIPSetId().equals(this.getIPSetId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getIPSetDescriptors() == null ^ this.getIPSetDescriptors() == null) return false; if (other.getIPSetDescriptors() != null && other.getIPSetDescriptors().equals(this.getIPSetDescriptors()) == false) return false; return true; }
/** * <p> * The IP address type (<code>IPV4</code> or <code>IPV6</code>) and the IP address range (in CIDR notation) that web * requests originate from. If the <code>WebACL</code> is associated with a CloudFront distribution and the viewer * did not use an HTTP proxy or a load balancer to send the request, this is the value of the c-ip field in the * CloudFront access logs. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setIPSetDescriptors(java.util.Collection)} or {@link #withIPSetDescriptors(java.util.Collection)} if you * want to override the existing values. * </p> * * @param iPSetDescriptors * The IP address type (<code>IPV4</code> or <code>IPV6</code>) and the IP address range (in CIDR notation) * that web requests originate from. If the <code>WebACL</code> is associated with a CloudFront distribution * and the viewer did not use an HTTP proxy or a load balancer to send the request, this is the value of the * c-ip field in the CloudFront access logs. * @return Returns a reference to this object so that method calls can be chained together. */ public IPSet withIPSetDescriptors(IPSetDescriptor... iPSetDescriptors) { if (this.iPSetDescriptors == null) { setIPSetDescriptors(new java.util.ArrayList<IPSetDescriptor>(iPSetDescriptors.length)); } for (IPSetDescriptor ele : iPSetDescriptors) { this.iPSetDescriptors.add(ele); } 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 (getIPSetId() != null) sb.append("IPSetId: ").append(getIPSetId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getIPSetDescriptors() != null) sb.append("IPSetDescriptors: ").append(getIPSetDescriptors()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(IPSet iPSet, ProtocolMarshaller protocolMarshaller) { if (iPSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(iPSet.getIPSetId(), IPSETID_BINDING); protocolMarshaller.marshall(iPSet.getName(), NAME_BINDING); protocolMarshaller.marshall(iPSet.getIPSetDescriptors(), IPSETDESCRIPTORS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(IPSet iPSet, ProtocolMarshaller protocolMarshaller) { if (iPSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(iPSet.getIPSetId(), IPSETID_BINDING); protocolMarshaller.marshall(iPSet.getName(), NAME_BINDING); protocolMarshaller.marshall(iPSet.getIPSetDescriptors(), IPSETDESCRIPTORS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }