package com.atlassian.stash.internal.rest.repository;

import com.atlassian.bitbucket.rest.RestMapEntity;

public abstract class AbstractRestCreateRefRequest extends RestMapEntity {

    private static final String NAME = "name";
    private static final String START_POINT = "startPoint";
    private static final String MESSAGE = "message";

    protected AbstractRestCreateRefRequest() {
    }

    // Required for REST documentation
    protected AbstractRestCreateRefRequest(String name, String startPoint, String message) {
        putIfNotNull(NAME, name);
        putIfNotNull(START_POINT, startPoint);
        putIfNotNull(MESSAGE, message);
    }

    public String getMessage() {
        return getStringProperty(MESSAGE);
    }

    public String getName() {
        return getStringProperty(NAME);
    }

    public String getStartPoint() {
        return getStringProperty(START_POINT);
    }
}
