#[non_exhaustive]pub struct CreateExternalApiRequest {
pub parent: String,
pub external_api_id: String,
pub external_api: Option<ExternalApi>,
/* private fields */
}Expand description
The CreateExternalApi 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 External API resource.
Format: projects/{project}/locations/{location}
external_api_id: StringOptional. The ID to use for the External API resource, which will become the final component of the External API’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 External API 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]-_/.
external_api: Option<ExternalApi>Required. The External API resource to create.
Implementations§
Source§impl CreateExternalApiRequest
impl CreateExternalApiRequest
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_external_api_id<T: Into<String>>(self, v: T) -> Self
pub fn set_external_api_id<T: Into<String>>(self, v: T) -> Self
Sets the value of external_api_id.
§Example
ⓘ
let x = CreateExternalApiRequest::new().set_external_api_id("example");Sourcepub fn set_external_api<T>(self, v: T) -> Selfwhere
T: Into<ExternalApi>,
pub fn set_external_api<T>(self, v: T) -> Selfwhere
T: Into<ExternalApi>,
Sets the value of external_api.
§Example
ⓘ
use google_cloud_apihub_v1::model::ExternalApi;
let x = CreateExternalApiRequest::new().set_external_api(ExternalApi::default()/* use setters */);Sourcepub fn set_or_clear_external_api<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExternalApi>,
pub fn set_or_clear_external_api<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExternalApi>,
Sets or clears the value of external_api.
§Example
ⓘ
use google_cloud_apihub_v1::model::ExternalApi;
let x = CreateExternalApiRequest::new().set_or_clear_external_api(Some(ExternalApi::default()/* use setters */));
let x = CreateExternalApiRequest::new().set_or_clear_external_api(None::<ExternalApi>);Trait Implementations§
Source§impl Clone for CreateExternalApiRequest
impl Clone for CreateExternalApiRequest
Source§fn clone(&self) -> CreateExternalApiRequest
fn clone(&self) -> CreateExternalApiRequest
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 CreateExternalApiRequest
impl Debug for CreateExternalApiRequest
Source§impl Default for CreateExternalApiRequest
impl Default for CreateExternalApiRequest
Source§fn default() -> CreateExternalApiRequest
fn default() -> CreateExternalApiRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateExternalApiRequest
impl Message for CreateExternalApiRequest
Source§impl PartialEq for CreateExternalApiRequest
impl PartialEq for CreateExternalApiRequest
impl StructuralPartialEq for CreateExternalApiRequest
Auto Trait Implementations§
impl Freeze for CreateExternalApiRequest
impl RefUnwindSafe for CreateExternalApiRequest
impl Send for CreateExternalApiRequest
impl Sync for CreateExternalApiRequest
impl Unpin for CreateExternalApiRequest
impl UnsafeUnpin for CreateExternalApiRequest
impl UnwindSafe for CreateExternalApiRequest
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