pub struct Builder { /* private fields */ }
Expand description
A builder for PackageVersionDescription
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn format(self, input: PackageFormat) -> Self
pub fn format(self, input: PackageFormat) -> Self
The format of the package version.
sourcepub fn set_format(self, input: Option<PackageFormat>) -> Self
pub fn set_format(self, input: Option<PackageFormat>) -> Self
The format of the package version.
sourcepub fn namespace(self, input: impl Into<String>) -> Self
pub fn namespace(self, input: impl Into<String>) -> Self
The namespace of the package version. The package version component that specifies its namespace depends on its type. For example:
-
The namespace of a Maven package version is its
groupId
. -
The namespace of an npm package version is its
scope
. -
Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
sourcepub fn set_namespace(self, input: Option<String>) -> Self
pub fn set_namespace(self, input: Option<String>) -> Self
The namespace of the package version. The package version component that specifies its namespace depends on its type. For example:
-
The namespace of a Maven package version is its
groupId
. -
The namespace of an npm package version is its
scope
. -
Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
sourcepub fn package_name(self, input: impl Into<String>) -> Self
pub fn package_name(self, input: impl Into<String>) -> Self
The name of the requested package.
sourcepub fn set_package_name(self, input: Option<String>) -> Self
pub fn set_package_name(self, input: Option<String>) -> Self
The name of the requested package.
sourcepub fn display_name(self, input: impl Into<String>) -> Self
pub fn display_name(self, input: impl Into<String>) -> Self
The name of the package that is displayed. The displayName
varies depending on the package version's format. For example, if an npm package is named ui
, is in the namespace vue
, and has the format npm
, then the displayName
is @vue/ui
.
sourcepub fn set_display_name(self, input: Option<String>) -> Self
pub fn set_display_name(self, input: Option<String>) -> Self
The name of the package that is displayed. The displayName
varies depending on the package version's format. For example, if an npm package is named ui
, is in the namespace vue
, and has the format npm
, then the displayName
is @vue/ui
.
sourcepub fn set_version(self, input: Option<String>) -> Self
pub fn set_version(self, input: Option<String>) -> Self
The version of the package.
sourcepub fn summary(self, input: impl Into<String>) -> Self
pub fn summary(self, input: impl Into<String>) -> Self
A summary of the package version. The summary is extracted from the package. The information in and detail level of the summary depends on the package version's format.
sourcepub fn set_summary(self, input: Option<String>) -> Self
pub fn set_summary(self, input: Option<String>) -> Self
A summary of the package version. The summary is extracted from the package. The information in and detail level of the summary depends on the package version's format.
sourcepub fn home_page(self, input: impl Into<String>) -> Self
pub fn home_page(self, input: impl Into<String>) -> Self
The homepage associated with the package.
sourcepub fn set_home_page(self, input: Option<String>) -> Self
pub fn set_home_page(self, input: Option<String>) -> Self
The homepage associated with the package.
sourcepub fn source_code_repository(self, input: impl Into<String>) -> Self
pub fn source_code_repository(self, input: impl Into<String>) -> Self
The repository for the source code in the package version, or the source code used to build it.
sourcepub fn set_source_code_repository(self, input: Option<String>) -> Self
pub fn set_source_code_repository(self, input: Option<String>) -> Self
The repository for the source code in the package version, or the source code used to build it.
sourcepub fn published_time(self, input: DateTime) -> Self
pub fn published_time(self, input: DateTime) -> Self
A timestamp that contains the date and time the package version was published.
sourcepub fn set_published_time(self, input: Option<DateTime>) -> Self
pub fn set_published_time(self, input: Option<DateTime>) -> Self
A timestamp that contains the date and time the package version was published.
sourcepub fn licenses(self, input: LicenseInfo) -> Self
pub fn licenses(self, input: LicenseInfo) -> Self
Appends an item to licenses
.
To override the contents of this collection use set_licenses
.
Information about licenses associated with the package version.
sourcepub fn set_licenses(self, input: Option<Vec<LicenseInfo>>) -> Self
pub fn set_licenses(self, input: Option<Vec<LicenseInfo>>) -> Self
Information about licenses associated with the package version.
sourcepub fn set_revision(self, input: Option<String>) -> Self
pub fn set_revision(self, input: Option<String>) -> Self
The revision of the package version.
sourcepub fn status(self, input: PackageVersionStatus) -> Self
pub fn status(self, input: PackageVersionStatus) -> Self
A string that contains the status of the package version.
sourcepub fn set_status(self, input: Option<PackageVersionStatus>) -> Self
pub fn set_status(self, input: Option<PackageVersionStatus>) -> Self
A string that contains the status of the package version.
sourcepub fn origin(self, input: PackageVersionOrigin) -> Self
pub fn origin(self, input: PackageVersionOrigin) -> Self
A PackageVersionOrigin object that contains information about how the package version was added to the repository.
sourcepub fn set_origin(self, input: Option<PackageVersionOrigin>) -> Self
pub fn set_origin(self, input: Option<PackageVersionOrigin>) -> Self
A PackageVersionOrigin object that contains information about how the package version was added to the repository.
sourcepub fn build(self) -> PackageVersionDescription
pub fn build(self) -> PackageVersionDescription
Consumes the builder and constructs a PackageVersionDescription
.