// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/iam/v1/role_service.proto

package iam

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	math "math"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

type GetRoleRequest struct {
	// ID of the Role resource to return.
	// To get the role ID, use a [RoleService.List] request.
	RoleId               string   `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetRoleRequest) Reset()         { *m = GetRoleRequest{} }
func (m *GetRoleRequest) String() string { return proto.CompactTextString(m) }
func (*GetRoleRequest) ProtoMessage()    {}
func (*GetRoleRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_f5f653f182a3525c, []int{0}
}

func (m *GetRoleRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_GetRoleRequest.Unmarshal(m, b)
}
func (m *GetRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_GetRoleRequest.Marshal(b, m, deterministic)
}
func (m *GetRoleRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetRoleRequest.Merge(m, src)
}
func (m *GetRoleRequest) XXX_Size() int {
	return xxx_messageInfo_GetRoleRequest.Size(m)
}
func (m *GetRoleRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_GetRoleRequest.DiscardUnknown(m)
}

var xxx_messageInfo_GetRoleRequest proto.InternalMessageInfo

func (m *GetRoleRequest) GetRoleId() string {
	if m != nil {
		return m.RoleId
	}
	return ""
}

type ListRolesRequest struct {
	// The maximum number of results per page to return. If the number of available
	// results is larger than [page_size],
	// the service returns a [ListRolesResponse.next_page_token]
	// that can be used to get the next page of results in subsequent list requests.
	// Default value: 100.
	PageSize int64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Page token. To get the next page of results, set [page_token]
	// to the [ListRolesResponse.next_page_token]
	// returned by a previous list request.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// A filter expression that filters resources listed in the response.
	Filter               string   `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ListRolesRequest) Reset()         { *m = ListRolesRequest{} }
func (m *ListRolesRequest) String() string { return proto.CompactTextString(m) }
func (*ListRolesRequest) ProtoMessage()    {}
func (*ListRolesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_f5f653f182a3525c, []int{1}
}

func (m *ListRolesRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ListRolesRequest.Unmarshal(m, b)
}
func (m *ListRolesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ListRolesRequest.Marshal(b, m, deterministic)
}
func (m *ListRolesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ListRolesRequest.Merge(m, src)
}
func (m *ListRolesRequest) XXX_Size() int {
	return xxx_messageInfo_ListRolesRequest.Size(m)
}
func (m *ListRolesRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_ListRolesRequest.DiscardUnknown(m)
}

var xxx_messageInfo_ListRolesRequest proto.InternalMessageInfo

func (m *ListRolesRequest) GetPageSize() int64 {
	if m != nil {
		return m.PageSize
	}
	return 0
}

func (m *ListRolesRequest) GetPageToken() string {
	if m != nil {
		return m.PageToken
	}
	return ""
}

func (m *ListRolesRequest) GetFilter() string {
	if m != nil {
		return m.Filter
	}
	return ""
}

type ListRolesResponse struct {
	// List of Role resources.
	Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// This token allows you to get the next page of results for list requests. If the number of results
	// is larger than [ListRolesRequest.page_size], use
	// the [next_page_token] as the value
	// for the [ListRolesRequest.page_token] query parameter
	// in the next list request. Each subsequent list request will have its own
	// [next_page_token] to continue paging through the results.
	NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ListRolesResponse) Reset()         { *m = ListRolesResponse{} }
func (m *ListRolesResponse) String() string { return proto.CompactTextString(m) }
func (*ListRolesResponse) ProtoMessage()    {}
func (*ListRolesResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_f5f653f182a3525c, []int{2}
}

func (m *ListRolesResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ListRolesResponse.Unmarshal(m, b)
}
func (m *ListRolesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ListRolesResponse.Marshal(b, m, deterministic)
}
func (m *ListRolesResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ListRolesResponse.Merge(m, src)
}
func (m *ListRolesResponse) XXX_Size() int {
	return xxx_messageInfo_ListRolesResponse.Size(m)
}
func (m *ListRolesResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_ListRolesResponse.DiscardUnknown(m)
}

var xxx_messageInfo_ListRolesResponse proto.InternalMessageInfo

func (m *ListRolesResponse) GetRoles() []*Role {
	if m != nil {
		return m.Roles
	}
	return nil
}

func (m *ListRolesResponse) GetNextPageToken() string {
	if m != nil {
		return m.NextPageToken
	}
	return ""
}

func init() {
	proto.RegisterType((*GetRoleRequest)(nil), "yandex.cloud.iam.v1.GetRoleRequest")
	proto.RegisterType((*ListRolesRequest)(nil), "yandex.cloud.iam.v1.ListRolesRequest")
	proto.RegisterType((*ListRolesResponse)(nil), "yandex.cloud.iam.v1.ListRolesResponse")
}

func init() {
	proto.RegisterFile("yandex/cloud/iam/v1/role_service.proto", fileDescriptor_f5f653f182a3525c)
}

var fileDescriptor_f5f653f182a3525c = []byte{
	// 431 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x3f, 0x6f, 0xd3, 0x40,
	0x14, 0x97, 0x9b, 0x36, 0x90, 0x57, 0x4a, 0xe1, 0x10, 0xc2, 0xb5, 0xf8, 0x53, 0x19, 0x35, 0x64,
	0xa9, 0xcf, 0x2e, 0x42, 0x0c, 0x6d, 0x96, 0x2c, 0x15, 0x12, 0x03, 0x72, 0x99, 0x58, 0xa2, 0x6b,
	0xfc, 0x6a, 0x4e, 0x9c, 0xef, 0x8c, 0xef, 0x62, 0x95, 0x22, 0x16, 0x36, 0xb2, 0xf2, 0xa1, 0x9a,
	0x9d, 0x8f, 0x00, 0x03, 0x9f, 0x81, 0x09, 0xf9, 0x2e, 0x45, 0x4d, 0xe5, 0x8a, 0xf5, 0x7e, 0x7f,
	0xef, 0xbd, 0x07, 0xfd, 0x4f, 0x4c, 0x66, 0x78, 0x4a, 0x27, 0x42, 0x4d, 0x33, 0xca, 0x59, 0x41,
	0xeb, 0x84, 0x56, 0x4a, 0xe0, 0x58, 0x63, 0x55, 0xf3, 0x09, 0x46, 0x65, 0xa5, 0x8c, 0x22, 0xf7,
	0x1c, 0x2f, 0xb2, 0xbc, 0x88, 0xb3, 0x22, 0xaa, 0x93, 0xe0, 0x61, 0xae, 0x54, 0x2e, 0x90, 0xb2,
	0x92, 0x53, 0x26, 0xa5, 0x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7, 0x37, 0x17, 0x8d, 0xf6, 0x7e, 0x7a, 0xb0,
	0xde, 0xe8, 0x8e, 0xdc, 0xea, 0xc8, 0x09, 0x74, 0x0e, 0xd1, 0x90, 0xa7, 0xad, 0x01, 0xcb, 0xc3,
	0x0d, 0xae, 0x6f, 0x11, 0x3e, 0xf9, 0xfa, 0xe3, 0xd7, 0xf7, 0x95, 0x2d, 0xf2, 0xe0, 0xf2, 0x96,
	0x34, 0xfd, 0xbc, 0x58, 0xc6, 0x17, 0x22, 0x60, 0xb5, 0xf9, 0x25, 0xd9, 0x69, 0xf5, 0xb8, 0xba,
	0x8b, 0xa0, 0xff, 0x3f, 0x9a, 0x9b, 0x53, 0x78, 0xdf, 0xe6, 0x6e, 0x92, 0x8d, 0xa5, 0xdc, 0xd1,
	0xf0, 0xdd, 0x7e, 0xce, 0xcd, 0xfb, 0xe9, 0x71, 0x34, 0x51, 0x05, 0x75, 0x56, 0xbb, 0xee, 0x8a,
	0x72, 0xb5, 0x9b, 0xa3, 0xb4, 0xf7, 0x43, 0x5b, 0xce, 0x6b, 0x9f, 0xb3, 0xe2, 0xb8, 0x6b, 0xe1,
	0xe7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x85, 0xbc, 0xc9, 0x90, 0xfa, 0x02, 0x00, 0x00,
}

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

// 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.SupportPackageIsVersion4

// RoleServiceClient is the client API for RoleService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RoleServiceClient interface {
	// Returns the specified Role resource.
	//
	// To get the list of available Role resources, use a [List] request.
	Get(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*Role, error)
	// Retrieves the list of Role resources.
	List(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error)
}

type roleServiceClient struct {
	cc *grpc.ClientConn
}

func NewRoleServiceClient(cc *grpc.ClientConn) RoleServiceClient {
	return &roleServiceClient{cc}
}

func (c *roleServiceClient) Get(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*Role, error) {
	out := new(Role)
	err := c.cc.Invoke(ctx, "/yandex.cloud.iam.v1.RoleService/Get", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *roleServiceClient) List(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error) {
	out := new(ListRolesResponse)
	err := c.cc.Invoke(ctx, "/yandex.cloud.iam.v1.RoleService/List", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RoleServiceServer is the server API for RoleService service.
type RoleServiceServer interface {
	// Returns the specified Role resource.
	//
	// To get the list of available Role resources, use a [List] request.
	Get(context.Context, *GetRoleRequest) (*Role, error)
	// Retrieves the list of Role resources.
	List(context.Context, *ListRolesRequest) (*ListRolesResponse, error)
}

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

func (*UnimplementedRoleServiceServer) Get(ctx context.Context, req *GetRoleRequest) (*Role, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedRoleServiceServer) List(ctx context.Context, req *ListRolesRequest) (*ListRolesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}

func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer) {
	s.RegisterService(&_RoleService_serviceDesc, srv)
}

func _RoleService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRoleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/yandex.cloud.iam.v1.RoleService/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).Get(ctx, req.(*GetRoleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoleService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListRolesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/yandex.cloud.iam.v1.RoleService/List",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).List(ctx, req.(*ListRolesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _RoleService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.iam.v1.RoleService",
	HandlerType: (*RoleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _RoleService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _RoleService_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/iam/v1/role_service.proto",
}
