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

com.pulumi.azurenative.servicefabricmesh.inputs.ServiceResourceDescriptionArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.servicefabricmesh.inputs;

import com.pulumi.azurenative.servicefabricmesh.enums.OperatingSystemType;
import com.pulumi.azurenative.servicefabricmesh.inputs.AutoScalingPolicyArgs;
import com.pulumi.azurenative.servicefabricmesh.inputs.ContainerCodePackagePropertiesArgs;
import com.pulumi.azurenative.servicefabricmesh.inputs.DiagnosticsRefArgs;
import com.pulumi.azurenative.servicefabricmesh.inputs.NetworkRefArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * This type describes a service resource.
 * 
 */
public final class ServiceResourceDescriptionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServiceResourceDescriptionArgs Empty = new ServiceResourceDescriptionArgs();

    /**
     * Auto scaling policies
     * 
     */
    @Import(name="autoScalingPolicies")
    private @Nullable Output> autoScalingPolicies;

    /**
     * @return Auto scaling policies
     * 
     */
    public Optional>> autoScalingPolicies() {
        return Optional.ofNullable(this.autoScalingPolicies);
    }

    /**
     * Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.).
     * 
     */
    @Import(name="codePackages", required=true)
    private Output> codePackages;

    /**
     * @return Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.).
     * 
     */
    public Output> codePackages() {
        return this.codePackages;
    }

    /**
     * User readable description of the service.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return User readable description of the service.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Reference to sinks in DiagnosticsDescription.
     * 
     */
    @Import(name="diagnostics")
    private @Nullable Output diagnostics;

    /**
     * @return Reference to sinks in DiagnosticsDescription.
     * 
     */
    public Optional> diagnostics() {
        return Optional.ofNullable(this.diagnostics);
    }

    /**
     * The name of the resource
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the resource
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The names of the private networks that this service needs to be part of.
     * 
     */
    @Import(name="networkRefs")
    private @Nullable Output> networkRefs;

    /**
     * @return The names of the private networks that this service needs to be part of.
     * 
     */
    public Optional>> networkRefs() {
        return Optional.ofNullable(this.networkRefs);
    }

    /**
     * The operation system required by the code in service.
     * 
     */
    @Import(name="osType", required=true)
    private Output> osType;

    /**
     * @return The operation system required by the code in service.
     * 
     */
    public Output> osType() {
        return this.osType;
    }

    /**
     * The number of replicas of the service to create. Defaults to 1 if not specified.
     * 
     */
    @Import(name="replicaCount")
    private @Nullable Output replicaCount;

    /**
     * @return The number of replicas of the service to create. Defaults to 1 if not specified.
     * 
     */
    public Optional> replicaCount() {
        return Optional.ofNullable(this.replicaCount);
    }

    private ServiceResourceDescriptionArgs() {}

    private ServiceResourceDescriptionArgs(ServiceResourceDescriptionArgs $) {
        this.autoScalingPolicies = $.autoScalingPolicies;
        this.codePackages = $.codePackages;
        this.description = $.description;
        this.diagnostics = $.diagnostics;
        this.name = $.name;
        this.networkRefs = $.networkRefs;
        this.osType = $.osType;
        this.replicaCount = $.replicaCount;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ServiceResourceDescriptionArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ServiceResourceDescriptionArgs $;

        public Builder() {
            $ = new ServiceResourceDescriptionArgs();
        }

        public Builder(ServiceResourceDescriptionArgs defaults) {
            $ = new ServiceResourceDescriptionArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param autoScalingPolicies Auto scaling policies
         * 
         * @return builder
         * 
         */
        public Builder autoScalingPolicies(@Nullable Output> autoScalingPolicies) {
            $.autoScalingPolicies = autoScalingPolicies;
            return this;
        }

        /**
         * @param autoScalingPolicies Auto scaling policies
         * 
         * @return builder
         * 
         */
        public Builder autoScalingPolicies(List autoScalingPolicies) {
            return autoScalingPolicies(Output.of(autoScalingPolicies));
        }

        /**
         * @param autoScalingPolicies Auto scaling policies
         * 
         * @return builder
         * 
         */
        public Builder autoScalingPolicies(AutoScalingPolicyArgs... autoScalingPolicies) {
            return autoScalingPolicies(List.of(autoScalingPolicies));
        }

        /**
         * @param codePackages Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.).
         * 
         * @return builder
         * 
         */
        public Builder codePackages(Output> codePackages) {
            $.codePackages = codePackages;
            return this;
        }

        /**
         * @param codePackages Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.).
         * 
         * @return builder
         * 
         */
        public Builder codePackages(List codePackages) {
            return codePackages(Output.of(codePackages));
        }

        /**
         * @param codePackages Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.).
         * 
         * @return builder
         * 
         */
        public Builder codePackages(ContainerCodePackagePropertiesArgs... codePackages) {
            return codePackages(List.of(codePackages));
        }

        /**
         * @param description User readable description of the service.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description User readable description of the service.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param diagnostics Reference to sinks in DiagnosticsDescription.
         * 
         * @return builder
         * 
         */
        public Builder diagnostics(@Nullable Output diagnostics) {
            $.diagnostics = diagnostics;
            return this;
        }

        /**
         * @param diagnostics Reference to sinks in DiagnosticsDescription.
         * 
         * @return builder
         * 
         */
        public Builder diagnostics(DiagnosticsRefArgs diagnostics) {
            return diagnostics(Output.of(diagnostics));
        }

        /**
         * @param name The name of the resource
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the resource
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param networkRefs The names of the private networks that this service needs to be part of.
         * 
         * @return builder
         * 
         */
        public Builder networkRefs(@Nullable Output> networkRefs) {
            $.networkRefs = networkRefs;
            return this;
        }

        /**
         * @param networkRefs The names of the private networks that this service needs to be part of.
         * 
         * @return builder
         * 
         */
        public Builder networkRefs(List networkRefs) {
            return networkRefs(Output.of(networkRefs));
        }

        /**
         * @param networkRefs The names of the private networks that this service needs to be part of.
         * 
         * @return builder
         * 
         */
        public Builder networkRefs(NetworkRefArgs... networkRefs) {
            return networkRefs(List.of(networkRefs));
        }

        /**
         * @param osType The operation system required by the code in service.
         * 
         * @return builder
         * 
         */
        public Builder osType(Output> osType) {
            $.osType = osType;
            return this;
        }

        /**
         * @param osType The operation system required by the code in service.
         * 
         * @return builder
         * 
         */
        public Builder osType(Either osType) {
            return osType(Output.of(osType));
        }

        /**
         * @param osType The operation system required by the code in service.
         * 
         * @return builder
         * 
         */
        public Builder osType(String osType) {
            return osType(Either.ofLeft(osType));
        }

        /**
         * @param osType The operation system required by the code in service.
         * 
         * @return builder
         * 
         */
        public Builder osType(OperatingSystemType osType) {
            return osType(Either.ofRight(osType));
        }

        /**
         * @param replicaCount The number of replicas of the service to create. Defaults to 1 if not specified.
         * 
         * @return builder
         * 
         */
        public Builder replicaCount(@Nullable Output replicaCount) {
            $.replicaCount = replicaCount;
            return this;
        }

        /**
         * @param replicaCount The number of replicas of the service to create. Defaults to 1 if not specified.
         * 
         * @return builder
         * 
         */
        public Builder replicaCount(Integer replicaCount) {
            return replicaCount(Output.of(replicaCount));
        }

        public ServiceResourceDescriptionArgs build() {
            if ($.codePackages == null) {
                throw new MissingRequiredPropertyException("ServiceResourceDescriptionArgs", "codePackages");
            }
            if ($.osType == null) {
                throw new MissingRequiredPropertyException("ServiceResourceDescriptionArgs", "osType");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy