// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.19.0
// source: external/iam/v2/rules.proto

package v2

import (
	context "context"
	_ "github.com/chef/automate/api/external/annotations/iam"
	request "github.com/chef/automate/api/external/iam/v2/request"
	response "github.com/chef/automate/api/external/iam/v2/response"
	_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

var File_external_iam_v2_rules_proto protoreflect.FileDescriptor

const file_external_iam_v2_rules_proto_rawDesc = "" +
	"\n" +
	"\x1bexternal/iam/v2/rules.proto\x12\x18chef.automate.api.iam.v2\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\x1a#external/iam/v2/request/rules.proto\x1a$external/iam/v2/response/rules.proto\x1a*external/annotations/iam/annotations.proto2\x86\x11\n" +
	"\x05Rules\x12\xe5\x03\n" +
	"\n" +
	"CreateRule\x12'.chef.automate.api.iam.v2.CreateRuleReq\x1a(.chef.automate.api.iam.v2.CreateRuleResp\"\x83\x03\x92A\x98\x02\n" +
	"\x05rulesj\x8e\x02\n" +
	"\x0ex-code-samples\x12\xfb\x012\xf8\x01\n" +
	"\xf5\x01*\xf2\x01\n" +
	"\x0e\n" +
	"\x04lang\x12\x06\x1a\x04JSON\n" +
	"\xdf\x01\n" +
	"\x06source\x12\xd4\x01\x1a\xd1\x01{\"id\": \"example-rule\", \"project-id\": \"example-project\", \"name\": \"My Example Rule\", \"type\": \"NODE\", \"conditions\": [{\"attribute\": \"CHEF_SERVER\", \"operator\": \"MEMBER_OF\", \"values\": [\"example.co\", \"example.io\"]}]}\x8a\xb5\x180\n" +
	"\x19iam:projects:{project_id}\x12\x13iam:projects:update\x82\xd3\xe4\x93\x02-:\x01*\"(/apis/iam/v2/projects/{project_id}/rules\x12\xd9\x03\n" +
	"\n" +
	"UpdateRule\x12'.chef.automate.api.iam.v2.UpdateRuleReq\x1a(.chef.automate.api.iam.v2.UpdateRuleResp\"\xf7\x02\x92A\x87\x02\n" +
	"\x05rulesj\xfd\x01\n" +
	"\x0ex-code-samples\x12\xea\x012\xe7\x01\n" +
	"\xe4\x01*\xe1\x01\n" +
	"\x0e\n" +
	"\x04lang\x12\x06\x1a\x04JSON\n" +
	"\xce\x01\n" +
	"\x06source\x12\xc3\x01\x1a\xc0\x01{\"id\": \"example-rule\", \"project-id\": \"example-project\", \"name\": \"My Updated Rule\", \"type\": \"NODE\", \"conditions\": [{\"attribute\": \"CHEF_SERVER\", \"operator\": \"EQUALS\", \"values\": [\"example.co\"]}]}\x8a\xb5\x180\n" +
	"\x19iam:projects:{project_id}\x12\x13iam:projects:update\x82\xd3\xe4\x93\x022:\x01*\x1a-/apis/iam/v2/projects/{project_id}/rules/{id}\x12\xc8\x01\n" +
	"\aGetRule\x12$.chef.automate.api.iam.v2.GetRuleReq\x1a%.chef.automate.api.iam.v2.GetRuleResp\"p\x92A\a\n" +
	"\x05rules\x8a\xb5\x18-\n" +
	"\x19iam:projects:{project_id}\x12\x10iam:projects:get\x82\xd3\xe4\x93\x02/\x12-/apis/iam/v2/projects/{project_id}/rules/{id}\x12\xd7\x01\n" +
	"\x13ListRulesForProject\x120.chef.automate.api.iam.v2.ListRulesForProjectReq\x1a1.chef.automate.api.iam.v2.ListRulesForProjectResp\"[\x92A\a\n" +
	"\x05rules\x8a\xb5\x18%\n" +
	"\x11iam:projects:{id}\x12\x10iam:projects:get\x82\xd3\xe4\x93\x02\"\x12 /apis/iam/v2/projects/{id}/rules\x12\xd4\x01\n" +
	"\n" +
	"DeleteRule\x12'.chef.automate.api.iam.v2.DeleteRuleReq\x1a(.chef.automate.api.iam.v2.DeleteRuleResp\"s\x92A\a\n" +
	"\x05rules\x8a\xb5\x180\n" +
	"\x19iam:projects:{project_id}\x12\x13iam:projects:update\x82\xd3\xe4\x93\x02/*-/apis/iam/v2/projects/{project_id}/rules/{id}\x12\xba\x01\n" +
	"\x0fApplyRulesStart\x12,.chef.automate.api.iam.v2.ApplyRulesStartReq\x1a-.chef.automate.api.iam.v2.ApplyRulesStartResp\"J\x92A\a\n" +
	"\x05rules\x8a\xb5\x18\x1c\n" +
	"\tiam:rules\x12\x0fiam:rules:apply\x82\xd3\xe4\x93\x02\x1a\"\x18/apis/iam/v2/apply-rules\x12\xbe\x01\n" +
	"\x10ApplyRulesCancel\x12-.chef.automate.api.iam.v2.ApplyRulesCancelReq\x1a..chef.automate.api.iam.v2.ApplyRulesCancelResp\"K\x92A\a\n" +
	"\x05rules\x8a\xb5\x18\x1d\n" +
	"\tiam:rules\x12\x10iam:rules:cancel\x82\xd3\xe4\x93\x02\x1a*\x18/apis/iam/v2/apply-rules\x12\xbe\x01\n" +
	"\x10ApplyRulesStatus\x12-.chef.automate.api.iam.v2.ApplyRulesStatusReq\x1a..chef.automate.api.iam.v2.ApplyRulesStatusResp\"K\x92A\a\n" +
	"\x05rules\x8a\xb5\x18\x1d\n" +
	"\tiam:rules\x12\x10iam:rules:status\x82\xd3\xe4\x93\x02\x1a\x12\x18/apis/iam/v2/apply-rulesB.Z,github.com/chef/automate/api/external/iam/v2b\x06proto3"

var file_external_iam_v2_rules_proto_goTypes = []any{
	(*request.CreateRuleReq)(nil),            // 0: chef.automate.api.iam.v2.CreateRuleReq
	(*request.UpdateRuleReq)(nil),            // 1: chef.automate.api.iam.v2.UpdateRuleReq
	(*request.GetRuleReq)(nil),               // 2: chef.automate.api.iam.v2.GetRuleReq
	(*request.ListRulesForProjectReq)(nil),   // 3: chef.automate.api.iam.v2.ListRulesForProjectReq
	(*request.DeleteRuleReq)(nil),            // 4: chef.automate.api.iam.v2.DeleteRuleReq
	(*request.ApplyRulesStartReq)(nil),       // 5: chef.automate.api.iam.v2.ApplyRulesStartReq
	(*request.ApplyRulesCancelReq)(nil),      // 6: chef.automate.api.iam.v2.ApplyRulesCancelReq
	(*request.ApplyRulesStatusReq)(nil),      // 7: chef.automate.api.iam.v2.ApplyRulesStatusReq
	(*response.CreateRuleResp)(nil),          // 8: chef.automate.api.iam.v2.CreateRuleResp
	(*response.UpdateRuleResp)(nil),          // 9: chef.automate.api.iam.v2.UpdateRuleResp
	(*response.GetRuleResp)(nil),             // 10: chef.automate.api.iam.v2.GetRuleResp
	(*response.ListRulesForProjectResp)(nil), // 11: chef.automate.api.iam.v2.ListRulesForProjectResp
	(*response.DeleteRuleResp)(nil),          // 12: chef.automate.api.iam.v2.DeleteRuleResp
	(*response.ApplyRulesStartResp)(nil),     // 13: chef.automate.api.iam.v2.ApplyRulesStartResp
	(*response.ApplyRulesCancelResp)(nil),    // 14: chef.automate.api.iam.v2.ApplyRulesCancelResp
	(*response.ApplyRulesStatusResp)(nil),    // 15: chef.automate.api.iam.v2.ApplyRulesStatusResp
}
var file_external_iam_v2_rules_proto_depIdxs = []int32{
	0,  // 0: chef.automate.api.iam.v2.Rules.CreateRule:input_type -> chef.automate.api.iam.v2.CreateRuleReq
	1,  // 1: chef.automate.api.iam.v2.Rules.UpdateRule:input_type -> chef.automate.api.iam.v2.UpdateRuleReq
	2,  // 2: chef.automate.api.iam.v2.Rules.GetRule:input_type -> chef.automate.api.iam.v2.GetRuleReq
	3,  // 3: chef.automate.api.iam.v2.Rules.ListRulesForProject:input_type -> chef.automate.api.iam.v2.ListRulesForProjectReq
	4,  // 4: chef.automate.api.iam.v2.Rules.DeleteRule:input_type -> chef.automate.api.iam.v2.DeleteRuleReq
	5,  // 5: chef.automate.api.iam.v2.Rules.ApplyRulesStart:input_type -> chef.automate.api.iam.v2.ApplyRulesStartReq
	6,  // 6: chef.automate.api.iam.v2.Rules.ApplyRulesCancel:input_type -> chef.automate.api.iam.v2.ApplyRulesCancelReq
	7,  // 7: chef.automate.api.iam.v2.Rules.ApplyRulesStatus:input_type -> chef.automate.api.iam.v2.ApplyRulesStatusReq
	8,  // 8: chef.automate.api.iam.v2.Rules.CreateRule:output_type -> chef.automate.api.iam.v2.CreateRuleResp
	9,  // 9: chef.automate.api.iam.v2.Rules.UpdateRule:output_type -> chef.automate.api.iam.v2.UpdateRuleResp
	10, // 10: chef.automate.api.iam.v2.Rules.GetRule:output_type -> chef.automate.api.iam.v2.GetRuleResp
	11, // 11: chef.automate.api.iam.v2.Rules.ListRulesForProject:output_type -> chef.automate.api.iam.v2.ListRulesForProjectResp
	12, // 12: chef.automate.api.iam.v2.Rules.DeleteRule:output_type -> chef.automate.api.iam.v2.DeleteRuleResp
	13, // 13: chef.automate.api.iam.v2.Rules.ApplyRulesStart:output_type -> chef.automate.api.iam.v2.ApplyRulesStartResp
	14, // 14: chef.automate.api.iam.v2.Rules.ApplyRulesCancel:output_type -> chef.automate.api.iam.v2.ApplyRulesCancelResp
	15, // 15: chef.automate.api.iam.v2.Rules.ApplyRulesStatus:output_type -> chef.automate.api.iam.v2.ApplyRulesStatusResp
	8,  // [8:16] is the sub-list for method output_type
	0,  // [0:8] is the sub-list for method input_type
	0,  // [0:0] is the sub-list for extension type_name
	0,  // [0:0] is the sub-list for extension extendee
	0,  // [0:0] is the sub-list for field type_name
}

func init() { file_external_iam_v2_rules_proto_init() }
func file_external_iam_v2_rules_proto_init() {
	if File_external_iam_v2_rules_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_external_iam_v2_rules_proto_rawDesc), len(file_external_iam_v2_rules_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   0,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_external_iam_v2_rules_proto_goTypes,
		DependencyIndexes: file_external_iam_v2_rules_proto_depIdxs,
	}.Build()
	File_external_iam_v2_rules_proto = out.File
	file_external_iam_v2_rules_proto_goTypes = nil
	file_external_iam_v2_rules_proto_depIdxs = nil
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6

// RulesClient is the client API for Rules service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RulesClient interface {
	// Create a project rule
	//
	// Creates a new project rule to move ingested resources into projects.
	//
	// A project rule contains conditions that determine if an ingested resource should be moved into the rule’s project.
	//
	// Each condition specifies one or more values to match for a particular attribute on an ingested resource.
	//
	// The choice of attributes depends on the rule type.
	// For NODE type, specify any of the available attributes.
	// For EVENT type, specify either CHEF_ORGANIZATION or CHEF_SERVER.
	//
	// The choice of operator depends on how many values you provide.
	// If you wish to match one among a group of values, set the operator to MEMBER_OF.
	// For a single value, use EQUALS.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:update
	CreateRule(ctx context.Context, in *request.CreateRuleReq, opts ...grpc.CallOption) (*response.CreateRuleResp, error)
	// Update a project rule
	//
	// Updates the name and conditions of an existing project rule.
	// New conditions can be added. Existing conditions can be updated or removed.
	//
	// This operation overwrites all fields excluding ID and Type,
	// including those omitted from the request, so be sure to specify all properties.
	// Properties that you do not include are reset to empty values.
	//
	// The resulting change to the project's resources does not take effect immediately.
	// Updates to project rules must be applied to ingested resources by a project update.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:update
	UpdateRule(ctx context.Context, in *request.UpdateRuleReq, opts ...grpc.CallOption) (*response.UpdateRuleResp, error)
	// Get a project rule
	//
	// Returns the details for a project rule.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:get
	GetRule(ctx context.Context, in *request.GetRuleReq, opts ...grpc.CallOption) (*response.GetRuleResp, error)
	// List a project's rules
	//
	// Lists all of the project rules of a specific project.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:get
	ListRulesForProject(ctx context.Context, in *request.ListRulesForProjectReq, opts ...grpc.CallOption) (*response.ListRulesForProjectResp, error)
	// Delete a project rule
	//
	// The resulting change to the project's resources does not take effect immediately.
	// Updates to project rules must be applied to ingested resources by a project update.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:update
	DeleteRule(ctx context.Context, in *request.DeleteRuleReq, opts ...grpc.CallOption) (*response.DeleteRuleResp, error)
	// Start project update
	//
	// Any changes to a project's rules are staged first. They do not take effect until
	// all projects are updated.
	//
	// Updating all projects begins an operation that applies all pending rule edits
	// and then moves ingested resources into the correct projects according to those latest changes.
	//
	// With a large amount of historical compliance data, rule application can take a considerable amount of time.
	// It’s best to batch up rule changes and apply them all at once.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:rules:apply
	ApplyRulesStart(ctx context.Context, in *request.ApplyRulesStartReq, opts ...grpc.CallOption) (*response.ApplyRulesStartResp, error)
	// Cancel project update
	//
	// Cancels an ongoing project update.
	//
	// Warning! This action leaves the system in an unknown state that only another
	// successful project update can rectify.
	//
	// This command exists really just for one scenario: you started a project update
	// but shortly thereafter discovered that you had one more change to include in the
	// batch of updates to be done.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:rules:cancel
	ApplyRulesCancel(ctx context.Context, in *request.ApplyRulesCancelReq, opts ...grpc.CallOption) (*response.ApplyRulesCancelResp, error)
	// Get the status of a project update
	//
	// Returns details about a project update operation.
	//
	// You can poll this endpoint during a project update to monitor progress.
	// Querying this endpoint when there is no update in progress will return details
	// about the completion status of the most recent update.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:rules:status
	ApplyRulesStatus(ctx context.Context, in *request.ApplyRulesStatusReq, opts ...grpc.CallOption) (*response.ApplyRulesStatusResp, error)
}

type rulesClient struct {
	cc grpc.ClientConnInterface
}

func NewRulesClient(cc grpc.ClientConnInterface) RulesClient {
	return &rulesClient{cc}
}

func (c *rulesClient) CreateRule(ctx context.Context, in *request.CreateRuleReq, opts ...grpc.CallOption) (*response.CreateRuleResp, error) {
	out := new(response.CreateRuleResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/CreateRule", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) UpdateRule(ctx context.Context, in *request.UpdateRuleReq, opts ...grpc.CallOption) (*response.UpdateRuleResp, error) {
	out := new(response.UpdateRuleResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/UpdateRule", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) GetRule(ctx context.Context, in *request.GetRuleReq, opts ...grpc.CallOption) (*response.GetRuleResp, error) {
	out := new(response.GetRuleResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/GetRule", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) ListRulesForProject(ctx context.Context, in *request.ListRulesForProjectReq, opts ...grpc.CallOption) (*response.ListRulesForProjectResp, error) {
	out := new(response.ListRulesForProjectResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/ListRulesForProject", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) DeleteRule(ctx context.Context, in *request.DeleteRuleReq, opts ...grpc.CallOption) (*response.DeleteRuleResp, error) {
	out := new(response.DeleteRuleResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/DeleteRule", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) ApplyRulesStart(ctx context.Context, in *request.ApplyRulesStartReq, opts ...grpc.CallOption) (*response.ApplyRulesStartResp, error) {
	out := new(response.ApplyRulesStartResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/ApplyRulesStart", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) ApplyRulesCancel(ctx context.Context, in *request.ApplyRulesCancelReq, opts ...grpc.CallOption) (*response.ApplyRulesCancelResp, error) {
	out := new(response.ApplyRulesCancelResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/ApplyRulesCancel", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rulesClient) ApplyRulesStatus(ctx context.Context, in *request.ApplyRulesStatusReq, opts ...grpc.CallOption) (*response.ApplyRulesStatusResp, error) {
	out := new(response.ApplyRulesStatusResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Rules/ApplyRulesStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RulesServer is the server API for Rules service.
type RulesServer interface {
	// Create a project rule
	//
	// Creates a new project rule to move ingested resources into projects.
	//
	// A project rule contains conditions that determine if an ingested resource should be moved into the rule’s project.
	//
	// Each condition specifies one or more values to match for a particular attribute on an ingested resource.
	//
	// The choice of attributes depends on the rule type.
	// For NODE type, specify any of the available attributes.
	// For EVENT type, specify either CHEF_ORGANIZATION or CHEF_SERVER.
	//
	// The choice of operator depends on how many values you provide.
	// If you wish to match one among a group of values, set the operator to MEMBER_OF.
	// For a single value, use EQUALS.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:update
	CreateRule(context.Context, *request.CreateRuleReq) (*response.CreateRuleResp, error)
	// Update a project rule
	//
	// Updates the name and conditions of an existing project rule.
	// New conditions can be added. Existing conditions can be updated or removed.
	//
	// This operation overwrites all fields excluding ID and Type,
	// including those omitted from the request, so be sure to specify all properties.
	// Properties that you do not include are reset to empty values.
	//
	// The resulting change to the project's resources does not take effect immediately.
	// Updates to project rules must be applied to ingested resources by a project update.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:update
	UpdateRule(context.Context, *request.UpdateRuleReq) (*response.UpdateRuleResp, error)
	// Get a project rule
	//
	// Returns the details for a project rule.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:get
	GetRule(context.Context, *request.GetRuleReq) (*response.GetRuleResp, error)
	// List a project's rules
	//
	// Lists all of the project rules of a specific project.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:get
	ListRulesForProject(context.Context, *request.ListRulesForProjectReq) (*response.ListRulesForProjectResp, error)
	// Delete a project rule
	//
	// The resulting change to the project's resources does not take effect immediately.
	// Updates to project rules must be applied to ingested resources by a project update.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:projects:update
	DeleteRule(context.Context, *request.DeleteRuleReq) (*response.DeleteRuleResp, error)
	// Start project update
	//
	// Any changes to a project's rules are staged first. They do not take effect until
	// all projects are updated.
	//
	// Updating all projects begins an operation that applies all pending rule edits
	// and then moves ingested resources into the correct projects according to those latest changes.
	//
	// With a large amount of historical compliance data, rule application can take a considerable amount of time.
	// It’s best to batch up rule changes and apply them all at once.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:rules:apply
	ApplyRulesStart(context.Context, *request.ApplyRulesStartReq) (*response.ApplyRulesStartResp, error)
	// Cancel project update
	//
	// Cancels an ongoing project update.
	//
	// Warning! This action leaves the system in an unknown state that only another
	// successful project update can rectify.
	//
	// This command exists really just for one scenario: you started a project update
	// but shortly thereafter discovered that you had one more change to include in the
	// batch of updates to be done.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:rules:cancel
	ApplyRulesCancel(context.Context, *request.ApplyRulesCancelReq) (*response.ApplyRulesCancelResp, error)
	// Get the status of a project update
	//
	// Returns details about a project update operation.
	//
	// You can poll this endpoint during a project update to monitor progress.
	// Querying this endpoint when there is no update in progress will return details
	// about the completion status of the most recent update.
	//
	// Authorization Action:
	// ```
	// ```
	//
	//iam:rules:status
	ApplyRulesStatus(context.Context, *request.ApplyRulesStatusReq) (*response.ApplyRulesStatusResp, error)
}

// UnimplementedRulesServer can be embedded to have forward compatible implementations.
type UnimplementedRulesServer struct {
}

func (*UnimplementedRulesServer) CreateRule(context.Context, *request.CreateRuleReq) (*response.CreateRuleResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateRule not implemented")
}
func (*UnimplementedRulesServer) UpdateRule(context.Context, *request.UpdateRuleReq) (*response.UpdateRuleResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateRule not implemented")
}
func (*UnimplementedRulesServer) GetRule(context.Context, *request.GetRuleReq) (*response.GetRuleResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRule not implemented")
}
func (*UnimplementedRulesServer) ListRulesForProject(context.Context, *request.ListRulesForProjectReq) (*response.ListRulesForProjectResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListRulesForProject not implemented")
}
func (*UnimplementedRulesServer) DeleteRule(context.Context, *request.DeleteRuleReq) (*response.DeleteRuleResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteRule not implemented")
}
func (*UnimplementedRulesServer) ApplyRulesStart(context.Context, *request.ApplyRulesStartReq) (*response.ApplyRulesStartResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ApplyRulesStart not implemented")
}
func (*UnimplementedRulesServer) ApplyRulesCancel(context.Context, *request.ApplyRulesCancelReq) (*response.ApplyRulesCancelResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ApplyRulesCancel not implemented")
}
func (*UnimplementedRulesServer) ApplyRulesStatus(context.Context, *request.ApplyRulesStatusReq) (*response.ApplyRulesStatusResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ApplyRulesStatus not implemented")
}

func RegisterRulesServer(s *grpc.Server, srv RulesServer) {
	s.RegisterService(&_Rules_serviceDesc, srv)
}

func _Rules_CreateRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.CreateRuleReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).CreateRule(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/CreateRule",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).CreateRule(ctx, req.(*request.CreateRuleReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_UpdateRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.UpdateRuleReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).UpdateRule(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/UpdateRule",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).UpdateRule(ctx, req.(*request.UpdateRuleReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_GetRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.GetRuleReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).GetRule(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/GetRule",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).GetRule(ctx, req.(*request.GetRuleReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_ListRulesForProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.ListRulesForProjectReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).ListRulesForProject(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/ListRulesForProject",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).ListRulesForProject(ctx, req.(*request.ListRulesForProjectReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_DeleteRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.DeleteRuleReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).DeleteRule(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/DeleteRule",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).DeleteRule(ctx, req.(*request.DeleteRuleReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_ApplyRulesStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.ApplyRulesStartReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).ApplyRulesStart(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/ApplyRulesStart",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).ApplyRulesStart(ctx, req.(*request.ApplyRulesStartReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_ApplyRulesCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.ApplyRulesCancelReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).ApplyRulesCancel(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/ApplyRulesCancel",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).ApplyRulesCancel(ctx, req.(*request.ApplyRulesCancelReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Rules_ApplyRulesStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.ApplyRulesStatusReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulesServer).ApplyRulesStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Rules/ApplyRulesStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulesServer).ApplyRulesStatus(ctx, req.(*request.ApplyRulesStatusReq))
	}
	return interceptor(ctx, in, info, handler)
}

var _Rules_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.api.iam.v2.Rules",
	HandlerType: (*RulesServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateRule",
			Handler:    _Rules_CreateRule_Handler,
		},
		{
			MethodName: "UpdateRule",
			Handler:    _Rules_UpdateRule_Handler,
		},
		{
			MethodName: "GetRule",
			Handler:    _Rules_GetRule_Handler,
		},
		{
			MethodName: "ListRulesForProject",
			Handler:    _Rules_ListRulesForProject_Handler,
		},
		{
			MethodName: "DeleteRule",
			Handler:    _Rules_DeleteRule_Handler,
		},
		{
			MethodName: "ApplyRulesStart",
			Handler:    _Rules_ApplyRulesStart_Handler,
		},
		{
			MethodName: "ApplyRulesCancel",
			Handler:    _Rules_ApplyRulesCancel_Handler,
		},
		{
			MethodName: "ApplyRulesStatus",
			Handler:    _Rules_ApplyRulesStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "external/iam/v2/rules.proto",
}
