#[non_exhaustive]pub struct CreateGeneratorRequest {
pub parent: String,
pub generator: Option<Generator>,
pub generator_id: String,
/* private fields */
}Available on crate feature
generators only.Expand description
Request message of CreateGenerator.
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 project/location to create generator for. Format:
projects/<Project ID>/locations/<Location ID>
generator: Option<Generator>Required. The generator to create.
generator_id: StringOptional. The ID to use for the generator, which will become the final component of the generator’s resource name.
The generator ID must be compliant with the regression formula
[a-zA-Z][a-zA-Z0-9_-]* with the characters length in range of [3,64].
If the field is not provided, an Id will be auto-generated.
If the field is provided, the caller is responsible for
- the uniqueness of the ID, otherwise the request will be rejected.
- the consistency for whether to use custom ID or not under a project to better ensure uniqueness.
Implementations§
Source§impl CreateGeneratorRequest
impl CreateGeneratorRequest
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_generator<T>(self, v: T) -> Self
pub fn set_generator<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_generator<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_generator<T>(self, v: Option<T>) -> Self
Sourcepub fn set_generator_id<T: Into<String>>(self, v: T) -> Self
pub fn set_generator_id<T: Into<String>>(self, v: T) -> Self
Sets the value of generator_id.
§Example
ⓘ
let x = CreateGeneratorRequest::new().set_generator_id("example");Trait Implementations§
Source§impl Clone for CreateGeneratorRequest
impl Clone for CreateGeneratorRequest
Source§fn clone(&self) -> CreateGeneratorRequest
fn clone(&self) -> CreateGeneratorRequest
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 CreateGeneratorRequest
impl Debug for CreateGeneratorRequest
Source§impl Default for CreateGeneratorRequest
impl Default for CreateGeneratorRequest
Source§fn default() -> CreateGeneratorRequest
fn default() -> CreateGeneratorRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateGeneratorRequest
impl Message for CreateGeneratorRequest
Source§impl PartialEq for CreateGeneratorRequest
impl PartialEq for CreateGeneratorRequest
impl StructuralPartialEq for CreateGeneratorRequest
Auto Trait Implementations§
impl Freeze for CreateGeneratorRequest
impl RefUnwindSafe for CreateGeneratorRequest
impl Send for CreateGeneratorRequest
impl Sync for CreateGeneratorRequest
impl Unpin for CreateGeneratorRequest
impl UnwindSafe for CreateGeneratorRequest
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