#[non_exhaustive]pub struct CreateHostProjectRegistrationRequest {
pub parent: String,
pub host_project_registration_id: String,
pub host_project_registration: Option<HostProjectRegistration>,
/* private fields */
}Expand description
The CreateHostProjectRegistration method’s request.
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: StringRequired. The parent resource for the host project.
Format: projects/{project}/locations/{location}
host_project_registration_id: StringRequired. The ID to use for the Host Project Registration, which will become the final component of the host project registration’s resource name. The ID must be the same as the Google cloud project specified in the host_project_registration.gcp_project field.
host_project_registration: Option<HostProjectRegistration>Required. The host project registration to register.
Implementations§
Source§impl CreateHostProjectRegistrationRequest
impl CreateHostProjectRegistrationRequest
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_host_project_registration_id<T: Into<String>>(self, v: T) -> Self
pub fn set_host_project_registration_id<T: Into<String>>(self, v: T) -> Self
Sets the value of host_project_registration_id.
§Example
ⓘ
let x = CreateHostProjectRegistrationRequest::new().set_host_project_registration_id("example");Sourcepub fn set_host_project_registration<T>(self, v: T) -> Selfwhere
T: Into<HostProjectRegistration>,
pub fn set_host_project_registration<T>(self, v: T) -> Selfwhere
T: Into<HostProjectRegistration>,
Sets the value of host_project_registration.
§Example
ⓘ
use google_cloud_apihub_v1::model::HostProjectRegistration;
let x = CreateHostProjectRegistrationRequest::new().set_host_project_registration(HostProjectRegistration::default()/* use setters */);Sourcepub fn set_or_clear_host_project_registration<T>(self, v: Option<T>) -> Selfwhere
T: Into<HostProjectRegistration>,
pub fn set_or_clear_host_project_registration<T>(self, v: Option<T>) -> Selfwhere
T: Into<HostProjectRegistration>,
Sets or clears the value of host_project_registration.
§Example
ⓘ
use google_cloud_apihub_v1::model::HostProjectRegistration;
let x = CreateHostProjectRegistrationRequest::new().set_or_clear_host_project_registration(Some(HostProjectRegistration::default()/* use setters */));
let x = CreateHostProjectRegistrationRequest::new().set_or_clear_host_project_registration(None::<HostProjectRegistration>);Trait Implementations§
Source§impl Clone for CreateHostProjectRegistrationRequest
impl Clone for CreateHostProjectRegistrationRequest
Source§fn clone(&self) -> CreateHostProjectRegistrationRequest
fn clone(&self) -> CreateHostProjectRegistrationRequest
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 Default for CreateHostProjectRegistrationRequest
impl Default for CreateHostProjectRegistrationRequest
Source§fn default() -> CreateHostProjectRegistrationRequest
fn default() -> CreateHostProjectRegistrationRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateHostProjectRegistrationRequest
impl PartialEq for CreateHostProjectRegistrationRequest
Source§fn eq(&self, other: &CreateHostProjectRegistrationRequest) -> bool
fn eq(&self, other: &CreateHostProjectRegistrationRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateHostProjectRegistrationRequest
Auto Trait Implementations§
impl Freeze for CreateHostProjectRegistrationRequest
impl RefUnwindSafe for CreateHostProjectRegistrationRequest
impl Send for CreateHostProjectRegistrationRequest
impl Sync for CreateHostProjectRegistrationRequest
impl Unpin for CreateHostProjectRegistrationRequest
impl UnsafeUnpin for CreateHostProjectRegistrationRequest
impl UnwindSafe for CreateHostProjectRegistrationRequest
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