// 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 RedisPatchSchedule_Spec struct {
	Name string `json:"name,omitempty"`

	// Properties: List of patch schedules for a Redis cache.
	Properties *ScheduleEntries `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &RedisPatchSchedule_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Cache/redis/patchSchedules"
func (schedule *RedisPatchSchedule_Spec) GetType() string {
	return "Microsoft.Cache/redis/patchSchedules"
}

// List of patch schedules for a Redis cache.
type ScheduleEntries struct {
	// ScheduleEntries: List of patch schedules for a Redis cache.
	ScheduleEntries []ScheduleEntry `json:"scheduleEntries,omitempty"`
}

// Patch schedule entry for a Premium Redis Cache.
type ScheduleEntry struct {
	// DayOfWeek: Day of the week when a cache can be patched.
	DayOfWeek *DayOfWeek `json:"dayOfWeek,omitempty"`

	// MaintenanceWindow: ISO8601 timespan specifying how much time cache patching can take.
	MaintenanceWindow *string `json:"maintenanceWindow,omitempty"`

	// StartHourUtc: Start hour after which cache patching can start.
	StartHourUtc *int `json:"startHourUtc,omitempty"`
}

// Day of the week when a cache can be patched.
// +kubebuilder:validation:Enum={"Everyday","Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday","Weekend"}
type DayOfWeek string

const (
	DayOfWeek_Everyday  = DayOfWeek("Everyday")
	DayOfWeek_Friday    = DayOfWeek("Friday")
	DayOfWeek_Monday    = DayOfWeek("Monday")
	DayOfWeek_Saturday  = DayOfWeek("Saturday")
	DayOfWeek_Sunday    = DayOfWeek("Sunday")
	DayOfWeek_Thursday  = DayOfWeek("Thursday")
	DayOfWeek_Tuesday   = DayOfWeek("Tuesday")
	DayOfWeek_Wednesday = DayOfWeek("Wednesday")
	DayOfWeek_Weekend   = DayOfWeek("Weekend")
)

// Mapping from string to DayOfWeek
var dayOfWeek_Values = map[string]DayOfWeek{
	"everyday":  DayOfWeek_Everyday,
	"friday":    DayOfWeek_Friday,
	"monday":    DayOfWeek_Monday,
	"saturday":  DayOfWeek_Saturday,
	"sunday":    DayOfWeek_Sunday,
	"thursday":  DayOfWeek_Thursday,
	"tuesday":   DayOfWeek_Tuesday,
	"wednesday": DayOfWeek_Wednesday,
	"weekend":   DayOfWeek_Weekend,
}
