Class: AWSCDK::Codepipeline::CfnPipeline::GitPullRequestFilterProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codepipeline/cfn_pipeline.rb

Overview

The event criteria for the pull request trigger configuration, such as the lists of branches or file paths to include and exclude.

The following are valid values for the events for this filter:

  • CLOSED
  • OPEN
  • UPDATED

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(branches: nil, events: nil, file_paths: nil) ⇒ GitPullRequestFilterProperty

Returns a new instance of GitPullRequestFilterProperty.

Parameters:



1483
1484
1485
1486
1487
1488
1489
1490
# File 'codepipeline/cfn_pipeline.rb', line 1483

def initialize(branches: nil, events: nil, file_paths: nil)
  @branches = branches.is_a?(Hash) ? ::AWSCDK::Codepipeline::CfnPipeline::GitBranchFilterCriteriaProperty.new(**branches.transform_keys(&:to_sym)) : branches
  Jsii::Type.check_type(@branches, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQ2ZuUGlwZWxpbmUuR2l0QnJhbmNoRmlsdGVyQ3JpdGVyaWFQcm9wZXJ0eSJ9XX19")), "branches") unless @branches.nil?
  @events = events
  Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "events") unless @events.nil?
  @file_paths = file_paths.is_a?(Hash) ? ::AWSCDK::Codepipeline::CfnPipeline::GitFilePathFilterCriteriaProperty.new(**file_paths.transform_keys(&:to_sym)) : file_paths
  Jsii::Type.check_type(@file_paths, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQ2ZuUGlwZWxpbmUuR2l0RmlsZVBhdGhGaWx0ZXJDcml0ZXJpYVByb3BlcnR5In1dfX0=")), "filePaths") unless @file_paths.nil?
end

Instance Attribute Details

#branchesAWSCDK::IResolvable, ... (readonly)

The field that specifies to filter on branches for the pull request trigger configuration.



1496
1497
1498
# File 'codepipeline/cfn_pipeline.rb', line 1496

def branches
  @branches
end

#eventsArray<String>? (readonly)

The field that specifies which pull request events to filter on (OPEN, UPDATED, CLOSED) for the trigger configuration.



1501
1502
1503
# File 'codepipeline/cfn_pipeline.rb', line 1501

def events
  @events
end

#file_pathsAWSCDK::IResolvable, ... (readonly)

The field that specifies to filter on file paths for the pull request trigger configuration.



1506
1507
1508
# File 'codepipeline/cfn_pipeline.rb', line 1506

def file_paths
  @file_paths
end

Class Method Details

.jsii_propertiesObject



1508
1509
1510
1511
1512
1513
1514
# File 'codepipeline/cfn_pipeline.rb', line 1508

def self.jsii_properties
  {
    :branches => "branches",
    :events => "events",
    :file_paths => "filePaths",
  }
end

Instance Method Details

#to_jsiiObject



1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'codepipeline/cfn_pipeline.rb', line 1516

def to_jsii
  result = {}
  result.merge!({
    "branches" => @branches,
    "events" => @events,
    "filePaths" => @file_paths,
  })
  result.compact
end