class SetDeprecatedVersionDecorator
    extends CustomResourceDefinitionVersionDecorator<CustomResourceDefinitionVersionFluent<?>> {

  private final boolean deprecated;
  private final String deprecationWarning;

  public SetDeprecatedVersionDecorator(String name, String version, boolean deprecated, String deprecationWarning) {
    super(name, version);
    this.deprecated = deprecated;
    this.deprecationWarning = deprecationWarning;
  }

  @Override
  public void andThenVisit(CustomResourceDefinitionVersionFluent<?> version) {
    if (deprecated) {
      version.withDeprecated(true);
      version.withDeprecationWarning(deprecationWarning);
    }
  }

  @Override
  public String toString() {<FILL_FUNCTION_BODY>}
}

    return getClass().getName() + " [name:" + getName() + ", version:" + getVersion()
        + ", deprecated:" + deprecated + ", deprecationWarning:" + deprecationWarning + "]";
  
<methods>public void <init>(java.lang.String, java.lang.String) ,public Class<? extends Decorator#RAW>[] after() ,public abstract void andThenVisit(CustomResourceDefinitionVersionFluent<?>) ,public Class<? extends Decorator#RAW>[] before() ,public java.lang.String getName() ,public java.lang.String getVersion() ,public void visit(VisitableBuilder) <variables>protected static final java.lang.String ANY,private final non-sealed java.lang.String name,private final non-sealed java.lang.String version,private final CustomResourceDefinitionVersionVisitor versionSelector,private final VersionVisitor versionVisitor