Java tutorial
/** * News Feed * news feed api * * OpenAPI spec version: 1.0.0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. * * Licensed under the Eclipse Public License - v 1.0 * * https://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License 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 info.glennengstrand.api; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.joda.time.DateTime; /** * Outbound */ public class Outbound { private Long from = null; private DateTime occurred = null; private String subject = null; private String story = null; private Outbound() { } public Outbound(@JsonProperty("from") Long from, @JsonProperty("occurred") DateTime occurred, @JsonProperty("subject") String subject, @JsonProperty("story") String story) { this.from = from; this.occurred = occurred; this.subject = subject; this.story = story; } /** * Get from * @return from **/ @JsonProperty("from") @ApiModelProperty(example = "null", value = "") public Long getFrom() { return from; } /** * Get occurred * @return occurred **/ @JsonProperty("occurred") @ApiModelProperty(example = "null", value = "") public DateTime getOccurred() { return occurred; } /** * Get subject * @return subject **/ @JsonProperty("subject") @ApiModelProperty(example = "null", value = "") public String getSubject() { return subject; } /** * Get story * @return story **/ @JsonProperty("story") @ApiModelProperty(example = "null", value = "") public String getStory() { return story; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Outbound outbound = (Outbound) o; return Objects.equals(this.from, outbound.from) && Objects.equals(this.occurred, outbound.occurred) && Objects.equals(this.subject, outbound.subject) && Objects.equals(this.story, outbound.story); } @Override public int hashCode() { return Objects.hash(from, occurred, subject, story); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Outbound {\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" occurred: ").append(toIndentedString(occurred)).append("\n"); sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); sb.append(" story: ").append(toIndentedString(story)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static class OutboundBuilder { private Long from = null; private DateTime occurred = null; private String subject = null; private String story = null; public OutboundBuilder withFrom(Long from) { this.from = from; return this; } public OutboundBuilder withOccurred(DateTime occurred) { this.occurred = occurred; return this; } public OutboundBuilder withSubject(String subject) { this.subject = subject; return this; } public OutboundBuilder withStory(String story) { this.story = story; return this; } public Outbound build() { return new Outbound(from, occurred, subject, story); } } }