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

com.pulumi.azurenative.containerregistry.inputs.SourcePropertiesArgs 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.containerregistry.inputs;

import com.pulumi.azurenative.containerregistry.enums.SourceControlType;
import com.pulumi.azurenative.containerregistry.inputs.AuthInfoArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The properties of the source code repository.
 * 
 */
public final class SourcePropertiesArgs extends com.pulumi.resources.ResourceArgs {

    public static final SourcePropertiesArgs Empty = new SourcePropertiesArgs();

    /**
     * The branch name of the source code.
     * 
     */
    @Import(name="branch")
    private @Nullable Output branch;

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

    /**
     * The full URL to the source code repository
     * 
     */
    @Import(name="repositoryUrl", required=true)
    private Output repositoryUrl;

    /**
     * @return The full URL to the source code repository
     * 
     */
    public Output repositoryUrl() {
        return this.repositoryUrl;
    }

    /**
     * The authorization properties for accessing the source code repository and to set up
     * webhooks for notifications.
     * 
     */
    @Import(name="sourceControlAuthProperties")
    private @Nullable Output sourceControlAuthProperties;

    /**
     * @return The authorization properties for accessing the source code repository and to set up
     * webhooks for notifications.
     * 
     */
    public Optional> sourceControlAuthProperties() {
        return Optional.ofNullable(this.sourceControlAuthProperties);
    }

    /**
     * The type of source control service.
     * 
     */
    @Import(name="sourceControlType", required=true)
    private Output> sourceControlType;

    /**
     * @return The type of source control service.
     * 
     */
    public Output> sourceControlType() {
        return this.sourceControlType;
    }

    private SourcePropertiesArgs() {}

    private SourcePropertiesArgs(SourcePropertiesArgs $) {
        this.branch = $.branch;
        this.repositoryUrl = $.repositoryUrl;
        this.sourceControlAuthProperties = $.sourceControlAuthProperties;
        this.sourceControlType = $.sourceControlType;
    }

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

    public static final class Builder {
        private SourcePropertiesArgs $;

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

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

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

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

        /**
         * @param repositoryUrl The full URL to the source code repository
         * 
         * @return builder
         * 
         */
        public Builder repositoryUrl(Output repositoryUrl) {
            $.repositoryUrl = repositoryUrl;
            return this;
        }

        /**
         * @param repositoryUrl The full URL to the source code repository
         * 
         * @return builder
         * 
         */
        public Builder repositoryUrl(String repositoryUrl) {
            return repositoryUrl(Output.of(repositoryUrl));
        }

        /**
         * @param sourceControlAuthProperties The authorization properties for accessing the source code repository and to set up
         * webhooks for notifications.
         * 
         * @return builder
         * 
         */
        public Builder sourceControlAuthProperties(@Nullable Output sourceControlAuthProperties) {
            $.sourceControlAuthProperties = sourceControlAuthProperties;
            return this;
        }

        /**
         * @param sourceControlAuthProperties The authorization properties for accessing the source code repository and to set up
         * webhooks for notifications.
         * 
         * @return builder
         * 
         */
        public Builder sourceControlAuthProperties(AuthInfoArgs sourceControlAuthProperties) {
            return sourceControlAuthProperties(Output.of(sourceControlAuthProperties));
        }

        /**
         * @param sourceControlType The type of source control service.
         * 
         * @return builder
         * 
         */
        public Builder sourceControlType(Output> sourceControlType) {
            $.sourceControlType = sourceControlType;
            return this;
        }

        /**
         * @param sourceControlType The type of source control service.
         * 
         * @return builder
         * 
         */
        public Builder sourceControlType(Either sourceControlType) {
            return sourceControlType(Output.of(sourceControlType));
        }

        /**
         * @param sourceControlType The type of source control service.
         * 
         * @return builder
         * 
         */
        public Builder sourceControlType(String sourceControlType) {
            return sourceControlType(Either.ofLeft(sourceControlType));
        }

        /**
         * @param sourceControlType The type of source control service.
         * 
         * @return builder
         * 
         */
        public Builder sourceControlType(SourceControlType sourceControlType) {
            return sourceControlType(Either.ofRight(sourceControlType));
        }

        public SourcePropertiesArgs build() {
            if ($.repositoryUrl == null) {
                throw new MissingRequiredPropertyException("SourcePropertiesArgs", "repositoryUrl");
            }
            if ($.sourceControlType == null) {
                throw new MissingRequiredPropertyException("SourcePropertiesArgs", "sourceControlType");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy