package com.airlock.iam.common.application.configuration.valueprovider;

import com.airlock.iam.common.api.application.configuration.valueprovider.IntegerValueProviderConfig;
import com.airlock.iam.plugin.api.annotation.config.Plugin;
import com.airlock.iam.plugin.api.annotation.property.IntegerProperty;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

@Plugin(description = "Defines a static integer value to be provided.", displayName = "Static Integer Value Provider")
public final class IntegerStaticValueProviderConfig implements IntegerValueProviderConfig {
   @IntegerProperty(description = "The value to be provided.", optional = false)
   private int value;

   public int getValue() {
      return this.value;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static IntegerStaticValueProviderConfig.IntegerStaticValueProviderConfigBuilder builder() {
      return new IntegerStaticValueProviderConfig.IntegerStaticValueProviderConfigBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public IntegerStaticValueProviderConfig() {
   }

   @SuppressFBWarnings(justification = "generated code")
   public IntegerStaticValueProviderConfig(int value) {
      this.value = value;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class IntegerStaticValueProviderConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private int value;

      @SuppressFBWarnings(justification = "generated code")
      IntegerStaticValueProviderConfigBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public IntegerStaticValueProviderConfig.IntegerStaticValueProviderConfigBuilder value(int value) {
         this.value = value;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public IntegerStaticValueProviderConfig build() {
         return new IntegerStaticValueProviderConfig(this.value);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "IntegerStaticValueProviderConfig.IntegerStaticValueProviderConfigBuilder(value=" + this.value + ")";
      }
   }
}
