// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package storage

import (
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// +kubebuilder:rbac:groups=devices.azure.com,resources=iothubs,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=devices.azure.com,resources={iothubs/status,iothubs/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,devices}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Storage version of v1api20210702.IotHub
// Generator information:
// - Generated from: /iothub/resource-manager/Microsoft.Devices/IoTHub/stable/2021-07-02/iothub.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}
type IotHub struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              IotHub_Spec   `json:"spec,omitempty"`
	Status            IotHub_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &IotHub{}

// GetConditions returns the conditions of the resource
func (iotHub *IotHub) GetConditions() conditions.Conditions {
	return iotHub.Status.Conditions
}

// SetConditions sets the conditions on the resource status
func (iotHub *IotHub) SetConditions(conditions conditions.Conditions) {
	iotHub.Status.Conditions = conditions
}

var _ configmaps.Exporter = &IotHub{}

// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property
func (iotHub *IotHub) ConfigMapDestinationExpressions() []*core.DestinationExpression {
	if iotHub.Spec.OperatorSpec == nil {
		return nil
	}
	return iotHub.Spec.OperatorSpec.ConfigMapExpressions
}

var _ secrets.Exporter = &IotHub{}

// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property
func (iotHub *IotHub) SecretDestinationExpressions() []*core.DestinationExpression {
	if iotHub.Spec.OperatorSpec == nil {
		return nil
	}
	return iotHub.Spec.OperatorSpec.SecretExpressions
}

var _ genruntime.KubernetesResource = &IotHub{}

// AzureName returns the Azure name of the resource
func (iotHub *IotHub) AzureName() string {
	return iotHub.Spec.AzureName
}

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-07-02"
func (iotHub IotHub) GetAPIVersion() string {
	return "2021-07-02"
}

// GetResourceScope returns the scope of the resource
func (iotHub *IotHub) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeResourceGroup
}

// GetSpec returns the specification of this resource
func (iotHub *IotHub) GetSpec() genruntime.ConvertibleSpec {
	return &iotHub.Spec
}

// GetStatus returns the status of this resource
func (iotHub *IotHub) GetStatus() genruntime.ConvertibleStatus {
	return &iotHub.Status
}

// GetSupportedOperations returns the operations supported by the resource
func (iotHub *IotHub) GetSupportedOperations() []genruntime.ResourceOperation {
	return []genruntime.ResourceOperation{
		genruntime.ResourceOperationDelete,
		genruntime.ResourceOperationGet,
		genruntime.ResourceOperationPut,
	}
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.Devices/IotHubs"
func (iotHub *IotHub) GetType() string {
	return "Microsoft.Devices/IotHubs"
}

// NewEmptyStatus returns a new empty (blank) status
func (iotHub *IotHub) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &IotHub_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (iotHub *IotHub) Owner() *genruntime.ResourceReference {
	if iotHub.Spec.Owner == nil {
		return nil
	}

	group, kind := genruntime.LookupOwnerGroupKind(iotHub.Spec)
	return iotHub.Spec.Owner.AsResourceReference(group, kind)
}

// SetStatus sets the status of this resource
func (iotHub *IotHub) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*IotHub_STATUS); ok {
		iotHub.Status = *st
		return nil
	}

	// Convert status to required version
	var st IotHub_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.Wrap(err, "failed to convert status")
	}

	iotHub.Status = st
	return nil
}

// Hub marks that this IotHub is the hub type for conversion
func (iotHub *IotHub) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (iotHub *IotHub) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: iotHub.Spec.OriginalVersion,
		Kind:    "IotHub",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20210702.IotHub
// Generator information:
// - Generated from: /iothub/resource-manager/Microsoft.Devices/IoTHub/stable/2021-07-02/iothub.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}
type IotHubList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []IotHub `json:"items"`
}

// Storage version of v1api20210702.APIVersion
// +kubebuilder:validation:Enum={"2021-07-02"}
type APIVersion string

const APIVersion_Value = APIVersion("2021-07-02")

// Storage version of v1api20210702.IotHub_Spec
type IotHub_Spec struct {
	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName       string              `json:"azureName,omitempty"`
	Identity        *ArmIdentity        `json:"identity,omitempty"`
	Location        *string             `json:"location,omitempty"`
	OperatorSpec    *IotHubOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion string              `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner       *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	Properties  *IotHubProperties                  `json:"properties,omitempty"`
	PropertyBag genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	Sku         *IotHubSkuInfo                     `json:"sku,omitempty"`
	Tags        map[string]string                  `json:"tags,omitempty"`
}

var _ genruntime.ConvertibleSpec = &IotHub_Spec{}

// ConvertSpecFrom populates our IotHub_Spec from the provided source
func (iotHub *IotHub_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == iotHub {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(iotHub)
}

// ConvertSpecTo populates the provided destination from our IotHub_Spec
func (iotHub *IotHub_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == iotHub {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(iotHub)
}

// Storage version of v1api20210702.IotHub_STATUS
type IotHub_STATUS struct {
	Conditions  []conditions.Condition   `json:"conditions,omitempty"`
	Etag        *string                  `json:"etag,omitempty"`
	Id          *string                  `json:"id,omitempty"`
	Identity    *ArmIdentity_STATUS      `json:"identity,omitempty"`
	Location    *string                  `json:"location,omitempty"`
	Name        *string                  `json:"name,omitempty"`
	Properties  *IotHubProperties_STATUS `json:"properties,omitempty"`
	PropertyBag genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	Sku         *IotHubSkuInfo_STATUS    `json:"sku,omitempty"`
	SystemData  *SystemData_STATUS       `json:"systemData,omitempty"`
	Tags        map[string]string        `json:"tags,omitempty"`
	Type        *string                  `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &IotHub_STATUS{}

// ConvertStatusFrom populates our IotHub_STATUS from the provided source
func (iotHub *IotHub_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == iotHub {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(iotHub)
}

// ConvertStatusTo populates the provided destination from our IotHub_STATUS
func (iotHub *IotHub_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == iotHub {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(iotHub)
}

// Storage version of v1api20210702.ArmIdentity
type ArmIdentity struct {
	PropertyBag            genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                   *string                       `json:"type,omitempty"`
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20210702.ArmIdentity_STATUS
type ArmIdentity_STATUS struct {
	PrincipalId            *string                           `json:"principalId,omitempty"`
	PropertyBag            genruntime.PropertyBag            `json:"$propertyBag,omitempty"`
	TenantId               *string                           `json:"tenantId,omitempty"`
	Type                   *string                           `json:"type,omitempty"`
	UserAssignedIdentities map[string]ArmUserIdentity_STATUS `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20210702.IotHubOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type IotHubOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression `json:"secretExpressions,omitempty"`
	Secrets              *IotHubOperatorSecrets        `json:"secrets,omitempty"`
}

// Storage version of v1api20210702.IotHubProperties
// The properties of an IoT hub.
type IotHubProperties struct {
	AllowedFqdnList               []string                                 `json:"allowedFqdnList,omitempty"`
	AuthorizationPolicies         []SharedAccessSignatureAuthorizationRule `json:"authorizationPolicies,omitempty"`
	CloudToDevice                 *CloudToDeviceProperties                 `json:"cloudToDevice,omitempty"`
	Comments                      *string                                  `json:"comments,omitempty"`
	DisableDeviceSAS              *bool                                    `json:"disableDeviceSAS,omitempty"`
	DisableLocalAuth              *bool                                    `json:"disableLocalAuth,omitempty"`
	DisableModuleSAS              *bool                                    `json:"disableModuleSAS,omitempty"`
	EnableDataResidency           *bool                                    `json:"enableDataResidency,omitempty"`
	EnableFileUploadNotifications *bool                                    `json:"enableFileUploadNotifications,omitempty"`
	EventHubEndpoints             map[string]EventHubProperties            `json:"eventHubEndpoints,omitempty"`
	Features                      *string                                  `json:"features,omitempty"`
	IpFilterRules                 []IpFilterRule                           `json:"ipFilterRules,omitempty"`
	MessagingEndpoints            map[string]MessagingEndpointProperties   `json:"messagingEndpoints,omitempty"`
	MinTlsVersion                 *string                                  `json:"minTlsVersion,omitempty"`
	NetworkRuleSets               *NetworkRuleSetProperties                `json:"networkRuleSets,omitempty"`
	PropertyBag                   genruntime.PropertyBag                   `json:"$propertyBag,omitempty"`
	PublicNetworkAccess           *string                                  `json:"publicNetworkAccess,omitempty"`
	RestrictOutboundNetworkAccess *bool                                    `json:"restrictOutboundNetworkAccess,omitempty"`
	Routing                       *RoutingProperties                       `json:"routing,omitempty"`
	StorageEndpoints              map[string]StorageEndpointProperties     `json:"storageEndpoints,omitempty"`
}

// Storage version of v1api20210702.IotHubProperties_STATUS
// The properties of an IoT hub.
type IotHubProperties_STATUS struct {
	AllowedFqdnList               []string                                        `json:"allowedFqdnList,omitempty"`
	AuthorizationPolicies         []SharedAccessSignatureAuthorizationRule_STATUS `json:"authorizationPolicies,omitempty"`
	CloudToDevice                 *CloudToDeviceProperties_STATUS                 `json:"cloudToDevice,omitempty"`
	Comments                      *string                                         `json:"comments,omitempty"`
	DisableDeviceSAS              *bool                                           `json:"disableDeviceSAS,omitempty"`
	DisableLocalAuth              *bool                                           `json:"disableLocalAuth,omitempty"`
	DisableModuleSAS              *bool                                           `json:"disableModuleSAS,omitempty"`
	EnableDataResidency           *bool                                           `json:"enableDataResidency,omitempty"`
	EnableFileUploadNotifications *bool                                           `json:"enableFileUploadNotifications,omitempty"`
	EventHubEndpoints             map[string]EventHubProperties_STATUS            `json:"eventHubEndpoints,omitempty"`
	Features                      *string                                         `json:"features,omitempty"`
	HostName                      *string                                         `json:"hostName,omitempty"`
	IpFilterRules                 []IpFilterRule_STATUS                           `json:"ipFilterRules,omitempty"`
	Locations                     []IotHubLocationDescription_STATUS              `json:"locations,omitempty"`
	MessagingEndpoints            map[string]MessagingEndpointProperties_STATUS   `json:"messagingEndpoints,omitempty"`
	MinTlsVersion                 *string                                         `json:"minTlsVersion,omitempty"`
	NetworkRuleSets               *NetworkRuleSetProperties_STATUS                `json:"networkRuleSets,omitempty"`
	PrivateEndpointConnections    []PrivateEndpointConnection_STATUS              `json:"privateEndpointConnections,omitempty"`
	PropertyBag                   genruntime.PropertyBag                          `json:"$propertyBag,omitempty"`
	ProvisioningState             *string                                         `json:"provisioningState,omitempty"`
	PublicNetworkAccess           *string                                         `json:"publicNetworkAccess,omitempty"`
	RestrictOutboundNetworkAccess *bool                                           `json:"restrictOutboundNetworkAccess,omitempty"`
	Routing                       *RoutingProperties_STATUS                       `json:"routing,omitempty"`
	State                         *string                                         `json:"state,omitempty"`
	StorageEndpoints              map[string]StorageEndpointProperties_STATUS     `json:"storageEndpoints,omitempty"`
}

// Storage version of v1api20210702.IotHubSkuInfo
// Information about the SKU of the IoT hub.
type IotHubSkuInfo struct {
	Capacity    *int                   `json:"capacity,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.IotHubSkuInfo_STATUS
// Information about the SKU of the IoT hub.
type IotHubSkuInfo_STATUS struct {
	Capacity    *int                   `json:"capacity,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20210702.SystemData_STATUS
// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	CreatedAt          *string                `json:"createdAt,omitempty"`
	CreatedBy          *string                `json:"createdBy,omitempty"`
	CreatedByType      *string                `json:"createdByType,omitempty"`
	LastModifiedAt     *string                `json:"lastModifiedAt,omitempty"`
	LastModifiedBy     *string                `json:"lastModifiedBy,omitempty"`
	LastModifiedByType *string                `json:"lastModifiedByType,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.ArmUserIdentity_STATUS
type ArmUserIdentity_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PrincipalId *string                `json:"principalId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.CloudToDeviceProperties
// The IoT hub cloud-to-device messaging properties.
type CloudToDeviceProperties struct {
	DefaultTtlAsIso8601 *string                `json:"defaultTtlAsIso8601,omitempty"`
	Feedback            *FeedbackProperties    `json:"feedback,omitempty"`
	MaxDeliveryCount    *int                   `json:"maxDeliveryCount,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.CloudToDeviceProperties_STATUS
// The IoT hub cloud-to-device messaging properties.
type CloudToDeviceProperties_STATUS struct {
	DefaultTtlAsIso8601 *string                    `json:"defaultTtlAsIso8601,omitempty"`
	Feedback            *FeedbackProperties_STATUS `json:"feedback,omitempty"`
	MaxDeliveryCount    *int                       `json:"maxDeliveryCount,omitempty"`
	PropertyBag         genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.EventHubProperties
// The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.
type EventHubProperties struct {
	PartitionCount      *int                   `json:"partitionCount,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RetentionTimeInDays *int                   `json:"retentionTimeInDays,omitempty"`
}

// Storage version of v1api20210702.EventHubProperties_STATUS
// The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.
type EventHubProperties_STATUS struct {
	Endpoint            *string                `json:"endpoint,omitempty"`
	PartitionCount      *int                   `json:"partitionCount,omitempty"`
	PartitionIds        []string               `json:"partitionIds,omitempty"`
	Path                *string                `json:"path,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RetentionTimeInDays *int                   `json:"retentionTimeInDays,omitempty"`
}

// Storage version of v1api20210702.IotHubLocationDescription_STATUS
// Public representation of one of the locations where a resource is provisioned.
type IotHubLocationDescription_STATUS struct {
	Location    *string                `json:"location,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Role        *string                `json:"role,omitempty"`
}

// Storage version of v1api20210702.IotHubOperatorSecrets
type IotHubOperatorSecrets struct {
	DevicePrimaryKey              *genruntime.SecretDestination `json:"devicePrimaryKey,omitempty"`
	DeviceSecondaryKey            *genruntime.SecretDestination `json:"deviceSecondaryKey,omitempty"`
	IotHubOwnerPrimaryKey         *genruntime.SecretDestination `json:"iotHubOwnerPrimaryKey,omitempty"`
	IotHubOwnerSecondaryKey       *genruntime.SecretDestination `json:"iotHubOwnerSecondaryKey,omitempty"`
	PropertyBag                   genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	RegistryReadPrimaryKey        *genruntime.SecretDestination `json:"registryReadPrimaryKey,omitempty"`
	RegistryReadSecondaryKey      *genruntime.SecretDestination `json:"registryReadSecondaryKey,omitempty"`
	RegistryReadWritePrimaryKey   *genruntime.SecretDestination `json:"registryReadWritePrimaryKey,omitempty"`
	RegistryReadWriteSecondaryKey *genruntime.SecretDestination `json:"registryReadWriteSecondaryKey,omitempty"`
	ServicePrimaryKey             *genruntime.SecretDestination `json:"servicePrimaryKey,omitempty"`
	ServiceSecondaryKey           *genruntime.SecretDestination `json:"serviceSecondaryKey,omitempty"`
}

// Storage version of v1api20210702.IpFilterRule
// The IP filter rules for the IoT hub.
type IpFilterRule struct {
	Action      *string                `json:"action,omitempty"`
	FilterName  *string                `json:"filterName,omitempty"`
	IpMask      *string                `json:"ipMask,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.IpFilterRule_STATUS
// The IP filter rules for the IoT hub.
type IpFilterRule_STATUS struct {
	Action      *string                `json:"action,omitempty"`
	FilterName  *string                `json:"filterName,omitempty"`
	IpMask      *string                `json:"ipMask,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.MessagingEndpointProperties
// The properties of the messaging endpoints used by this IoT hub.
type MessagingEndpointProperties struct {
	LockDurationAsIso8601 *string                `json:"lockDurationAsIso8601,omitempty"`
	MaxDeliveryCount      *int                   `json:"maxDeliveryCount,omitempty"`
	PropertyBag           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TtlAsIso8601          *string                `json:"ttlAsIso8601,omitempty"`
}

// Storage version of v1api20210702.MessagingEndpointProperties_STATUS
// The properties of the messaging endpoints used by this IoT hub.
type MessagingEndpointProperties_STATUS struct {
	LockDurationAsIso8601 *string                `json:"lockDurationAsIso8601,omitempty"`
	MaxDeliveryCount      *int                   `json:"maxDeliveryCount,omitempty"`
	PropertyBag           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TtlAsIso8601          *string                `json:"ttlAsIso8601,omitempty"`
}

// Storage version of v1api20210702.NetworkRuleSetProperties
// Network Rule Set Properties of IotHub
type NetworkRuleSetProperties struct {
	ApplyToBuiltInEventHubEndpoint *bool                  `json:"applyToBuiltInEventHubEndpoint,omitempty"`
	DefaultAction                  *string                `json:"defaultAction,omitempty"`
	IpRules                        []NetworkRuleSetIpRule `json:"ipRules,omitempty"`
	PropertyBag                    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.NetworkRuleSetProperties_STATUS
// Network Rule Set Properties of IotHub
type NetworkRuleSetProperties_STATUS struct {
	ApplyToBuiltInEventHubEndpoint *bool                         `json:"applyToBuiltInEventHubEndpoint,omitempty"`
	DefaultAction                  *string                       `json:"defaultAction,omitempty"`
	IpRules                        []NetworkRuleSetIpRule_STATUS `json:"ipRules,omitempty"`
	PropertyBag                    genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.PrivateEndpointConnection_STATUS
// The private endpoint connection of an IotHub
type PrivateEndpointConnection_STATUS struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.RoutingProperties
// The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
type RoutingProperties struct {
	Endpoints     *RoutingEndpoints        `json:"endpoints,omitempty"`
	Enrichments   []EnrichmentProperties   `json:"enrichments,omitempty"`
	FallbackRoute *FallbackRouteProperties `json:"fallbackRoute,omitempty"`
	PropertyBag   genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	Routes        []RouteProperties        `json:"routes,omitempty"`
}

// Storage version of v1api20210702.RoutingProperties_STATUS
// The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
type RoutingProperties_STATUS struct {
	Endpoints     *RoutingEndpoints_STATUS        `json:"endpoints,omitempty"`
	Enrichments   []EnrichmentProperties_STATUS   `json:"enrichments,omitempty"`
	FallbackRoute *FallbackRouteProperties_STATUS `json:"fallbackRoute,omitempty"`
	PropertyBag   genruntime.PropertyBag          `json:"$propertyBag,omitempty"`
	Routes        []RouteProperties_STATUS        `json:"routes,omitempty"`
}

// Storage version of v1api20210702.SharedAccessSignatureAuthorizationRule
// The properties of an IoT hub shared access policy.
type SharedAccessSignatureAuthorizationRule struct {
	KeyName     *string                `json:"keyName,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Rights      *string                `json:"rights,omitempty"`
}

// Storage version of v1api20210702.SharedAccessSignatureAuthorizationRule_STATUS
// The properties of an IoT hub shared access policy.
type SharedAccessSignatureAuthorizationRule_STATUS struct {
	KeyName     *string                `json:"keyName,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Rights      *string                `json:"rights,omitempty"`
}

// Storage version of v1api20210702.StorageEndpointProperties
// The properties of the Azure Storage endpoint for file upload.
type StorageEndpointProperties struct {
	AuthenticationType *string                     `json:"authenticationType,omitempty"`
	ConnectionString   *genruntime.SecretReference `json:"connectionString,omitempty"`
	ContainerName      *string                     `json:"containerName,omitempty"`
	Identity           *ManagedIdentity            `json:"identity,omitempty"`
	PropertyBag        genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	SasTtlAsIso8601    *string                     `json:"sasTtlAsIso8601,omitempty"`
}

// Storage version of v1api20210702.StorageEndpointProperties_STATUS
// The properties of the Azure Storage endpoint for file upload.
type StorageEndpointProperties_STATUS struct {
	AuthenticationType *string                 `json:"authenticationType,omitempty"`
	ContainerName      *string                 `json:"containerName,omitempty"`
	Identity           *ManagedIdentity_STATUS `json:"identity,omitempty"`
	PropertyBag        genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	SasTtlAsIso8601    *string                 `json:"sasTtlAsIso8601,omitempty"`
}

// Storage version of v1api20210702.UserAssignedIdentityDetails
// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	PropertyBag genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	Reference   genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// Storage version of v1api20210702.EnrichmentProperties
// The properties of an enrichment that your IoT hub applies to messages delivered to endpoints.
type EnrichmentProperties struct {
	EndpointNames []string               `json:"endpointNames,omitempty"`
	Key           *string                `json:"key,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value         *string                `json:"value,omitempty"`
}

// Storage version of v1api20210702.EnrichmentProperties_STATUS
// The properties of an enrichment that your IoT hub applies to messages delivered to endpoints.
type EnrichmentProperties_STATUS struct {
	EndpointNames []string               `json:"endpointNames,omitempty"`
	Key           *string                `json:"key,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value         *string                `json:"value,omitempty"`
}

// Storage version of v1api20210702.FallbackRouteProperties
// The properties of the fallback route. IoT Hub uses these properties when it routes messages to the fallback endpoint.
type FallbackRouteProperties struct {
	Condition     *string                `json:"condition,omitempty"`
	EndpointNames []string               `json:"endpointNames,omitempty"`
	IsEnabled     *bool                  `json:"isEnabled,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Source        *string                `json:"source,omitempty"`
}

// Storage version of v1api20210702.FallbackRouteProperties_STATUS
// The properties of the fallback route. IoT Hub uses these properties when it routes messages to the fallback endpoint.
type FallbackRouteProperties_STATUS struct {
	Condition     *string                `json:"condition,omitempty"`
	EndpointNames []string               `json:"endpointNames,omitempty"`
	IsEnabled     *bool                  `json:"isEnabled,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Source        *string                `json:"source,omitempty"`
}

// Storage version of v1api20210702.FeedbackProperties
// The properties of the feedback queue for cloud-to-device messages.
type FeedbackProperties struct {
	LockDurationAsIso8601 *string                `json:"lockDurationAsIso8601,omitempty"`
	MaxDeliveryCount      *int                   `json:"maxDeliveryCount,omitempty"`
	PropertyBag           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TtlAsIso8601          *string                `json:"ttlAsIso8601,omitempty"`
}

// Storage version of v1api20210702.FeedbackProperties_STATUS
// The properties of the feedback queue for cloud-to-device messages.
type FeedbackProperties_STATUS struct {
	LockDurationAsIso8601 *string                `json:"lockDurationAsIso8601,omitempty"`
	MaxDeliveryCount      *int                   `json:"maxDeliveryCount,omitempty"`
	PropertyBag           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TtlAsIso8601          *string                `json:"ttlAsIso8601,omitempty"`
}

// Storage version of v1api20210702.ManagedIdentity
// The properties of the Managed identity.
type ManagedIdentity struct {
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UserAssignedIdentity *string                `json:"userAssignedIdentity,omitempty"`
}

// Storage version of v1api20210702.ManagedIdentity_STATUS
// The properties of the Managed identity.
type ManagedIdentity_STATUS struct {
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UserAssignedIdentity *string                `json:"userAssignedIdentity,omitempty"`
}

// Storage version of v1api20210702.NetworkRuleSetIpRule
// IP Rule to be applied as part of Network Rule Set
type NetworkRuleSetIpRule struct {
	Action      *string                `json:"action,omitempty"`
	FilterName  *string                `json:"filterName,omitempty"`
	IpMask      *string                `json:"ipMask,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.NetworkRuleSetIpRule_STATUS
// IP Rule to be applied as part of Network Rule Set
type NetworkRuleSetIpRule_STATUS struct {
	Action      *string                `json:"action,omitempty"`
	FilterName  *string                `json:"filterName,omitempty"`
	IpMask      *string                `json:"ipMask,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20210702.RouteProperties
// The properties of a routing rule that your IoT hub uses to route messages to endpoints.
type RouteProperties struct {
	Condition     *string                `json:"condition,omitempty"`
	EndpointNames []string               `json:"endpointNames,omitempty"`
	IsEnabled     *bool                  `json:"isEnabled,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Source        *string                `json:"source,omitempty"`
}

// Storage version of v1api20210702.RouteProperties_STATUS
// The properties of a routing rule that your IoT hub uses to route messages to endpoints.
type RouteProperties_STATUS struct {
	Condition     *string                `json:"condition,omitempty"`
	EndpointNames []string               `json:"endpointNames,omitempty"`
	IsEnabled     *bool                  `json:"isEnabled,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Source        *string                `json:"source,omitempty"`
}

// Storage version of v1api20210702.RoutingEndpoints
// The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A
// maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed
// across all endpoint types for free hubs.
type RoutingEndpoints struct {
	EventHubs         []RoutingEventHubProperties                `json:"eventHubs,omitempty"`
	PropertyBag       genruntime.PropertyBag                     `json:"$propertyBag,omitempty"`
	ServiceBusQueues  []RoutingServiceBusQueueEndpointProperties `json:"serviceBusQueues,omitempty"`
	ServiceBusTopics  []RoutingServiceBusTopicEndpointProperties `json:"serviceBusTopics,omitempty"`
	StorageContainers []RoutingStorageContainerProperties        `json:"storageContainers,omitempty"`
}

// Storage version of v1api20210702.RoutingEndpoints_STATUS
// The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A
// maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed
// across all endpoint types for free hubs.
type RoutingEndpoints_STATUS struct {
	EventHubs         []RoutingEventHubProperties_STATUS                `json:"eventHubs,omitempty"`
	PropertyBag       genruntime.PropertyBag                            `json:"$propertyBag,omitempty"`
	ServiceBusQueues  []RoutingServiceBusQueueEndpointProperties_STATUS `json:"serviceBusQueues,omitempty"`
	ServiceBusTopics  []RoutingServiceBusTopicEndpointProperties_STATUS `json:"serviceBusTopics,omitempty"`
	StorageContainers []RoutingStorageContainerProperties_STATUS        `json:"storageContainers,omitempty"`
}

// Storage version of v1api20210702.RoutingEventHubProperties
// The properties related to an event hub endpoint.
type RoutingEventHubProperties struct {
	AuthenticationType *string                     `json:"authenticationType,omitempty"`
	ConnectionString   *genruntime.SecretReference `json:"connectionString,omitempty"`
	EndpointUri        *string                     `json:"endpointUri,omitempty"`
	EntityPath         *string                     `json:"entityPath,omitempty"`
	Identity           *ManagedIdentity            `json:"identity,omitempty"`
	Name               *string                     `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag      `json:"$propertyBag,omitempty"`

	// Reference: Id of the event hub endpoint
	Reference      *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	ResourceGroup  *string                       `json:"resourceGroup,omitempty"`
	SubscriptionId *string                       `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingEventHubProperties_STATUS
// The properties related to an event hub endpoint.
type RoutingEventHubProperties_STATUS struct {
	AuthenticationType *string                 `json:"authenticationType,omitempty"`
	EndpointUri        *string                 `json:"endpointUri,omitempty"`
	EntityPath         *string                 `json:"entityPath,omitempty"`
	Id                 *string                 `json:"id,omitempty"`
	Identity           *ManagedIdentity_STATUS `json:"identity,omitempty"`
	Name               *string                 `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	ResourceGroup      *string                 `json:"resourceGroup,omitempty"`
	SubscriptionId     *string                 `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingServiceBusQueueEndpointProperties
// The properties related to service bus queue endpoint types.
type RoutingServiceBusQueueEndpointProperties struct {
	AuthenticationType *string                     `json:"authenticationType,omitempty"`
	ConnectionString   *genruntime.SecretReference `json:"connectionString,omitempty"`
	EndpointUri        *string                     `json:"endpointUri,omitempty"`
	EntityPath         *string                     `json:"entityPath,omitempty"`
	Identity           *ManagedIdentity            `json:"identity,omitempty"`
	Name               *string                     `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag      `json:"$propertyBag,omitempty"`

	// Reference: Id of the service bus queue endpoint
	Reference      *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	ResourceGroup  *string                       `json:"resourceGroup,omitempty"`
	SubscriptionId *string                       `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingServiceBusQueueEndpointProperties_STATUS
// The properties related to service bus queue endpoint types.
type RoutingServiceBusQueueEndpointProperties_STATUS struct {
	AuthenticationType *string                 `json:"authenticationType,omitempty"`
	EndpointUri        *string                 `json:"endpointUri,omitempty"`
	EntityPath         *string                 `json:"entityPath,omitempty"`
	Id                 *string                 `json:"id,omitempty"`
	Identity           *ManagedIdentity_STATUS `json:"identity,omitempty"`
	Name               *string                 `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	ResourceGroup      *string                 `json:"resourceGroup,omitempty"`
	SubscriptionId     *string                 `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingServiceBusTopicEndpointProperties
// The properties related to service bus topic endpoint types.
type RoutingServiceBusTopicEndpointProperties struct {
	AuthenticationType *string                     `json:"authenticationType,omitempty"`
	ConnectionString   *genruntime.SecretReference `json:"connectionString,omitempty"`
	EndpointUri        *string                     `json:"endpointUri,omitempty"`
	EntityPath         *string                     `json:"entityPath,omitempty"`
	Identity           *ManagedIdentity            `json:"identity,omitempty"`
	Name               *string                     `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag      `json:"$propertyBag,omitempty"`

	// Reference: Id of the service bus topic endpoint
	Reference      *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	ResourceGroup  *string                       `json:"resourceGroup,omitempty"`
	SubscriptionId *string                       `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingServiceBusTopicEndpointProperties_STATUS
// The properties related to service bus topic endpoint types.
type RoutingServiceBusTopicEndpointProperties_STATUS struct {
	AuthenticationType *string                 `json:"authenticationType,omitempty"`
	EndpointUri        *string                 `json:"endpointUri,omitempty"`
	EntityPath         *string                 `json:"entityPath,omitempty"`
	Id                 *string                 `json:"id,omitempty"`
	Identity           *ManagedIdentity_STATUS `json:"identity,omitempty"`
	Name               *string                 `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	ResourceGroup      *string                 `json:"resourceGroup,omitempty"`
	SubscriptionId     *string                 `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingStorageContainerProperties
// The properties related to a storage container endpoint.
type RoutingStorageContainerProperties struct {
	AuthenticationType      *string                     `json:"authenticationType,omitempty"`
	BatchFrequencyInSeconds *int                        `json:"batchFrequencyInSeconds,omitempty"`
	ConnectionString        *genruntime.SecretReference `json:"connectionString,omitempty"`
	ContainerName           *string                     `json:"containerName,omitempty"`
	Encoding                *string                     `json:"encoding,omitempty"`
	EndpointUri             *string                     `json:"endpointUri,omitempty"`
	FileNameFormat          *string                     `json:"fileNameFormat,omitempty"`
	Identity                *ManagedIdentity            `json:"identity,omitempty"`
	MaxChunkSizeInBytes     *int                        `json:"maxChunkSizeInBytes,omitempty"`
	Name                    *string                     `json:"name,omitempty"`
	PropertyBag             genruntime.PropertyBag      `json:"$propertyBag,omitempty"`

	// Reference: Id of the storage container endpoint
	Reference      *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	ResourceGroup  *string                       `json:"resourceGroup,omitempty"`
	SubscriptionId *string                       `json:"subscriptionId,omitempty"`
}

// Storage version of v1api20210702.RoutingStorageContainerProperties_STATUS
// The properties related to a storage container endpoint.
type RoutingStorageContainerProperties_STATUS struct {
	AuthenticationType      *string                 `json:"authenticationType,omitempty"`
	BatchFrequencyInSeconds *int                    `json:"batchFrequencyInSeconds,omitempty"`
	ContainerName           *string                 `json:"containerName,omitempty"`
	Encoding                *string                 `json:"encoding,omitempty"`
	EndpointUri             *string                 `json:"endpointUri,omitempty"`
	FileNameFormat          *string                 `json:"fileNameFormat,omitempty"`
	Id                      *string                 `json:"id,omitempty"`
	Identity                *ManagedIdentity_STATUS `json:"identity,omitempty"`
	MaxChunkSizeInBytes     *int                    `json:"maxChunkSizeInBytes,omitempty"`
	Name                    *string                 `json:"name,omitempty"`
	PropertyBag             genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	ResourceGroup           *string                 `json:"resourceGroup,omitempty"`
	SubscriptionId          *string                 `json:"subscriptionId,omitempty"`
}

func init() {
	SchemeBuilder.Register(&IotHub{}, &IotHubList{})
}
