jirust_cli::args::commands

Struct VersionArgs

Source
pub struct VersionArgs {
Show 15 fields pub version_act: VersionActionValues, pub project_key: String, pub project_id: Option<i64>, pub version_id: Option<String>, pub version_name: Option<String>, pub version_description: Option<String>, pub version_start_date: Option<String>, pub version_release_date: Option<String>, pub version_archived: Option<bool>, pub version_released: Option<bool>, pub changelog_file: Option<String>, pub transition_issues: Option<bool>, pub transition_assignee: Option<String>, pub pagination: PaginationArgs, pub output: OutputArgs,
}
Expand description

Available version command line arguments version_act: VersionActionValues Create, List, Update, Delete, Release, Archive

Fields§

§version_act: VersionActionValues

Version action

§project_key: String

Jira Project key

§project_id: Option<i64>

Jira Project ID

§version_id: Option<String>

Jira Project version ID

§version_name: Option<String>

Jira Project version name

§version_description: Option<String>

Jira Project version description

§version_start_date: Option<String>

Jira Project version start date

§version_release_date: Option<String>

Jira Project version release date

§version_archived: Option<bool>

Jira Project version archived

§version_released: Option<bool>

Jira Project version released

§changelog_file: Option<String>

Jira Project version changelog file

§transition_issues: Option<bool>

Jira Project version automatically transition issues in changelog

§transition_assignee: Option<String>

Jira Project version transition assignee

§pagination: PaginationArgs

Jira Project version pagination

§output: OutputArgs

Jira Project version actions result output format

Trait Implementations§

Source§

impl Args for VersionArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for VersionArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&VersionArgs> for VersionCmdParams

Implementation of the From trait for the VersionArgs struct This implementation allows the conversion of a VersionArgs struct to a VersionCmdParams struct.

Source§

fn from(args: &VersionArgs) -> Self

This method converts the VersionArgs struct to a VersionCmdParams struct and returns a VersionCmdParams struct

§Arguments
  • args - A VersionArgs struct
§Returns
  • A VersionCmdParams struct
§Examples
use jirust_cli::args::commands::{VersionActionValues, VersionArgs, PaginationArgs, OutputArgs};
use jirust_cli::runners::jira_cmd_runners::version_cmd_runner::VersionCmdParams;

let version_args = VersionArgs {
  version_act: VersionActionValues::List,
  project_key: "project_key".to_string(),
  project_id: None,
  version_id: None,
  version_name: Some("version_name".to_string()),
  version_description: Some("version_description".to_string()),
  version_start_date: None,
  version_release_date: None,
  version_archived: None,
  version_released: None,
  changelog_file: None,
  pagination: PaginationArgs { page_size: Some(10), page_offset: Some(0) },
  output: OutputArgs { output: None},
  transition_issues: None,
  transition_assignee: None,
};

let params = VersionCmdParams::from(&version_args);

assert_eq!(params.project, "project_key".to_string());
assert_eq!(params.version_name, Some("version_name".to_string()));
assert_eq!(params.version_description, Some("version_description".to_string()));
assert_eq!(params.versions_page_size, Some(10));
assert_eq!(params.versions_page_offset, Some(0));
Source§

impl FromArgMatches for VersionArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T