package oci

import (
	"context"
	"reflect"

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

type LogAnalyticsLogAnalyticsEntity struct {
	pulumi.CustomResourceState

	AreLogsCollected pulumi.BoolOutput `pulumi:"areLogsCollected"`

	CloudResourceId pulumi.StringOutput `pulumi:"cloudResourceId"`

	CompartmentId pulumi.StringOutput `pulumi:"compartmentId"`

	DefinedTags pulumi.MapOutput `pulumi:"definedTags"`

	EntityTypeInternalName pulumi.StringOutput `pulumi:"entityTypeInternalName"`

	EntityTypeName pulumi.StringOutput `pulumi:"entityTypeName"`

	FreeformTags pulumi.MapOutput `pulumi:"freeformTags"`

	Hostname pulumi.StringOutput `pulumi:"hostname"`

	LifecycleDetails pulumi.StringOutput `pulumi:"lifecycleDetails"`

	ManagementAgentCompartmentId pulumi.StringOutput `pulumi:"managementAgentCompartmentId"`

	ManagementAgentDisplayName pulumi.StringOutput `pulumi:"managementAgentDisplayName"`

	ManagementAgentId pulumi.StringOutput `pulumi:"managementAgentId"`

	Name pulumi.StringOutput `pulumi:"name"`

	Namespace pulumi.StringOutput `pulumi:"namespace"`

	Properties pulumi.MapOutput `pulumi:"properties"`

	SourceId pulumi.StringOutput `pulumi:"sourceId"`

	State pulumi.StringOutput `pulumi:"state"`

	TimeCreated pulumi.StringOutput `pulumi:"timeCreated"`

	TimeUpdated pulumi.StringOutput `pulumi:"timeUpdated"`

	TimezoneRegion pulumi.StringOutput `pulumi:"timezoneRegion"`
}

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

	if args.CompartmentId == nil {
		return nil, errors.New("invalid value for required argument 'CompartmentId'")
	}
	if args.EntityTypeName == nil {
		return nil, errors.New("invalid value for required argument 'EntityTypeName'")
	}
	if args.Namespace == nil {
		return nil, errors.New("invalid value for required argument 'Namespace'")
	}
	var resource LogAnalyticsLogAnalyticsEntity
	err := ctx.RegisterResource("oci:index/logAnalyticsLogAnalyticsEntity:LogAnalyticsLogAnalyticsEntity", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

func GetLogAnalyticsLogAnalyticsEntity(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LogAnalyticsLogAnalyticsEntityState, opts ...pulumi.ResourceOption) (*LogAnalyticsLogAnalyticsEntity, error) {
	var resource LogAnalyticsLogAnalyticsEntity
	err := ctx.ReadResource("oci:index/logAnalyticsLogAnalyticsEntity:LogAnalyticsLogAnalyticsEntity", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

type logAnalyticsLogAnalyticsEntityState struct {

	AreLogsCollected *bool `pulumi:"areLogsCollected"`

	CloudResourceId *string `pulumi:"cloudResourceId"`

	CompartmentId *string `pulumi:"compartmentId"`

	DefinedTags map[string]interface{} `pulumi:"definedTags"`

	EntityTypeInternalName *string `pulumi:"entityTypeInternalName"`

	EntityTypeName *string `pulumi:"entityTypeName"`

	FreeformTags map[string]interface{} `pulumi:"freeformTags"`

	Hostname *string `pulumi:"hostname"`

	LifecycleDetails *string `pulumi:"lifecycleDetails"`

	ManagementAgentCompartmentId *string `pulumi:"managementAgentCompartmentId"`

	ManagementAgentDisplayName *string `pulumi:"managementAgentDisplayName"`

	ManagementAgentId *string `pulumi:"managementAgentId"`

	Name *string `pulumi:"name"`

	Namespace *string `pulumi:"namespace"`

	Properties map[string]interface{} `pulumi:"properties"`

	SourceId *string `pulumi:"sourceId"`

	State *string `pulumi:"state"`

	TimeCreated *string `pulumi:"timeCreated"`

	TimeUpdated *string `pulumi:"timeUpdated"`

	TimezoneRegion *string `pulumi:"timezoneRegion"`
}

type LogAnalyticsLogAnalyticsEntityState struct {

	AreLogsCollected pulumi.BoolPtrInput

	CloudResourceId pulumi.StringPtrInput

	CompartmentId pulumi.StringPtrInput

	DefinedTags pulumi.MapInput

	EntityTypeInternalName pulumi.StringPtrInput

	EntityTypeName pulumi.StringPtrInput

	FreeformTags pulumi.MapInput

	Hostname pulumi.StringPtrInput

	LifecycleDetails pulumi.StringPtrInput

	ManagementAgentCompartmentId pulumi.StringPtrInput

	ManagementAgentDisplayName pulumi.StringPtrInput

	ManagementAgentId pulumi.StringPtrInput

	Name pulumi.StringPtrInput

	Namespace pulumi.StringPtrInput

	Properties pulumi.MapInput

	SourceId pulumi.StringPtrInput

	State pulumi.StringPtrInput

	TimeCreated pulumi.StringPtrInput

	TimeUpdated pulumi.StringPtrInput

	TimezoneRegion pulumi.StringPtrInput
}

func (LogAnalyticsLogAnalyticsEntityState) ElementType() reflect.Type {
	return reflect.TypeOf((*logAnalyticsLogAnalyticsEntityState)(nil)).Elem()
}

type logAnalyticsLogAnalyticsEntityArgs struct {

	CloudResourceId *string `pulumi:"cloudResourceId"`

	CompartmentId string `pulumi:"compartmentId"`

	DefinedTags map[string]interface{} `pulumi:"definedTags"`

	EntityTypeName string `pulumi:"entityTypeName"`

	FreeformTags map[string]interface{} `pulumi:"freeformTags"`

	Hostname *string `pulumi:"hostname"`

	ManagementAgentId *string `pulumi:"managementAgentId"`

	Name *string `pulumi:"name"`

	Namespace string `pulumi:"namespace"`

	Properties map[string]interface{} `pulumi:"properties"`

	SourceId *string `pulumi:"sourceId"`

	TimezoneRegion *string `pulumi:"timezoneRegion"`
}

type LogAnalyticsLogAnalyticsEntityArgs struct {

	CloudResourceId pulumi.StringPtrInput

	CompartmentId pulumi.StringInput

	DefinedTags pulumi.MapInput

	EntityTypeName pulumi.StringInput

	FreeformTags pulumi.MapInput

	Hostname pulumi.StringPtrInput

	ManagementAgentId pulumi.StringPtrInput

	Name pulumi.StringPtrInput

	Namespace pulumi.StringInput

	Properties pulumi.MapInput

	SourceId pulumi.StringPtrInput

	TimezoneRegion pulumi.StringPtrInput
}

func (LogAnalyticsLogAnalyticsEntityArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*logAnalyticsLogAnalyticsEntityArgs)(nil)).Elem()
}

type LogAnalyticsLogAnalyticsEntityInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityOutput() LogAnalyticsLogAnalyticsEntityOutput
	ToLogAnalyticsLogAnalyticsEntityOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityOutput
}

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

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityOutput() LogAnalyticsLogAnalyticsEntityOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityOutputWithContext(context.Background())
}

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityOutput)
}

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(context.Background())
}

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityPtrOutput)
}

type LogAnalyticsLogAnalyticsEntityPtrInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput
	ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput
}

type logAnalyticsLogAnalyticsEntityPtrType LogAnalyticsLogAnalyticsEntityArgs

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

func (i *logAnalyticsLogAnalyticsEntityPtrType) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(context.Background())
}

func (i *logAnalyticsLogAnalyticsEntityPtrType) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityPtrOutput)
}

type LogAnalyticsLogAnalyticsEntityArrayInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityArrayOutput() LogAnalyticsLogAnalyticsEntityArrayOutput
	ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(context.Context) LogAnalyticsLogAnalyticsEntityArrayOutput
}

type LogAnalyticsLogAnalyticsEntityArray []LogAnalyticsLogAnalyticsEntityInput

func (LogAnalyticsLogAnalyticsEntityArray) ElementType() reflect.Type {
	return reflect.TypeOf((*[]*LogAnalyticsLogAnalyticsEntity)(nil)).Elem()
}

func (i LogAnalyticsLogAnalyticsEntityArray) ToLogAnalyticsLogAnalyticsEntityArrayOutput() LogAnalyticsLogAnalyticsEntityArrayOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(context.Background())
}

func (i LogAnalyticsLogAnalyticsEntityArray) ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityArrayOutput)
}

type LogAnalyticsLogAnalyticsEntityMapInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityMapOutput() LogAnalyticsLogAnalyticsEntityMapOutput
	ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(context.Context) LogAnalyticsLogAnalyticsEntityMapOutput
}

type LogAnalyticsLogAnalyticsEntityMap map[string]LogAnalyticsLogAnalyticsEntityInput

func (LogAnalyticsLogAnalyticsEntityMap) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]*LogAnalyticsLogAnalyticsEntity)(nil)).Elem()
}

func (i LogAnalyticsLogAnalyticsEntityMap) ToLogAnalyticsLogAnalyticsEntityMapOutput() LogAnalyticsLogAnalyticsEntityMapOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(context.Background())
}

func (i LogAnalyticsLogAnalyticsEntityMap) ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityMapOutput)
}

type LogAnalyticsLogAnalyticsEntityOutput struct {
	*pulumi.OutputState
}

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

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityOutput() LogAnalyticsLogAnalyticsEntityOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o.ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(context.Background())
}

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o.ApplyT(func(v LogAnalyticsLogAnalyticsEntity) *LogAnalyticsLogAnalyticsEntity {
		return &v
	}).(LogAnalyticsLogAnalyticsEntityPtrOutput)
}

type LogAnalyticsLogAnalyticsEntityPtrOutput struct {
	*pulumi.OutputState
}

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

func (o LogAnalyticsLogAnalyticsEntityPtrOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityPtrOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o
}

type LogAnalyticsLogAnalyticsEntityArrayOutput struct{ *pulumi.OutputState }

func (LogAnalyticsLogAnalyticsEntityArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]LogAnalyticsLogAnalyticsEntity)(nil))
}

func (o LogAnalyticsLogAnalyticsEntityArrayOutput) ToLogAnalyticsLogAnalyticsEntityArrayOutput() LogAnalyticsLogAnalyticsEntityArrayOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityArrayOutput) ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityArrayOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityArrayOutput) Index(i pulumi.IntInput) LogAnalyticsLogAnalyticsEntityOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) LogAnalyticsLogAnalyticsEntity {
		return vs[0].([]LogAnalyticsLogAnalyticsEntity)[vs[1].(int)]
	}).(LogAnalyticsLogAnalyticsEntityOutput)
}

type LogAnalyticsLogAnalyticsEntityMapOutput struct{ *pulumi.OutputState }

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

func (o LogAnalyticsLogAnalyticsEntityMapOutput) ToLogAnalyticsLogAnalyticsEntityMapOutput() LogAnalyticsLogAnalyticsEntityMapOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityMapOutput) ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityMapOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityMapOutput) MapIndex(k pulumi.StringInput) LogAnalyticsLogAnalyticsEntityOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) LogAnalyticsLogAnalyticsEntity {
		return vs[0].(map[string]LogAnalyticsLogAnalyticsEntity)[vs[1].(string)]
	}).(LogAnalyticsLogAnalyticsEntityOutput)
}

func init() {
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityOutput{})
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityPtrOutput{})
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityArrayOutput{})
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityMapOutput{})
}
// *** 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 oci

import (
	"context"
	"reflect"

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

// This resource provides the Log Analytics Entity resource in Oracle Cloud Infrastructure Log Analytics service.
//
// Create a new log analytics entity.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// 	"github.com/pulumi/pulumi-oci/sdk/go/oci"
// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// 	pulumi.Run(func(ctx *pulumi.Context) error {
// 		_, err := oci.NewLogAnalyticsLogAnalyticsEntity(ctx, "testLogAnalyticsEntity", &oci.LogAnalyticsLogAnalyticsEntityArgs{
// 			CompartmentId:   pulumi.Any(_var.Compartment_id),
// 			EntityTypeName:  pulumi.Any(_var.Log_analytics_entity_entity_type_name),
// 			Namespace:       pulumi.Any(_var.Log_analytics_entity_namespace),
// 			CloudResourceId: pulumi.Any(oci_log_analytics_cloud_resource.Test_cloud_resource.Id),
// 			DefinedTags: pulumi.AnyMap{
// 				"foo-namespace.bar-key": pulumi.Any("value"),
// 			},
// 			FreeformTags: pulumi.AnyMap{
// 				"bar-key": pulumi.Any("value"),
// 			},
// 			Hostname:          pulumi.Any(_var.Log_analytics_entity_hostname),
// 			ManagementAgentId: pulumi.Any(oci_management_agent_management_agent.Test_management_agent.Id),
// 			Properties:        pulumi.Any(_var.Log_analytics_entity_properties),
// 			SourceId:          pulumi.Any(oci_log_analytics_source.Test_source.Id),
// 			TimezoneRegion:    pulumi.Any(_var.Log_analytics_entity_timezone_region),
// 		})
// 		if err != nil {
// 			return err
// 		}
// 		return nil
// 	})
// }
// ```
//
// ## Import
//
// LogAnalyticsEntities can be imported using the `id`, e.g.
//
// ```sh
//  $ pulumi import oci:index/logAnalyticsLogAnalyticsEntity:LogAnalyticsLogAnalyticsEntity test_log_analytics_entity "namespaces/{namespaceName}/logAnalyticsEntities/{logAnalyticsEntityId}"
// ```
type LogAnalyticsLogAnalyticsEntity struct {
	pulumi.CustomResourceState

	// The Boolean flag to indicate if logs are collected for an entity for log analytics usage.
	AreLogsCollected pulumi.BoolOutput `pulumi:"areLogsCollected"`
	// The OCID of the Cloud resource which this entity is a representation of. This may be blank when the entity represents a non-cloud resource that the customer may have on their premises.
	CloudResourceId pulumi.StringOutput `pulumi:"cloudResourceId"`
	// (Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
	CompartmentId pulumi.StringOutput `pulumi:"compartmentId"`
	// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
	DefinedTags pulumi.MapOutput `pulumi:"definedTags"`
	// Internal name for the log analytics entity type.
	EntityTypeInternalName pulumi.StringOutput `pulumi:"entityTypeInternalName"`
	// Log analytics entity type name.
	EntityTypeName pulumi.StringOutput `pulumi:"entityTypeName"`
	// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
	FreeformTags pulumi.MapOutput `pulumi:"freeformTags"`
	// (Updatable) The hostname where the entity represented here is actually present. This would be the output one would get if they run `echo $HOSTNAME` on Linux or an equivalent OS command. This may be different from management agents host since logs may be collected remotely.
	Hostname pulumi.StringOutput `pulumi:"hostname"`
	// lifecycleDetails has additional information regarding substeps such as management agent plugin deployment.
	LifecycleDetails pulumi.StringOutput `pulumi:"lifecycleDetails"`
	// Management agent (management-agents resource kind) compartment OCID
	ManagementAgentCompartmentId pulumi.StringOutput `pulumi:"managementAgentCompartmentId"`
	// Management agent (management-agents resource kind) display name
	ManagementAgentDisplayName pulumi.StringOutput `pulumi:"managementAgentDisplayName"`
	// (Updatable) The OCID of the Management Agent.
	ManagementAgentId pulumi.StringOutput `pulumi:"managementAgentId"`
	// (Updatable) Log analytics entity name.
	Name pulumi.StringOutput `pulumi:"name"`
	// The Logging Analytics namespace used for the request.
	Namespace pulumi.StringOutput `pulumi:"namespace"`
	// (Updatable) The name/value pairs for parameter values to be used in file patterns specified in log sources.
	Properties pulumi.MapOutput `pulumi:"properties"`
	// This indicates the type of source. It is primarily for Enterprise Manager Repository ID.
	SourceId pulumi.StringOutput `pulumi:"sourceId"`
	// The current state of the log analytics entity.
	State pulumi.StringOutput `pulumi:"state"`
	// The date and time the resource was created, in the format defined by RFC3339.
	TimeCreated pulumi.StringOutput `pulumi:"timeCreated"`
	// The date and time the resource was last updated, in the format defined by RFC3339.
	TimeUpdated pulumi.StringOutput `pulumi:"timeUpdated"`
	// (Updatable) The timezone region of the log analytics entity.
	TimezoneRegion pulumi.StringOutput `pulumi:"timezoneRegion"`
}

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

	if args.CompartmentId == nil {
		return nil, errors.New("invalid value for required argument 'CompartmentId'")
	}
	if args.EntityTypeName == nil {
		return nil, errors.New("invalid value for required argument 'EntityTypeName'")
	}
	if args.Namespace == nil {
		return nil, errors.New("invalid value for required argument 'Namespace'")
	}
	var resource LogAnalyticsLogAnalyticsEntity
	err := ctx.RegisterResource("oci:index/logAnalyticsLogAnalyticsEntity:LogAnalyticsLogAnalyticsEntity", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// GetLogAnalyticsLogAnalyticsEntity gets an existing LogAnalyticsLogAnalyticsEntity 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 GetLogAnalyticsLogAnalyticsEntity(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LogAnalyticsLogAnalyticsEntityState, opts ...pulumi.ResourceOption) (*LogAnalyticsLogAnalyticsEntity, error) {
	var resource LogAnalyticsLogAnalyticsEntity
	err := ctx.ReadResource("oci:index/logAnalyticsLogAnalyticsEntity:LogAnalyticsLogAnalyticsEntity", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering LogAnalyticsLogAnalyticsEntity resources.
type logAnalyticsLogAnalyticsEntityState struct {
	// The Boolean flag to indicate if logs are collected for an entity for log analytics usage.
	AreLogsCollected *bool `pulumi:"areLogsCollected"`
	// The OCID of the Cloud resource which this entity is a representation of. This may be blank when the entity represents a non-cloud resource that the customer may have on their premises.
	CloudResourceId *string `pulumi:"cloudResourceId"`
	// (Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
	CompartmentId *string `pulumi:"compartmentId"`
	// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
	DefinedTags map[string]interface{} `pulumi:"definedTags"`
	// Internal name for the log analytics entity type.
	EntityTypeInternalName *string `pulumi:"entityTypeInternalName"`
	// Log analytics entity type name.
	EntityTypeName *string `pulumi:"entityTypeName"`
	// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
	FreeformTags map[string]interface{} `pulumi:"freeformTags"`
	// (Updatable) The hostname where the entity represented here is actually present. This would be the output one would get if they run `echo $HOSTNAME` on Linux or an equivalent OS command. This may be different from management agents host since logs may be collected remotely.
	Hostname *string `pulumi:"hostname"`
	// lifecycleDetails has additional information regarding substeps such as management agent plugin deployment.
	LifecycleDetails *string `pulumi:"lifecycleDetails"`
	// Management agent (management-agents resource kind) compartment OCID
	ManagementAgentCompartmentId *string `pulumi:"managementAgentCompartmentId"`
	// Management agent (management-agents resource kind) display name
	ManagementAgentDisplayName *string `pulumi:"managementAgentDisplayName"`
	// (Updatable) The OCID of the Management Agent.
	ManagementAgentId *string `pulumi:"managementAgentId"`
	// (Updatable) Log analytics entity name.
	Name *string `pulumi:"name"`
	// The Logging Analytics namespace used for the request.
	Namespace *string `pulumi:"namespace"`
	// (Updatable) The name/value pairs for parameter values to be used in file patterns specified in log sources.
	Properties map[string]interface{} `pulumi:"properties"`
	// This indicates the type of source. It is primarily for Enterprise Manager Repository ID.
	SourceId *string `pulumi:"sourceId"`
	// The current state of the log analytics entity.
	State *string `pulumi:"state"`
	// The date and time the resource was created, in the format defined by RFC3339.
	TimeCreated *string `pulumi:"timeCreated"`
	// The date and time the resource was last updated, in the format defined by RFC3339.
	TimeUpdated *string `pulumi:"timeUpdated"`
	// (Updatable) The timezone region of the log analytics entity.
	TimezoneRegion *string `pulumi:"timezoneRegion"`
}

type LogAnalyticsLogAnalyticsEntityState struct {
	// The Boolean flag to indicate if logs are collected for an entity for log analytics usage.
	AreLogsCollected pulumi.BoolPtrInput
	// The OCID of the Cloud resource which this entity is a representation of. This may be blank when the entity represents a non-cloud resource that the customer may have on their premises.
	CloudResourceId pulumi.StringPtrInput
	// (Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
	CompartmentId pulumi.StringPtrInput
	// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
	DefinedTags pulumi.MapInput
	// Internal name for the log analytics entity type.
	EntityTypeInternalName pulumi.StringPtrInput
	// Log analytics entity type name.
	EntityTypeName pulumi.StringPtrInput
	// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
	FreeformTags pulumi.MapInput
	// (Updatable) The hostname where the entity represented here is actually present. This would be the output one would get if they run `echo $HOSTNAME` on Linux or an equivalent OS command. This may be different from management agents host since logs may be collected remotely.
	Hostname pulumi.StringPtrInput
	// lifecycleDetails has additional information regarding substeps such as management agent plugin deployment.
	LifecycleDetails pulumi.StringPtrInput
	// Management agent (management-agents resource kind) compartment OCID
	ManagementAgentCompartmentId pulumi.StringPtrInput
	// Management agent (management-agents resource kind) display name
	ManagementAgentDisplayName pulumi.StringPtrInput
	// (Updatable) The OCID of the Management Agent.
	ManagementAgentId pulumi.StringPtrInput
	// (Updatable) Log analytics entity name.
	Name pulumi.StringPtrInput
	// The Logging Analytics namespace used for the request.
	Namespace pulumi.StringPtrInput
	// (Updatable) The name/value pairs for parameter values to be used in file patterns specified in log sources.
	Properties pulumi.MapInput
	// This indicates the type of source. It is primarily for Enterprise Manager Repository ID.
	SourceId pulumi.StringPtrInput
	// The current state of the log analytics entity.
	State pulumi.StringPtrInput
	// The date and time the resource was created, in the format defined by RFC3339.
	TimeCreated pulumi.StringPtrInput
	// The date and time the resource was last updated, in the format defined by RFC3339.
	TimeUpdated pulumi.StringPtrInput
	// (Updatable) The timezone region of the log analytics entity.
	TimezoneRegion pulumi.StringPtrInput
}

func (LogAnalyticsLogAnalyticsEntityState) ElementType() reflect.Type {
	return reflect.TypeOf((*logAnalyticsLogAnalyticsEntityState)(nil)).Elem()
}

type logAnalyticsLogAnalyticsEntityArgs struct {
	// The OCID of the Cloud resource which this entity is a representation of. This may be blank when the entity represents a non-cloud resource that the customer may have on their premises.
	CloudResourceId *string `pulumi:"cloudResourceId"`
	// (Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
	CompartmentId string `pulumi:"compartmentId"`
	// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
	DefinedTags map[string]interface{} `pulumi:"definedTags"`
	// Log analytics entity type name.
	EntityTypeName string `pulumi:"entityTypeName"`
	// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
	FreeformTags map[string]interface{} `pulumi:"freeformTags"`
	// (Updatable) The hostname where the entity represented here is actually present. This would be the output one would get if they run `echo $HOSTNAME` on Linux or an equivalent OS command. This may be different from management agents host since logs may be collected remotely.
	Hostname *string `pulumi:"hostname"`
	// (Updatable) The OCID of the Management Agent.
	ManagementAgentId *string `pulumi:"managementAgentId"`
	// (Updatable) Log analytics entity name.
	Name *string `pulumi:"name"`
	// The Logging Analytics namespace used for the request.
	Namespace string `pulumi:"namespace"`
	// (Updatable) The name/value pairs for parameter values to be used in file patterns specified in log sources.
	Properties map[string]interface{} `pulumi:"properties"`
	// This indicates the type of source. It is primarily for Enterprise Manager Repository ID.
	SourceId *string `pulumi:"sourceId"`
	// (Updatable) The timezone region of the log analytics entity.
	TimezoneRegion *string `pulumi:"timezoneRegion"`
}

// The set of arguments for constructing a LogAnalyticsLogAnalyticsEntity resource.
type LogAnalyticsLogAnalyticsEntityArgs struct {
	// The OCID of the Cloud resource which this entity is a representation of. This may be blank when the entity represents a non-cloud resource that the customer may have on their premises.
	CloudResourceId pulumi.StringPtrInput
	// (Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
	CompartmentId pulumi.StringInput
	// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
	DefinedTags pulumi.MapInput
	// Log analytics entity type name.
	EntityTypeName pulumi.StringInput
	// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
	FreeformTags pulumi.MapInput
	// (Updatable) The hostname where the entity represented here is actually present. This would be the output one would get if they run `echo $HOSTNAME` on Linux or an equivalent OS command. This may be different from management agents host since logs may be collected remotely.
	Hostname pulumi.StringPtrInput
	// (Updatable) The OCID of the Management Agent.
	ManagementAgentId pulumi.StringPtrInput
	// (Updatable) Log analytics entity name.
	Name pulumi.StringPtrInput
	// The Logging Analytics namespace used for the request.
	Namespace pulumi.StringInput
	// (Updatable) The name/value pairs for parameter values to be used in file patterns specified in log sources.
	Properties pulumi.MapInput
	// This indicates the type of source. It is primarily for Enterprise Manager Repository ID.
	SourceId pulumi.StringPtrInput
	// (Updatable) The timezone region of the log analytics entity.
	TimezoneRegion pulumi.StringPtrInput
}

func (LogAnalyticsLogAnalyticsEntityArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*logAnalyticsLogAnalyticsEntityArgs)(nil)).Elem()
}

type LogAnalyticsLogAnalyticsEntityInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityOutput() LogAnalyticsLogAnalyticsEntityOutput
	ToLogAnalyticsLogAnalyticsEntityOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityOutput
}

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

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityOutput() LogAnalyticsLogAnalyticsEntityOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityOutputWithContext(context.Background())
}

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityOutput)
}

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(context.Background())
}

func (i *LogAnalyticsLogAnalyticsEntity) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityPtrOutput)
}

type LogAnalyticsLogAnalyticsEntityPtrInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput
	ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput
}

type logAnalyticsLogAnalyticsEntityPtrType LogAnalyticsLogAnalyticsEntityArgs

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

func (i *logAnalyticsLogAnalyticsEntityPtrType) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(context.Background())
}

func (i *logAnalyticsLogAnalyticsEntityPtrType) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityPtrOutput)
}

// LogAnalyticsLogAnalyticsEntityArrayInput is an input type that accepts LogAnalyticsLogAnalyticsEntityArray and LogAnalyticsLogAnalyticsEntityArrayOutput values.
// You can construct a concrete instance of `LogAnalyticsLogAnalyticsEntityArrayInput` via:
//
//          LogAnalyticsLogAnalyticsEntityArray{ LogAnalyticsLogAnalyticsEntityArgs{...} }
type LogAnalyticsLogAnalyticsEntityArrayInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityArrayOutput() LogAnalyticsLogAnalyticsEntityArrayOutput
	ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(context.Context) LogAnalyticsLogAnalyticsEntityArrayOutput
}

type LogAnalyticsLogAnalyticsEntityArray []LogAnalyticsLogAnalyticsEntityInput

func (LogAnalyticsLogAnalyticsEntityArray) ElementType() reflect.Type {
	return reflect.TypeOf((*[]*LogAnalyticsLogAnalyticsEntity)(nil)).Elem()
}

func (i LogAnalyticsLogAnalyticsEntityArray) ToLogAnalyticsLogAnalyticsEntityArrayOutput() LogAnalyticsLogAnalyticsEntityArrayOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(context.Background())
}

func (i LogAnalyticsLogAnalyticsEntityArray) ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityArrayOutput)
}

// LogAnalyticsLogAnalyticsEntityMapInput is an input type that accepts LogAnalyticsLogAnalyticsEntityMap and LogAnalyticsLogAnalyticsEntityMapOutput values.
// You can construct a concrete instance of `LogAnalyticsLogAnalyticsEntityMapInput` via:
//
//          LogAnalyticsLogAnalyticsEntityMap{ "key": LogAnalyticsLogAnalyticsEntityArgs{...} }
type LogAnalyticsLogAnalyticsEntityMapInput interface {
	pulumi.Input

	ToLogAnalyticsLogAnalyticsEntityMapOutput() LogAnalyticsLogAnalyticsEntityMapOutput
	ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(context.Context) LogAnalyticsLogAnalyticsEntityMapOutput
}

type LogAnalyticsLogAnalyticsEntityMap map[string]LogAnalyticsLogAnalyticsEntityInput

func (LogAnalyticsLogAnalyticsEntityMap) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]*LogAnalyticsLogAnalyticsEntity)(nil)).Elem()
}

func (i LogAnalyticsLogAnalyticsEntityMap) ToLogAnalyticsLogAnalyticsEntityMapOutput() LogAnalyticsLogAnalyticsEntityMapOutput {
	return i.ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(context.Background())
}

func (i LogAnalyticsLogAnalyticsEntityMap) ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsLogAnalyticsEntityMapOutput)
}

type LogAnalyticsLogAnalyticsEntityOutput struct {
	*pulumi.OutputState
}

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

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityOutput() LogAnalyticsLogAnalyticsEntityOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o.ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(context.Background())
}

func (o LogAnalyticsLogAnalyticsEntityOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o.ApplyT(func(v LogAnalyticsLogAnalyticsEntity) *LogAnalyticsLogAnalyticsEntity {
		return &v
	}).(LogAnalyticsLogAnalyticsEntityPtrOutput)
}

type LogAnalyticsLogAnalyticsEntityPtrOutput struct {
	*pulumi.OutputState
}

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

func (o LogAnalyticsLogAnalyticsEntityPtrOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutput() LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityPtrOutput) ToLogAnalyticsLogAnalyticsEntityPtrOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityPtrOutput {
	return o
}

type LogAnalyticsLogAnalyticsEntityArrayOutput struct{ *pulumi.OutputState }

func (LogAnalyticsLogAnalyticsEntityArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]LogAnalyticsLogAnalyticsEntity)(nil))
}

func (o LogAnalyticsLogAnalyticsEntityArrayOutput) ToLogAnalyticsLogAnalyticsEntityArrayOutput() LogAnalyticsLogAnalyticsEntityArrayOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityArrayOutput) ToLogAnalyticsLogAnalyticsEntityArrayOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityArrayOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityArrayOutput) Index(i pulumi.IntInput) LogAnalyticsLogAnalyticsEntityOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) LogAnalyticsLogAnalyticsEntity {
		return vs[0].([]LogAnalyticsLogAnalyticsEntity)[vs[1].(int)]
	}).(LogAnalyticsLogAnalyticsEntityOutput)
}

type LogAnalyticsLogAnalyticsEntityMapOutput struct{ *pulumi.OutputState }

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

func (o LogAnalyticsLogAnalyticsEntityMapOutput) ToLogAnalyticsLogAnalyticsEntityMapOutput() LogAnalyticsLogAnalyticsEntityMapOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityMapOutput) ToLogAnalyticsLogAnalyticsEntityMapOutputWithContext(ctx context.Context) LogAnalyticsLogAnalyticsEntityMapOutput {
	return o
}

func (o LogAnalyticsLogAnalyticsEntityMapOutput) MapIndex(k pulumi.StringInput) LogAnalyticsLogAnalyticsEntityOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) LogAnalyticsLogAnalyticsEntity {
		return vs[0].(map[string]LogAnalyticsLogAnalyticsEntity)[vs[1].(string)]
	}).(LogAnalyticsLogAnalyticsEntityOutput)
}

func init() {
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityOutput{})
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityPtrOutput{})
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityArrayOutput{})
	pulumi.RegisterOutputType(LogAnalyticsLogAnalyticsEntityMapOutput{})
}
