// 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 ./commandsv3/generate_files.py. DO NOT MODIFY

package org.wpilib.command3.button;

import org.wpilib.command3.Scheduler;
import org.wpilib.command3.Trigger;
import org.wpilib.driverstation.NiDsStadiaController;
import org.wpilib.event.EventLoop;

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

  /**
   * Construct an instance of a controller. Commands bound to buttons on the controller will be
   * scheduled on the {@link Scheduler#getDefault() default scheduler} using its default event loop.
   *
   * @param port The port index on the Driver Station that the controller is plugged into.
   */
  public CommandNiDsStadiaController(int port) {
    super(port);
    m_hid = new NiDsStadiaController(port);
  }

  /**
   * Construct an instance of a controller. Commands bound to buttons on the controller will be
   * scheduled on the given scheduler using its default event loop.
   *
   * @param scheduler The scheduler that should execute the triggered commands.
   * @param port The port index on the Driver Station that the controller is plugged into.
   */
  public CommandNiDsStadiaController(Scheduler scheduler, int port) {
    super(scheduler, port);
    m_hid = new NiDsStadiaController(port);
  }

  /**
   * Get the underlying GenericHID object.
   *
   * @return the wrapped GenericHID object
   */
  @Override
  public NiDsStadiaController 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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #a(EventLoop)
   */
  public Trigger a() {
    return a(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #b(EventLoop)
   */
  public Trigger b() {
    return b(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #x(EventLoop)
   */
  public Trigger x() {
    return x(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #y(EventLoop)
   */
  public Trigger y() {
    return y(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #leftBumper(EventLoop)
   */
  public Trigger leftBumper() {
    return leftBumper(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #rightBumper(EventLoop)
   */
  public Trigger rightBumper() {
    return rightBumper(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #leftStick(EventLoop)
   */
  public Trigger leftStick() {
    return leftStick(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #rightStick(EventLoop)
   */
  public Trigger rightStick() {
    return rightStick(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #ellipses(EventLoop)
   */
  public Trigger ellipses() {
    return ellipses(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #hamburger(EventLoop)
   */
  public Trigger hamburger() {
    return hamburger(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #stadia(EventLoop)
   */
  public Trigger stadia() {
    return stadia(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #rightTrigger(EventLoop)
   */
  public Trigger rightTrigger() {
    return rightTrigger(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #leftTrigger(EventLoop)
   */
  public Trigger leftTrigger() {
    return leftTrigger(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #google(EventLoop)
   */
  public Trigger google() {
    return google(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.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 Scheduler#getDefaultEventLoop() default scheduler event loop} on the
   *     scheduler passed to the controller's constructor, or the {@link Scheduler#getDefault
   *     default scheduler} if a scheduler was not explicitly provided.
   * @see #frame(EventLoop)
   */
  public Trigger frame() {
    return frame(getScheduler().getDefaultEventLoop());
  }

  /**
   * 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(NiDsStadiaController.Button.kFrame.value, loop);
  }

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

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

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

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