1 package org.apache.archiva.rest.api.model.v2;/*
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
19 import io.swagger.v3.oas.annotations.media.Schema;
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
23 import java.util.Objects;
26 * @author Martin Stockhammer <martin_s@apache.org>
28 @XmlRootElement(name="beanInformation")
29 @Schema(name="BeanInformation",description = "Information about a bean instance.")
30 public class BeanInformation implements Serializable
32 private static final long serialVersionUID = -432385743277355987L;
35 String descriptionKey;
36 String defaultDescription;
39 public BeanInformation( )
43 public BeanInformation( String id, String displayName, String descriptionKey, String defaultDescription, boolean readonly )
46 this.displayName = displayName;
47 this.descriptionKey = descriptionKey;
48 this.defaultDescription = defaultDescription;
49 this.readonly = readonly;
52 @Schema(description = "The identifier")
53 public String getId( )
58 public void setId( String id )
63 @Schema(name="display_name", description = "The display name")
64 public String getDisplayName( )
69 public void setDisplayName( String displayName )
71 this.displayName = displayName;
74 @Schema(name="description_key", description = "The translation key for the description")
75 public String getDescriptionKey( )
77 return descriptionKey;
80 public void setDescriptionKey( String descriptionKey )
82 this.descriptionKey = descriptionKey;
85 @Schema(name="default_description", description = "The description translated in the default language")
86 public String getDefaultDescription( )
88 return defaultDescription;
91 public void setDefaultDescription( String defaultDescription )
93 this.defaultDescription = defaultDescription;
96 @Schema(description = "True, if this bean cannot be removed")
97 public boolean isReadonly( )
102 public void setReadonly( boolean readonly )
104 this.readonly = readonly;
108 public boolean equals( Object o )
110 if ( this == o ) return true;
111 if ( o == null || getClass( ) != o.getClass( ) ) return false;
112 BeanInformation that = (BeanInformation) o;
113 return readonly == that.readonly && id.equals( that.id ) && Objects.equals( displayName, that.displayName ) && Objects.equals( descriptionKey, that.descriptionKey ) && Objects.equals( defaultDescription, that.defaultDescription );
117 public int hashCode( )
119 return Objects.hash( id, displayName, descriptionKey, defaultDescription, readonly );
123 public String toString( )
125 return "BeanInformation{" +
127 ", display_name='" + displayName + '\'' +
128 ", description_key='" + descriptionKey + '\'' +
129 ", default_description='" + defaultDescription + '\'' +
130 ", readonly=" + readonly +