Class: Google::Apis::CloudbuildV1::RepositoryEventConfig

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

Overview

The configuration of a trigger that creates a build whenever an event from Repo API is received.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RepositoryEventConfig

Returns a new instance of RepositoryEventConfig.



3474
3475
3476
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3474

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

Instance Attribute Details

#pull_requestGoogle::Apis::CloudbuildV1::PullRequestFilter

PullRequestFilter contains filter properties for matching GitHub Pull Requests. Corresponds to the JSON property pullRequest



3457
3458
3459
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3457

def pull_request
  @pull_request
end

#pushGoogle::Apis::CloudbuildV1::PushFilter

Push contains filter properties for matching GitHub git pushes. Corresponds to the JSON property push



3462
3463
3464
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3462

def push
  @push
end

#repositoryString

The resource name of the Repo API resource. Corresponds to the JSON property repository

Returns:

  • (String)


3467
3468
3469
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3467

def repository
  @repository
end

#repository_typeString

Output only. The type of the SCM vendor the repository points to. Corresponds to the JSON property repositoryType

Returns:

  • (String)


3472
3473
3474
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3472

def repository_type
  @repository_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3479
3480
3481
3482
3483
3484
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3479

def update!(**args)
  @pull_request = args[:pull_request] if args.key?(:pull_request)
  @push = args[:push] if args.key?(:push)
  @repository = args[:repository] if args.key?(:repository)
  @repository_type = args[:repository_type] if args.key?(:repository_type)
end