Partner.java

/*
 * Copyright 2017 Global Crop Diversity Trust
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.genesys.server.api.v1.model;

import lombok.Getter;
import lombok.Setter;
import org.genesys.blocks.security.serialization.Permissions;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.net.URL;
import java.time.Instant;
import java.util.Set;
import java.util.UUID;

@Getter
@Setter
public class Partner {

	private Long id;
	private UUID uuid;
	private boolean active;
	private Integer version;

	private String createdBy;
	private Instant createdDate;
	private String lastModifiedBy;
	private Instant lastModifiedDate;

	/// partner short name (acronym or abbr.)
	@Size(max = 20)
	@NotNull
	private String shortName;

	/// partner name
	@Size(max = 200)
	@NotNull
	private String name;

	/// partner description
	private String description;

	/// partner email
	@Size(max = 100)
	private String email;

	/// partner phone number
	@Size(max = 100)
	private String phone;

	/// partner address
	@Size(max = 500)
	private String address;

	private Set<URL> urls;

	private Set<String> countryCodes;

	@Size(max = 512)
	private URL requestApiEndpoint;

	@Size(max = 1024)
	private String requestApiAuthorization;

	private Permissions _permissions;
}