All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wallride.model.CustomFieldCreateRequest Maven / Gradle / Ivy

package org.wallride.model;


import org.wallride.domain.CustomField;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CustomFieldCreateRequest implements Serializable {

	private String name;
	private String code;
	private CustomField.FieldType type = CustomField.FieldType.UNDEFINED;
	private String description;
	private List options = new ArrayList<>();
	private String language;

	public String getName() {
		return name;
	}

	public String getCode() {
		return code;
	}

	public CustomField.FieldType getType() {
		return type;
	}

	public String getDescription() {
		return description;
	}

	public List getOptions() {
		return options;
	}

	public String getLanguage() {
		return language;
	}

	public static class Builder {

		private String name;
		private String code;
		private CustomField.FieldType type = CustomField.FieldType.UNDEFINED;
		private String description;
		private List options = new ArrayList<>();
		private String language;

		public Builder() {
		}

		public Builder name(String name) {
			this.name = name;
			return this;
		}

		public Builder code(String code) {
			this.code = code;
			return this;
		}

		public Builder type(CustomField.FieldType type) {
			this.type = type;
			return this;
		}

		public Builder description(String description) {
			this.description = description;
			return this;
		}

		public Builder options(List options) {
			this.options = options;
			return this;
		}

		public Builder language(String language) {
			this.language = language;
			return this;
		}

		public CustomFieldCreateRequest build() {
			CustomFieldCreateRequest request = new CustomFieldCreateRequest();
			request.name = name;
			request.code = code;
			request.type = type;
			request.description = description;
			request.options = options;
			request.language = language;
			return request;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy