/** 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.threatintelligence.ThreatintelClient;
import com.oracle.bmc.threatintelligence.model.*;
import com.oracle.bmc.threatintelligence.requests.*;
import com.oracle.bmc.threatintelligence.responses.*;


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


public class ListIndicatorsExample {
    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 */
        ThreatintelClient client = ThreatintelClient.builder().build(provider);

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

	ListIndicatorsRequest listIndicatorsRequest = ListIndicatorsRequest.builder()
		.compartmentId("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value")
		.threatTypeName(new ArrayList<>(Arrays.asList("EXAMPLE--Value")))
		.type(IndicatorType.IpAddress)
		.value("EXAMPLE-value-Value")
		.confidenceGreaterThanOrEqualTo(36)
		.timeUpdatedGreaterThanOrEqualTo(new Date("Sun Sep 26 03:38:18 UTC 2021"))
		.timeUpdatedLessThan(new Date("Mon Apr 16 05:18:30 UTC 2001"))
		.timeLastSeenGreaterThanOrEqualTo(new Date("Fri Aug 19 20:58:10 UTC 2039"))
		.timeLastSeenLessThan(new Date("Thu Jul 30 04:14:37 UTC 2026"))
		.timeCreatedGreaterThanOrEqualTo(new Date("Sat Jan 12 20:31:52 UTC 2002"))
		.timeCreatedLessThan(new Date("Thu May 30 14:09:49 UTC 2002"))
		.limit(712)
		.page("EXAMPLE-page-Value")
		.sortOrder(SortOrder.Asc)
		.sortBy(ListIndicatorsRequest.SortBy.TimeUpdated)
		.opcRequestId("TV6SIPEULJG6S0OY31ED<unique_ID>").build();

        /* Send request to the Client */
        ListIndicatorsResponse response = client.listIndicators(listIndicatorsRequest);
    }

    
}