// 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/datasafe"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
)

func ExampleListProfileSummaries() {
	// 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 := datasafe.NewDataSafeClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

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

	req := datasafe.ListProfileSummariesRequest{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
		PasswordLockTimeLessThan:              common.String("EXAMPLE-passwordLockTimeLessThan-Value"),
		PasswordVerificationFunction:          common.String("EXAMPLE-passwordVerificationFunction-Value"),
		ProfileName:                           common.String("EXAMPLE-profileName-Value"),
		SessionsPerUserGreaterThanOrEqual:     common.String("EXAMPLE-sessionsPerUserGreaterThanOrEqual-Value"),
		SortOrder:                             datasafe.ListProfileSummariesSortOrderDesc,
		CompartmentIdInSubtree:                common.Bool(true),
		InactiveAccountTimeLessThan:           common.String("EXAMPLE-inactiveAccountTimeLessThan-Value"),
		Limit:                                 common.Int(741),
		OpcRequestId:                          common.String("KIAZ6EAG2SK5R2BYSZBW<unique_ID>"),
		UserCountGreaterThanOrEqual:           common.String("EXAMPLE-userCountGreaterThanOrEqual-Value"),
		UserCountLessThan:                     common.String("EXAMPLE-userCountLessThan-Value"),
		UserAssessmentId:                      common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-userAssessmentId-Value"),
		AccessLevel:                           datasafe.ListProfileSummariesAccessLevelAccessible,
		InactiveAccountTimeGreaterThanOrEqual: common.String("EXAMPLE-inactiveAccountTimeGreaterThanOrEqual-Value"),
		SessionsPerUserLessThan:               common.String("EXAMPLE-sessionsPerUserLessThan-Value"),
		TargetId:                              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-targetId-Value"),
		PasswordLockTimeGreaterThanOrEqual:    common.String("EXAMPLE-passwordLockTimeGreaterThanOrEqual-Value"),
		SortBy:                                datasafe.ListProfileSummariesSortByUsercount,
		FailedLoginAttemptsGreaterThanOrEqual: common.String("EXAMPLE-failedLoginAttemptsGreaterThanOrEqual-Value"),
		FailedLoginAttemptsLessThan:           common.String("EXAMPLE-failedLoginAttemptsLessThan-Value"),
		IsUserCreated:                         common.Bool(false),
		Page:                                  common.String("EXAMPLE-page-Value")}

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

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