@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode()); return hashCode; }
/** * <p> * EndpointArn returned from CreateEndpoint action. * </p> * * @param endpointArn * EndpointArn returned from CreateEndpoint action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePlatformEndpointResult withEndpointArn(String endpointArn) { setEndpointArn(endpointArn); return this; }
public CreatePlatformEndpointResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePlatformEndpointResult createPlatformEndpointResult = new CreatePlatformEndpointResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createPlatformEndpointResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("EndpointArn", targetDepth)) { createPlatformEndpointResult.setEndpointArn(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createPlatformEndpointResult; } } } }
public CreatePlatformEndpointResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePlatformEndpointResult createPlatformEndpointResult = new CreatePlatformEndpointResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("EndpointArn", targetDepth)) { createPlatformEndpointResult.setEndpointArn(StringStaxUnmarshaller .getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return createPlatformEndpointResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreatePlatformEndpointResult == false) return false; CreatePlatformEndpointResult other = (CreatePlatformEndpointResult) obj; if (other.getEndpointArn() == null ^ this.getEndpointArn() == null) return false; if (other.getEndpointArn() != null && other.getEndpointArn().equals(this.getEndpointArn()) == false) return false; return true; }
public CreatePlatformEndpointResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePlatformEndpointResult createPlatformEndpointResult = new CreatePlatformEndpointResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("EndpointArn", targetDepth)) { createPlatformEndpointResult.setEndpointArn(StringStaxUnmarshaller .getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return createPlatformEndpointResult; }
/** * 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 (getEndpointArn() != null) sb.append("EndpointArn: ").append(getEndpointArn()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreatePlatformEndpointResult == false) return false; CreatePlatformEndpointResult other = (CreatePlatformEndpointResult) obj; if (other.getEndpointArn() == null ^ this.getEndpointArn() == null) return false; if (other.getEndpointArn() != null && other.getEndpointArn().equals(this.getEndpointArn()) == false) return false; return true; } }
/** * 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 (getEndpointArn() != null) sb.append("EndpointArn: " + getEndpointArn()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreatePlatformEndpointResult == false) return false; CreatePlatformEndpointResult other = (CreatePlatformEndpointResult) obj; if (other.getEndpointArn() == null ^ this.getEndpointArn() == null) return false; if (other.getEndpointArn() != null && other.getEndpointArn().equals(this.getEndpointArn()) == false) return false; return true; } }
/** * 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 (getEndpointArn() != null) sb.append("EndpointArn: " + getEndpointArn()); sb.append("}"); return sb.toString(); }
public String createPlatformArn(AmazonSNS snsClient, String platformApplicationArn, String token, User user) { CreatePlatformEndpointRequest platformEndpointRequest = new CreatePlatformEndpointRequest(); platformEndpointRequest.setPlatformApplicationArn(platformApplicationArn); platformEndpointRequest.setToken(token); String customUserData = getCustomUserData(user); platformEndpointRequest.setCustomUserData(customUserData); CreatePlatformEndpointResult platformEndpointResult = snsClient.createPlatformEndpoint(platformEndpointRequest); return platformEndpointResult.getEndpointArn(); }
platformEndpointResult.getEndpointArn(), platform, attrsMap,message); System.out.println("Published! \n{MessageId=" + publishResult.getMessageId() + "}");
platformEndpointRequest.setPlatformApplicationArn(PLATFORM_APPLICATION_ARN); CreatePlatformEndpointResult result = mClient.createPlatformEndpoint(platformEndpointRequest); mNotifPreferencesHelper.storeEndpointArn(result.getEndpointArn());