//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use crate::generated::types::RemainingAccountsInfo;
use borsh::BorshSerialize;
use borsh::BorshDeserialize;

pub const LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR: [u8; 8] = [202, 175, 176, 66, 139, 120, 175, 193];

/// Accounts.
#[derive(Debug)]
pub struct LiquidateTunaSpotPositionJupiter {
            /// 
/// TUNA accounts
/// 

    
              
          pub authority: solana_pubkey::Pubkey,
          
              
          pub tuna_config: solana_pubkey::Pubkey,
          
              
          pub mint_a: solana_pubkey::Pubkey,
          
              
          pub mint_b: solana_pubkey::Pubkey,
          
              
          pub token_program_a: solana_pubkey::Pubkey,
          
              
          pub token_program_b: solana_pubkey::Pubkey,
          
              
          pub market: solana_pubkey::Pubkey,
          
              
          pub vault_a: solana_pubkey::Pubkey,
          
              
          pub vault_b: solana_pubkey::Pubkey,
          
              
          pub vault_a_ata: solana_pubkey::Pubkey,
          
              
          pub vault_b_ata: solana_pubkey::Pubkey,
          
              
          pub tuna_position: solana_pubkey::Pubkey,
          
              
          pub tuna_position_ata_a: solana_pubkey::Pubkey,
          
              
          pub tuna_position_ata_b: solana_pubkey::Pubkey,
          
              
          pub fee_recipient_ata_a: solana_pubkey::Pubkey,
          
              
          pub fee_recipient_ata_b: solana_pubkey::Pubkey,
          
              
          pub tuna_position_owner: solana_pubkey::Pubkey,
          
              
          pub tuna_position_owner_ata_a: solana_pubkey::Pubkey,
          
              
          pub tuna_position_owner_ata_b: solana_pubkey::Pubkey,
          
              
          pub oracle_price_update_a: solana_pubkey::Pubkey,
          
              
          pub oracle_price_update_b: solana_pubkey::Pubkey,
          
              
          pub pool: solana_pubkey::Pubkey,
                /// 
/// Jupiter accounts
/// 

    
              
          pub jupiter_program: solana_pubkey::Pubkey,
                /// 
/// Other accounts
/// 

    
              
          pub memo_program: solana_pubkey::Pubkey,
          
              
          pub system_program: solana_pubkey::Pubkey,
      }

impl LiquidateTunaSpotPositionJupiter {
  pub fn instruction(&self, args: LiquidateTunaSpotPositionJupiterInstructionArgs) -> solana_instruction::Instruction {
    self.instruction_with_remaining_accounts(args, &[])
  }
  #[allow(clippy::arithmetic_side_effects)]
  #[allow(clippy::vec_init_then_push)]
  pub fn instruction_with_remaining_accounts(&self, args: LiquidateTunaSpotPositionJupiterInstructionArgs, remaining_accounts: &[solana_instruction::AccountMeta]) -> solana_instruction::Instruction {
    let mut accounts = Vec::with_capacity(25+ remaining_accounts.len());
                            accounts.push(solana_instruction::AccountMeta::new(
            self.authority,
            true
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.tuna_config,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.mint_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.mint_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.token_program_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.token_program_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.market,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.vault_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.vault_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.vault_a_ata,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.vault_b_ata,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.tuna_position,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.tuna_position_ata_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.tuna_position_ata_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.fee_recipient_ata_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.fee_recipient_ata_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.tuna_position_owner,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.tuna_position_owner_ata_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            self.tuna_position_owner_ata_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.oracle_price_update_a,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.oracle_price_update_b,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.pool,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.jupiter_program,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.memo_program,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            self.system_program,
            false
          ));
                      accounts.extend_from_slice(remaining_accounts);
    let mut data = borsh::to_vec(&LiquidateTunaSpotPositionJupiterInstructionData::new()).unwrap();
          let mut args = borsh::to_vec(&args).unwrap();
      data.append(&mut args);
    
    solana_instruction::Instruction {
      program_id: crate::TUNA_ID,
      accounts,
      data,
    }
  }
}

#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
 pub struct LiquidateTunaSpotPositionJupiterInstructionData {
            discriminator: [u8; 8],
                        }

impl LiquidateTunaSpotPositionJupiterInstructionData {
  pub fn new() -> Self {
    Self {
                        discriminator: [202, 175, 176, 66, 139, 120, 175, 193],
                                                            }
  }
}

impl Default for LiquidateTunaSpotPositionJupiterInstructionData {
  fn default() -> Self {
    Self::new()
  }
}

#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
 pub struct LiquidateTunaSpotPositionJupiterInstructionArgs {
                  pub decrease_percent: u32,
                pub jupiter_route_data: Vec<u8>,
                pub remaining_accounts_info: RemainingAccountsInfo,
      }


/// Instruction builder for `LiquidateTunaSpotPositionJupiter`.
///
/// ### Accounts:
///
                      ///   0. `[writable, signer]` authority
          ///   1. `[]` tuna_config
          ///   2. `[]` mint_a
          ///   3. `[]` mint_b
          ///   4. `[]` token_program_a
          ///   5. `[]` token_program_b
                ///   6. `[writable]` market
                ///   7. `[writable]` vault_a
                ///   8. `[writable]` vault_b
                ///   9. `[writable]` vault_a_ata
                ///   10. `[writable]` vault_b_ata
                ///   11. `[writable]` tuna_position
                ///   12. `[writable]` tuna_position_ata_a
                ///   13. `[writable]` tuna_position_ata_b
                ///   14. `[writable]` fee_recipient_ata_a
                ///   15. `[writable]` fee_recipient_ata_b
                ///   16. `[writable]` tuna_position_owner
                ///   17. `[writable]` tuna_position_owner_ata_a
                ///   18. `[writable]` tuna_position_owner_ata_b
          ///   19. `[]` oracle_price_update_a
          ///   20. `[]` oracle_price_update_b
          ///   21. `[]` pool
          ///   22. `[]` jupiter_program
          ///   23. `[]` memo_program
                ///   24. `[optional]` system_program (default to `11111111111111111111111111111111`)
#[derive(Clone, Debug, Default)]
pub struct LiquidateTunaSpotPositionJupiterBuilder {
            authority: Option<solana_pubkey::Pubkey>,
                tuna_config: Option<solana_pubkey::Pubkey>,
                mint_a: Option<solana_pubkey::Pubkey>,
                mint_b: Option<solana_pubkey::Pubkey>,
                token_program_a: Option<solana_pubkey::Pubkey>,
                token_program_b: Option<solana_pubkey::Pubkey>,
                market: Option<solana_pubkey::Pubkey>,
                vault_a: Option<solana_pubkey::Pubkey>,
                vault_b: Option<solana_pubkey::Pubkey>,
                vault_a_ata: Option<solana_pubkey::Pubkey>,
                vault_b_ata: Option<solana_pubkey::Pubkey>,
                tuna_position: Option<solana_pubkey::Pubkey>,
                tuna_position_ata_a: Option<solana_pubkey::Pubkey>,
                tuna_position_ata_b: Option<solana_pubkey::Pubkey>,
                fee_recipient_ata_a: Option<solana_pubkey::Pubkey>,
                fee_recipient_ata_b: Option<solana_pubkey::Pubkey>,
                tuna_position_owner: Option<solana_pubkey::Pubkey>,
                tuna_position_owner_ata_a: Option<solana_pubkey::Pubkey>,
                tuna_position_owner_ata_b: Option<solana_pubkey::Pubkey>,
                oracle_price_update_a: Option<solana_pubkey::Pubkey>,
                oracle_price_update_b: Option<solana_pubkey::Pubkey>,
                pool: Option<solana_pubkey::Pubkey>,
                jupiter_program: Option<solana_pubkey::Pubkey>,
                memo_program: Option<solana_pubkey::Pubkey>,
                system_program: Option<solana_pubkey::Pubkey>,
                        decrease_percent: Option<u32>,
                jupiter_route_data: Option<Vec<u8>>,
                remaining_accounts_info: Option<RemainingAccountsInfo>,
        __remaining_accounts: Vec<solana_instruction::AccountMeta>,
}

impl LiquidateTunaSpotPositionJupiterBuilder {
  pub fn new() -> Self {
    Self::default()
  }
            /// 
/// TUNA accounts
/// 
#[inline(always)]
    pub fn authority(&mut self, authority: solana_pubkey::Pubkey) -> &mut Self {
                        self.authority = Some(authority);
                    self
    }
            #[inline(always)]
    pub fn tuna_config(&mut self, tuna_config: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_config = Some(tuna_config);
                    self
    }
            #[inline(always)]
    pub fn mint_a(&mut self, mint_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.mint_a = Some(mint_a);
                    self
    }
            #[inline(always)]
    pub fn mint_b(&mut self, mint_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.mint_b = Some(mint_b);
                    self
    }
            #[inline(always)]
    pub fn token_program_a(&mut self, token_program_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.token_program_a = Some(token_program_a);
                    self
    }
            #[inline(always)]
    pub fn token_program_b(&mut self, token_program_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.token_program_b = Some(token_program_b);
                    self
    }
            #[inline(always)]
    pub fn market(&mut self, market: solana_pubkey::Pubkey) -> &mut Self {
                        self.market = Some(market);
                    self
    }
            #[inline(always)]
    pub fn vault_a(&mut self, vault_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.vault_a = Some(vault_a);
                    self
    }
            #[inline(always)]
    pub fn vault_b(&mut self, vault_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.vault_b = Some(vault_b);
                    self
    }
            #[inline(always)]
    pub fn vault_a_ata(&mut self, vault_a_ata: solana_pubkey::Pubkey) -> &mut Self {
                        self.vault_a_ata = Some(vault_a_ata);
                    self
    }
            #[inline(always)]
    pub fn vault_b_ata(&mut self, vault_b_ata: solana_pubkey::Pubkey) -> &mut Self {
                        self.vault_b_ata = Some(vault_b_ata);
                    self
    }
            #[inline(always)]
    pub fn tuna_position(&mut self, tuna_position: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_position = Some(tuna_position);
                    self
    }
            #[inline(always)]
    pub fn tuna_position_ata_a(&mut self, tuna_position_ata_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_position_ata_a = Some(tuna_position_ata_a);
                    self
    }
            #[inline(always)]
    pub fn tuna_position_ata_b(&mut self, tuna_position_ata_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_position_ata_b = Some(tuna_position_ata_b);
                    self
    }
            #[inline(always)]
    pub fn fee_recipient_ata_a(&mut self, fee_recipient_ata_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.fee_recipient_ata_a = Some(fee_recipient_ata_a);
                    self
    }
            #[inline(always)]
    pub fn fee_recipient_ata_b(&mut self, fee_recipient_ata_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.fee_recipient_ata_b = Some(fee_recipient_ata_b);
                    self
    }
            #[inline(always)]
    pub fn tuna_position_owner(&mut self, tuna_position_owner: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_position_owner = Some(tuna_position_owner);
                    self
    }
            #[inline(always)]
    pub fn tuna_position_owner_ata_a(&mut self, tuna_position_owner_ata_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_position_owner_ata_a = Some(tuna_position_owner_ata_a);
                    self
    }
            #[inline(always)]
    pub fn tuna_position_owner_ata_b(&mut self, tuna_position_owner_ata_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.tuna_position_owner_ata_b = Some(tuna_position_owner_ata_b);
                    self
    }
            #[inline(always)]
    pub fn oracle_price_update_a(&mut self, oracle_price_update_a: solana_pubkey::Pubkey) -> &mut Self {
                        self.oracle_price_update_a = Some(oracle_price_update_a);
                    self
    }
            #[inline(always)]
    pub fn oracle_price_update_b(&mut self, oracle_price_update_b: solana_pubkey::Pubkey) -> &mut Self {
                        self.oracle_price_update_b = Some(oracle_price_update_b);
                    self
    }
            #[inline(always)]
    pub fn pool(&mut self, pool: solana_pubkey::Pubkey) -> &mut Self {
                        self.pool = Some(pool);
                    self
    }
            /// 
/// Jupiter accounts
/// 
#[inline(always)]
    pub fn jupiter_program(&mut self, jupiter_program: solana_pubkey::Pubkey) -> &mut Self {
                        self.jupiter_program = Some(jupiter_program);
                    self
    }
            /// 
/// Other accounts
/// 
#[inline(always)]
    pub fn memo_program(&mut self, memo_program: solana_pubkey::Pubkey) -> &mut Self {
                        self.memo_program = Some(memo_program);
                    self
    }
            /// `[optional account, default to '11111111111111111111111111111111']`
#[inline(always)]
    pub fn system_program(&mut self, system_program: solana_pubkey::Pubkey) -> &mut Self {
                        self.system_program = Some(system_program);
                    self
    }
                    #[inline(always)]
      pub fn decrease_percent(&mut self, decrease_percent: u32) -> &mut Self {
        self.decrease_percent = Some(decrease_percent);
        self
      }
                #[inline(always)]
      pub fn jupiter_route_data(&mut self, jupiter_route_data: Vec<u8>) -> &mut Self {
        self.jupiter_route_data = Some(jupiter_route_data);
        self
      }
                #[inline(always)]
      pub fn remaining_accounts_info(&mut self, remaining_accounts_info: RemainingAccountsInfo) -> &mut Self {
        self.remaining_accounts_info = Some(remaining_accounts_info);
        self
      }
        /// Add an additional account to the instruction.
  #[inline(always)]
  pub fn add_remaining_account(&mut self, account: solana_instruction::AccountMeta) -> &mut Self {
    self.__remaining_accounts.push(account);
    self
  }
  /// Add additional accounts to the instruction.
  #[inline(always)]
  pub fn add_remaining_accounts(&mut self, accounts: &[solana_instruction::AccountMeta]) -> &mut Self {
    self.__remaining_accounts.extend_from_slice(accounts);
    self
  }
  #[allow(clippy::clone_on_copy)]
  pub fn instruction(&self) -> solana_instruction::Instruction {
    let accounts = LiquidateTunaSpotPositionJupiter {
                              authority: self.authority.expect("authority is not set"),
                                        tuna_config: self.tuna_config.expect("tuna_config is not set"),
                                        mint_a: self.mint_a.expect("mint_a is not set"),
                                        mint_b: self.mint_b.expect("mint_b is not set"),
                                        token_program_a: self.token_program_a.expect("token_program_a is not set"),
                                        token_program_b: self.token_program_b.expect("token_program_b is not set"),
                                        market: self.market.expect("market is not set"),
                                        vault_a: self.vault_a.expect("vault_a is not set"),
                                        vault_b: self.vault_b.expect("vault_b is not set"),
                                        vault_a_ata: self.vault_a_ata.expect("vault_a_ata is not set"),
                                        vault_b_ata: self.vault_b_ata.expect("vault_b_ata is not set"),
                                        tuna_position: self.tuna_position.expect("tuna_position is not set"),
                                        tuna_position_ata_a: self.tuna_position_ata_a.expect("tuna_position_ata_a is not set"),
                                        tuna_position_ata_b: self.tuna_position_ata_b.expect("tuna_position_ata_b is not set"),
                                        fee_recipient_ata_a: self.fee_recipient_ata_a.expect("fee_recipient_ata_a is not set"),
                                        fee_recipient_ata_b: self.fee_recipient_ata_b.expect("fee_recipient_ata_b is not set"),
                                        tuna_position_owner: self.tuna_position_owner.expect("tuna_position_owner is not set"),
                                        tuna_position_owner_ata_a: self.tuna_position_owner_ata_a.expect("tuna_position_owner_ata_a is not set"),
                                        tuna_position_owner_ata_b: self.tuna_position_owner_ata_b.expect("tuna_position_owner_ata_b is not set"),
                                        oracle_price_update_a: self.oracle_price_update_a.expect("oracle_price_update_a is not set"),
                                        oracle_price_update_b: self.oracle_price_update_b.expect("oracle_price_update_b is not set"),
                                        pool: self.pool.expect("pool is not set"),
                                        jupiter_program: self.jupiter_program.expect("jupiter_program is not set"),
                                        memo_program: self.memo_program.expect("memo_program is not set"),
                                        system_program: self.system_program.unwrap_or(solana_pubkey::pubkey!("11111111111111111111111111111111")),
                      };
          let args = LiquidateTunaSpotPositionJupiterInstructionArgs {
                                                              decrease_percent: self.decrease_percent.clone().expect("decrease_percent is not set"),
                                                                  jupiter_route_data: self.jupiter_route_data.clone().expect("jupiter_route_data is not set"),
                                                                  remaining_accounts_info: self.remaining_accounts_info.clone().expect("remaining_accounts_info is not set"),
                                    };
    
    accounts.instruction_with_remaining_accounts(args, &self.__remaining_accounts)
  }
}

  /// `liquidate_tuna_spot_position_jupiter` CPI accounts.
  pub struct LiquidateTunaSpotPositionJupiterCpiAccounts<'a, 'b> {
                  /// 
/// TUNA accounts
/// 

      
                    
              pub authority: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_config: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub mint_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub mint_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub token_program_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub token_program_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub market: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub vault_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub vault_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub vault_a_ata: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub vault_b_ata: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_position: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_position_ata_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_position_ata_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub fee_recipient_ata_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub fee_recipient_ata_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_position_owner: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_position_owner_ata_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub tuna_position_owner_ata_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub oracle_price_update_a: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub oracle_price_update_b: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub pool: &'b solana_account_info::AccountInfo<'a>,
                        /// 
/// Jupiter accounts
/// 

      
                    
              pub jupiter_program: &'b solana_account_info::AccountInfo<'a>,
                        /// 
/// Other accounts
/// 

      
                    
              pub memo_program: &'b solana_account_info::AccountInfo<'a>,
                
                    
              pub system_program: &'b solana_account_info::AccountInfo<'a>,
            }

/// `liquidate_tuna_spot_position_jupiter` CPI instruction.
pub struct LiquidateTunaSpotPositionJupiterCpi<'a, 'b> {
  /// The program to invoke.
  pub __program: &'b solana_account_info::AccountInfo<'a>,
            /// 
/// TUNA accounts
/// 

    
              
          pub authority: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_config: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub mint_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub mint_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub token_program_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub token_program_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub market: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub vault_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub vault_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub vault_a_ata: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub vault_b_ata: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_position: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_position_ata_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_position_ata_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub fee_recipient_ata_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub fee_recipient_ata_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_position_owner: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_position_owner_ata_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub tuna_position_owner_ata_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub oracle_price_update_a: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub oracle_price_update_b: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub pool: &'b solana_account_info::AccountInfo<'a>,
                /// 
/// Jupiter accounts
/// 

    
              
          pub jupiter_program: &'b solana_account_info::AccountInfo<'a>,
                /// 
/// Other accounts
/// 

    
              
          pub memo_program: &'b solana_account_info::AccountInfo<'a>,
          
              
          pub system_program: &'b solana_account_info::AccountInfo<'a>,
            /// The arguments for the instruction.
    pub __args: LiquidateTunaSpotPositionJupiterInstructionArgs,
  }

impl<'a, 'b> LiquidateTunaSpotPositionJupiterCpi<'a, 'b> {
  pub fn new(
    program: &'b solana_account_info::AccountInfo<'a>,
          accounts: LiquidateTunaSpotPositionJupiterCpiAccounts<'a, 'b>,
              args: LiquidateTunaSpotPositionJupiterInstructionArgs,
      ) -> Self {
    Self {
      __program: program,
              authority: accounts.authority,
              tuna_config: accounts.tuna_config,
              mint_a: accounts.mint_a,
              mint_b: accounts.mint_b,
              token_program_a: accounts.token_program_a,
              token_program_b: accounts.token_program_b,
              market: accounts.market,
              vault_a: accounts.vault_a,
              vault_b: accounts.vault_b,
              vault_a_ata: accounts.vault_a_ata,
              vault_b_ata: accounts.vault_b_ata,
              tuna_position: accounts.tuna_position,
              tuna_position_ata_a: accounts.tuna_position_ata_a,
              tuna_position_ata_b: accounts.tuna_position_ata_b,
              fee_recipient_ata_a: accounts.fee_recipient_ata_a,
              fee_recipient_ata_b: accounts.fee_recipient_ata_b,
              tuna_position_owner: accounts.tuna_position_owner,
              tuna_position_owner_ata_a: accounts.tuna_position_owner_ata_a,
              tuna_position_owner_ata_b: accounts.tuna_position_owner_ata_b,
              oracle_price_update_a: accounts.oracle_price_update_a,
              oracle_price_update_b: accounts.oracle_price_update_b,
              pool: accounts.pool,
              jupiter_program: accounts.jupiter_program,
              memo_program: accounts.memo_program,
              system_program: accounts.system_program,
                    __args: args,
          }
  }
  #[inline(always)]
  pub fn invoke(&self) -> solana_program_error::ProgramResult {
    self.invoke_signed_with_remaining_accounts(&[], &[])
  }
  #[inline(always)]
  pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> solana_program_error::ProgramResult {
    self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
  }
  #[inline(always)]
  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
    self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
  }
  #[allow(clippy::arithmetic_side_effects)]
  #[allow(clippy::clone_on_copy)]
  #[allow(clippy::vec_init_then_push)]
  pub fn invoke_signed_with_remaining_accounts(
    &self,
    signers_seeds: &[&[&[u8]]],
    remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]
  ) -> solana_program_error::ProgramResult {
    let mut accounts = Vec::with_capacity(25+ remaining_accounts.len());
                            accounts.push(solana_instruction::AccountMeta::new(
            *self.authority.key,
            true
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.tuna_config.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.mint_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.mint_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.token_program_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.token_program_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.market.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.vault_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.vault_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.vault_a_ata.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.vault_b_ata.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.tuna_position.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.tuna_position_ata_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.tuna_position_ata_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.fee_recipient_ata_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.fee_recipient_ata_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.tuna_position_owner.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.tuna_position_owner_ata_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new(
            *self.tuna_position_owner_ata_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.oracle_price_update_a.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.oracle_price_update_b.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.pool.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.jupiter_program.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.memo_program.key,
            false
          ));
                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
            *self.system_program.key,
            false
          ));
                      remaining_accounts.iter().for_each(|remaining_account| {
      accounts.push(solana_instruction::AccountMeta {
          pubkey: *remaining_account.0.key,
          is_signer: remaining_account.1,
          is_writable: remaining_account.2,
      })
    });
    let mut data = borsh::to_vec(&LiquidateTunaSpotPositionJupiterInstructionData::new()).unwrap();
          let mut args = borsh::to_vec(&self.__args).unwrap();
      data.append(&mut args);
    
    let instruction = solana_instruction::Instruction {
      program_id: crate::TUNA_ID,
      accounts,
      data,
    };
    let mut account_infos = Vec::with_capacity(26 + remaining_accounts.len());
    account_infos.push(self.__program.clone());
                  account_infos.push(self.authority.clone());
                        account_infos.push(self.tuna_config.clone());
                        account_infos.push(self.mint_a.clone());
                        account_infos.push(self.mint_b.clone());
                        account_infos.push(self.token_program_a.clone());
                        account_infos.push(self.token_program_b.clone());
                        account_infos.push(self.market.clone());
                        account_infos.push(self.vault_a.clone());
                        account_infos.push(self.vault_b.clone());
                        account_infos.push(self.vault_a_ata.clone());
                        account_infos.push(self.vault_b_ata.clone());
                        account_infos.push(self.tuna_position.clone());
                        account_infos.push(self.tuna_position_ata_a.clone());
                        account_infos.push(self.tuna_position_ata_b.clone());
                        account_infos.push(self.fee_recipient_ata_a.clone());
                        account_infos.push(self.fee_recipient_ata_b.clone());
                        account_infos.push(self.tuna_position_owner.clone());
                        account_infos.push(self.tuna_position_owner_ata_a.clone());
                        account_infos.push(self.tuna_position_owner_ata_b.clone());
                        account_infos.push(self.oracle_price_update_a.clone());
                        account_infos.push(self.oracle_price_update_b.clone());
                        account_infos.push(self.pool.clone());
                        account_infos.push(self.jupiter_program.clone());
                        account_infos.push(self.memo_program.clone());
                        account_infos.push(self.system_program.clone());
              remaining_accounts.iter().for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));

    if signers_seeds.is_empty() {
      solana_cpi::invoke(&instruction, &account_infos)
    } else {
      solana_cpi::invoke_signed(&instruction, &account_infos, signers_seeds)
    }
  }
}

/// Instruction builder for `LiquidateTunaSpotPositionJupiter` via CPI.
///
/// ### Accounts:
///
                      ///   0. `[writable, signer]` authority
          ///   1. `[]` tuna_config
          ///   2. `[]` mint_a
          ///   3. `[]` mint_b
          ///   4. `[]` token_program_a
          ///   5. `[]` token_program_b
                ///   6. `[writable]` market
                ///   7. `[writable]` vault_a
                ///   8. `[writable]` vault_b
                ///   9. `[writable]` vault_a_ata
                ///   10. `[writable]` vault_b_ata
                ///   11. `[writable]` tuna_position
                ///   12. `[writable]` tuna_position_ata_a
                ///   13. `[writable]` tuna_position_ata_b
                ///   14. `[writable]` fee_recipient_ata_a
                ///   15. `[writable]` fee_recipient_ata_b
                ///   16. `[writable]` tuna_position_owner
                ///   17. `[writable]` tuna_position_owner_ata_a
                ///   18. `[writable]` tuna_position_owner_ata_b
          ///   19. `[]` oracle_price_update_a
          ///   20. `[]` oracle_price_update_b
          ///   21. `[]` pool
          ///   22. `[]` jupiter_program
          ///   23. `[]` memo_program
          ///   24. `[]` system_program
#[derive(Clone, Debug)]
pub struct LiquidateTunaSpotPositionJupiterCpiBuilder<'a, 'b> {
  instruction: Box<LiquidateTunaSpotPositionJupiterCpiBuilderInstruction<'a, 'b>>,
}

impl<'a, 'b> LiquidateTunaSpotPositionJupiterCpiBuilder<'a, 'b> {
  pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
    let instruction = Box::new(LiquidateTunaSpotPositionJupiterCpiBuilderInstruction {
      __program: program,
              authority: None,
              tuna_config: None,
              mint_a: None,
              mint_b: None,
              token_program_a: None,
              token_program_b: None,
              market: None,
              vault_a: None,
              vault_b: None,
              vault_a_ata: None,
              vault_b_ata: None,
              tuna_position: None,
              tuna_position_ata_a: None,
              tuna_position_ata_b: None,
              fee_recipient_ata_a: None,
              fee_recipient_ata_b: None,
              tuna_position_owner: None,
              tuna_position_owner_ata_a: None,
              tuna_position_owner_ata_b: None,
              oracle_price_update_a: None,
              oracle_price_update_b: None,
              pool: None,
              jupiter_program: None,
              memo_program: None,
              system_program: None,
                                            decrease_percent: None,
                                jupiter_route_data: None,
                                remaining_accounts_info: None,
                    __remaining_accounts: Vec::new(),
    });
    Self { instruction }
  }
      /// 
/// TUNA accounts
/// 
#[inline(always)]
    pub fn authority(&mut self, authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.authority = Some(authority);
                    self
    }
      #[inline(always)]
    pub fn tuna_config(&mut self, tuna_config: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_config = Some(tuna_config);
                    self
    }
      #[inline(always)]
    pub fn mint_a(&mut self, mint_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.mint_a = Some(mint_a);
                    self
    }
      #[inline(always)]
    pub fn mint_b(&mut self, mint_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.mint_b = Some(mint_b);
                    self
    }
      #[inline(always)]
    pub fn token_program_a(&mut self, token_program_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.token_program_a = Some(token_program_a);
                    self
    }
      #[inline(always)]
    pub fn token_program_b(&mut self, token_program_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.token_program_b = Some(token_program_b);
                    self
    }
      #[inline(always)]
    pub fn market(&mut self, market: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.market = Some(market);
                    self
    }
      #[inline(always)]
    pub fn vault_a(&mut self, vault_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.vault_a = Some(vault_a);
                    self
    }
      #[inline(always)]
    pub fn vault_b(&mut self, vault_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.vault_b = Some(vault_b);
                    self
    }
      #[inline(always)]
    pub fn vault_a_ata(&mut self, vault_a_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.vault_a_ata = Some(vault_a_ata);
                    self
    }
      #[inline(always)]
    pub fn vault_b_ata(&mut self, vault_b_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.vault_b_ata = Some(vault_b_ata);
                    self
    }
      #[inline(always)]
    pub fn tuna_position(&mut self, tuna_position: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_position = Some(tuna_position);
                    self
    }
      #[inline(always)]
    pub fn tuna_position_ata_a(&mut self, tuna_position_ata_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_position_ata_a = Some(tuna_position_ata_a);
                    self
    }
      #[inline(always)]
    pub fn tuna_position_ata_b(&mut self, tuna_position_ata_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_position_ata_b = Some(tuna_position_ata_b);
                    self
    }
      #[inline(always)]
    pub fn fee_recipient_ata_a(&mut self, fee_recipient_ata_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.fee_recipient_ata_a = Some(fee_recipient_ata_a);
                    self
    }
      #[inline(always)]
    pub fn fee_recipient_ata_b(&mut self, fee_recipient_ata_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.fee_recipient_ata_b = Some(fee_recipient_ata_b);
                    self
    }
      #[inline(always)]
    pub fn tuna_position_owner(&mut self, tuna_position_owner: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_position_owner = Some(tuna_position_owner);
                    self
    }
      #[inline(always)]
    pub fn tuna_position_owner_ata_a(&mut self, tuna_position_owner_ata_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_position_owner_ata_a = Some(tuna_position_owner_ata_a);
                    self
    }
      #[inline(always)]
    pub fn tuna_position_owner_ata_b(&mut self, tuna_position_owner_ata_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.tuna_position_owner_ata_b = Some(tuna_position_owner_ata_b);
                    self
    }
      #[inline(always)]
    pub fn oracle_price_update_a(&mut self, oracle_price_update_a: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.oracle_price_update_a = Some(oracle_price_update_a);
                    self
    }
      #[inline(always)]
    pub fn oracle_price_update_b(&mut self, oracle_price_update_b: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.oracle_price_update_b = Some(oracle_price_update_b);
                    self
    }
      #[inline(always)]
    pub fn pool(&mut self, pool: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.pool = Some(pool);
                    self
    }
      /// 
/// Jupiter accounts
/// 
#[inline(always)]
    pub fn jupiter_program(&mut self, jupiter_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.jupiter_program = Some(jupiter_program);
                    self
    }
      /// 
/// Other accounts
/// 
#[inline(always)]
    pub fn memo_program(&mut self, memo_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.memo_program = Some(memo_program);
                    self
    }
      #[inline(always)]
    pub fn system_program(&mut self, system_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
                        self.instruction.system_program = Some(system_program);
                    self
    }
                    #[inline(always)]
      pub fn decrease_percent(&mut self, decrease_percent: u32) -> &mut Self {
        self.instruction.decrease_percent = Some(decrease_percent);
        self
      }
                #[inline(always)]
      pub fn jupiter_route_data(&mut self, jupiter_route_data: Vec<u8>) -> &mut Self {
        self.instruction.jupiter_route_data = Some(jupiter_route_data);
        self
      }
                #[inline(always)]
      pub fn remaining_accounts_info(&mut self, remaining_accounts_info: RemainingAccountsInfo) -> &mut Self {
        self.instruction.remaining_accounts_info = Some(remaining_accounts_info);
        self
      }
        /// Add an additional account to the instruction.
  #[inline(always)]
  pub fn add_remaining_account(&mut self, account: &'b solana_account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
    self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
    self
  }
  /// Add additional accounts to the instruction.
  ///
  /// Each account is represented by a tuple of the `AccountInfo`, a `bool` indicating whether the account is writable or not,
  /// and a `bool` indicating whether the account is a signer or not.
  #[inline(always)]
  pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
    self.instruction.__remaining_accounts.extend_from_slice(accounts);
    self
  }
  #[inline(always)]
  pub fn invoke(&self) -> solana_program_error::ProgramResult {
    self.invoke_signed(&[])
  }
  #[allow(clippy::clone_on_copy)]
  #[allow(clippy::vec_init_then_push)]
  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
          let args = LiquidateTunaSpotPositionJupiterInstructionArgs {
                                                              decrease_percent: self.instruction.decrease_percent.clone().expect("decrease_percent is not set"),
                                                                  jupiter_route_data: self.instruction.jupiter_route_data.clone().expect("jupiter_route_data is not set"),
                                                                  remaining_accounts_info: self.instruction.remaining_accounts_info.clone().expect("remaining_accounts_info is not set"),
                                    };
        let instruction = LiquidateTunaSpotPositionJupiterCpi {
        __program: self.instruction.__program,
                  
          authority: self.instruction.authority.expect("authority is not set"),
                  
          tuna_config: self.instruction.tuna_config.expect("tuna_config is not set"),
                  
          mint_a: self.instruction.mint_a.expect("mint_a is not set"),
                  
          mint_b: self.instruction.mint_b.expect("mint_b is not set"),
                  
          token_program_a: self.instruction.token_program_a.expect("token_program_a is not set"),
                  
          token_program_b: self.instruction.token_program_b.expect("token_program_b is not set"),
                  
          market: self.instruction.market.expect("market is not set"),
                  
          vault_a: self.instruction.vault_a.expect("vault_a is not set"),
                  
          vault_b: self.instruction.vault_b.expect("vault_b is not set"),
                  
          vault_a_ata: self.instruction.vault_a_ata.expect("vault_a_ata is not set"),
                  
          vault_b_ata: self.instruction.vault_b_ata.expect("vault_b_ata is not set"),
                  
          tuna_position: self.instruction.tuna_position.expect("tuna_position is not set"),
                  
          tuna_position_ata_a: self.instruction.tuna_position_ata_a.expect("tuna_position_ata_a is not set"),
                  
          tuna_position_ata_b: self.instruction.tuna_position_ata_b.expect("tuna_position_ata_b is not set"),
                  
          fee_recipient_ata_a: self.instruction.fee_recipient_ata_a.expect("fee_recipient_ata_a is not set"),
                  
          fee_recipient_ata_b: self.instruction.fee_recipient_ata_b.expect("fee_recipient_ata_b is not set"),
                  
          tuna_position_owner: self.instruction.tuna_position_owner.expect("tuna_position_owner is not set"),
                  
          tuna_position_owner_ata_a: self.instruction.tuna_position_owner_ata_a.expect("tuna_position_owner_ata_a is not set"),
                  
          tuna_position_owner_ata_b: self.instruction.tuna_position_owner_ata_b.expect("tuna_position_owner_ata_b is not set"),
                  
          oracle_price_update_a: self.instruction.oracle_price_update_a.expect("oracle_price_update_a is not set"),
                  
          oracle_price_update_b: self.instruction.oracle_price_update_b.expect("oracle_price_update_b is not set"),
                  
          pool: self.instruction.pool.expect("pool is not set"),
                  
          jupiter_program: self.instruction.jupiter_program.expect("jupiter_program is not set"),
                  
          memo_program: self.instruction.memo_program.expect("memo_program is not set"),
                  
          system_program: self.instruction.system_program.expect("system_program is not set"),
                          __args: args,
            };
    instruction.invoke_signed_with_remaining_accounts(signers_seeds, &self.instruction.__remaining_accounts)
  }
}

#[derive(Clone, Debug)]
struct LiquidateTunaSpotPositionJupiterCpiBuilderInstruction<'a, 'b> {
  __program: &'b solana_account_info::AccountInfo<'a>,
            authority: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_config: Option<&'b solana_account_info::AccountInfo<'a>>,
                mint_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                mint_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                token_program_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                token_program_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                market: Option<&'b solana_account_info::AccountInfo<'a>>,
                vault_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                vault_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                vault_a_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
                vault_b_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_position: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_position_ata_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_position_ata_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                fee_recipient_ata_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                fee_recipient_ata_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_position_owner: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_position_owner_ata_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                tuna_position_owner_ata_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                oracle_price_update_a: Option<&'b solana_account_info::AccountInfo<'a>>,
                oracle_price_update_b: Option<&'b solana_account_info::AccountInfo<'a>>,
                pool: Option<&'b solana_account_info::AccountInfo<'a>>,
                jupiter_program: Option<&'b solana_account_info::AccountInfo<'a>>,
                memo_program: Option<&'b solana_account_info::AccountInfo<'a>>,
                system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
                        decrease_percent: Option<u32>,
                jupiter_route_data: Option<Vec<u8>>,
                remaining_accounts_info: Option<RemainingAccountsInfo>,
        /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
  __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
}

