// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.

package armimpactreporting

import "time"

// ClientIncidentDetails - Client incident details ex: incidentId , incident source
type ClientIncidentDetails struct {
	// Client incident id. ex : id of the incident created to investigate and address the impact if any.
	ClientIncidentID *string

	// Client incident source. ex : source system name where the incident is created
	ClientIncidentSource *IncidentSource
}

// Connectivity - Details about connectivity issue. Applicable when root resource causing the issue is not identified. For
// example, when a VM is impacted due to a network issue, the impacted resource could be VM or the network. In such cases,
// the connectivity field will have the details about both VM and network.
type Connectivity struct {
	// Port number for the connection
	Port *int32

	// Protocol used for the connection
	Protocol *Protocol

	// Source from which the connection was attempted
	Source *SourceOrTarget

	// target which connection was attempted
	Target *SourceOrTarget
}

// Connector - A connector is a resource that can be used to proactively report impacts against workloads in Azure to Microsoft.
type Connector struct {
	// The resource-specific properties for this resource.
	Properties *ConnectorProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

// ConnectorListResult - The response of a Connector list operation.
type ConnectorListResult struct {
	// REQUIRED; The Connector items on this page
	Value []*Connector

	// The link to the next page of items
	NextLink *string
}

// ConnectorProperties - Details of the Connector.
type ConnectorProperties struct {
	// REQUIRED; connector type
	ConnectorType *Platform

	// READ-ONLY; unique id of the connector.
	ConnectorID *string

	// READ-ONLY; last run time stamp of this connector in UTC time zone
	LastRunTimeStamp *time.Time

	// READ-ONLY; tenant id of this connector
	TenantID *string

	// READ-ONLY; Resource provisioning state.
	ProvisioningState *ProvisioningState
}

// ConnectorUpdate - The type used for update operations of the Connector.
type ConnectorUpdate struct {
	// The resource-specific properties for this resource.
	Properties *ConnectorUpdateProperties
}

// ConnectorUpdateProperties - The updatable properties of the Connector.
type ConnectorUpdateProperties struct {
	// connector type
	ConnectorType *Platform
}

// Content - Article details of the insight like title, description etc
type Content struct {
	// REQUIRED; Description of the insight
	Description *string

	// REQUIRED; Title of the insight
	Title *string
}

// ErrorDetailProperties - ARM error code and error message associated with the impact
type ErrorDetailProperties struct {
	// ARM Error code associated with the impact.
	ErrorCode *string

	// ARM Error Message associated with the impact
	ErrorMessage *string
}

// ExpectedValueRange - Max and Min Threshold values for the metric
type ExpectedValueRange struct {
	// REQUIRED; Max threshold value for the metric
	Max *float64

	// REQUIRED; Min threshold value for the metric
	Min *float64
}

// ImpactCategory resource
type ImpactCategory struct {
	// The resource-specific properties for this resource.
	Properties *ImpactCategoryProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

// ImpactCategoryListResult - The response of a ImpactCategory list operation.
type ImpactCategoryListResult struct {
	// REQUIRED; The ImpactCategory items on this page
	Value []*ImpactCategory

	// The link to the next page of items
	NextLink *string
}

// ImpactCategoryProperties - Impact category properties.
type ImpactCategoryProperties struct {
	// REQUIRED; Unique ID of the category
	CategoryID *string

	// Description of the category
	Description *string

	// Unique ID of the parent category
	ParentCategoryID *string

	// The workloadImpact properties which are required when reporting with the impact category
	RequiredImpactProperties []*RequiredImpactProperties

	// READ-ONLY; Resource provisioning state.
	ProvisioningState *ProvisioningState
}

// ImpactDetails - details of of the impact for which insight has been generated.
type ImpactDetails struct {
	// REQUIRED; Azure Id of the impact.
	ImpactID *string

	// REQUIRED; List of impacted Azure resources.
	ImpactedResourceID *string

	// REQUIRED; Time at which impact was started according to reported impact.
	StartTime *time.Time

	// Time at which impact was ended according to reported impact.
	EndTime *time.Time
}

// Insight resource
type Insight struct {
	// The resource-specific properties for this resource.
	Properties *InsightProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

// InsightListResult - The response of a Insight list operation.
type InsightListResult struct {
	// REQUIRED; The Insight items on this page
	Value []*Insight

	// The link to the next page of items
	NextLink *string
}

// InsightProperties - Impact category properties.
type InsightProperties struct {
	// REQUIRED; category of the insight.
	Category *string

	// REQUIRED; Contains title & description for the insight
	Content *Content

	// REQUIRED; details of of the impact for which insight has been generated.
	Impact *ImpactDetails

	// REQUIRED; unique id of the insight.
	InsightUniqueID *string

	// additional details of the insight.
	AdditionalDetails *InsightPropertiesAdditionalDetails

	// Identifier of the event that has been correlated with this insight. This can be used to aggregate insights for the same
	// event.
	EventID *string

	// Time of the event, which has been correlated the impact.
	EventTime *time.Time

	// Identifier that can be used to group similar insights.
	GroupID *string

	// status of the insight. example resolved, repaired, other.
	Status *string

	// READ-ONLY; Resource provisioning state.
	ProvisioningState *ProvisioningState
}

type InsightPropertiesAdditionalDetails struct {
}

// Operation - REST API Operation
//
// Details of a REST API operation, returned from the Resource Provider Operations API
type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
	// Resource Manager/control-plane operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

// OperationDisplay - Localized display information for an operation.
type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

// OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to
// get the next set of results.
type OperationListResult struct {
	// REQUIRED; The Operation items on this page
	Value []*Operation

	// The link to the next page of items
	NextLink *string
}

// Performance - Details about impacted performance metrics. Applicable for performance related impact
type Performance struct {
	// Observed value for the metric
	Actual *float64

	// Threshold value for the metric
	Expected *float64

	// Max and Min Threshold values for the metric
	ExpectedValueRange *ExpectedValueRange

	// Name of the Metric examples: Disk, IOPs, CPU, GPU, Memory, details can be found from /impactCategories API
	MetricName *string

	// Unit of the metric ex: Bytes, Percentage, Count, Seconds, Milliseconds, Bytes/Second, Count/Second, etc.., Other
	Unit *MetricUnit
}

// RequiredImpactProperties - Required impact properties
type RequiredImpactProperties struct {
	// REQUIRED; Name of the property
	Name *string

	// Allowed values values for the property
	AllowedValues []*string
}

// SourceOrTarget - Resource details
type SourceOrTarget struct {
	// Azure resource id, example /subscription/{subscription}/resourceGroup/{rg}/Microsoft.compute/virtualMachine/{vmName}
	AzureResourceID *string
}

// SystemData - Metadata pertaining to creation and last modification of the resource.
type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

// Workload - Information about the impacted workload
type Workload struct {
	// the scenario for the workload
	Context *string

	// Tool used to interact with Azure. SDK, AzPortal, etc.., Other
	Toolset *Toolset
}

// WorkloadImpact - Workload Impact properties
type WorkloadImpact struct {
	// The resource-specific properties for this resource.
	Properties *WorkloadImpactProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

// WorkloadImpactListResult - The response of a WorkloadImpact list operation.
type WorkloadImpactListResult struct {
	// REQUIRED; The WorkloadImpact items on this page
	Value []*WorkloadImpact

	// The link to the next page of items
	NextLink *string
}

// WorkloadImpactProperties - Workload impact properties
type WorkloadImpactProperties struct {
	// REQUIRED; Category of the impact, details can found from /impactCategories API
	ImpactCategory *string

	// REQUIRED; Azure resource id of the impacted resource
	ImpactedResourceID *string

	// REQUIRED; Time at which impact was observed
	StartDateTime *time.Time

	// Additional fields related to impact, applicable fields per resource type are list under /impactCategories API
	AdditionalProperties map[string]any

	// The ARM correlation ids, this is important field for control plane related impacts
	ArmCorrelationIDs []*string

	// Client incident details ex: incidentId , incident source
	ClientIncidentDetails *ClientIncidentDetails

	// Degree of confidence on the impact being a platform issue
	ConfidenceLevel *ConfidenceLevel

	// Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when
	// a VM is impacted due to a network issue, the impacted resource is identified as the VM, but the root cause is the network.
	// In such cases, the connectivity field will have the details about the network issue
	Connectivity *Connectivity

	// Time at which impact has ended
	EndDateTime *time.Time

	// ARM error code and error message associated with the impact
	ErrorDetails *ErrorDetailProperties

	// A detailed description of the impact
	ImpactDescription *string

	// Use this field to group impacts
	ImpactGroupID *string

	// Details about performance issue. Applicable for performance impacts.
	Performance []*Performance

	// Information about the impacted workload
	Workload *Workload

	// READ-ONLY; Unique ID of the impact (UUID)
	ImpactUniqueID *string

	// READ-ONLY; Resource provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Time at which impact is reported
	ReportedTimeUTC *time.Time
}
