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

io.helidon.integrations.oci.authentication.resource.ResourcePrincipalBuilderProvider__ServiceDescriptor Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2024 Oracle and/or its affiliates.
 *
 * 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.
 */

package io.helidon.integrations.oci.authentication.resource;

import java.util.List;
import java.util.Set;

import io.helidon.common.Generated;
import io.helidon.common.GenericType;
import io.helidon.common.types.TypeName;
import io.helidon.integrations.oci.OciConfig;
import io.helidon.service.registry.Dependency;
import io.helidon.service.registry.DependencyContext;
import io.helidon.service.registry.GeneratedService;

/**
 * Service descriptor for {@link io.helidon.integrations.oci.authentication.resource.ResourcePrincipalBuilderProvider}.
 *
 * @param  type of the service, for extensibility
 */
@Generated(value = "io.helidon.service.codegen.ServiceExtension", trigger = "io.helidon.integrations.oci.authentication.resource.ResourcePrincipalBuilderProvider")
public class ResourcePrincipalBuilderProvider__ServiceDescriptor implements GeneratedService.Descriptor {

    private static final TypeName TYPE_0 = TypeName.create("io.helidon.integrations.oci.OciConfig");
    private static final GenericType GTYPE_0 = new GenericType() {};
    /**
     * Global singleton instance for this descriptor.
     */
    public static final ResourcePrincipalBuilderProvider__ServiceDescriptor INSTANCE = new ResourcePrincipalBuilderProvider__ServiceDescriptor<>();
    private static final TypeName SERVICE_TYPE = TypeName.create("io.helidon.integrations.oci.authentication.resource.ResourcePrincipalBuilderProvider");
    private static final TypeName DESCRIPTOR_TYPE = TypeName.create("io.helidon.integrations.oci.authentication.resource.ResourcePrincipalBuilderProvider__ServiceDescriptor");
    /**
     * Dependency for ResourcePrincipalBuilderProvider(OciConfig config), parameter config.
     */
    public static final Dependency PARAM_0 = Dependency.builder()
            .typeName(TYPE_0)
            .name("config")
            .service(SERVICE_TYPE)
            .descriptor(DESCRIPTOR_TYPE)
            .descriptorConstant("PARAM_0")
            .contract(TYPE_0)
            .contractType(GTYPE_0)
            .build();
    private static final List DEPENDENCIES = List.of(PARAM_0);
    private static final Set CONTRACTS = Set.of(TypeName.create("java.util.function.Supplier"), TypeName.create("com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider.Builder"), TypeName.create("com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder"), TypeName.create("com.oracle.bmc.auth.ResourcePrincipalAuthenticationDetailsProvider.ResourcePrincipalAuthenticationDetailsProviderBuilder"));

    /**
     * Constructor with no side effects
     */
    protected ResourcePrincipalBuilderProvider__ServiceDescriptor() {
    }

    @Override
    public TypeName serviceType() {
        return SERVICE_TYPE;
    }

    @Override
    public TypeName descriptorType() {
        return DESCRIPTOR_TYPE;
    }

    @Override
    public Set contracts() {
        return CONTRACTS;
    }

    @Override
    public List dependencies() {
        return DEPENDENCIES;
    }

    @Override
    public ResourcePrincipalBuilderProvider instantiate(DependencyContext ctx__helidonRegistry) {
        OciConfig config = ctx__helidonRegistry.dependency(PARAM_0);
        
        return new ResourcePrincipalBuilderProvider(config);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy