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

package main

import (
	"context"
	"fmt"
	"time"

	"github.com/oracle/oci-go-sdk/v65/common"
	"github.com/oracle/oci-go-sdk/v65/desktops"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
)

func ExampleUpdateDesktopPool() {
	// 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.
	client, err := desktops.NewDesktopServiceClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).

	req := desktops.UpdateDesktopPoolRequest{DesktopPoolId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-desktopPoolId-Value"),
		IfMatch:      common.String("EXAMPLE-ifMatch-Value"),
		OpcRequestId: common.String("DEPFOH7WNI9JBHLZDOPL<unique_ID>"),
		UpdateDesktopPoolDetails: desktops.UpdateDesktopPoolDetails{DisplayName: common.String("EXAMPLE-displayName-Value"),
			MaximumSize:       common.Int(8459),
			StandbySize:       common.Int(402),
			TimeStopScheduled: &common.SDKTime{Time: time.Now()},
			AvailabilityPolicy: &desktops.DesktopAvailabilityPolicy{StartSchedule: &desktops.DesktopSchedule{CronExpression: common.String("EXAMPLE-cronExpression-Value"),
				Timezone: common.String("EXAMPLE-timezone-Value")}},
			ContactDetails:     common.String("EXAMPLE-contactDetails-Value"),
			DefinedTags:        map[string]map[string]interface{}{"EXAMPLE_KEY_bwgve": map[string]interface{}{"EXAMPLE_KEY_zsmTO": "EXAMPLE--Value"}},
			TimeStartScheduled: &common.SDKTime{Time: time.Now()},
			Description:        common.String("EXAMPLE-description-Value"),
			DevicePolicy: &desktops.DesktopDevicePolicy{IsDisplayEnabled: common.Bool(true),
				IsKeyboardEnabled: common.Bool(false),
				IsPointerEnabled:  common.Bool(true),
				IsPrintingEnabled: common.Bool(false),
				AudioMode:         desktops.DesktopDevicePolicyAudioModeFull,
				CdmMode:           desktops.DesktopDevicePolicyCdmModeNone,
				ClipboardMode:     desktops.DesktopDevicePolicyClipboardModeFull},
			FreeformTags: map[string]string{"EXAMPLE_KEY_NxS64": "EXAMPLE_VALUE_LX44wTlIIzErucnUaTlH"}}}

	// Send the request using the service client
	resp, err := client.UpdateDesktopPool(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}