#[non_exhaustive]pub struct CreateProfileRequest {
pub parent: String,
pub deployment: Option<Deployment>,
pub profile_type: Vec<ProfileType>,
/* private fields */
}Expand description
CreateProfileRequest describes a profile resource online creation request. The deployment field must be populated. The profile_type specifies the list of profile types supported by the agent. The creation call will hang until a profile of one of these types needs to be collected.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringParent project to create the profile in.
deployment: Option<Deployment>Deployment details.
profile_type: Vec<ProfileType>One or more profile types that the agent is capable of providing.
Implementations§
Source§impl CreateProfileRequest
impl CreateProfileRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_deployment<T>(self, v: T) -> Selfwhere
T: Into<Deployment>,
pub fn set_deployment<T>(self, v: T) -> Selfwhere
T: Into<Deployment>,
Sets the value of deployment.
§Example
ⓘ
use google_cloud_profiler_v2::model::Deployment;
let x = CreateProfileRequest::new().set_deployment(Deployment::default()/* use setters */);Sourcepub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Deployment>,
pub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Deployment>,
Sets or clears the value of deployment.
§Example
ⓘ
use google_cloud_profiler_v2::model::Deployment;
let x = CreateProfileRequest::new().set_or_clear_deployment(Some(Deployment::default()/* use setters */));
let x = CreateProfileRequest::new().set_or_clear_deployment(None::<Deployment>);Sourcepub fn set_profile_type<T, V>(self, v: T) -> Self
pub fn set_profile_type<T, V>(self, v: T) -> Self
Sets the value of profile_type.
§Example
ⓘ
use google_cloud_profiler_v2::model::ProfileType;
let x = CreateProfileRequest::new().set_profile_type([
ProfileType::Cpu,
ProfileType::Wall,
ProfileType::Heap,
]);Trait Implementations§
Source§impl Clone for CreateProfileRequest
impl Clone for CreateProfileRequest
Source§fn clone(&self) -> CreateProfileRequest
fn clone(&self) -> CreateProfileRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateProfileRequest
impl Debug for CreateProfileRequest
Source§impl Default for CreateProfileRequest
impl Default for CreateProfileRequest
Source§fn default() -> CreateProfileRequest
fn default() -> CreateProfileRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateProfileRequest
impl Message for CreateProfileRequest
Source§impl PartialEq for CreateProfileRequest
impl PartialEq for CreateProfileRequest
impl StructuralPartialEq for CreateProfileRequest
Auto Trait Implementations§
impl Freeze for CreateProfileRequest
impl RefUnwindSafe for CreateProfileRequest
impl Send for CreateProfileRequest
impl Sync for CreateProfileRequest
impl Unpin for CreateProfileRequest
impl UnwindSafe for CreateProfileRequest
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