@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRuleName() == null) ? 0 : getRuleName().hashCode()); hashCode = prime * hashCode + ((getTopicRulePayload() == null) ? 0 : getTopicRulePayload().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
/** * <p> * The name of the rule. * </p> * * @param ruleName * The name of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTopicRuleRequest withRuleName(String ruleName) { setRuleName(ruleName); return this; }
/** * <p> * The rule payload. * </p> * * @param topicRulePayload * The rule payload. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTopicRuleRequest withTopicRulePayload(TopicRulePayload topicRulePayload) { setTopicRulePayload(topicRulePayload); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRuleName() == null) ? 0 : getRuleName().hashCode()); hashCode = prime * hashCode + ((getTopicRulePayload() == null) ? 0 : getTopicRulePayload().hashCode()); return hashCode; }
public static Result index() { init(); CreateTopicRuleRequest another_test = new CreateTopicRuleRequest(); another_test.setRuleName("test"); TopicRulePayload topicRulePayload = new TopicRulePayload(); topicRulePayload.setDescription("A test rule"); topicRulePayload.setSql("SELECT state.reported.turbineStatus FROM '$aws/things/turbine1/shadow/update/accepted' WHERE state.reported.turbineStatus=true"); ArrayList<Action> actionList = new ArrayList(); Action action = new Action(); S3Action s3 = new S3Action(); s3.setRoleArn("arn:aws:iam::442759113924:role/sushant"); s3.setBucketName("bajra-iot-test"); s3.setKey("bajra-iot-test"); action.setS3(s3); actionList.add(action); topicRulePayload.setActions(actionList); another_test.setTopicRulePayload(topicRulePayload); CreateTopicRuleResult test = awsIotClient.createTopicRule(another_test); return ok(index.render("iot")); }
setTags(tags); return this;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateTopicRuleRequest == false) return false; CreateTopicRuleRequest other = (CreateTopicRuleRequest) obj; if (other.getRuleName() == null ^ this.getRuleName() == null) return false; if (other.getRuleName() != null && other.getRuleName().equals(this.getRuleName()) == false) return false; if (other.getTopicRulePayload() == null ^ this.getTopicRulePayload() == null) return false; if (other.getTopicRulePayload() != null && other.getTopicRulePayload().equals(this.getTopicRulePayload()) == false) return false; return true; } }
setTags(tags); return this;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateTopicRuleRequest == false) return false; CreateTopicRuleRequest other = (CreateTopicRuleRequest) obj; if (other.getRuleName() == null ^ this.getRuleName() == null) return false; if (other.getRuleName() != null && other.getRuleName().equals(this.getRuleName()) == false) return false; if (other.getTopicRulePayload() == null ^ this.getTopicRulePayload() == null) return false; if (other.getTopicRulePayload() != null && other.getTopicRulePayload().equals(this.getTopicRulePayload()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 (getRuleName() != null) sb.append("ruleName: " + getRuleName() + ","); if (getTopicRulePayload() != null) sb.append("topicRulePayload: " + getTopicRulePayload()); sb.append("}"); return sb.toString(); }
/** * <p> * The rule payload. * </p> * * @param topicRulePayload * The rule payload. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTopicRuleRequest withTopicRulePayload(TopicRulePayload topicRulePayload) { setTopicRulePayload(topicRulePayload); return this; }
/** * <p> * The name of the rule. * </p> * * @param ruleName * The name of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTopicRuleRequest withRuleName(String ruleName) { setRuleName(ruleName); 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 (getRuleName() != null) sb.append("RuleName: ").append(getRuleName()).append(","); if (getTopicRulePayload() != null) sb.append("TopicRulePayload: ").append(getTopicRulePayload()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); }
uriResourcePath = uriResourcePath.replace( "{ruleName}", (createTopicRuleRequest.getRuleName() == null) ? "" : StringUtils .fromString(createTopicRuleRequest.getRuleName())); request.setResourcePath(uriResourcePath); try { StringWriter stringWriter = new StringWriter(); AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter); if (createTopicRuleRequest.getTopicRulePayload() != null) { TopicRulePayload topicRulePayload = createTopicRuleRequest.getTopicRulePayload(); TopicRulePayloadJsonMarshaller.getInstance().marshall(topicRulePayload, jsonWriter);
/** * Marshall the given parameter object. */ public void marshall(CreateTopicRuleRequest createTopicRuleRequest, ProtocolMarshaller protocolMarshaller) { if (createTopicRuleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createTopicRuleRequest.getRuleName(), RULENAME_BINDING); protocolMarshaller.marshall(createTopicRuleRequest.getTopicRulePayload(), TOPICRULEPAYLOAD_BINDING); protocolMarshaller.marshall(createTopicRuleRequest.getTags(), TAGS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRuleName() == null) ? 0 : getRuleName().hashCode()); hashCode = prime * hashCode + ((getTopicRulePayload() == null) ? 0 : getTopicRulePayload().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRuleName() == null) ? 0 : getRuleName().hashCode()); hashCode = prime * hashCode + ((getTopicRulePayload() == null) ? 0 : getTopicRulePayload().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateTopicRuleRequest == false) return false; CreateTopicRuleRequest other = (CreateTopicRuleRequest) obj; if (other.getRuleName() == null ^ this.getRuleName() == null) return false; if (other.getRuleName() != null && other.getRuleName().equals(this.getRuleName()) == false) return false; if (other.getTopicRulePayload() == null ^ this.getTopicRulePayload() == null) return false; if (other.getTopicRulePayload() != null && other.getTopicRulePayload().equals(this.getTopicRulePayload()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateTopicRuleRequest == false) return false; CreateTopicRuleRequest other = (CreateTopicRuleRequest) obj; if (other.getRuleName() == null ^ this.getRuleName() == null) return false; if (other.getRuleName() != null && other.getRuleName().equals(this.getRuleName()) == false) return false; if (other.getTopicRulePayload() == null ^ this.getTopicRulePayload() == null) return false; if (other.getTopicRulePayload() != null && other.getTopicRulePayload().equals(this.getTopicRulePayload()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 (getRuleName() != null) sb.append("ruleName: " + getRuleName() + ","); if (getTopicRulePayload() != null) sb.append("topicRulePayload: " + getTopicRulePayload() + ","); if (getTags() != null) sb.append("tags: " + getTags()); sb.append("}"); return sb.toString(); }