package com.airlock.iam.common.infrastructure.request;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.net.URI;

public record RequestMethodInfo(
   boolean methodExists, boolean sessionLessEndpoint, boolean uiEndpoint, boolean responseDelayDisabled, boolean oneShotEndpoint, URI requestUri
) {
   @SuppressFBWarnings(justification = "generated code")
   public static RequestMethodInfo.RequestMethodInfoBuilder builder() {
      return new RequestMethodInfo.RequestMethodInfoBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class RequestMethodInfoBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private boolean methodExists;
      @SuppressFBWarnings(justification = "generated code")
      private boolean sessionLessEndpoint;
      @SuppressFBWarnings(justification = "generated code")
      private boolean uiEndpoint;
      @SuppressFBWarnings(justification = "generated code")
      private boolean responseDelayDisabled;
      @SuppressFBWarnings(justification = "generated code")
      private boolean oneShotEndpoint;
      @SuppressFBWarnings(justification = "generated code")
      private URI requestUri;

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

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo.RequestMethodInfoBuilder methodExists(boolean methodExists) {
         this.methodExists = methodExists;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo.RequestMethodInfoBuilder sessionLessEndpoint(boolean sessionLessEndpoint) {
         this.sessionLessEndpoint = sessionLessEndpoint;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo.RequestMethodInfoBuilder uiEndpoint(boolean uiEndpoint) {
         this.uiEndpoint = uiEndpoint;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo.RequestMethodInfoBuilder responseDelayDisabled(boolean responseDelayDisabled) {
         this.responseDelayDisabled = responseDelayDisabled;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo.RequestMethodInfoBuilder oneShotEndpoint(boolean oneShotEndpoint) {
         this.oneShotEndpoint = oneShotEndpoint;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo.RequestMethodInfoBuilder requestUri(URI requestUri) {
         this.requestUri = requestUri;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public RequestMethodInfo build() {
         return new RequestMethodInfo(
            this.methodExists, this.sessionLessEndpoint, this.uiEndpoint, this.responseDelayDisabled, this.oneShotEndpoint, this.requestUri
         );
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "RequestMethodInfo.RequestMethodInfoBuilder(methodExists="
            + this.methodExists
            + ", sessionLessEndpoint="
            + this.sessionLessEndpoint
            + ", uiEndpoint="
            + this.uiEndpoint
            + ", responseDelayDisabled="
            + this.responseDelayDisabled
            + ", oneShotEndpoint="
            + this.oneShotEndpoint
            + ", requestUri="
            + this.requestUri
            + ")";
      }
   }
}
