All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.okta.sdk.resource.api.OrgSettingAdminApi Maven / Gradle / Ivy

Go to download

The Okta Java SDK API .jar provides a Java API that your code can use to make calls to the Okta API. This .jar is the only compile-time dependency within the Okta SDK project that your code should depend on. Implementations of this API (implementation .jars) should be runtime dependencies only.

There is a newer version: 23.0.1
Show newest version
/*
 * Okta Admin Management
 * Allows customers to easily access the Okta Management APIs
 *
 * The version of the OpenAPI document: 2024.08.3
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.okta.sdk.resource.api;

import com.fasterxml.jackson.core.type.TypeReference;

import com.okta.sdk.resource.client.ApiException;
import com.okta.sdk.resource.client.ApiClient;
import com.okta.sdk.resource.client.Configuration;
import com.okta.sdk.resource.model.*;
import com.okta.sdk.resource.client.Pair;

import com.okta.sdk.resource.model.ClientPrivilegesSetting;
import com.okta.sdk.resource.model.Error;
import com.okta.sdk.resource.model.ThirdPartyAdminSetting;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;

import org.openapitools.jackson.nullable.JsonNullableModule;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-11-15T08:48:47.130589-06:00[America/Chicago]", comments = "Generator version: 7.8.0")
public class OrgSettingAdminApi {

    private ApiClient apiClient;

    public OrgSettingAdminApi() {
        this(Configuration.getDefaultApiClient());
    }

    public OrgSettingAdminApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Assign the Default Public Client App Role Setting Assigns the [Super Admin
     * role](https://help.okta.com/okta_help.htm?type=oie&id=ext_superadmin) as the default role for new
     * public client apps
     *
     * @param clientPrivilegesSetting
     *            (optional)
     *
     * @return ClientPrivilegesSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ClientPrivilegesSetting assignClientPrivilegesSetting(ClientPrivilegesSetting clientPrivilegesSetting)
            throws ApiException {
        return this.assignClientPrivilegesSetting(clientPrivilegesSetting, Collections.emptyMap());
    }

    /**
     * Assign the Default Public Client App Role Setting Assigns the [Super Admin
     * role](https://help.okta.com/okta_help.htm?type=oie&id=ext_superadmin) as the default role for new
     * public client apps
     *
     * @param clientPrivilegesSetting
     *            (optional)
     * @param additionalHeaders
     *            additionalHeaders for this call
     *
     * @return ClientPrivilegesSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ClientPrivilegesSetting assignClientPrivilegesSetting(ClientPrivilegesSetting clientPrivilegesSetting,
            Map additionalHeaders) throws ApiException {
        Object localVarPostBody = clientPrivilegesSetting;

        // create path and map variables
        String localVarPath = "/api/v1/org/settings/clientPrivilegesSetting";

        StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
        String localVarQueryParameterBaseName;
        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        localVarHeaderParams.putAll(additionalHeaders);

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "apiToken", "oauth2" };

        TypeReference localVarReturnType = new TypeReference() {
        };
        return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams,
                localVarQueryStringJoiner.toString(), localVarPostBody, localVarHeaderParams, localVarCookieParams,
                localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    }

    /**
     * Retrieve the Default Public Client App Role Setting Retrieves the org setting to assign the [Super Admin
     * role](https://help.okta.com/okta_help.htm?type=oie&id=ext_superadmin) to new public client apps
     *
     * @return ClientPrivilegesSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ClientPrivilegesSetting getClientPrivilegesSetting() throws ApiException {
        return this.getClientPrivilegesSetting(Collections.emptyMap());
    }

    /**
     * Retrieve the Default Public Client App Role Setting Retrieves the org setting to assign the [Super Admin
     * role](https://help.okta.com/okta_help.htm?type=oie&id=ext_superadmin) to new public client apps
     *
     * @param additionalHeaders
     *            additionalHeaders for this call
     *
     * @return ClientPrivilegesSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ClientPrivilegesSetting getClientPrivilegesSetting(Map additionalHeaders)
            throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/api/v1/org/settings/clientPrivilegesSetting";

        StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
        String localVarQueryParameterBaseName;
        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        localVarHeaderParams.putAll(additionalHeaders);

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "apiToken", "oauth2" };

        TypeReference localVarReturnType = new TypeReference() {
        };
        return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams,
                localVarQueryStringJoiner.toString(), localVarPostBody, localVarHeaderParams, localVarCookieParams,
                localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    }

    /**
     * Retrieve the Org Third-Party Admin Setting Retrieves the Third-Party Admin Setting. See [Configure third-party
     * administrators](https://help.okta.com/okta_help.htm?type=oie&id=csh_admin-third) in the Okta
     * product documentation.
     *
     * @return ThirdPartyAdminSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ThirdPartyAdminSetting getThirdPartyAdminSetting() throws ApiException {
        return this.getThirdPartyAdminSetting(Collections.emptyMap());
    }

    /**
     * Retrieve the Org Third-Party Admin Setting Retrieves the Third-Party Admin Setting. See [Configure third-party
     * administrators](https://help.okta.com/okta_help.htm?type=oie&id=csh_admin-third) in the Okta
     * product documentation.
     *
     * @param additionalHeaders
     *            additionalHeaders for this call
     *
     * @return ThirdPartyAdminSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ThirdPartyAdminSetting getThirdPartyAdminSetting(Map additionalHeaders) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/api/v1/org/orgSettings/thirdPartyAdminSetting";

        StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
        String localVarQueryParameterBaseName;
        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        localVarHeaderParams.putAll(additionalHeaders);

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "apiToken", "oauth2" };

        TypeReference localVarReturnType = new TypeReference() {
        };
        return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams,
                localVarQueryStringJoiner.toString(), localVarPostBody, localVarHeaderParams, localVarCookieParams,
                localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    }

    /**
     * Update the Org Third-Party Admin Setting Updates the Third-Party Admin Setting. This setting allows third-party
     * admins to perform administrative actions in the Admin Console, but they can't do any of the following: *
     * Receive Okta admin email notifications * Contact Okta support * Sign in to the Okta Help Center See [Configure
     * third-party administrators](https://help.okta.com/okta_help.htm?type=oie&id=csh_admin-third) in the
     * Okta product documentation.
     *
     * @param thirdPartyAdminSetting
     *            (required)
     *
     * @return ThirdPartyAdminSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ThirdPartyAdminSetting updateThirdPartyAdminSetting(ThirdPartyAdminSetting thirdPartyAdminSetting)
            throws ApiException {
        return this.updateThirdPartyAdminSetting(thirdPartyAdminSetting, Collections.emptyMap());
    }

    /**
     * Update the Org Third-Party Admin Setting Updates the Third-Party Admin Setting. This setting allows third-party
     * admins to perform administrative actions in the Admin Console, but they can't do any of the following: *
     * Receive Okta admin email notifications * Contact Okta support * Sign in to the Okta Help Center See [Configure
     * third-party administrators](https://help.okta.com/okta_help.htm?type=oie&id=csh_admin-third) in the
     * Okta product documentation.
     *
     * @param thirdPartyAdminSetting
     *            (required)
     * @param additionalHeaders
     *            additionalHeaders for this call
     *
     * @return ThirdPartyAdminSetting
     *
     * @throws ApiException
     *             if fails to make API call
     */
    public ThirdPartyAdminSetting updateThirdPartyAdminSetting(ThirdPartyAdminSetting thirdPartyAdminSetting,
            Map additionalHeaders) throws ApiException {
        Object localVarPostBody = thirdPartyAdminSetting;

        // verify the required parameter 'thirdPartyAdminSetting' is set
        if (thirdPartyAdminSetting == null) {
            throw new ApiException(400,
                    "Missing the required parameter 'thirdPartyAdminSetting' when calling updateThirdPartyAdminSetting");
        }

        // create path and map variables
        String localVarPath = "/api/v1/org/orgSettings/thirdPartyAdminSetting";

        StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
        String localVarQueryParameterBaseName;
        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        localVarHeaderParams.putAll(additionalHeaders);

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "apiToken", "oauth2" };

        TypeReference localVarReturnType = new TypeReference() {
        };
        return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams,
                localVarQueryStringJoiner.toString(), localVarPostBody, localVarHeaderParams, localVarCookieParams,
                localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    }

    protected static ObjectMapper getObjectMapper() {
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.registerModule(new JavaTimeModule());
        objectMapper.registerModule(new JsonNullableModule());
        objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        objectMapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);
        return objectMapper;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy