// 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.DatascienceService;
using Oci.Common;
using Oci.Common.Auth;

namespace Oci.Sdk.DotNet.Example.Datascience
{
    public class UpdateNotebookSessionExample
    {
        public static async Task Main()
        {
            // Create a request and dependent object(s).
			var updateNotebookSessionDetails = new Oci.DatascienceService.Models.UpdateNotebookSessionDetails
			{
				DisplayName = "EXAMPLE-displayName-Value",
				NotebookSessionConfigurationDetails = new Oci.DatascienceService.Models.NotebookSessionConfigurationDetails
				{
					Shape = "EXAMPLE-shape-Value",
					BlockStorageSizeInGBs = 3762,
					SubnetId = "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
					PrivateEndpointId = "ocid1.test.oc1..<unique_ID>EXAMPLE-privateEndpointId-Value",
					NotebookSessionShapeConfigDetails = new Oci.DatascienceService.Models.NotebookSessionShapeConfigDetails
					{
						Ocpus = (float)39.049065,
						MemoryInGBs = (float)440.49585
					}
				},
				FreeformTags = new Dictionary<string, string>()
				{
					{
						"EXAMPLE_KEY_K8ssM", 
						"EXAMPLE_VALUE_rvytdy2QjLnDXAj3AwDp"
					}
				},
				DefinedTags = new Dictionary<string, Dictionary<string, Object>>()
				{
					{
						"EXAMPLE_KEY_Zwcsg", 
						new Dictionary<string, Object>()
						{
							{
								"EXAMPLE_KEY_yHyGZ", 
								"EXAMPLE--Value"
							}
						}
					}
				},
				NotebookSessionRuntimeConfigDetails = new Oci.DatascienceService.Models.NotebookSessionRuntimeConfigDetails
				{
					CustomEnvironmentVariables = new Dictionary<string, string>()
					{
						{
							"EXAMPLE_KEY_KOp4t", 
							"EXAMPLE_VALUE_P1vJMBxdrQsRmtEzZmbI"
						}
					},
					NotebookSessionGitConfigDetails = new Oci.DatascienceService.Models.NotebookSessionGitConfigDetails
					{
						NotebookSessionGitRepoConfigCollection = new List<Oci.DatascienceService.Models.NotebookSessionGitRepoConfigDetails>
						{
							new Oci.DatascienceService.Models.NotebookSessionGitRepoConfigDetails
							{
								Url = "EXAMPLE-url-Value"
							}
						}
					}
				},
				NotebookSessionStorageMountConfigurationDetailsList = new List<Oci.DatascienceService.Models.StorageMountConfigurationDetails>
				{
					new Oci.DatascienceService.Models.FileStorageMountConfigurationDetails
					{
						MountTargetId = "ocid1.test.oc1..<unique_ID>EXAMPLE-mountTargetId-Value",
						ExportId = "ocid1.test.oc1..<unique_ID>EXAMPLE-exportId-Value",
						DestinationDirectoryName = "EXAMPLE-destinationDirectoryName-Value",
						DestinationPath = "EXAMPLE-destinationPath-Value"
					}
				}
			};
			var updateNotebookSessionRequest = new Oci.DatascienceService.Requests.UpdateNotebookSessionRequest
			{
				NotebookSessionId = "ocid1.test.oc1..<unique_ID>EXAMPLE-notebookSessionId-Value",
				UpdateNotebookSessionDetails = updateNotebookSessionDetails,
				IfMatch = "EXAMPLE-ifMatch-Value",
				OpcRequestId = "G4NVZX3IIIXQKJCWFOCU<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 DataScienceClient(provider, new ClientConfiguration()))
				{
					var response = await client.UpdateNotebookSession(updateNotebookSessionRequest);
					// Retrieve value from the response.
					var id = response.NotebookSession.Id;
				}
            }
            catch (Exception e)
            {
                Console.WriteLine($"UpdateNotebookSession Failed with {e.Message}");
                throw e;
            }
        }

    }
}