// Code generated by protoc-gen-policy. DO NOT EDIT.
// source: external/ingest/job_scheduler.proto

package ingest

import (
	policy "github.com/chef/automate/api/external/iam/v2/policy"
	request "github.com/chef/automate/api/external/ingest/request"
)

func init() {
	policy.MapMethodTo("/chef.automate.api.ingest.JobScheduler/GetStatusJobScheduler", "retention:nodes", "retention:nodes:get", "GET", "/api/v0/retention/nodes/status", func(unexpandedResource string, input interface{}) string {
		return unexpandedResource
	})
	policy.MapMethodTo("/chef.automate.api.ingest.JobScheduler/ConfigureNodesMissingScheduler", "retention:nodes", "retention:nodes:update", "POST", "/api/v0/retention/nodes/missing-nodes/config", func(unexpandedResource string, input interface{}) string {
		if m, ok := input.(*request.SchedulerConfig); ok {
			return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
				switch want {
				case "every":
					return m.Every
				case "threshold":
					return m.Threshold
				default:
					return ""
				}
			})
		}
		return ""
	})
	policy.MapMethodTo("/chef.automate.api.ingest.JobScheduler/ConfigureDeleteNodesScheduler", "retention:nodes", "retention:nodes:update", "POST", "/api/v0/retention/nodes/delete-nodes/config", func(unexpandedResource string, input interface{}) string {
		if m, ok := input.(*request.SchedulerConfig); ok {
			return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
				switch want {
				case "every":
					return m.Every
				case "threshold":
					return m.Threshold
				default:
					return ""
				}
			})
		}
		return ""
	})
	policy.MapMethodTo("/chef.automate.api.ingest.JobScheduler/ConfigureMissingNodesForDeletionScheduler", "retention:nodes", "retention:nodes:update", "POST", "/api/v0/retention/nodes/missing-nodes-deletion/config", func(unexpandedResource string, input interface{}) string {
		if m, ok := input.(*request.SchedulerConfig); ok {
			return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
				switch want {
				case "every":
					return m.Every
				case "threshold":
					return m.Threshold
				default:
					return ""
				}
			})
		}
		return ""
	})
}
