// 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"

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

func ExampleUpdateFleetAdvancedFeatureConfiguration() {
	// 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 := jms.NewJavaManagementServiceClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

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

	req := jms.UpdateFleetAdvancedFeatureConfigurationRequest{FleetId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-fleetId-Value"),
		IfMatch:       common.String("EXAMPLE-ifMatch-Value"),
		OpcRequestId:  common.String("79PDCMTG57WND5DFXI75<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		UpdateFleetAdvancedFeatureConfigurationDetails: jms.UpdateFleetAdvancedFeatureConfigurationDetails{JavaMigrationAnalysis: &jms.JavaMigrationAnalysis{IsEnabled: common.Bool(true)},
			JfrRecording: &jms.JfrRecording{IsEnabled: common.Bool(false)},
			Lcm: &jms.Lcm{IsEnabled: common.Bool(true),
				PostInstallationActions: &jms.PostInstallationActionSettings{ShouldReplaceCertificatesOperatingSystem: common.Bool(false),
					AddLoggingHandler: common.Bool(false),
					DisabledTlsVersions: []jms.TlsVersionsEnum{jms.TlsVersionsTls10,
						jms.TlsVersionsTls11},
					GlobalLoggingLevel: jms.GlobalLoggingLevelSevere,
					MinimumKeySizeSettings: &jms.MinimumKeySizeSettings{Certpath: []jms.KeySizeAlgorithm{jms.KeySizeAlgorithm{KeySize: common.Int(925),
						Name: jms.AlgorithmsEc}},
						Jar: []jms.KeySizeAlgorithm{jms.KeySizeAlgorithm{KeySize: common.Int(405),
							Name: jms.AlgorithmsDh}},
						Tls: []jms.KeySizeAlgorithm{jms.KeySizeAlgorithm{KeySize: common.Int(534),
							Name: jms.AlgorithmsDh}}},
					Proxies: &jms.Proxies{FtpProxyHost: common.String("EXAMPLE-ftpProxyHost-Value"),
						HttpProxyPort:    common.Int(59129),
						HttpsProxyPort:   common.Int(49793),
						SocksProxyHost:   common.String("EXAMPLE-socksProxyHost-Value"),
						FtpProxyPort:     common.Int(35484),
						HttpProxyHost:    common.String("EXAMPLE-httpProxyHost-Value"),
						HttpsProxyHost:   common.String("EXAMPLE-httpsProxyHost-Value"),
						SocksProxyPort:   common.Int(4147),
						UseSystemProxies: common.Bool(false)}}},
			PerformanceTuningAnalysis: &jms.PerformanceTuningAnalysis{IsEnabled: common.Bool(false)},
			AdvancedUsageTracking:     &jms.AdvancedUsageTracking{IsEnabled: common.Bool(false)},
			AnalyticBucketName:        common.String("EXAMPLE-analyticBucketName-Value"),
			AnalyticNamespace:         common.String("EXAMPLE-analyticNamespace-Value"),
			CryptoEventAnalysis: &jms.CryptoEventAnalysis{IsEnabled: common.Bool(true),
				SummarizedEventsLog: &jms.SummarizedEventsLog{LogGroupId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value"),
					LogId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value")}}}}

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

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