1 package org.apache.archiva.rest.api.v2.model;/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing,
12 * software distributed under the License is distributed on an
13 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 * KIND, either express or implied. See the License for the
15 * specific language governing permissions and limitations
20 * Licensed to the Apache Software Foundation (ASF) under one
21 * or more contributor license agreements. See the NOTICE file
22 * distributed with this work for additional information
23 * regarding copyright ownership. The ASF licenses this file
24 * to you under the Apache License, Version 2.0 (the
25 * "License"); you may not use this file except in compliance
26 * with the License. You may obtain a copy of the License at
28 * http://www.apache.org/licenses/LICENSE-2.0
29 * Unless required by applicable law or agreed to in writing,
30 * software distributed under the License is distributed on an
31 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
32 * KIND, either express or implied. See the License for the
33 * specific language governing permissions and limitations
37 import io.swagger.v3.oas.annotations.media.Schema;
39 import javax.xml.bind.annotation.XmlRootElement;
40 import java.io.Serializable;
41 import java.util.Objects;
44 * @author Martin Stockhammer <martin_s@apache.org>
46 @XmlRootElement(name="beanInformation")
47 @Schema(name="BeanInformation",description = "Information about a bean instance.")
48 public class BeanInformation implements Serializable
50 private static final long serialVersionUID = -432385743277355987L;
52 private String displayName;
53 private String descriptionKey;
54 private String defaultDescription;
55 private boolean readonly;
57 public BeanInformation( )
61 public BeanInformation( String id, String displayName, String descriptionKey, String defaultDescription, boolean readonly )
64 this.displayName = displayName;
65 this.descriptionKey = descriptionKey;
66 this.defaultDescription = defaultDescription;
67 this.readonly = readonly;
70 @Schema(description = "The identifier")
71 public String getId( )
76 public void setId( String id )
81 @Schema(name="display_name", description = "The display name")
82 public String getDisplayName( )
87 public void setDisplayName( String displayName )
89 this.displayName = displayName;
92 @Schema(name="description_key", description = "The translation key for the description")
93 public String getDescriptionKey( )
95 return descriptionKey;
98 public void setDescriptionKey( String descriptionKey )
100 this.descriptionKey = descriptionKey;
103 @Schema(name="default_description", description = "The description translated in the default language")
104 public String getDefaultDescription( )
106 return defaultDescription;
109 public void setDefaultDescription( String defaultDescription )
111 this.defaultDescription = defaultDescription;
114 @Schema(description = "True, if this bean cannot be removed")
115 public boolean isReadonly( )
120 public void setReadonly( boolean readonly )
122 this.readonly = readonly;
126 public boolean equals( Object o )
128 if ( this == o ) return true;
129 if ( o == null || getClass( ) != o.getClass( ) ) return false;
130 BeanInformation that = (BeanInformation) o;
131 return readonly == that.readonly && id.equals( that.id ) && Objects.equals( displayName, that.displayName ) && Objects.equals( descriptionKey, that.descriptionKey ) && Objects.equals( defaultDescription, that.defaultDescription );
135 public int hashCode( )
137 return Objects.hash( id, displayName, descriptionKey, defaultDescription, readonly );
141 public String toString( )
143 return "BeanInformation{" +
145 ", display_name='" + displayName + '\'' +
146 ", description_key='" + descriptionKey + '\'' +
147 ", default_description='" + defaultDescription + '\'' +
148 ", readonly=" + readonly +