// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v7.35.0
// source: state.proto

package proto

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	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)
)

type FileID struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	ModTime       int64                  `protobuf:"varint,1,opt,name=mod_time,json=modTime,proto3" json:"mod_time,omitempty"` // unix nano sec.
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *FileID) Reset() {
	*x = FileID{}
	mi := &file_state_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *FileID) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*FileID) ProtoMessage() {}

func (x *FileID) ProtoReflect() protoreflect.Message {
	mi := &file_state_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use FileID.ProtoReflect.Descriptor instead.
func (*FileID) Descriptor() ([]byte, []int) {
	return file_state_proto_rawDescGZIP(), []int{0}
}

func (x *FileID) GetModTime() int64 {
	if x != nil {
		return x.ModTime
	}
	return 0
}

type Digest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Hash          string                 `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	SizeBytes     int64                  `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Digest) Reset() {
	*x = Digest{}
	mi := &file_state_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Digest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Digest) ProtoMessage() {}

func (x *Digest) ProtoReflect() protoreflect.Message {
	mi := &file_state_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Digest.ProtoReflect.Descriptor instead.
func (*Digest) Descriptor() ([]byte, []int) {
	return file_state_proto_rawDescGZIP(), []int{1}
}

func (x *Digest) GetHash() string {
	if x != nil {
		return x.Hash
	}
	return ""
}

func (x *Digest) GetSizeBytes() int64 {
	if x != nil {
		return x.SizeBytes
	}
	return 0
}

type Entry struct {
	state        protoimpl.MessageState `protogen:"open.v1"`
	Id           *FileID                `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name         string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Digest       *Digest                `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
	IsExecutable bool                   `protobuf:"varint,4,opt,name=is_executable,json=isExecutable,proto3" json:"is_executable,omitempty"`
	// target is symlink target.
	Target string `protobuf:"bytes,5,opt,name=target,proto3" json:"target,omitempty"`
	// action, cmd, edge (inputs/outputs paths) that generated this file.
	CmdHash       []byte  `protobuf:"bytes,6,opt,name=cmd_hash,json=cmdHash,proto3" json:"cmd_hash,omitempty"`
	EdgeHash      []byte  `protobuf:"bytes,9,opt,name=edge_hash,json=edgeHash,proto3" json:"edge_hash,omitempty"`
	Action        *Digest `protobuf:"bytes,7,opt,name=action,proto3" json:"action,omitempty"`
	UpdatedTime   int64   `protobuf:"varint,8,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` // unix nano sec.
	Local         bool    `protobuf:"varint,10,opt,name=local,proto3" json:"local,omitempty"`                               // local generated. not in RBE-CAS.
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Entry) Reset() {
	*x = Entry{}
	mi := &file_state_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Entry) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Entry) ProtoMessage() {}

func (x *Entry) ProtoReflect() protoreflect.Message {
	mi := &file_state_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Entry.ProtoReflect.Descriptor instead.
func (*Entry) Descriptor() ([]byte, []int) {
	return file_state_proto_rawDescGZIP(), []int{2}
}

func (x *Entry) GetId() *FileID {
	if x != nil {
		return x.Id
	}
	return nil
}

func (x *Entry) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Entry) GetDigest() *Digest {
	if x != nil {
		return x.Digest
	}
	return nil
}

func (x *Entry) GetIsExecutable() bool {
	if x != nil {
		return x.IsExecutable
	}
	return false
}

func (x *Entry) GetTarget() string {
	if x != nil {
		return x.Target
	}
	return ""
}

func (x *Entry) GetCmdHash() []byte {
	if x != nil {
		return x.CmdHash
	}
	return nil
}

func (x *Entry) GetEdgeHash() []byte {
	if x != nil {
		return x.EdgeHash
	}
	return nil
}

func (x *Entry) GetAction() *Digest {
	if x != nil {
		return x.Action
	}
	return nil
}

func (x *Entry) GetUpdatedTime() int64 {
	if x != nil {
		return x.UpdatedTime
	}
	return 0
}

func (x *Entry) GetLocal() bool {
	if x != nil {
		return x.Local
	}
	return false
}

type BuildTargets struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Targets       []string               `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *BuildTargets) Reset() {
	*x = BuildTargets{}
	mi := &file_state_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BuildTargets) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BuildTargets) ProtoMessage() {}

func (x *BuildTargets) ProtoReflect() protoreflect.Message {
	mi := &file_state_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use BuildTargets.ProtoReflect.Descriptor instead.
func (*BuildTargets) Descriptor() ([]byte, []int) {
	return file_state_proto_rawDescGZIP(), []int{3}
}

func (x *BuildTargets) GetTargets() []string {
	if x != nil {
		return x.Targets
	}
	return nil
}

type State struct {
	state   protoimpl.MessageState `protogen:"open.v1"`
	Entries []*Entry               `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// last checked token for fsmonitor (e.g. watchman)
	LastChecked string `protobuf:"bytes,2,opt,name=last_checked,json=lastChecked,proto3" json:"last_checked,omitempty"`
	// build targets that are used to update fs entries.
	// only set when the build was succeeded.
	// It is used to check no-op build.
	// i.e. if all entries are clean and build_targets are the same,
	// everything is up-to-date.
	BuildTargets *BuildTargets `protobuf:"bytes,3,opt,name=build_targets,json=buildTargets,proto3" json:"build_targets,omitempty"`
	// files that are used as outputs, but doesn't exist.
	MissingOutputs []string `protobuf:"bytes,4,rep,name=missing_outputs,json=missingOutputs,proto3" json:"missing_outputs,omitempty"`
	// files that are used as inputs, but digest is still unknown.
	MissingDigests []string `protobuf:"bytes,5,rep,name=missing_digests,json=missingDigests,proto3" json:"missing_digests,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *State) Reset() {
	*x = State{}
	mi := &file_state_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *State) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*State) ProtoMessage() {}

func (x *State) ProtoReflect() protoreflect.Message {
	mi := &file_state_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use State.ProtoReflect.Descriptor instead.
func (*State) Descriptor() ([]byte, []int) {
	return file_state_proto_rawDescGZIP(), []int{4}
}

func (x *State) GetEntries() []*Entry {
	if x != nil {
		return x.Entries
	}
	return nil
}

func (x *State) GetLastChecked() string {
	if x != nil {
		return x.LastChecked
	}
	return ""
}

func (x *State) GetBuildTargets() *BuildTargets {
	if x != nil {
		return x.BuildTargets
	}
	return nil
}

func (x *State) GetMissingOutputs() []string {
	if x != nil {
		return x.MissingOutputs
	}
	return nil
}

func (x *State) GetMissingDigests() []string {
	if x != nil {
		return x.MissingDigests
	}
	return nil
}

var File_state_proto protoreflect.FileDescriptor

const file_state_proto_rawDesc = "" +
	"\n" +
	"\vstate.proto\x12\vsiso.hashfs\"#\n" +
	"\x06FileID\x12\x19\n" +
	"\bmod_time\x18\x01 \x01(\x03R\amodTime\";\n" +
	"\x06Digest\x12\x12\n" +
	"\x04hash\x18\x01 \x01(\tR\x04hash\x12\x1d\n" +
	"\n" +
	"size_bytes\x18\x02 \x01(\x03R\tsizeBytes\"\xc8\x02\n" +
	"\x05Entry\x12#\n" +
	"\x02id\x18\x01 \x01(\v2\x13.siso.hashfs.FileIDR\x02id\x12\x12\n" +
	"\x04name\x18\x02 \x01(\tR\x04name\x12+\n" +
	"\x06digest\x18\x03 \x01(\v2\x13.siso.hashfs.DigestR\x06digest\x12#\n" +
	"\ris_executable\x18\x04 \x01(\bR\fisExecutable\x12\x16\n" +
	"\x06target\x18\x05 \x01(\tR\x06target\x12\x19\n" +
	"\bcmd_hash\x18\x06 \x01(\fR\acmdHash\x12\x1b\n" +
	"\tedge_hash\x18\t \x01(\fR\bedgeHash\x12+\n" +
	"\x06action\x18\a \x01(\v2\x13.siso.hashfs.DigestR\x06action\x12!\n" +
	"\fupdated_time\x18\b \x01(\x03R\vupdatedTime\x12\x14\n" +
	"\x05local\x18\n" +
	" \x01(\bR\x05local\"(\n" +
	"\fBuildTargets\x12\x18\n" +
	"\atargets\x18\x01 \x03(\tR\atargets\"\xea\x01\n" +
	"\x05State\x12,\n" +
	"\aentries\x18\x01 \x03(\v2\x12.siso.hashfs.EntryR\aentries\x12!\n" +
	"\flast_checked\x18\x02 \x01(\tR\vlastChecked\x12>\n" +
	"\rbuild_targets\x18\x03 \x01(\v2\x19.siso.hashfs.BuildTargetsR\fbuildTargets\x12'\n" +
	"\x0fmissing_outputs\x18\x04 \x03(\tR\x0emissingOutputs\x12'\n" +
	"\x0fmissing_digests\x18\x05 \x03(\tR\x0emissingDigestsB)Z'go.chromium.org/build/siso/hashfs/protob\x06proto3"

var (
	file_state_proto_rawDescOnce sync.Once
	file_state_proto_rawDescData []byte
)

func file_state_proto_rawDescGZIP() []byte {
	file_state_proto_rawDescOnce.Do(func() {
		file_state_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_proto_rawDesc), len(file_state_proto_rawDesc)))
	})
	return file_state_proto_rawDescData
}

var file_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_state_proto_goTypes = []any{
	(*FileID)(nil),       // 0: siso.hashfs.FileID
	(*Digest)(nil),       // 1: siso.hashfs.Digest
	(*Entry)(nil),        // 2: siso.hashfs.Entry
	(*BuildTargets)(nil), // 3: siso.hashfs.BuildTargets
	(*State)(nil),        // 4: siso.hashfs.State
}
var file_state_proto_depIdxs = []int32{
	0, // 0: siso.hashfs.Entry.id:type_name -> siso.hashfs.FileID
	1, // 1: siso.hashfs.Entry.digest:type_name -> siso.hashfs.Digest
	1, // 2: siso.hashfs.Entry.action:type_name -> siso.hashfs.Digest
	2, // 3: siso.hashfs.State.entries:type_name -> siso.hashfs.Entry
	3, // 4: siso.hashfs.State.build_targets:type_name -> siso.hashfs.BuildTargets
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_state_proto_init() }
func file_state_proto_init() {
	if File_state_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_proto_rawDesc), len(file_state_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_state_proto_goTypes,
		DependencyIndexes: file_state_proto_depIdxs,
		MessageInfos:      file_state_proto_msgTypes,
	}.Build()
	File_state_proto = out.File
	file_state_proto_goTypes = nil
	file_state_proto_depIdxs = nil
}
