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

com.pulumi.aws.connect.PhoneNumberArgs 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.aws.connect;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class PhoneNumberArgs extends com.pulumi.resources.ResourceArgs {

    public static final PhoneNumberArgs Empty = new PhoneNumberArgs();

    /**
     * The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
     * 
     */
    @Import(name="countryCode", required=true)
    private Output countryCode;

    /**
     * @return The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
     * 
     */
    public Output countryCode() {
        return this.countryCode;
    }

    /**
     * The description of the phone number.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return The description of the phone number.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
     * 
     */
    @Import(name="prefix")
    private @Nullable Output prefix;

    /**
     * @return The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
     * 
     */
    public Optional> prefix() {
        return Optional.ofNullable(this.prefix);
    }

    /**
     * Tags to apply to the Phone Number. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Tags to apply to the Phone Number. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
     * 
     */
    @Import(name="targetArn", required=true)
    private Output targetArn;

    /**
     * @return The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
     * 
     */
    public Output targetArn() {
        return this.targetArn;
    }

    /**
     * The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
     * 
     */
    public Output type() {
        return this.type;
    }

    private PhoneNumberArgs() {}

    private PhoneNumberArgs(PhoneNumberArgs $) {
        this.countryCode = $.countryCode;
        this.description = $.description;
        this.prefix = $.prefix;
        this.tags = $.tags;
        this.targetArn = $.targetArn;
        this.type = $.type;
    }

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

    public static final class Builder {
        private PhoneNumberArgs $;

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

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

        /**
         * @param countryCode The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
         * 
         * @return builder
         * 
         */
        public Builder countryCode(Output countryCode) {
            $.countryCode = countryCode;
            return this;
        }

        /**
         * @param countryCode The ISO country code. For a list of Valid values, refer to [PhoneNumberCountryCode](https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchAvailablePhoneNumbers.html#connect-SearchAvailablePhoneNumbers-request-PhoneNumberCountryCode).
         * 
         * @return builder
         * 
         */
        public Builder countryCode(String countryCode) {
            return countryCode(Output.of(countryCode));
        }

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

        /**
         * @param description The description of the phone number.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param prefix The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
         * 
         * @return builder
         * 
         */
        public Builder prefix(@Nullable Output prefix) {
            $.prefix = prefix;
            return this;
        }

        /**
         * @param prefix The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain `+` as part of the country code. Do not specify this argument when importing the resource.
         * 
         * @return builder
         * 
         */
        public Builder prefix(String prefix) {
            return prefix(Output.of(prefix));
        }

        /**
         * @param tags Tags to apply to the Phone Number. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Tags to apply to the Phone Number. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param targetArn The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
         * 
         * @return builder
         * 
         */
        public Builder targetArn(Output targetArn) {
            $.targetArn = targetArn;
            return this;
        }

        /**
         * @param targetArn The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.
         * 
         * @return builder
         * 
         */
        public Builder targetArn(String targetArn) {
            return targetArn(Output.of(targetArn));
        }

        /**
         * @param type The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of phone number. Valid Values: `TOLL_FREE` | `DID`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public PhoneNumberArgs build() {
            if ($.countryCode == null) {
                throw new MissingRequiredPropertyException("PhoneNumberArgs", "countryCode");
            }
            if ($.targetArn == null) {
                throw new MissingRequiredPropertyException("PhoneNumberArgs", "targetArn");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("PhoneNumberArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy