// This is an automatically generated code sample. 
// To make this code sample work in your Oracle Cloud tenancy, 
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and 
// boolean, number, and enum parameters with values not fitting your use case).

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Oci.MarketplaceprivateofferService;
using Oci.Common;
using Oci.Common.Auth;

namespace Oci.Sdk.DotNet.Example.Marketplaceprivateoffer
{
    public class UpdateOfferQuoteExample
    {
        public static async Task Main()
        {
            // Create a request and dependent object(s).
			var updateOfferQuoteDetails = new Oci.MarketplaceprivateofferService.Models.UpdateOfferQuoteDetails
			{
				DisplayName = "EXAMPLE-displayName-Value",
				IsvCompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-isvCompartmentId-Value",
				IsvPublisherId = "ocid1.test.oc1..<unique_ID>EXAMPLE-isvPublisherId-Value",
				Description = "EXAMPLE-description-Value",
				BuyerCompartmentIds = new List<string>
				{
					"EXAMPLE--Value"
				},
				ResellerInformation = new Oci.MarketplaceprivateofferService.Models.ResellerInformation
				{
					PrimaryContact = new Oci.MarketplaceprivateofferService.Models.Contact
					{
						FirstName = "EXAMPLE-firstName-Value",
						LastName = "EXAMPLE-lastName-Value",
						Email = "EXAMPLE-email-Value"
					},
					AdditionalContacts = new List<Oci.MarketplaceprivateofferService.Models.Contact>
					{
						new Oci.MarketplaceprivateofferService.Models.Contact
						{
							FirstName = "EXAMPLE-firstName-Value",
							LastName = "EXAMPLE-lastName-Value",
							Email = "EXAMPLE-email-Value"
						}
					}
				},
				IsvInformation = new Oci.MarketplaceprivateofferService.Models.IsvInformation
				{
					PrimaryContact = new Oci.MarketplaceprivateofferService.Models.Contact
					{
						FirstName = "EXAMPLE-firstName-Value",
						LastName = "EXAMPLE-lastName-Value",
						Email = "EXAMPLE-email-Value"
					},
					AdditionalContacts = new List<Oci.MarketplaceprivateofferService.Models.Contact>
					{
						new Oci.MarketplaceprivateofferService.Models.Contact
						{
							FirstName = "EXAMPLE-firstName-Value",
							LastName = "EXAMPLE-lastName-Value",
							Email = "EXAMPLE-email-Value"
						}
					}
				},
				ResourceBundles = new List<Oci.MarketplaceprivateofferService.Models.ResourceBundle>
				{
					new Oci.MarketplaceprivateofferService.Models.ResourceBundle
					{
						Type = Oci.MarketplaceprivateofferService.Models.ResourceBundle.TypeEnum.Listing,
						Quantity = 53,
						UnitOfMeasurement = Oci.MarketplaceprivateofferService.Models.ResourceBundle.UnitOfMeasurementEnum.OcpuPerHour,
						ResourceIds = new List<string>
						{
							"EXAMPLE--Value"
						}
					}
				},
				BuyerAcceptanceDeadline = DateTime.Parse("04/01/2028 07:56:06"),
				BuyerOfferDuration = "EXAMPLE-buyerOfferDuration-Value",
				FreeformTags = new Dictionary<string, string>()
				{
					{
						"EXAMPLE_KEY_dQNpM", 
						"EXAMPLE_VALUE_RLtVk42cODgR5V5FSoK1"
					}
				},
				DefinedTags = new Dictionary<string, Dictionary<string, Object>>()
				{
					{
						"EXAMPLE_KEY_BoHvL", 
						new Dictionary<string, Object>()
						{
							{
								"EXAMPLE_KEY_KrXUh", 
								"EXAMPLE--Value"
							}
						}
					}
				}
			};
			var updateOfferQuoteRequest = new Oci.MarketplaceprivateofferService.Requests.UpdateOfferQuoteRequest
			{
				OfferQuoteId = "ocid1.test.oc1..<unique_ID>EXAMPLE-offerQuoteId-Value",
				UpdateOfferQuoteDetails = updateOfferQuoteDetails,
				IfMatch = "EXAMPLE-ifMatch-Value",
				OpcRequestId = "VEG5XJKXPYS05PKFWW1M<unique_ID>"
			};

            // Create a default authentication provider that uses the DEFAULT
            // profile in the configuration file.
            // Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file. 
            var provider = new ConfigFileAuthenticationDetailsProvider("DEFAULT");
            try
            {
                // Create a service client and send the request.
				using (var client = new OfferQuoteClient(provider, new ClientConfiguration()))
				{
					var response = await client.UpdateOfferQuote(updateOfferQuoteRequest);
					// Retrieve value from the response.
					var id = response.OfferQuote.Id;
				}
            }
            catch (Exception e)
            {
                Console.WriteLine($"UpdateOfferQuote Failed with {e.Message}");
                throw e;
            }
        }

    }
}