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

Returns information about the location of a change or comment in the comparison between two commits or a pull request.

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

The name of the file being compared, including its extension and subdirectory, if any.

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

The position of a change in a compared file, in line number format.

pub file_position: ::std::option::Option, ///

In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

pub relative_file_version: ::std::option::Option, } impl Location { ///

The name of the file being compared, including its extension and subdirectory, if any.

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

The position of a change in a compared file, in line number format.

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

In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

pub fn relative_file_version(&self) -> ::std::option::Option<&crate::types::RelativeFileVersionEnum> { self.relative_file_version.as_ref() } } impl Location { /// Creates a new builder-style object to manufacture [`Location`](crate::types::Location). pub fn builder() -> crate::types::builders::LocationBuilder { crate::types::builders::LocationBuilder::default() } } /// A builder for [`Location`](crate::types::Location). #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct LocationBuilder { pub(crate) file_path: ::std::option::Option<::std::string::String>, pub(crate) file_position: ::std::option::Option, pub(crate) relative_file_version: ::std::option::Option, } impl LocationBuilder { ///

The name of the file being compared, including its extension and subdirectory, if any.

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

The name of the file being compared, including its extension and subdirectory, if any.

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

The name of the file being compared, including its extension and subdirectory, if any.

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

The position of a change in a compared file, in line number format.

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

The position of a change in a compared file, in line number format.

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

The position of a change in a compared file, in line number format.

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

In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

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

In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

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

In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

pub fn get_relative_file_version(&self) -> &::std::option::Option { &self.relative_file_version } /// Consumes the builder and constructs a [`Location`](crate::types::Location). pub fn build(self) -> crate::types::Location { crate::types::Location { file_path: self.file_path, file_position: self.file_position, relative_file_version: self.relative_file_version, } } }