// 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) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

package armextensions

import "time"

// ErrorAdditionalInfo - The resource management error additional info.
type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

// ErrorDetail - The error detail.
type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

// Extension - The Extension object.
type Extension struct {
	// Identity of the Extension resource
	Identity *Identity

	// The plan information.
	Plan *Plan

	// Properties of an Extension resource
	Properties *ExtensionProperties

	// 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; Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources
	SystemData *SystemData

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

// ExtensionProperties - Properties of an Extension resource
type ExtensionProperties struct {
	// Identity of the Extension resource in an AKS cluster
	AksAssignedIdentity *ExtensionPropertiesAksAssignedIdentity

	// Flag to note if this extension participates in auto upgrade of minor version, or not.
	AutoUpgradeMinorVersion *bool

	// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
	ConfigurationProtectedSettings map[string]*string

	// Configuration settings, as name-value pairs for configuring this extension.
	ConfigurationSettings map[string]*string

	// Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with
	// Microsoft.KubernetesConfiguration by the Extension publisher.
	ExtensionType *string

	// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion
	// is 'true'.
	ReleaseTrain *string

	// Scope at which the extension is installed.
	Scope *Scope

	// Status from this extension.
	Statuses []*ExtensionStatus

	// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be
	// 'false'.
	Version *string

	// READ-ONLY; Currently installed version of the extension.
	CurrentVersion *string

	// READ-ONLY; Custom Location settings properties.
	CustomLocationSettings map[string]*string

	// READ-ONLY; Error information from the Agent - e.g. errors during installation.
	ErrorInfo *ErrorDetail

	// READ-ONLY; Flag to note if this extension is a system extension
	IsSystemExtension *bool

	// READ-ONLY; Uri of the Helm package
	PackageURI *string

	// READ-ONLY; Status of installation of this extension.
	ProvisioningState *ProvisioningState
}

// ExtensionPropertiesAksAssignedIdentity - Identity of the Extension resource in an AKS cluster
type ExtensionPropertiesAksAssignedIdentity struct {
	// The identity type.
	Type *AKSIdentityType

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

// ExtensionStatus - Status from the extension.
type ExtensionStatus struct {
	// Status code provided by the Extension
	Code *string

	// Short description of status of the extension.
	DisplayStatus *string

	// Level of the status.
	Level *LevelType

	// Detailed message of the status from the Extension.
	Message *string

	// DateLiteral (per ISO8601) noting the time of installation status.
	Time *string
}

// Identity for the resource.
type Identity struct {
	// CONSTANT; The identity type.
	// Field has constant value "SystemAssigned", any specified value is ignored.
	Type *string

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

// List - Result of the request to list Extensions. It contains a list of Extension objects and a URL link to get the next
// set of results.
type List struct {
	// READ-ONLY; URL to get the next set of extension objects, if any.
	NextLink *string

	// READ-ONLY; List of Extensions within a Kubernetes cluster.
	Value []*Extension
}

// OperationStatusResult - The current status of an async operation.
type OperationStatusResult struct {
	// REQUIRED; Operation status.
	Status *string

	// Fully qualified ID for the async operation.
	ID *string

	// Name of the async operation.
	Name *string

	// Additional information, if available.
	Properties map[string]*string

	// READ-ONLY; If present, details of the operation error.
	Error *ErrorDetail
}

// PatchExtension - The Extension Patch Request object.
type PatchExtension struct {
	// Updatable properties of an Extension Patch Request
	Properties *PatchExtensionProperties
}

// PatchExtensionProperties - Updatable properties of an Extension Patch Request
type PatchExtensionProperties struct {
	// Flag to note if this extension participates in auto upgrade of minor version, or not.
	AutoUpgradeMinorVersion *bool

	// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
	ConfigurationProtectedSettings map[string]*string

	// Configuration settings, as name-value pairs for configuring this extension.
	ConfigurationSettings map[string]*string

	// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion
	// is 'true'.
	ReleaseTrain *string

	// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.
	Version *string
}

// Plan for the resource.
type Plan struct {
	// REQUIRED; A user defined name of the 3rd Party Artifact that is being procured.
	Name *string

	// REQUIRED; The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact
	// at the time of Data Market onboarding.
	Product *string

	// REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic
	Publisher *string

	// A publisher provided promotion code as provisioned in Data Market for the said product/artifact.
	PromotionCode *string

	// The version of the desired product/artifact.
	Version *string
}

// Scope of the extension. It can be either Cluster or Namespace; but not both.
type Scope struct {
	// Specifies that the scope of the extension is Cluster
	Cluster *ScopeCluster

	// Specifies that the scope of the extension is Namespace
	Namespace *ScopeNamespace
}

// ScopeCluster - Specifies that the scope of the extension is Cluster
type ScopeCluster struct {
	// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist,
	// it will be created
	ReleaseNamespace *string
}

// ScopeNamespace - Specifies that the scope of the extension is Namespace
type ScopeNamespace struct {
	// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will
	// be created
	TargetNamespace *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
}
