/** 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).
*/

import com.oracle.bmc.ConfigFileReader;
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider;
import com.oracle.bmc.rover.RoverNodeClient;
import com.oracle.bmc.rover.model.*;
import com.oracle.bmc.rover.requests.*;
import com.oracle.bmc.rover.responses.*;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.Date;
import java.util.Arrays;


public class CreateRoverNodeExample {
    public static void main(String[] args) throws Exception {

        /**
         * 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.
         */
        final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault();
        final AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(configFile);

        /* Create a service client */
        RoverNodeClient client = new RoverNodeClient(provider);

        /* Create a request and dependent object(s). */
	CreateRoverNodeDetails createRoverNodeDetails = CreateRoverNodeDetails.builder()
		.displayName("EXAMPLE-displayName-Value")
		.compartmentId("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value")
		.shape("EXAMPLE-shape-Value")
		.customerShippingAddress(ShippingAddress.builder()
			.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").build())
		.nodeWorkloads(new ArrayList<>(Arrays.asList(RoverWorkload.builder()
				.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").build())))
		.superUserPassword("EXAMPLE-superUserPassword-Value")
		.unlockPassphrase("EXAMPLE-unlockPassphrase-Value")
		.pointOfContact("EXAMPLE-pointOfContact-Value")
		.pointOfContactPhoneNumber("EXAMPLE-pointOfContactPhoneNumber-Value")
		.shippingPreference(CreateRoverNodeDetails.ShippingPreference.OracleShipped)
		.shippingVendor("EXAMPLE-shippingVendor-Value")
		.timePickupExpected(new Date("Sat May 30 21:04:37 UTC 2026"))
		.publicKey("EXAMPLE-publicKey-Value")
		.timeReturnWindowStarts(new Date("Tue Jul 24 19:40:16 UTC 2018"))
		.timeReturnWindowEnds(new Date("Sun Apr 27 16:47:54 UTC 2025"))
		.lifecycleState(LifecycleState.Active)
		.enclosureType(EnclosureType.NonRuggadized)
		.lifecycleStateDetails("EXAMPLE-lifecycleStateDetails-Value")
		.serialNumber("EXAMPLE-serialNumber-Value")
		.oracleShippingTrackingUrl("EXAMPLE-oracleShippingTrackingUrl-Value")
		.isImportRequested(false)
		.importCompartmentId("ocid1.test.oc1..<unique_ID>EXAMPLE-importCompartmentId-Value")
		.importFileBucket("EXAMPLE-importFileBucket-Value")
		.dataValidationCode("EXAMPLE-dataValidationCode-Value")
		.masterKeyId("ocid1.test.oc1..<unique_ID>EXAMPLE-masterKeyId-Value")
		.freeformTags(new HashMap<java.lang.String, java.lang.String>() {
				{
					put("EXAMPLE_KEY_x9gyS","EXAMPLE_VALUE_i16jyAukwkaKn2jUxJya");
				}
 			})
		.definedTags(new HashMap<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>() {
				{
					put("EXAMPLE_KEY_emWLa",new HashMap<java.lang.String, java.lang.Object>() {
					{
						put("EXAMPLE_KEY_kdhZ0","EXAMPLE--Value");
					}
 				});
				}
 			})
		.systemTags(new HashMap<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>() {
				{
					put("EXAMPLE_KEY_4rloJ",new HashMap<java.lang.String, java.lang.Object>() {
					{
						put("EXAMPLE_KEY_Nm85y","EXAMPLE--Value");
					}
 				});
				}
 			}).build();

	CreateRoverNodeRequest createRoverNodeRequest = CreateRoverNodeRequest.builder()
		.createRoverNodeDetails(createRoverNodeDetails)
		.opcRetryToken("EXAMPLE-opcRetryToken-Value")
		.opcRequestId("F3FBPIWC6LMMZUUU9O5O<unique_ID>").build();

        /* Send request to the Client */
        CreateRoverNodeResponse response = client.createRoverNode(createRoverNodeRequest);
    }

    
}