#[non_exhaustive]pub struct CreateNamespaceRequest {
pub parent: String,
pub namespace_id: String,
pub namespace: Option<Namespace>,
/* private fields */
}Expand description
The request message for RegistrationService.CreateNamespace.
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 resource name of the project and location the namespace will be created in.
namespace_id: StringRequired. The Resource ID must be 1-63 characters long, and comply with
RFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z](?:[-a-z0-9]{0,61}[a-z0-9])? which means the first
character must be a lowercase letter, and all following characters must
be a dash, lowercase letter, or digit, except the last character, which
cannot be a dash.
namespace: Option<Namespace>Required. A namespace with initial fields set.
Implementations§
Source§impl CreateNamespaceRequest
impl CreateNamespaceRequest
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_namespace_id<T: Into<String>>(self, v: T) -> Self
pub fn set_namespace_id<T: Into<String>>(self, v: T) -> Self
Sets the value of namespace_id.
§Example
ⓘ
let x = CreateNamespaceRequest::new().set_namespace_id("example");Sourcepub fn set_namespace<T>(self, v: T) -> Self
pub fn set_namespace<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_namespace<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_namespace<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for CreateNamespaceRequest
impl Clone for CreateNamespaceRequest
Source§fn clone(&self) -> CreateNamespaceRequest
fn clone(&self) -> CreateNamespaceRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateNamespaceRequest
impl Debug for CreateNamespaceRequest
Source§impl Default for CreateNamespaceRequest
impl Default for CreateNamespaceRequest
Source§fn default() -> CreateNamespaceRequest
fn default() -> CreateNamespaceRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateNamespaceRequest
impl Message for CreateNamespaceRequest
Source§impl PartialEq for CreateNamespaceRequest
impl PartialEq for CreateNamespaceRequest
impl StructuralPartialEq for CreateNamespaceRequest
Auto Trait Implementations§
impl Freeze for CreateNamespaceRequest
impl RefUnwindSafe for CreateNamespaceRequest
impl Send for CreateNamespaceRequest
impl Sync for CreateNamespaceRequest
impl Unpin for CreateNamespaceRequest
impl UnsafeUnpin for CreateNamespaceRequest
impl UnwindSafe for CreateNamespaceRequest
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