Class: Google::Apis::SecuresourcemanagerV1::TreeEntry

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/securesourcemanager_v1/classes.rb,
lib/google/apis/securesourcemanager_v1/representations.rb,
lib/google/apis/securesourcemanager_v1/representations.rb

Overview

Represents an entry within a tree structure (like a Git tree).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TreeEntry

Returns a new instance of TreeEntry.



2238
2239
2240
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2238

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#modeString

Output only. The file mode as a string (e.g., "100644"). Indicates file type. Output-only. Corresponds to the JSON property mode

Returns:

  • (String)


2215
2216
2217
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2215

def mode
  @mode
end

#pathString

Output only. The path of the file or directory within the tree (e.g., "src/ main/java/MyClass.java"). Output-only. Corresponds to the JSON property path

Returns:

  • (String)


2221
2222
2223
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2221

def path
  @path
end

#shaString

Output only. The SHA-1 hash of the object (unique identifier). Output-only. Corresponds to the JSON property sha

Returns:

  • (String)


2226
2227
2228
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2226

def sha
  @sha
end

#sizeFixnum

Output only. The size of the object in bytes (only for blobs). Output-only. Corresponds to the JSON property size

Returns:

  • (Fixnum)


2231
2232
2233
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2231

def size
  @size
end

#typeString

Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. Corresponds to the JSON property type

Returns:

  • (String)


2236
2237
2238
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2236

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2243
2244
2245
2246
2247
2248
2249
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 2243

def update!(**args)
  @mode = args[:mode] if args.key?(:mode)
  @path = args[:path] if args.key?(:path)
  @sha = args[:sha] if args.key?(:sha)
  @size = args[:size] if args.key?(:size)
  @type = args[:type] if args.key?(:type)
end