Class: Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Tree
- Inherits:
-
Object
- Object
- Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Tree
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/remotebuildexecution_v2/classes.rb,
generated/google/apis/remotebuildexecution_v2/representations.rb,
generated/google/apis/remotebuildexecution_v2/representations.rb
Overview
A Tree contains all the
Directory protos in a
single directory Merkle tree, compressed into one message.
Instance Attribute Summary collapse
-
#children ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Directory>
All the child directories: the directories referred to by the root and, recursively, all its children.
-
#root ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Directory
A
Directoryrepresents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BuildBazelRemoteExecutionV2Tree
constructor
A new instance of BuildBazelRemoteExecutionV2Tree.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ BuildBazelRemoteExecutionV2Tree
Returns a new instance of BuildBazelRemoteExecutionV2Tree
2041 2042 2043 |
# File 'generated/google/apis/remotebuildexecution_v2/classes.rb', line 2041 def initialize(**args) update!(**args) end |
Instance Attribute Details
#children ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Directory>
All the child directories: the directories referred to by the root and,
recursively, all its children. In order to reconstruct the directory tree,
the client must take the digests of each of the child directories and then
build up a tree starting from the root.
Corresponds to the JSON property children
1979 1980 1981 |
# File 'generated/google/apis/remotebuildexecution_v2/classes.rb', line 1979 def children @children end |
#root ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Directory
A Directory represents a directory node in a file tree, containing zero or
more children FileNodes,
DirectoryNodes and
SymlinkNodes.
Each Node contains its name in the directory, either the digest of its
content (either a file blob or a Directory proto) or a symlink target, as
well as possibly some metadata about the file or directory.
In order to ensure that two equivalent directory trees hash to the same
value, the following restrictions MUST be obeyed when constructing a
a Directory:
- Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed.
- Each child in the directory must have a unique path segment (file name).
- The files, directories and symlinks in the directory must each be sorted
in lexicographical order by path. The path strings must be sorted by code
point, equivalently, by UTF-8 bytes.
A
Directorythat obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file namedbarand a directory namedfoowith an executable file namedbaz(hashes shortened for readability):json // (Directory proto) ` files: [ ` name: "bar", digest: ` hash: "4a73bc9d03...", size: 65534 ` ` ], directories: [ ` name: "foo", digest: ` hash: "4cf2eda940...", size: 43 ` ` ] ` // (Directory proto with hash "4cf2eda940..." and size 43) ` files: [ ` name: "baz", digest: ` hash: "b2c941073e...", size: 1294, `, is_executable: true ` ] `Corresponds to the JSON propertyroot
2039 2040 2041 |
# File 'generated/google/apis/remotebuildexecution_v2/classes.rb', line 2039 def root @root end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2046 2047 2048 2049 |
# File 'generated/google/apis/remotebuildexecution_v2/classes.rb', line 2046 def update!(**args) @children = args[:children] if args.key?(:children) @root = args[:root] if args.key?(:root) end |