pub struct LicenseCreateRequest {Show 15 fields
pub policy_id: String,
pub name: Option<String>,
pub key: Option<String>,
pub expiry: Option<DateTime<Utc>>,
pub max_machines: Option<i32>,
pub max_processes: Option<i32>,
pub max_users: Option<i32>,
pub max_cores: Option<i32>,
pub max_uses: Option<i32>,
pub protected: Option<bool>,
pub suspended: Option<bool>,
pub permissions: Option<Vec<String>>,
pub metadata: Option<HashMap<String, Value>>,
pub owner_id: Option<String>,
pub group_id: Option<String>,
}Expand description
Request structure for creating a new license with complete API support
Fields§
§policy_id: String§name: Option<String>§key: Option<String>§expiry: Option<DateTime<Utc>>§max_machines: Option<i32>§max_processes: Option<i32>§max_users: Option<i32>§max_cores: Option<i32>§max_uses: Option<i32>§protected: Option<bool>§suspended: Option<bool>§permissions: Option<Vec<String>>§metadata: Option<HashMap<String, Value>>§owner_id: Option<String>§group_id: Option<String>Implementations§
Source§impl LicenseCreateRequest
impl LicenseCreateRequest
Sourcepub fn new(policy_id: String) -> Self
pub fn new(policy_id: String) -> Self
Create a new license creation request with the required policy ID
Sourcepub fn with_expiry(self, expiry: DateTime<Utc>) -> Self
pub fn with_expiry(self, expiry: DateTime<Utc>) -> Self
Set the expiry date
Sourcepub fn with_max_machines(self, max_machines: i32) -> Self
pub fn with_max_machines(self, max_machines: i32) -> Self
Set the maximum number of machines
Sourcepub fn with_max_processes(self, max_processes: i32) -> Self
pub fn with_max_processes(self, max_processes: i32) -> Self
Set the maximum number of processes
Sourcepub fn with_max_users(self, max_users: i32) -> Self
pub fn with_max_users(self, max_users: i32) -> Self
Set the maximum number of users
Sourcepub fn with_max_cores(self, max_cores: i32) -> Self
pub fn with_max_cores(self, max_cores: i32) -> Self
Set the maximum number of cores
Sourcepub fn with_max_uses(self, max_uses: i32) -> Self
pub fn with_max_uses(self, max_uses: i32) -> Self
Set the maximum number of uses
Sourcepub fn with_protected(self, protected: bool) -> Self
pub fn with_protected(self, protected: bool) -> Self
Set the protected flag
Sourcepub fn with_suspended(self, suspended: bool) -> Self
pub fn with_suspended(self, suspended: bool) -> Self
Set the suspended flag
Sourcepub fn with_permissions(self, permissions: Vec<String>) -> Self
pub fn with_permissions(self, permissions: Vec<String>) -> Self
Set the permissions array
Sourcepub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
Set the metadata
Sourcepub fn with_owner_id(self, owner_id: String) -> Self
pub fn with_owner_id(self, owner_id: String) -> Self
Set the owner (user) ID
Sourcepub fn with_group_id(self, group_id: String) -> Self
pub fn with_group_id(self, group_id: String) -> Self
Set the group ID
Sourcepub fn to_json_body(self) -> Value
pub fn to_json_body(self) -> Value
Convert this request to attributes and relationships JSON maps for the API
Trait Implementations§
Source§impl Debug for LicenseCreateRequest
impl Debug for LicenseCreateRequest
Source§impl Default for LicenseCreateRequest
impl Default for LicenseCreateRequest
Source§fn default() -> LicenseCreateRequest
fn default() -> LicenseCreateRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LicenseCreateRequest
impl RefUnwindSafe for LicenseCreateRequest
impl Send for LicenseCreateRequest
impl Sync for LicenseCreateRequest
impl Unpin for LicenseCreateRequest
impl UnsafeUnpin for LicenseCreateRequest
impl UnwindSafe for LicenseCreateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more