Class: Google::Apis::ContaineranalysisV1::SourceContext

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

Overview

A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SourceContext

Returns a new instance of SourceContext.



5127
5128
5129
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 5127

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

Instance Attribute Details

#cloud_repoGoogle::Apis::ContaineranalysisV1::CloudRepoSourceContext

A CloudRepoSourceContext denotes a particular revision in a Google Cloud Source Repo. Corresponds to the JSON property cloudRepo



5109
5110
5111
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 5109

def cloud_repo
  @cloud_repo
end

#gerritGoogle::Apis::ContaineranalysisV1::GerritSourceContext

A SourceContext referring to a Gerrit project. Corresponds to the JSON property gerrit



5114
5115
5116
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 5114

def gerrit
  @gerrit
end

#gitGoogle::Apis::ContaineranalysisV1::GitSourceContext

A GitSourceContext denotes a particular revision in a third party Git repository (e.g., GitHub). Corresponds to the JSON property git



5120
5121
5122
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 5120

def git
  @git
end

#labelsHash<String,String>

Labels with user defined metadata. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


5125
5126
5127
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 5125

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5132
5133
5134
5135
5136
5137
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 5132

def update!(**args)
  @cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo)
  @gerrit = args[:gerrit] if args.key?(:gerrit)
  @git = args[:git] if args.key?(:git)
  @labels = args[:labels] if args.key?(:labels)
end