package v20191027preview

import (
	"context"
	"reflect"

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

type OpenShiftManagedCluster struct {
	pulumi.CustomResourceState

	AgentPoolProfiles OpenShiftManagedClusterAgentPoolProfileResponseArrayOutput `pulumi:"agentPoolProfiles"`
	AuthProfile       OpenShiftManagedClusterAuthProfileResponsePtrOutput        `pulumi:"authProfile"`
	ClusterVersion    pulumi.StringOutput                                        `pulumi:"clusterVersion"`
	Fqdn              pulumi.StringOutput                                        `pulumi:"fqdn"`
	Location          pulumi.StringOutput                                        `pulumi:"location"`
	MasterPoolProfile OpenShiftManagedClusterMasterPoolProfileResponsePtrOutput  `pulumi:"masterPoolProfile"`
	MonitorProfile    OpenShiftManagedClusterMonitorProfileResponsePtrOutput     `pulumi:"monitorProfile"`
	Name              pulumi.StringOutput                                        `pulumi:"name"`
	NetworkProfile    NetworkProfileResponsePtrOutput                            `pulumi:"networkProfile"`
	OpenShiftVersion  pulumi.StringOutput                                        `pulumi:"openShiftVersion"`
	Plan              PurchasePlanResponsePtrOutput                              `pulumi:"plan"`
	ProvisioningState pulumi.StringOutput                                        `pulumi:"provisioningState"`
	PublicHostname    pulumi.StringOutput                                        `pulumi:"publicHostname"`
	RefreshCluster    pulumi.BoolPtrOutput                                       `pulumi:"refreshCluster"`
	RouterProfiles    OpenShiftRouterProfileResponseArrayOutput                  `pulumi:"routerProfiles"`
	Tags              pulumi.StringMapOutput                                     `pulumi:"tags"`
	Type              pulumi.StringOutput                                        `pulumi:"type"`
}

func NewOpenShiftManagedCluster(ctx *pulumi.Context,
	name string, args *OpenShiftManagedClusterArgs, opts ...pulumi.ResourceOption) (*OpenShiftManagedCluster, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.OpenShiftVersion == nil {
		return nil, errors.New("invalid value for required argument 'OpenShiftVersion'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	aliases := pulumi.Aliases([]pulumi.Alias{
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20191027preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice/v20180930preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20180930preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice/v20190430:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20190430:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice/v20190930preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20190930preview:OpenShiftManagedCluster"),
		},
	})
	opts = append(opts, aliases)
	var resource OpenShiftManagedCluster
	err := ctx.RegisterResource("azure-native:containerservice/v20191027preview:OpenShiftManagedCluster", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

func GetOpenShiftManagedCluster(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *OpenShiftManagedClusterState, opts ...pulumi.ResourceOption) (*OpenShiftManagedCluster, error) {
	var resource OpenShiftManagedCluster
	err := ctx.ReadResource("azure-native:containerservice/v20191027preview:OpenShiftManagedCluster", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

type openShiftManagedClusterState struct {
}

type OpenShiftManagedClusterState struct {
}

func (OpenShiftManagedClusterState) ElementType() reflect.Type {
	return reflect.TypeOf((*openShiftManagedClusterState)(nil)).Elem()
}

type openShiftManagedClusterArgs struct {
	AgentPoolProfiles []OpenShiftManagedClusterAgentPoolProfile `pulumi:"agentPoolProfiles"`
	AuthProfile       *OpenShiftManagedClusterAuthProfile       `pulumi:"authProfile"`
	Location          *string                                   `pulumi:"location"`
	MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `pulumi:"masterPoolProfile"`
	MonitorProfile    *OpenShiftManagedClusterMonitorProfile    `pulumi:"monitorProfile"`
	NetworkProfile    *NetworkProfile                           `pulumi:"networkProfile"`
	OpenShiftVersion  string                                    `pulumi:"openShiftVersion"`
	Plan              *PurchasePlan                             `pulumi:"plan"`
	RefreshCluster    *bool                                     `pulumi:"refreshCluster"`
	ResourceGroupName string                                    `pulumi:"resourceGroupName"`
	ResourceName      *string                                   `pulumi:"resourceName"`
	RouterProfiles    []OpenShiftRouterProfile                  `pulumi:"routerProfiles"`
	Tags              map[string]string                         `pulumi:"tags"`
}

type OpenShiftManagedClusterArgs struct {
	AgentPoolProfiles OpenShiftManagedClusterAgentPoolProfileArrayInput
	AuthProfile       OpenShiftManagedClusterAuthProfilePtrInput
	Location          pulumi.StringPtrInput
	MasterPoolProfile OpenShiftManagedClusterMasterPoolProfilePtrInput
	MonitorProfile    OpenShiftManagedClusterMonitorProfilePtrInput
	NetworkProfile    NetworkProfilePtrInput
	OpenShiftVersion  pulumi.StringInput
	Plan              PurchasePlanPtrInput
	RefreshCluster    pulumi.BoolPtrInput
	ResourceGroupName pulumi.StringInput
	ResourceName      pulumi.StringPtrInput
	RouterProfiles    OpenShiftRouterProfileArrayInput
	Tags              pulumi.StringMapInput
}

func (OpenShiftManagedClusterArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*openShiftManagedClusterArgs)(nil)).Elem()
}

type OpenShiftManagedClusterInput interface {
	pulumi.Input

	ToOpenShiftManagedClusterOutput() OpenShiftManagedClusterOutput
	ToOpenShiftManagedClusterOutputWithContext(ctx context.Context) OpenShiftManagedClusterOutput
}

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

func (i *OpenShiftManagedCluster) ToOpenShiftManagedClusterOutput() OpenShiftManagedClusterOutput {
	return i.ToOpenShiftManagedClusterOutputWithContext(context.Background())
}

func (i *OpenShiftManagedCluster) ToOpenShiftManagedClusterOutputWithContext(ctx context.Context) OpenShiftManagedClusterOutput {
	return pulumi.ToOutputWithContext(ctx, i).(OpenShiftManagedClusterOutput)
}

type OpenShiftManagedClusterOutput struct{ *pulumi.OutputState }

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

func (o OpenShiftManagedClusterOutput) ToOpenShiftManagedClusterOutput() OpenShiftManagedClusterOutput {
	return o
}

func (o OpenShiftManagedClusterOutput) ToOpenShiftManagedClusterOutputWithContext(ctx context.Context) OpenShiftManagedClusterOutput {
	return o
}

func init() {
	pulumi.RegisterOutputType(OpenShiftManagedClusterOutput{})
}
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package v20191027preview

import (
	"context"
	"reflect"

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

type OpenShiftManagedCluster struct {
	pulumi.CustomResourceState

	AgentPoolProfiles OpenShiftManagedClusterAgentPoolProfileResponseArrayOutput `pulumi:"agentPoolProfiles"`
	AuthProfile       OpenShiftManagedClusterAuthProfileResponsePtrOutput        `pulumi:"authProfile"`
	ClusterVersion    pulumi.StringOutput                                        `pulumi:"clusterVersion"`
	Fqdn              pulumi.StringOutput                                        `pulumi:"fqdn"`
	Location          pulumi.StringOutput                                        `pulumi:"location"`
	MasterPoolProfile OpenShiftManagedClusterMasterPoolProfileResponsePtrOutput  `pulumi:"masterPoolProfile"`
	MonitorProfile    OpenShiftManagedClusterMonitorProfileResponsePtrOutput     `pulumi:"monitorProfile"`
	Name              pulumi.StringOutput                                        `pulumi:"name"`
	NetworkProfile    NetworkProfileResponsePtrOutput                            `pulumi:"networkProfile"`
	OpenShiftVersion  pulumi.StringOutput                                        `pulumi:"openShiftVersion"`
	Plan              PurchasePlanResponsePtrOutput                              `pulumi:"plan"`
	ProvisioningState pulumi.StringOutput                                        `pulumi:"provisioningState"`
	PublicHostname    pulumi.StringOutput                                        `pulumi:"publicHostname"`
	RefreshCluster    pulumi.BoolPtrOutput                                       `pulumi:"refreshCluster"`
	RouterProfiles    OpenShiftRouterProfileResponseArrayOutput                  `pulumi:"routerProfiles"`
	Tags              pulumi.StringMapOutput                                     `pulumi:"tags"`
	Type              pulumi.StringOutput                                        `pulumi:"type"`
}

// NewOpenShiftManagedCluster registers a new resource with the given unique name, arguments, and options.
func NewOpenShiftManagedCluster(ctx *pulumi.Context,
	name string, args *OpenShiftManagedClusterArgs, opts ...pulumi.ResourceOption) (*OpenShiftManagedCluster, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.OpenShiftVersion == nil {
		return nil, errors.New("invalid value for required argument 'OpenShiftVersion'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	aliases := pulumi.Aliases([]pulumi.Alias{
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20191027preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice/v20180930preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20180930preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice/v20190430:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20190430:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-native:containerservice/v20190930preview:OpenShiftManagedCluster"),
		},
		{
			Type: pulumi.String("azure-nextgen:containerservice/v20190930preview:OpenShiftManagedCluster"),
		},
	})
	opts = append(opts, aliases)
	var resource OpenShiftManagedCluster
	err := ctx.RegisterResource("azure-native:containerservice/v20191027preview:OpenShiftManagedCluster", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// GetOpenShiftManagedCluster gets an existing OpenShiftManagedCluster 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 GetOpenShiftManagedCluster(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *OpenShiftManagedClusterState, opts ...pulumi.ResourceOption) (*OpenShiftManagedCluster, error) {
	var resource OpenShiftManagedCluster
	err := ctx.ReadResource("azure-native:containerservice/v20191027preview:OpenShiftManagedCluster", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering OpenShiftManagedCluster resources.
type openShiftManagedClusterState struct {
}

type OpenShiftManagedClusterState struct {
}

func (OpenShiftManagedClusterState) ElementType() reflect.Type {
	return reflect.TypeOf((*openShiftManagedClusterState)(nil)).Elem()
}

type openShiftManagedClusterArgs struct {
	AgentPoolProfiles []OpenShiftManagedClusterAgentPoolProfile `pulumi:"agentPoolProfiles"`
	AuthProfile       *OpenShiftManagedClusterAuthProfile       `pulumi:"authProfile"`
	Location          *string                                   `pulumi:"location"`
	MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `pulumi:"masterPoolProfile"`
	MonitorProfile    *OpenShiftManagedClusterMonitorProfile    `pulumi:"monitorProfile"`
	NetworkProfile    *NetworkProfile                           `pulumi:"networkProfile"`
	OpenShiftVersion  string                                    `pulumi:"openShiftVersion"`
	Plan              *PurchasePlan                             `pulumi:"plan"`
	RefreshCluster    *bool                                     `pulumi:"refreshCluster"`
	ResourceGroupName string                                    `pulumi:"resourceGroupName"`
	ResourceName      *string                                   `pulumi:"resourceName"`
	RouterProfiles    []OpenShiftRouterProfile                  `pulumi:"routerProfiles"`
	Tags              map[string]string                         `pulumi:"tags"`
}

// The set of arguments for constructing a OpenShiftManagedCluster resource.
type OpenShiftManagedClusterArgs struct {
	AgentPoolProfiles OpenShiftManagedClusterAgentPoolProfileArrayInput
	AuthProfile       OpenShiftManagedClusterAuthProfilePtrInput
	Location          pulumi.StringPtrInput
	MasterPoolProfile OpenShiftManagedClusterMasterPoolProfilePtrInput
	MonitorProfile    OpenShiftManagedClusterMonitorProfilePtrInput
	NetworkProfile    NetworkProfilePtrInput
	OpenShiftVersion  pulumi.StringInput
	Plan              PurchasePlanPtrInput
	RefreshCluster    pulumi.BoolPtrInput
	ResourceGroupName pulumi.StringInput
	ResourceName      pulumi.StringPtrInput
	RouterProfiles    OpenShiftRouterProfileArrayInput
	Tags              pulumi.StringMapInput
}

func (OpenShiftManagedClusterArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*openShiftManagedClusterArgs)(nil)).Elem()
}

type OpenShiftManagedClusterInput interface {
	pulumi.Input

	ToOpenShiftManagedClusterOutput() OpenShiftManagedClusterOutput
	ToOpenShiftManagedClusterOutputWithContext(ctx context.Context) OpenShiftManagedClusterOutput
}

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

func (i *OpenShiftManagedCluster) ToOpenShiftManagedClusterOutput() OpenShiftManagedClusterOutput {
	return i.ToOpenShiftManagedClusterOutputWithContext(context.Background())
}

func (i *OpenShiftManagedCluster) ToOpenShiftManagedClusterOutputWithContext(ctx context.Context) OpenShiftManagedClusterOutput {
	return pulumi.ToOutputWithContext(ctx, i).(OpenShiftManagedClusterOutput)
}

type OpenShiftManagedClusterOutput struct{ *pulumi.OutputState }

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

func (o OpenShiftManagedClusterOutput) ToOpenShiftManagedClusterOutput() OpenShiftManagedClusterOutput {
	return o
}

func (o OpenShiftManagedClusterOutput) ToOpenShiftManagedClusterOutputWithContext(ctx context.Context) OpenShiftManagedClusterOutput {
	return o
}

func init() {
	pulumi.RegisterOutputType(OpenShiftManagedClusterOutput{})
}
