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

namespace Oci.Sdk.DotNet.Example.Rover
{
    public class UpdateRoverClusterExample
    {
        public static async Task Main()
        {
            // Create a request and dependent object(s).
			var updateRoverClusterDetails = new Oci.RoverService.Models.UpdateRoverClusterDetails
			{
				DisplayName = "EXAMPLE-displayName-Value",
				ClusterSize = 28,
				CustomerShippingAddress = new Oci.RoverService.Models.ShippingAddress
				{
					Addressee = "EXAMPLE-addressee-Value",
					CareOf = "EXAMPLE-careOf-Value",
					Address1 = "EXAMPLE-address1-Value",
					Address2 = "EXAMPLE-address2-Value",
					Address3 = "EXAMPLE-address3-Value",
					Address4 = "EXAMPLE-address4-Value",
					CityOrLocality = "EXAMPLE-cityOrLocality-Value",
					StateOrRegion = "EXAMPLE-stateOrRegion-Value",
					Zipcode = "EXAMPLE-zipcode-Value",
					Country = "EXAMPLE-country-Value",
					PhoneNumber = "EXAMPLE-phoneNumber-Value",
					Email = "EXAMPLE-email-Value"
				},
				ClusterWorkloads = new List<Oci.RoverService.Models.RoverWorkload>
				{
					new Oci.RoverService.Models.RoverWorkload
					{
						Name = "EXAMPLE-name-Value",
						CompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
						Id = "ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
						Size = "EXAMPLE-size-Value",
						ObjectCount = "EXAMPLE-objectCount-Value",
						Prefix = "EXAMPLE-prefix-Value",
						RangeStart = "EXAMPLE-rangeStart-Value",
						RangeEnd = "EXAMPLE-rangeEnd-Value",
						WorkloadType = "EXAMPLE-workloadType-Value",
						WorkRequestId = "ocid1.test.oc1..<unique_ID>EXAMPLE-workRequestId-Value"
					}
				},
				SuperUserPassword = "EXAMPLE-superUserPassword-Value",
				LifecycleState = Oci.RoverService.Models.LifecycleState.Creating,
				LifecycleStateDetails = "EXAMPLE-lifecycleStateDetails-Value",
				UnlockPassphrase = "EXAMPLE-unlockPassphrase-Value",
				EnclosureType = Oci.RoverService.Models.EnclosureType.NonRuggadized,
				PointOfContact = "EXAMPLE-pointOfContact-Value",
				PointOfContactPhoneNumber = "EXAMPLE-pointOfContactPhoneNumber-Value",
				ShippingPreference = Oci.RoverService.Models.UpdateRoverClusterDetails.ShippingPreferenceEnum.CustomerPickup,
				OracleShippingTrackingUrl = "EXAMPLE-oracleShippingTrackingUrl-Value",
				SubscriptionId = "ocid1.test.oc1..<unique_ID>EXAMPLE-subscriptionId-Value",
				ShippingVendor = "EXAMPLE-shippingVendor-Value",
				TimePickupExpected = DateTime.Parse("02/28/2004 04:38:13"),
				IsImportRequested = false,
				ImportCompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-importCompartmentId-Value",
				ImportFileBucket = "EXAMPLE-importFileBucket-Value",
				DataValidationCode = "EXAMPLE-dataValidationCode-Value",
				FreeformTags = new Dictionary<string, string>()
				{
					{
						"EXAMPLE_KEY_AZgoH", 
						"EXAMPLE_VALUE_IkLt0uQIcthomaFIkcDS"
					}
				},
				DefinedTags = new Dictionary<string, Dictionary<string, Object>>()
				{
					{
						"EXAMPLE_KEY_Xq12L", 
						new Dictionary<string, Object>()
						{
							{
								"EXAMPLE_KEY_cnZdS", 
								"EXAMPLE--Value"
							}
						}
					}
				},
				SystemTags = new Dictionary<string, Dictionary<string, Object>>()
				{
					{
						"EXAMPLE_KEY_vr7Yf", 
						new Dictionary<string, Object>()
						{
							{
								"EXAMPLE_KEY_uM8oD", 
								"EXAMPLE--Value"
							}
						}
					}
				}
			};
			var updateRoverClusterRequest = new Oci.RoverService.Requests.UpdateRoverClusterRequest
			{
				RoverClusterId = "ocid1.test.oc1..<unique_ID>EXAMPLE-roverClusterId-Value",
				UpdateRoverClusterDetails = updateRoverClusterDetails,
				IfMatch = "EXAMPLE-ifMatch-Value",
				OpcRequestId = "WPCLWXO8GBFSDMHKVLEE<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 RoverClusterClient(provider, new ClientConfiguration()))
				{
					var response = await client.UpdateRoverCluster(updateRoverClusterRequest);
					// Retrieve value from the response.
					var id = response.RoverCluster.Id;
				}
            }
            catch (Exception e)
            {
                Console.WriteLine($"UpdateRoverCluster Failed with {e.Message}");
                throw e;
            }
        }

    }
}