001 002package com.commercetools.api.models.subscription; 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 * <p>The CloudEventsFormat can be used with any Destination, and the payload is delivered in the <code>JSON Event Format</code>. AzureEventGridDestination offers native support to filter and route CloudEvents.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class CloudEventsFormatImpl implements CloudEventsFormat, ModelBase { 022 023 private String type; 024 025 private String cloudEventsVersion; 026 027 /** 028 * create instance with all properties 029 */ 030 @JsonCreator 031 CloudEventsFormatImpl(@JsonProperty("cloudEventsVersion") final String cloudEventsVersion) { 032 this.cloudEventsVersion = cloudEventsVersion; 033 this.type = CLOUD_EVENTS; 034 } 035 036 /** 037 * create empty instance 038 */ 039 public CloudEventsFormatImpl() { 040 this.type = CLOUD_EVENTS; 041 } 042 043 /** 044 * 045 */ 046 047 public String getType() { 048 return this.type; 049 } 050 051 /** 052 * 053 */ 054 055 public String getCloudEventsVersion() { 056 return this.cloudEventsVersion; 057 } 058 059 public void setCloudEventsVersion(final String cloudEventsVersion) { 060 this.cloudEventsVersion = cloudEventsVersion; 061 } 062 063 @Override 064 public boolean equals(Object o) { 065 if (this == o) 066 return true; 067 068 if (o == null || getClass() != o.getClass()) 069 return false; 070 071 CloudEventsFormatImpl that = (CloudEventsFormatImpl) o; 072 073 return new EqualsBuilder().append(type, that.type) 074 .append(cloudEventsVersion, that.cloudEventsVersion) 075 .isEquals(); 076 } 077 078 @Override 079 public int hashCode() { 080 return new HashCodeBuilder(17, 37).append(type).append(cloudEventsVersion).toHashCode(); 081 } 082 083}