#[non_exhaustive]pub struct CreateAttributeRequest {
pub parent: String,
pub attribute_id: String,
pub attribute: Option<Attribute>,
/* private fields */
}Expand description
The CreateAttribute 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 Attribute.
Format: projects/{project}/locations/{location}
attribute_id: StringOptional. The ID to use for the attribute, which will become the final component of the attribute’s resource name. This field is optional.
- If provided, the same will be used. The service will throw an error if the specified id is already used by another attribute resource in the API hub.
- If not provided, a system generated id will be used.
This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
attribute: Option<Attribute>Required. The attribute to create.
Implementations§
Source§impl CreateAttributeRequest
impl CreateAttributeRequest
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_attribute_id<T: Into<String>>(self, v: T) -> Self
pub fn set_attribute_id<T: Into<String>>(self, v: T) -> Self
Sets the value of attribute_id.
§Example
ⓘ
let x = CreateAttributeRequest::new().set_attribute_id("example");Sourcepub fn set_attribute<T>(self, v: T) -> Self
pub fn set_attribute<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_attribute<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_attribute<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for CreateAttributeRequest
impl Clone for CreateAttributeRequest
Source§fn clone(&self) -> CreateAttributeRequest
fn clone(&self) -> CreateAttributeRequest
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 CreateAttributeRequest
impl Debug for CreateAttributeRequest
Source§impl Default for CreateAttributeRequest
impl Default for CreateAttributeRequest
Source§fn default() -> CreateAttributeRequest
fn default() -> CreateAttributeRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateAttributeRequest
impl Message for CreateAttributeRequest
Source§impl PartialEq for CreateAttributeRequest
impl PartialEq for CreateAttributeRequest
impl StructuralPartialEq for CreateAttributeRequest
Auto Trait Implementations§
impl Freeze for CreateAttributeRequest
impl RefUnwindSafe for CreateAttributeRequest
impl Send for CreateAttributeRequest
impl Sync for CreateAttributeRequest
impl Unpin for CreateAttributeRequest
impl UnsafeUnpin for CreateAttributeRequest
impl UnwindSafe for CreateAttributeRequest
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