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>AWS EventBridge can be used to push events and messages to a serverless event bus that can forward them to AWS SQS, SNS, Lambda, and other AWS services based on forwarding rules. Once the Subscription is created, an equivalent "partner event source" is created in AWS EventBridge. This event source must be associated with an event bus for the Subscription setup to be complete.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class EventBridgeDestinationImpl implements EventBridgeDestination, ModelBase {
022
023    private String type;
024
025    private String region;
026
027    private String accountId;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    EventBridgeDestinationImpl(@JsonProperty("region") final String region,
034            @JsonProperty("accountId") final String accountId) {
035        this.region = region;
036        this.accountId = accountId;
037        this.type = EVENT_BRIDGE;
038    }
039
040    /**
041     * create empty instance
042     */
043    public EventBridgeDestinationImpl() {
044        this.type = EVENT_BRIDGE;
045    }
046
047    /**
048     *
049     */
050
051    public String getType() {
052        return this.type;
053    }
054
055    /**
056     *  <p>AWS region that receives the events.</p>
057     */
058
059    public String getRegion() {
060        return this.region;
061    }
062
063    /**
064     *  <p>ID of the AWS account that receives the events.</p>
065     */
066
067    public String getAccountId() {
068        return this.accountId;
069    }
070
071    public void setRegion(final String region) {
072        this.region = region;
073    }
074
075    public void setAccountId(final String accountId) {
076        this.accountId = accountId;
077    }
078
079    @Override
080    public boolean equals(Object o) {
081        if (this == o)
082            return true;
083
084        if (o == null || getClass() != o.getClass())
085            return false;
086
087        EventBridgeDestinationImpl that = (EventBridgeDestinationImpl) o;
088
089        return new EqualsBuilder().append(type, that.type)
090                .append(region, that.region)
091                .append(accountId, that.accountId)
092                .isEquals();
093    }
094
095    @Override
096    public int hashCode() {
097        return new HashCodeBuilder(17, 37).append(type).append(region).append(accountId).toHashCode();
098    }
099
100}