// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. ///

Returns information about a pull request event.

#[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct PullRequestEvent { ///

The system-generated ID of the pull request.

pub pull_request_id: ::std::option::Option<::std::string::String>, ///

The day and time of the pull request event, in timestamp format.

pub event_date: ::std::option::Option<::aws_smithy_types::DateTime>, ///

The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).

pub pull_request_event_type: ::std::option::Option, ///

The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.

pub actor_arn: ::std::option::Option<::std::string::String>, ///

Information about the source and destination branches for the pull request.

pub pull_request_created_event_metadata: ::std::option::Option, ///

Information about the change in status for the pull request event.

pub pull_request_status_changed_event_metadata: ::std::option::Option, ///

Information about the updated source branch for the pull request event.

pub pull_request_source_reference_updated_event_metadata: ::std::option::Option, ///

Information about the change in mergability state for the pull request event.

pub pull_request_merged_state_changed_event_metadata: ::std::option::Option, ///

Information about a pull request event.

pub approval_rule_event_metadata: ::std::option::Option, ///

Information about an approval state change for a pull request.

pub approval_state_changed_event_metadata: ::std::option::Option, ///

Information about an approval rule override event for a pull request.

pub approval_rule_overridden_event_metadata: ::std::option::Option, } impl PullRequestEvent { ///

The system-generated ID of the pull request.

pub fn pull_request_id(&self) -> ::std::option::Option<&str> { self.pull_request_id.as_deref() } ///

The day and time of the pull request event, in timestamp format.

pub fn event_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { self.event_date.as_ref() } ///

The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).

pub fn pull_request_event_type(&self) -> ::std::option::Option<&crate::types::PullRequestEventType> { self.pull_request_event_type.as_ref() } ///

The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.

pub fn actor_arn(&self) -> ::std::option::Option<&str> { self.actor_arn.as_deref() } ///

Information about the source and destination branches for the pull request.

pub fn pull_request_created_event_metadata(&self) -> ::std::option::Option<&crate::types::PullRequestCreatedEventMetadata> { self.pull_request_created_event_metadata.as_ref() } ///

Information about the change in status for the pull request event.

pub fn pull_request_status_changed_event_metadata(&self) -> ::std::option::Option<&crate::types::PullRequestStatusChangedEventMetadata> { self.pull_request_status_changed_event_metadata.as_ref() } ///

Information about the updated source branch for the pull request event.

pub fn pull_request_source_reference_updated_event_metadata( &self, ) -> ::std::option::Option<&crate::types::PullRequestSourceReferenceUpdatedEventMetadata> { self.pull_request_source_reference_updated_event_metadata.as_ref() } ///

Information about the change in mergability state for the pull request event.

pub fn pull_request_merged_state_changed_event_metadata( &self, ) -> ::std::option::Option<&crate::types::PullRequestMergedStateChangedEventMetadata> { self.pull_request_merged_state_changed_event_metadata.as_ref() } ///

Information about a pull request event.

pub fn approval_rule_event_metadata(&self) -> ::std::option::Option<&crate::types::ApprovalRuleEventMetadata> { self.approval_rule_event_metadata.as_ref() } ///

Information about an approval state change for a pull request.

pub fn approval_state_changed_event_metadata(&self) -> ::std::option::Option<&crate::types::ApprovalStateChangedEventMetadata> { self.approval_state_changed_event_metadata.as_ref() } ///

Information about an approval rule override event for a pull request.

pub fn approval_rule_overridden_event_metadata(&self) -> ::std::option::Option<&crate::types::ApprovalRuleOverriddenEventMetadata> { self.approval_rule_overridden_event_metadata.as_ref() } } impl PullRequestEvent { /// Creates a new builder-style object to manufacture [`PullRequestEvent`](crate::types::PullRequestEvent). pub fn builder() -> crate::types::builders::PullRequestEventBuilder { crate::types::builders::PullRequestEventBuilder::default() } } /// A builder for [`PullRequestEvent`](crate::types::PullRequestEvent). #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct PullRequestEventBuilder { pub(crate) pull_request_id: ::std::option::Option<::std::string::String>, pub(crate) event_date: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) pull_request_event_type: ::std::option::Option, pub(crate) actor_arn: ::std::option::Option<::std::string::String>, pub(crate) pull_request_created_event_metadata: ::std::option::Option, pub(crate) pull_request_status_changed_event_metadata: ::std::option::Option, pub(crate) pull_request_source_reference_updated_event_metadata: ::std::option::Option, pub(crate) pull_request_merged_state_changed_event_metadata: ::std::option::Option, pub(crate) approval_rule_event_metadata: ::std::option::Option, pub(crate) approval_state_changed_event_metadata: ::std::option::Option, pub(crate) approval_rule_overridden_event_metadata: ::std::option::Option, } impl PullRequestEventBuilder { ///

The system-generated ID of the pull request.

pub fn pull_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.pull_request_id = ::std::option::Option::Some(input.into()); self } ///

The system-generated ID of the pull request.

pub fn set_pull_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.pull_request_id = input; self } ///

The system-generated ID of the pull request.

pub fn get_pull_request_id(&self) -> &::std::option::Option<::std::string::String> { &self.pull_request_id } ///

The day and time of the pull request event, in timestamp format.

pub fn event_date(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.event_date = ::std::option::Option::Some(input); self } ///

The day and time of the pull request event, in timestamp format.

pub fn set_event_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.event_date = input; self } ///

The day and time of the pull request event, in timestamp format.

pub fn get_event_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.event_date } ///

The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).

pub fn pull_request_event_type(mut self, input: crate::types::PullRequestEventType) -> Self { self.pull_request_event_type = ::std::option::Option::Some(input); self } ///

The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).

pub fn set_pull_request_event_type(mut self, input: ::std::option::Option) -> Self { self.pull_request_event_type = input; self } ///

The type of the pull request event (for example, a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED)).

pub fn get_pull_request_event_type(&self) -> &::std::option::Option { &self.pull_request_event_type } ///

The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.

pub fn actor_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.actor_arn = ::std::option::Option::Some(input.into()); self } ///

The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.

pub fn set_actor_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.actor_arn = input; self } ///

The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.

pub fn get_actor_arn(&self) -> &::std::option::Option<::std::string::String> { &self.actor_arn } ///

Information about the source and destination branches for the pull request.

pub fn pull_request_created_event_metadata(mut self, input: crate::types::PullRequestCreatedEventMetadata) -> Self { self.pull_request_created_event_metadata = ::std::option::Option::Some(input); self } ///

Information about the source and destination branches for the pull request.

pub fn set_pull_request_created_event_metadata(mut self, input: ::std::option::Option) -> Self { self.pull_request_created_event_metadata = input; self } ///

Information about the source and destination branches for the pull request.

pub fn get_pull_request_created_event_metadata(&self) -> &::std::option::Option { &self.pull_request_created_event_metadata } ///

Information about the change in status for the pull request event.

pub fn pull_request_status_changed_event_metadata(mut self, input: crate::types::PullRequestStatusChangedEventMetadata) -> Self { self.pull_request_status_changed_event_metadata = ::std::option::Option::Some(input); self } ///

Information about the change in status for the pull request event.

pub fn set_pull_request_status_changed_event_metadata( mut self, input: ::std::option::Option, ) -> Self { self.pull_request_status_changed_event_metadata = input; self } ///

Information about the change in status for the pull request event.

pub fn get_pull_request_status_changed_event_metadata(&self) -> &::std::option::Option { &self.pull_request_status_changed_event_metadata } ///

Information about the updated source branch for the pull request event.

pub fn pull_request_source_reference_updated_event_metadata( mut self, input: crate::types::PullRequestSourceReferenceUpdatedEventMetadata, ) -> Self { self.pull_request_source_reference_updated_event_metadata = ::std::option::Option::Some(input); self } ///

Information about the updated source branch for the pull request event.

pub fn set_pull_request_source_reference_updated_event_metadata( mut self, input: ::std::option::Option, ) -> Self { self.pull_request_source_reference_updated_event_metadata = input; self } ///

Information about the updated source branch for the pull request event.

pub fn get_pull_request_source_reference_updated_event_metadata( &self, ) -> &::std::option::Option { &self.pull_request_source_reference_updated_event_metadata } ///

Information about the change in mergability state for the pull request event.

pub fn pull_request_merged_state_changed_event_metadata(mut self, input: crate::types::PullRequestMergedStateChangedEventMetadata) -> Self { self.pull_request_merged_state_changed_event_metadata = ::std::option::Option::Some(input); self } ///

Information about the change in mergability state for the pull request event.

pub fn set_pull_request_merged_state_changed_event_metadata( mut self, input: ::std::option::Option, ) -> Self { self.pull_request_merged_state_changed_event_metadata = input; self } ///

Information about the change in mergability state for the pull request event.

pub fn get_pull_request_merged_state_changed_event_metadata( &self, ) -> &::std::option::Option { &self.pull_request_merged_state_changed_event_metadata } ///

Information about a pull request event.

pub fn approval_rule_event_metadata(mut self, input: crate::types::ApprovalRuleEventMetadata) -> Self { self.approval_rule_event_metadata = ::std::option::Option::Some(input); self } ///

Information about a pull request event.

pub fn set_approval_rule_event_metadata(mut self, input: ::std::option::Option) -> Self { self.approval_rule_event_metadata = input; self } ///

Information about a pull request event.

pub fn get_approval_rule_event_metadata(&self) -> &::std::option::Option { &self.approval_rule_event_metadata } ///

Information about an approval state change for a pull request.

pub fn approval_state_changed_event_metadata(mut self, input: crate::types::ApprovalStateChangedEventMetadata) -> Self { self.approval_state_changed_event_metadata = ::std::option::Option::Some(input); self } ///

Information about an approval state change for a pull request.

pub fn set_approval_state_changed_event_metadata( mut self, input: ::std::option::Option, ) -> Self { self.approval_state_changed_event_metadata = input; self } ///

Information about an approval state change for a pull request.

pub fn get_approval_state_changed_event_metadata(&self) -> &::std::option::Option { &self.approval_state_changed_event_metadata } ///

Information about an approval rule override event for a pull request.

pub fn approval_rule_overridden_event_metadata(mut self, input: crate::types::ApprovalRuleOverriddenEventMetadata) -> Self { self.approval_rule_overridden_event_metadata = ::std::option::Option::Some(input); self } ///

Information about an approval rule override event for a pull request.

pub fn set_approval_rule_overridden_event_metadata( mut self, input: ::std::option::Option, ) -> Self { self.approval_rule_overridden_event_metadata = input; self } ///

Information about an approval rule override event for a pull request.

pub fn get_approval_rule_overridden_event_metadata(&self) -> &::std::option::Option { &self.approval_rule_overridden_event_metadata } /// Consumes the builder and constructs a [`PullRequestEvent`](crate::types::PullRequestEvent). pub fn build(self) -> crate::types::PullRequestEvent { crate::types::PullRequestEvent { pull_request_id: self.pull_request_id, event_date: self.event_date, pull_request_event_type: self.pull_request_event_type, actor_arn: self.actor_arn, pull_request_created_event_metadata: self.pull_request_created_event_metadata, pull_request_status_changed_event_metadata: self.pull_request_status_changed_event_metadata, pull_request_source_reference_updated_event_metadata: self.pull_request_source_reference_updated_event_metadata, pull_request_merged_state_changed_event_metadata: self.pull_request_merged_state_changed_event_metadata, approval_rule_event_metadata: self.approval_rule_event_metadata, approval_state_changed_event_metadata: self.approval_state_changed_event_metadata, approval_rule_overridden_event_metadata: self.approval_rule_overridden_event_metadata, } } }