001package org.apache.archiva.redback.rest.api.model.v2; 002/* 003 * Licensed to the Apache Software Foundation (ASF) under one 004 * or more contributor license agreements. See the NOTICE file 005 * distributed with this work for additional information 006 * regarding copyright ownership. The ASF licenses this file 007 * to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance 009 * with the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, 014 * software distributed under the License is distributed on an 015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 016 * KIND, either express or implied. See the License for the 017 * specific language governing permissions and limitations 018 * under the License. 019 */ 020 021import io.swagger.v3.oas.annotations.media.Schema; 022 023import javax.xml.bind.annotation.XmlRootElement; 024import java.io.Serializable; 025 026/** 027 * @author Olivier Lamy 028 * @since 2.0 029 */ 030@XmlRootElement( name = "userRegistrationRequest" ) 031@Schema(name="UserRegistrationRequest",description = "Registration request for a new user.") 032public class UserRegistrationRequest 033 implements Serializable 034{ 035 private static final long serialVersionUID = 5516902373853039946L; 036 private User user; 037 038 private String applicationUrl; 039 040 public UserRegistrationRequest() 041 { 042 // no op 043 } 044 045 public UserRegistrationRequest( User user, String applicationUrl ) 046 { 047 this.user = user; 048 this.applicationUrl = applicationUrl; 049 } 050 051 @Schema(name="user", description = "Information about the new user that wants to be registered.") 052 public User getUser() 053 { 054 return user; 055 } 056 057 public void setUser( User user ) 058 { 059 this.user = user; 060 } 061 062 @Schema(name="application_url",description = "The URL of the application, used to verify the request.") 063 public String getApplicationUrl() 064 { 065 return applicationUrl; 066 } 067 068 public void setApplicationUrl( String applicationUrl ) 069 { 070 this.applicationUrl = applicationUrl; 071 } 072 073 @Override 074 public String toString() 075 { 076 final StringBuilder sb = new StringBuilder(); 077 sb.append( "UserRegistrationRequest" ); 078 sb.append( "{user=" ).append( user ); 079 sb.append( ", applicationUrl='" ).append( applicationUrl ).append( '\'' ); 080 sb.append( '}' ); 081 return sb.toString(); 082 } 083}