// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

// THIS FILE WAS AUTO-GENERATED BY ./wpilibNewCommands/generate_hids.py. DO NOT MODIFY

package edu.wpi.first.wpilibj2.command.button;

import edu.wpi.first.wpilibj.StadiaController;
import edu.wpi.first.wpilibj.event.EventLoop;
import edu.wpi.first.wpilibj2.command.CommandScheduler;

/**
 * A version of {@link StadiaController} with {@link Trigger} factories for command-based.
 *
 * @see StadiaController
 */
@SuppressWarnings("MethodName")
public class CommandStadiaController extends CommandGenericHID {
  private final StadiaController m_hid;

  /**
   * Construct an instance of a controller.
   *
   * @param port The port index on the Driver Station that the controller is plugged into.
   */
  public CommandStadiaController(int port) {
    super(port);
    m_hid = new StadiaController(port);
  }

  /**
   * Get the underlying GenericHID object.
   *
   * @return the wrapped GenericHID object
   */
  @Override
  public StadiaController getHID() {
    return m_hid;
  }

  /**
   * Constructs a Trigger instance around the A button's digital signal.
   *
   * @return a Trigger instance representing the A button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #a(EventLoop)
   */
  public Trigger a() {
    return a(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the A button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the A button's digital signal attached
   *     to the given loop.
   */
  public Trigger a(EventLoop loop) {
    return button(StadiaController.Button.kA.value, loop);
  }

  /**
   * Constructs a Trigger instance around the B button's digital signal.
   *
   * @return a Trigger instance representing the B button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #b(EventLoop)
   */
  public Trigger b() {
    return b(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the B button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the B button's digital signal attached
   *     to the given loop.
   */
  public Trigger b(EventLoop loop) {
    return button(StadiaController.Button.kB.value, loop);
  }

  /**
   * Constructs a Trigger instance around the X button's digital signal.
   *
   * @return a Trigger instance representing the X button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #x(EventLoop)
   */
  public Trigger x() {
    return x(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the X button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the X button's digital signal attached
   *     to the given loop.
   */
  public Trigger x(EventLoop loop) {
    return button(StadiaController.Button.kX.value, loop);
  }

  /**
   * Constructs a Trigger instance around the Y button's digital signal.
   *
   * @return a Trigger instance representing the Y button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #y(EventLoop)
   */
  public Trigger y() {
    return y(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the Y button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the Y button's digital signal attached
   *     to the given loop.
   */
  public Trigger y(EventLoop loop) {
    return button(StadiaController.Button.kY.value, loop);
  }

  /**
   * Constructs a Trigger instance around the left bumper button's digital signal.
   *
   * @return a Trigger instance representing the left bumper button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #leftBumper(EventLoop)
   */
  public Trigger leftBumper() {
    return leftBumper(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the left bumper button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the left bumper button's digital signal attached
   *     to the given loop.
   */
  public Trigger leftBumper(EventLoop loop) {
    return button(StadiaController.Button.kLeftBumper.value, loop);
  }

  /**
   * Constructs a Trigger instance around the right bumper button's digital signal.
   *
   * @return a Trigger instance representing the right bumper button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #rightBumper(EventLoop)
   */
  public Trigger rightBumper() {
    return rightBumper(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the right bumper button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the right bumper button's digital signal attached
   *     to the given loop.
   */
  public Trigger rightBumper(EventLoop loop) {
    return button(StadiaController.Button.kRightBumper.value, loop);
  }

  /**
   * Constructs a Trigger instance around the left stick button's digital signal.
   *
   * @return a Trigger instance representing the left stick button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #leftStick(EventLoop)
   */
  public Trigger leftStick() {
    return leftStick(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the left stick button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the left stick button's digital signal attached
   *     to the given loop.
   */
  public Trigger leftStick(EventLoop loop) {
    return button(StadiaController.Button.kLeftStick.value, loop);
  }

  /**
   * Constructs a Trigger instance around the right stick button's digital signal.
   *
   * @return a Trigger instance representing the right stick button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #rightStick(EventLoop)
   */
  public Trigger rightStick() {
    return rightStick(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the right stick button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the right stick button's digital signal attached
   *     to the given loop.
   */
  public Trigger rightStick(EventLoop loop) {
    return button(StadiaController.Button.kRightStick.value, loop);
  }

  /**
   * Constructs a Trigger instance around the ellipses button's digital signal.
   *
   * @return a Trigger instance representing the ellipses button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #ellipses(EventLoop)
   */
  public Trigger ellipses() {
    return ellipses(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the ellipses button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the ellipses button's digital signal attached
   *     to the given loop.
   */
  public Trigger ellipses(EventLoop loop) {
    return button(StadiaController.Button.kEllipses.value, loop);
  }

  /**
   * Constructs a Trigger instance around the hamburger button's digital signal.
   *
   * @return a Trigger instance representing the hamburger button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #hamburger(EventLoop)
   */
  public Trigger hamburger() {
    return hamburger(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the hamburger button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the hamburger button's digital signal attached
   *     to the given loop.
   */
  public Trigger hamburger(EventLoop loop) {
    return button(StadiaController.Button.kHamburger.value, loop);
  }

  /**
   * Constructs a Trigger instance around the stadia button's digital signal.
   *
   * @return a Trigger instance representing the stadia button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #stadia(EventLoop)
   */
  public Trigger stadia() {
    return stadia(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the stadia button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the stadia button's digital signal attached
   *     to the given loop.
   */
  public Trigger stadia(EventLoop loop) {
    return button(StadiaController.Button.kStadia.value, loop);
  }

  /**
   * Constructs a Trigger instance around the right trigger button's digital signal.
   *
   * @return a Trigger instance representing the right trigger button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #rightTrigger(EventLoop)
   */
  public Trigger rightTrigger() {
    return rightTrigger(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the right trigger button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the right trigger button's digital signal attached
   *     to the given loop.
   */
  public Trigger rightTrigger(EventLoop loop) {
    return button(StadiaController.Button.kRightTrigger.value, loop);
  }

  /**
   * Constructs a Trigger instance around the left trigger button's digital signal.
   *
   * @return a Trigger instance representing the left trigger button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #leftTrigger(EventLoop)
   */
  public Trigger leftTrigger() {
    return leftTrigger(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the left trigger button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the left trigger button's digital signal attached
   *     to the given loop.
   */
  public Trigger leftTrigger(EventLoop loop) {
    return button(StadiaController.Button.kLeftTrigger.value, loop);
  }

  /**
   * Constructs a Trigger instance around the google button's digital signal.
   *
   * @return a Trigger instance representing the google button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #google(EventLoop)
   */
  public Trigger google() {
    return google(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the google button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the google button's digital signal attached
   *     to the given loop.
   */
  public Trigger google(EventLoop loop) {
    return button(StadiaController.Button.kGoogle.value, loop);
  }

  /**
   * Constructs a Trigger instance around the frame button's digital signal.
   *
   * @return a Trigger instance representing the frame button's digital signal attached
   *     to the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}.
   * @see #frame(EventLoop)
   */
  public Trigger frame() {
    return frame(CommandScheduler.getInstance().getDefaultButtonLoop());
  }

  /**
   * Constructs a Trigger instance around the frame button's digital signal.
   *
   * @param loop the event loop instance to attach the event to.
   * @return a Trigger instance representing the frame button's digital signal attached
   *     to the given loop.
   */
  public Trigger frame(EventLoop loop) {
    return button(StadiaController.Button.kFrame.value, loop);
  }

  /**
   * Get the X axis value of left side of the controller.
   *
   * @return The axis value.
   */
  public double getLeftX() {
    return m_hid.getLeftX();
  }

  /**
   * Get the X axis value of right side of the controller.
   *
   * @return The axis value.
   */
  public double getRightX() {
    return m_hid.getRightX();
  }

  /**
   * Get the Y axis value of left side of the controller.
   *
   * @return The axis value.
   */
  public double getLeftY() {
    return m_hid.getLeftY();
  }

  /**
   * Get the Y axis value of right side of the controller.
   *
   * @return The axis value.
   */
  public double getRightY() {
    return m_hid.getRightY();
  }
}
