001 002package com.commercetools.api.models.order; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * OrderUpdateSyncInfoAction 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class OrderUpdateSyncInfoActionImpl implements OrderUpdateSyncInfoAction, ModelBase { 022 023 private String action; 024 025 private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; 026 027 private String externalId; 028 029 private java.time.ZonedDateTime syncedAt; 030 031 /** 032 * create instance with all properties 033 */ 034 @JsonCreator 035 OrderUpdateSyncInfoActionImpl( 036 @JsonProperty("channel") final com.commercetools.api.models.channel.ChannelResourceIdentifier channel, 037 @JsonProperty("externalId") final String externalId, 038 @JsonProperty("syncedAt") final java.time.ZonedDateTime syncedAt) { 039 this.channel = channel; 040 this.externalId = externalId; 041 this.syncedAt = syncedAt; 042 this.action = UPDATE_SYNC_INFO; 043 } 044 045 /** 046 * create empty instance 047 */ 048 public OrderUpdateSyncInfoActionImpl() { 049 this.action = UPDATE_SYNC_INFO; 050 } 051 052 /** 053 * 054 */ 055 056 public String getAction() { 057 return this.action; 058 } 059 060 /** 061 * <p>ResourceIdentifier to a Channel.</p> 062 */ 063 064 public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { 065 return this.channel; 066 } 067 068 /** 069 * 070 */ 071 072 public String getExternalId() { 073 return this.externalId; 074 } 075 076 /** 077 * 078 */ 079 080 public java.time.ZonedDateTime getSyncedAt() { 081 return this.syncedAt; 082 } 083 084 public void setChannel(final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { 085 this.channel = channel; 086 } 087 088 public void setExternalId(final String externalId) { 089 this.externalId = externalId; 090 } 091 092 public void setSyncedAt(final java.time.ZonedDateTime syncedAt) { 093 this.syncedAt = syncedAt; 094 } 095 096 @Override 097 public boolean equals(Object o) { 098 if (this == o) 099 return true; 100 101 if (o == null || getClass() != o.getClass()) 102 return false; 103 104 OrderUpdateSyncInfoActionImpl that = (OrderUpdateSyncInfoActionImpl) o; 105 106 return new EqualsBuilder().append(action, that.action) 107 .append(channel, that.channel) 108 .append(externalId, that.externalId) 109 .append(syncedAt, that.syncedAt) 110 .isEquals(); 111 } 112 113 @Override 114 public int hashCode() { 115 return new HashCodeBuilder(17, 37).append(action) 116 .append(channel) 117 .append(externalId) 118 .append(syncedAt) 119 .toHashCode(); 120 } 121 122}