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

tech.jhipster.lite.module.infrastructure.primary.RestJHipsterLandscapeDependency Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package tech.jhipster.lite.module.infrastructure.primary;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import tech.jhipster.lite.module.domain.landscape.JHipsterLandscapeDependency;
import tech.jhipster.lite.module.domain.landscape.JHipsterLandscapeElementType;

@Schema(name = "JHipsterLandscapeDependency", description = "A dependency to another element")
final class RestJHipsterLandscapeDependency {

  private final JHipsterLandscapeElementType type;
  private final String slug;

  private RestJHipsterLandscapeDependency(JHipsterLandscapeElementType type, String slug) {
    this.type = type;
    this.slug = slug;
  }

  public static RestJHipsterLandscapeDependency from(JHipsterLandscapeDependency dependency) {
    return new RestJHipsterLandscapeDependency(dependency.type(), dependency.slug().get());
  }

  @Schema(description = "Type of this dependency", requiredMode = RequiredMode.REQUIRED)
  public JHipsterLandscapeElementType getType() {
    return type;
  }

  @Schema(description = "Slug of this dependency", requiredMode = RequiredMode.REQUIRED)
  public String getSlug() {
    return slug;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy