Class: Google::Apis::SecuresourcemanagerV1::FileDiff

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

Metadata of a FileDiff. FileDiff represents a single file diff in a pull request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FileDiff

Returns a new instance of FileDiff.



673
674
675
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 673

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

Instance Attribute Details

#actionString

Output only. The action taken on the file (eg. added, modified, deleted). Corresponds to the JSON property action

Returns:

  • (String)


656
657
658
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 656

def action
  @action
end

#nameString

Output only. The name of the file. Corresponds to the JSON property name

Returns:

  • (String)


661
662
663
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 661

def name
  @name
end

#patchString

Output only. The git patch containing the file changes. Corresponds to the JSON property patch

Returns:

  • (String)


666
667
668
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 666

def patch
  @patch
end

#shaString

Output only. The commit pointing to the file changes. Corresponds to the JSON property sha

Returns:

  • (String)


671
672
673
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 671

def sha
  @sha
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



678
679
680
681
682
683
# File 'lib/google/apis/securesourcemanager_v1/classes.rb', line 678

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @name = args[:name] if args.key?(:name)
  @patch = args[:patch] if args.key?(:patch)
  @sha = args[:sha] if args.key?(:sha)
end