pub struct LicenseUpdateRequest {
pub name: Option<String>,
pub expiry: Option<DateTime<Utc>>,
pub max_machines: UpdateField<i32>,
pub max_processes: UpdateField<i32>,
pub max_users: UpdateField<i32>,
pub max_cores: UpdateField<i32>,
pub max_uses: UpdateField<i32>,
pub protected: Option<bool>,
pub suspended: Option<bool>,
pub permissions: Option<Vec<String>>,
pub metadata: Option<HashMap<String, Value>>,
}Expand description
Request structure for updating a license with complete API support
Fields§
§name: Option<String>§expiry: Option<DateTime<Utc>>§max_machines: UpdateField<i32>§max_processes: UpdateField<i32>§max_users: UpdateField<i32>§max_cores: UpdateField<i32>§max_uses: UpdateField<i32>§protected: Option<bool>§suspended: Option<bool>§permissions: Option<Vec<String>>§metadata: Option<HashMap<String, Value>>Implementations§
Source§impl LicenseUpdateRequest
impl LicenseUpdateRequest
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 clear_max_machines(self) -> Self
pub fn clear_max_machines(self) -> Self
Clear the maximum number of machines (set to null)
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 clear_max_processes(self) -> Self
pub fn clear_max_processes(self) -> Self
Clear the maximum number of processes (set to null)
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 clear_max_users(self) -> Self
pub fn clear_max_users(self) -> Self
Clear the maximum number of users (set to null)
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 clear_max_cores(self) -> Self
pub fn clear_max_cores(self) -> Self
Clear the maximum number of cores (set to null)
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 clear_max_uses(self) -> Self
pub fn clear_max_uses(self) -> Self
Clear the maximum number of uses (set to null)
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 to_json_body(self) -> Value
pub fn to_json_body(self) -> Value
Convert this request to complete JSON body for the API
Trait Implementations§
Source§impl Debug for LicenseUpdateRequest
impl Debug for LicenseUpdateRequest
Source§impl Default for LicenseUpdateRequest
impl Default for LicenseUpdateRequest
Source§fn default() -> LicenseUpdateRequest
fn default() -> LicenseUpdateRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LicenseUpdateRequest
impl RefUnwindSafe for LicenseUpdateRequest
impl Send for LicenseUpdateRequest
impl Sync for LicenseUpdateRequest
impl Unpin for LicenseUpdateRequest
impl UnsafeUnpin for LicenseUpdateRequest
impl UnwindSafe for LicenseUpdateRequest
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