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

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type RouteTablesRoute_Spec struct {
	// Name: The name of the resource that is unique within a resource group. This name can be used to access the resource.
	Name string `json:"name,omitempty"`

	// Properties: Properties of the route.
	Properties *RoutePropertiesFormat `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &RouteTablesRoute_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-03-01"
func (route RouteTablesRoute_Spec) GetAPIVersion() string {
	return "2024-03-01"
}

// GetName returns the Name of the resource
func (route *RouteTablesRoute_Spec) GetName() string {
	return route.Name
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/routeTables/routes"
func (route *RouteTablesRoute_Spec) GetType() string {
	return "Microsoft.Network/routeTables/routes"
}

// Route resource.
type RoutePropertiesFormat struct {
	// AddressPrefix: The destination CIDR to which the route applies.
	AddressPrefix *string `json:"addressPrefix,omitempty"`

	// NextHopIpAddress: The IP address packets should be forwarded to. Next hop values are only allowed in routes where the
	// next hop type is VirtualAppliance.
	NextHopIpAddress *string `json:"nextHopIpAddress,omitempty"`

	// NextHopType: The type of Azure hop the packet should be sent to.
	NextHopType *RouteNextHopType `json:"nextHopType,omitempty"`
}

// The type of Azure hop the packet should be sent to.
// +kubebuilder:validation:Enum={"Internet","None","VirtualAppliance","VirtualNetworkGateway","VnetLocal"}
type RouteNextHopType string

const (
	RouteNextHopType_Internet              = RouteNextHopType("Internet")
	RouteNextHopType_None                  = RouteNextHopType("None")
	RouteNextHopType_VirtualAppliance      = RouteNextHopType("VirtualAppliance")
	RouteNextHopType_VirtualNetworkGateway = RouteNextHopType("VirtualNetworkGateway")
	RouteNextHopType_VnetLocal             = RouteNextHopType("VnetLocal")
)

// Mapping from string to RouteNextHopType
var routeNextHopType_Values = map[string]RouteNextHopType{
	"internet":              RouteNextHopType_Internet,
	"none":                  RouteNextHopType_None,
	"virtualappliance":      RouteNextHopType_VirtualAppliance,
	"virtualnetworkgateway": RouteNextHopType_VirtualNetworkGateway,
	"vnetlocal":             RouteNextHopType_VnetLocal,
}
