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

OktaJavaImpl.api.mustache Maven / Gradle / Ivy

The newest version!
{{!
    Copyright 2017 Okta

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
}}
{{>licenseInfo}}
package {{package}};

import com.okta.commons.http.RequestExecutor;
import com.okta.sdk.cache.CacheManager;
import com.okta.sdk.client.AuthenticationScheme;
import com.okta.commons.http.config.Proxy;
import com.okta.commons.http.QueryString;
import com.okta.commons.http.HttpHeaders;
import com.okta.sdk.impl.config.ClientConfiguration;
import com.okta.sdk.resource.*;

import com.okta.sdk.impl.ds.InternalDataStore;
import com.okta.sdk.impl.resource.DefaultVoidResource;
import com.okta.sdk.impl.resource.DefaultInputStreamResource;

import java.util.LinkedHashMap;
import java.io.InputStream;
{{^fullJavaUtil}}
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
{{/fullJavaUtil}}

import static com.okta.commons.lang.Assert.notNull;
import static com.okta.commons.lang.Assert.hasText;

{{#operations}}
@javax.annotation.Generated(
        value = "{{generatorClass}}",
        date  = "{{generatedDate}}")
@SuppressWarnings("deprecation")
public class {{classname}} extends com.okta.sdk.impl.client.BaseClient implements com.okta.sdk.client.Client {

    /**
    * Instantiates a new Client instance that will communicate with the Okta REST API.  See the class-level
    * JavaDoc for a usage example.
    *
    * @param clientConfiguration  the {@link ClientConfiguration} containing the connection information
    * @param cacheManager         the {@link CacheManager} that should be used to cache
    */
    public {{classname}}(ClientConfiguration clientConfiguration, CacheManager cacheManager) {
        super(clientConfiguration, cacheManager);
    }

    /**
    * Instantiates a new Client instance that will communicate with the Okta REST API.  See the class-level
    * JavaDoc for a usage example.
    *
    * @param clientConfiguration  the {@link ClientConfiguration} containing the connection information
    * @param cacheManager         the {@link CacheManager} that should be used to cache
    * @param requestExecutor      the {@link RequestExecutor} that should be used to execute requests
    */
    public {{classname}}(ClientConfiguration clientConfiguration, CacheManager cacheManager, RequestExecutor requestExecutor) {
        super(clientConfiguration, cacheManager, requestExecutor);
    }

{{#operation}}{{^vendorExtensions.moved}}
    /**
    * {{summary}}
    * {{notes}}
    {{#allParams}}
    * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
    {{/allParams}}
    {{#returnType}}
    * @return {{returnType}}
    {{/returnType}}
    */
    @Override
    @javax.annotation.Generated(
            value    = "{{generatorClass}}",
            date     = "{{generatedDate}}",
            comments = "{{httpMethod}} - {{path}}")
    public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^@last}}, {{/@last}}{{/allParams}}) {
{{>paramPartial}}
{{#vendorExtensions.x-is-get-method}}
{{>apiMethodGet}}
{{/vendorExtensions.x-is-get-method}}
{{#vendorExtensions.x-is-put-method}}
{{>apiMethodPut}}
{{/vendorExtensions.x-is-put-method}}
{{#vendorExtensions.x-is-post-method}}
{{>apiMethodPostClient}}
{{/vendorExtensions.x-is-post-method}}
{{#vendorExtensions.x-is-delete-method}}
{{>apiMethodDelete}}
{{/vendorExtensions.x-is-delete-method}}
    }

{{#vendorExtensions.hasOptional}}
    /**
    * {{summary}}
    * {{notes}}
    {{#vendorExtensions.nonOptionalParams}}
    * @param {{paramName}} {{description}} (required)
    {{/vendorExtensions.nonOptionalParams}}
    {{#returnType}}
    * @return {{returnType}}
    {{/returnType}}
    */
    @Override
    @javax.annotation.Generated(
            value    = "{{generatorClass}}",
            date     = "{{generatedDate}}",
            comments = "{{httpMethod}} - {{path}}")
    public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#vendorExtensions.nonOptionalParams}}{{{dataType}}} {{paramName}}{{^@last}}, {{/@last}}{{/vendorExtensions.nonOptionalParams}}) {
{{>paramPartialOnlyRequired}}
{{#vendorExtensions.x-is-get-method}}
{{>apiMethodGet}}
{{/vendorExtensions.x-is-get-method}}
{{#vendorExtensions.x-is-put-method}}
{{>apiMethodPut}}
{{/vendorExtensions.x-is-put-method}}
{{#vendorExtensions.x-is-post-method}}
{{#vendorExtensions.optionalBody}}
{{>apiMethodPostNoBody}}
{{/vendorExtensions.optionalBody}}
{{^vendorExtensions.optionalBody}}
{{>apiMethodPostClient}}
{{/vendorExtensions.optionalBody}}
{{/vendorExtensions.x-is-post-method}}
{{#vendorExtensions.x-is-delete-method}}
{{>apiMethodDelete}}
{{/vendorExtensions.x-is-delete-method}}
    }
{{/vendorExtensions.hasOptional}}

{{#vendorExtensions.hasBackwardsCompatibleParams}}
{{#vendorExtensions.backwardsCompatibleParamsEntrySet}}
    /**
    * {{summary}}
    * {{notes}}
    {{#value}}
    * @param {{paramName}} {{description}} (required)
    {{/value}}
    {{#returnType}}
    * @return {{returnType}}
    {{/returnType}}
    */
    @Override
    @javax.annotation.Generated(
            value    = "{{generatorClass}}",
            date     = "{{generatedDate}}",
            comments = "{{httpMethod}} - {{path}}")
    public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#value}}{{{dataType}}} {{paramName}}{{^@last}}, {{/@last}}{{/value}}) {
{{>paramPartialBackwardsCompat}}
{{#vendorExtensions.x-is-get-method}}
{{>apiMethodGet}}
{{/vendorExtensions.x-is-get-method}}
{{#vendorExtensions.x-is-put-method}}
{{>apiMethodPut}}
{{/vendorExtensions.x-is-put-method}}
{{#vendorExtensions.x-is-post-method}}
{{>apiMethodPostClient}}
{{/vendorExtensions.x-is-post-method}}
{{#vendorExtensions.x-is-delete-method}}
{{>apiMethodDelete}}
{{/vendorExtensions.x-is-delete-method}}
    }
{{/vendorExtensions.backwardsCompatibleParamsEntrySet}}
{{/vendorExtensions.hasBackwardsCompatibleParams}}
{{/vendorExtensions.moved}}
{{/operation}}
}
{{/operations}}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy