package mediaconvert

import (
	"context"
	"reflect"

	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

type Queue struct {
	pulumi.CustomResourceState

	Arn pulumi.StringOutput `pulumi:"arn"`

	Description pulumi.StringPtrOutput `pulumi:"description"`

	Name pulumi.StringOutput `pulumi:"name"`

	PricingPlan pulumi.StringPtrOutput `pulumi:"pricingPlan"`

	ReservationPlanSettings QueueReservationPlanSettingsOutput `pulumi:"reservationPlanSettings"`

	Status pulumi.StringPtrOutput `pulumi:"status"`

	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

func NewQueue(ctx *pulumi.Context,
	name string, args *QueueArgs, opts ...pulumi.ResourceOption) (*Queue, error) {
	if args == nil {
		args = &QueueArgs{}
	}

	var resource Queue
	err := ctx.RegisterResource("aws:mediaconvert/queue:Queue", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

func GetQueue(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *QueueState, opts ...pulumi.ResourceOption) (*Queue, error) {
	var resource Queue
	err := ctx.ReadResource("aws:mediaconvert/queue:Queue", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

type queueState struct {

	Arn *string `pulumi:"arn"`

	Description *string `pulumi:"description"`

	Name *string `pulumi:"name"`

	PricingPlan *string `pulumi:"pricingPlan"`

	ReservationPlanSettings *QueueReservationPlanSettings `pulumi:"reservationPlanSettings"`

	Status *string `pulumi:"status"`

	Tags map[string]string `pulumi:"tags"`
}

type QueueState struct {

	Arn pulumi.StringPtrInput

	Description pulumi.StringPtrInput

	Name pulumi.StringPtrInput

	PricingPlan pulumi.StringPtrInput

	ReservationPlanSettings QueueReservationPlanSettingsPtrInput

	Status pulumi.StringPtrInput

	Tags pulumi.StringMapInput
}

func (QueueState) ElementType() reflect.Type {
	return reflect.TypeOf((*queueState)(nil)).Elem()
}

type queueArgs struct {

	Description *string `pulumi:"description"`

	Name *string `pulumi:"name"`

	PricingPlan *string `pulumi:"pricingPlan"`

	ReservationPlanSettings *QueueReservationPlanSettings `pulumi:"reservationPlanSettings"`

	Status *string `pulumi:"status"`

	Tags map[string]string `pulumi:"tags"`
}

type QueueArgs struct {

	Description pulumi.StringPtrInput

	Name pulumi.StringPtrInput

	PricingPlan pulumi.StringPtrInput

	ReservationPlanSettings QueueReservationPlanSettingsPtrInput

	Status pulumi.StringPtrInput

	Tags pulumi.StringMapInput
}

func (QueueArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*queueArgs)(nil)).Elem()
}

type QueueInput interface {
	pulumi.Input

	ToQueueOutput() QueueOutput
	ToQueueOutputWithContext(ctx context.Context) QueueOutput
}

func (*Queue) ElementType() reflect.Type {
	return reflect.TypeOf((*Queue)(nil))
}

func (i *Queue) ToQueueOutput() QueueOutput {
	return i.ToQueueOutputWithContext(context.Background())
}

func (i *Queue) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueueOutput)
}

func (i *Queue) ToQueuePtrOutput() QueuePtrOutput {
	return i.ToQueuePtrOutputWithContext(context.Background())
}

func (i *Queue) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueuePtrOutput)
}

type QueuePtrInput interface {
	pulumi.Input

	ToQueuePtrOutput() QueuePtrOutput
	ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput
}

type queuePtrType QueueArgs

func (*queuePtrType) ElementType() reflect.Type {
	return reflect.TypeOf((**Queue)(nil))
}

func (i *queuePtrType) ToQueuePtrOutput() QueuePtrOutput {
	return i.ToQueuePtrOutputWithContext(context.Background())
}

func (i *queuePtrType) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueuePtrOutput)
}

type QueueArrayInput interface {
	pulumi.Input

	ToQueueArrayOutput() QueueArrayOutput
	ToQueueArrayOutputWithContext(context.Context) QueueArrayOutput
}

type QueueArray []QueueInput

func (QueueArray) ElementType() reflect.Type {
	return reflect.TypeOf(([]*Queue)(nil))
}

func (i QueueArray) ToQueueArrayOutput() QueueArrayOutput {
	return i.ToQueueArrayOutputWithContext(context.Background())
}

func (i QueueArray) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueueArrayOutput)
}

type QueueMapInput interface {
	pulumi.Input

	ToQueueMapOutput() QueueMapOutput
	ToQueueMapOutputWithContext(context.Context) QueueMapOutput
}

type QueueMap map[string]QueueInput

func (QueueMap) ElementType() reflect.Type {
	return reflect.TypeOf((map[string]*Queue)(nil))
}

func (i QueueMap) ToQueueMapOutput() QueueMapOutput {
	return i.ToQueueMapOutputWithContext(context.Background())
}

func (i QueueMap) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueueMapOutput)
}

type QueueOutput struct {
	*pulumi.OutputState
}

func (QueueOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*Queue)(nil))
}

func (o QueueOutput) ToQueueOutput() QueueOutput {
	return o
}

func (o QueueOutput) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
	return o
}

func (o QueueOutput) ToQueuePtrOutput() QueuePtrOutput {
	return o.ToQueuePtrOutputWithContext(context.Background())
}

func (o QueueOutput) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return o.ApplyT(func(v Queue) *Queue {
		return &v
	}).(QueuePtrOutput)
}

type QueuePtrOutput struct {
	*pulumi.OutputState
}

func (QueuePtrOutput) ElementType() reflect.Type {
	return reflect.TypeOf((**Queue)(nil))
}

func (o QueuePtrOutput) ToQueuePtrOutput() QueuePtrOutput {
	return o
}

func (o QueuePtrOutput) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return o
}

type QueueArrayOutput struct{ *pulumi.OutputState }

func (QueueArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]Queue)(nil))
}

func (o QueueArrayOutput) ToQueueArrayOutput() QueueArrayOutput {
	return o
}

func (o QueueArrayOutput) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
	return o
}

func (o QueueArrayOutput) Index(i pulumi.IntInput) QueueOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) Queue {
		return vs[0].([]Queue)[vs[1].(int)]
	}).(QueueOutput)
}

type QueueMapOutput struct{ *pulumi.OutputState }

func (QueueMapOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]Queue)(nil))
}

func (o QueueMapOutput) ToQueueMapOutput() QueueMapOutput {
	return o
}

func (o QueueMapOutput) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
	return o
}

func (o QueueMapOutput) MapIndex(k pulumi.StringInput) QueueOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) Queue {
		return vs[0].(map[string]Queue)[vs[1].(string)]
	}).(QueueOutput)
}

func init() {
	pulumi.RegisterOutputType(QueueOutput{})
	pulumi.RegisterOutputType(QueuePtrOutput{})
	pulumi.RegisterOutputType(QueueArrayOutput{})
	pulumi.RegisterOutputType(QueueMapOutput{})
}
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package mediaconvert

import (
	"context"
	"reflect"

	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

// Provides an AWS Elemental MediaConvert Queue.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// 	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/mediaconvert"
// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// 	pulumi.Run(func(ctx *pulumi.Context) error {
// 		_, err := mediaconvert.NewQueue(ctx, "test", nil)
// 		if err != nil {
// 			return err
// 		}
// 		return nil
// 	})
// }
// ```
//
// ## Import
//
// Media Convert Queue can be imported via the queue name, e.g.
//
// ```sh
//  $ pulumi import aws:mediaconvert/queue:Queue test tf-test-queue
// ```
type Queue struct {
	pulumi.CustomResourceState

	// The Arn of the queue
	Arn pulumi.StringOutput `pulumi:"arn"`
	// A description of the queue
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// A unique identifier describing the queue
	Name pulumi.StringOutput `pulumi:"name"`
	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
	PricingPlan pulumi.StringPtrOutput `pulumi:"pricingPlan"`
	// A detail pricing plan of the  reserved queue. See below.
	ReservationPlanSettings QueueReservationPlanSettingsOutput `pulumi:"reservationPlanSettings"`
	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
	Status pulumi.StringPtrOutput `pulumi:"status"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

// NewQueue registers a new resource with the given unique name, arguments, and options.
func NewQueue(ctx *pulumi.Context,
	name string, args *QueueArgs, opts ...pulumi.ResourceOption) (*Queue, error) {
	if args == nil {
		args = &QueueArgs{}
	}

	var resource Queue
	err := ctx.RegisterResource("aws:mediaconvert/queue:Queue", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// GetQueue gets an existing Queue resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetQueue(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *QueueState, opts ...pulumi.ResourceOption) (*Queue, error) {
	var resource Queue
	err := ctx.ReadResource("aws:mediaconvert/queue:Queue", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering Queue resources.
type queueState struct {
	// The Arn of the queue
	Arn *string `pulumi:"arn"`
	// A description of the queue
	Description *string `pulumi:"description"`
	// A unique identifier describing the queue
	Name *string `pulumi:"name"`
	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
	PricingPlan *string `pulumi:"pricingPlan"`
	// A detail pricing plan of the  reserved queue. See below.
	ReservationPlanSettings *QueueReservationPlanSettings `pulumi:"reservationPlanSettings"`
	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
	Status *string `pulumi:"status"`
	// A map of tags to assign to the resource.
	Tags map[string]string `pulumi:"tags"`
}

type QueueState struct {
	// The Arn of the queue
	Arn pulumi.StringPtrInput
	// A description of the queue
	Description pulumi.StringPtrInput
	// A unique identifier describing the queue
	Name pulumi.StringPtrInput
	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
	PricingPlan pulumi.StringPtrInput
	// A detail pricing plan of the  reserved queue. See below.
	ReservationPlanSettings QueueReservationPlanSettingsPtrInput
	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
	Status pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

func (QueueState) ElementType() reflect.Type {
	return reflect.TypeOf((*queueState)(nil)).Elem()
}

type queueArgs struct {
	// A description of the queue
	Description *string `pulumi:"description"`
	// A unique identifier describing the queue
	Name *string `pulumi:"name"`
	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
	PricingPlan *string `pulumi:"pricingPlan"`
	// A detail pricing plan of the  reserved queue. See below.
	ReservationPlanSettings *QueueReservationPlanSettings `pulumi:"reservationPlanSettings"`
	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
	Status *string `pulumi:"status"`
	// A map of tags to assign to the resource.
	Tags map[string]string `pulumi:"tags"`
}

// The set of arguments for constructing a Queue resource.
type QueueArgs struct {
	// A description of the queue
	Description pulumi.StringPtrInput
	// A unique identifier describing the queue
	Name pulumi.StringPtrInput
	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
	PricingPlan pulumi.StringPtrInput
	// A detail pricing plan of the  reserved queue. See below.
	ReservationPlanSettings QueueReservationPlanSettingsPtrInput
	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
	Status pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

func (QueueArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*queueArgs)(nil)).Elem()
}

type QueueInput interface {
	pulumi.Input

	ToQueueOutput() QueueOutput
	ToQueueOutputWithContext(ctx context.Context) QueueOutput
}

func (*Queue) ElementType() reflect.Type {
	return reflect.TypeOf((*Queue)(nil))
}

func (i *Queue) ToQueueOutput() QueueOutput {
	return i.ToQueueOutputWithContext(context.Background())
}

func (i *Queue) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueueOutput)
}

func (i *Queue) ToQueuePtrOutput() QueuePtrOutput {
	return i.ToQueuePtrOutputWithContext(context.Background())
}

func (i *Queue) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueuePtrOutput)
}

type QueuePtrInput interface {
	pulumi.Input

	ToQueuePtrOutput() QueuePtrOutput
	ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput
}

type queuePtrType QueueArgs

func (*queuePtrType) ElementType() reflect.Type {
	return reflect.TypeOf((**Queue)(nil))
}

func (i *queuePtrType) ToQueuePtrOutput() QueuePtrOutput {
	return i.ToQueuePtrOutputWithContext(context.Background())
}

func (i *queuePtrType) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueuePtrOutput)
}

// QueueArrayInput is an input type that accepts QueueArray and QueueArrayOutput values.
// You can construct a concrete instance of `QueueArrayInput` via:
//
//          QueueArray{ QueueArgs{...} }
type QueueArrayInput interface {
	pulumi.Input

	ToQueueArrayOutput() QueueArrayOutput
	ToQueueArrayOutputWithContext(context.Context) QueueArrayOutput
}

type QueueArray []QueueInput

func (QueueArray) ElementType() reflect.Type {
	return reflect.TypeOf(([]*Queue)(nil))
}

func (i QueueArray) ToQueueArrayOutput() QueueArrayOutput {
	return i.ToQueueArrayOutputWithContext(context.Background())
}

func (i QueueArray) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueueArrayOutput)
}

// QueueMapInput is an input type that accepts QueueMap and QueueMapOutput values.
// You can construct a concrete instance of `QueueMapInput` via:
//
//          QueueMap{ "key": QueueArgs{...} }
type QueueMapInput interface {
	pulumi.Input

	ToQueueMapOutput() QueueMapOutput
	ToQueueMapOutputWithContext(context.Context) QueueMapOutput
}

type QueueMap map[string]QueueInput

func (QueueMap) ElementType() reflect.Type {
	return reflect.TypeOf((map[string]*Queue)(nil))
}

func (i QueueMap) ToQueueMapOutput() QueueMapOutput {
	return i.ToQueueMapOutputWithContext(context.Background())
}

func (i QueueMap) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(QueueMapOutput)
}

type QueueOutput struct {
	*pulumi.OutputState
}

func (QueueOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*Queue)(nil))
}

func (o QueueOutput) ToQueueOutput() QueueOutput {
	return o
}

func (o QueueOutput) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
	return o
}

func (o QueueOutput) ToQueuePtrOutput() QueuePtrOutput {
	return o.ToQueuePtrOutputWithContext(context.Background())
}

func (o QueueOutput) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return o.ApplyT(func(v Queue) *Queue {
		return &v
	}).(QueuePtrOutput)
}

type QueuePtrOutput struct {
	*pulumi.OutputState
}

func (QueuePtrOutput) ElementType() reflect.Type {
	return reflect.TypeOf((**Queue)(nil))
}

func (o QueuePtrOutput) ToQueuePtrOutput() QueuePtrOutput {
	return o
}

func (o QueuePtrOutput) ToQueuePtrOutputWithContext(ctx context.Context) QueuePtrOutput {
	return o
}

type QueueArrayOutput struct{ *pulumi.OutputState }

func (QueueArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]Queue)(nil))
}

func (o QueueArrayOutput) ToQueueArrayOutput() QueueArrayOutput {
	return o
}

func (o QueueArrayOutput) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
	return o
}

func (o QueueArrayOutput) Index(i pulumi.IntInput) QueueOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) Queue {
		return vs[0].([]Queue)[vs[1].(int)]
	}).(QueueOutput)
}

type QueueMapOutput struct{ *pulumi.OutputState }

func (QueueMapOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]Queue)(nil))
}

func (o QueueMapOutput) ToQueueMapOutput() QueueMapOutput {
	return o
}

func (o QueueMapOutput) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
	return o
}

func (o QueueMapOutput) MapIndex(k pulumi.StringInput) QueueOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) Queue {
		return vs[0].(map[string]Queue)[vs[1].(string)]
	}).(QueueOutput)
}

func init() {
	pulumi.RegisterOutputType(QueueOutput{})
	pulumi.RegisterOutputType(QueuePtrOutput{})
	pulumi.RegisterOutputType(QueueArrayOutput{})
	pulumi.RegisterOutputType(QueueMapOutput{})
}
