//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @ImmutableConstructor private FxRateId(com.opengamma.strata.basics.currency.CurrencyPair currencyPair, ObservableSource observableSource)
        private FxRateId(CurrencyPair currencyPair, ObservableSource observableSource)
        {
            ArgChecker.notNull(currencyPair, "currencyPair");
            ArgChecker.notNull(observableSource, "observableSource");
            this.pair             = currencyPair.toConventional();
            this.observableSource = observableSource;
        }
        /// <summary>
        /// Returns a key identifying the market quote for an observable FX rate.
        /// <para>
        /// If the FX rate is not observable in the market an empty optional is returned.
        /// </para>
        /// <para>
        /// It is possible the quote is for the rate of the inverse of the currency pair. This does not matter as
        /// the market data system ensures that the correct rate is always provided regardless of which way round
        /// the pair is quoted.
        ///
        /// </para>
        /// </summary>
        /// <param name="currencyPair">  the currency pair </param>
        /// <returns> a key identifying the market quote for the rate if it is observable in the market </returns>
        public Optional <QuoteId> getObservableRateKey(CurrencyPair currencyPair)
        {
            QuoteId quoteId = observableRates.get(currencyPair.toConventional());

            return(Optional.ofNullable(quoteId));
        }