// 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("WOKIFX4WZW3GGCXPRTB5<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		UpdateFleetAdvancedFeatureConfigurationDetails: jms.UpdateFleetAdvancedFeatureConfigurationDetails{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(false),
				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")}},
			JavaMigrationAnalysis: &jms.JavaMigrationAnalysis{IsEnabled: common.Bool(false)},
			JfrRecording:          &jms.JfrRecording{IsEnabled: common.Bool(true)},
			Lcm: &jms.Lcm{IsEnabled: common.Bool(false),
				PostInstallationActions: &jms.PostInstallationActionSettings{GlobalLoggingLevel: jms.GlobalLoggingLevelConfig,
					MinimumKeySizeSettings: &jms.MinimumKeySizeSettings{Certpath: []jms.KeySizeAlgorithm{jms.KeySizeAlgorithm{KeySize: common.Int(882),
						Name: jms.AlgorithmsEc}},
						Jar: []jms.KeySizeAlgorithm{jms.KeySizeAlgorithm{Name: jms.AlgorithmsDh,
							KeySize: common.Int(644)}},
						Tls: []jms.KeySizeAlgorithm{jms.KeySizeAlgorithm{KeySize: common.Int(718),
							Name: jms.AlgorithmsDsa}}},
					Proxies: &jms.Proxies{HttpsProxyHost: common.String("EXAMPLE-httpsProxyHost-Value"),
						HttpsProxyPort:   common.Int(1588),
						FtpProxyPort:     common.Int(51446),
						HttpProxyHost:    common.String("EXAMPLE-httpProxyHost-Value"),
						HttpProxyPort:    common.Int(12842),
						SocksProxyHost:   common.String("EXAMPLE-socksProxyHost-Value"),
						SocksProxyPort:   common.Int(58959),
						UseSystemProxies: common.Bool(false),
						FtpProxyHost:     common.String("EXAMPLE-ftpProxyHost-Value")},
					ShouldReplaceCertificatesOperatingSystem: common.Bool(true),
					AddLoggingHandler:                        common.Bool(false),
					DisabledTlsVersions: []jms.TlsVersionsEnum{jms.TlsVersionsTls10,
						jms.TlsVersionsTls11}}}}}

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