#[non_exhaustive]pub struct Hook {
pub name: String,
pub target_uri: String,
pub disabled: bool,
pub events: Vec<HookEventType>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub uid: String,
pub push_option: Option<PushOption>,
pub sensitive_query_string: String,
/* private fields */
}Expand description
Metadata of a Secure Source Manager Hook.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. A unique identifier for a Hook. The name should be of the
format:
projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}
target_uri: StringRequired. The target URI to which the payloads will be delivered.
disabled: boolOptional. Determines if the hook disabled or not. Set to true to stop sending traffic.
events: Vec<HookEventType>Optional. The events that trigger hook on.
create_time: Option<Timestamp>Output only. Create timestamp.
update_time: Option<Timestamp>Output only. Update timestamp.
uid: StringOutput only. Unique identifier of the hook.
push_option: Option<PushOption>Optional. The trigger option for push events.
sensitive_query_string: StringOptional. The sensitive query string to be appended to the target URI.
Implementations§
Source§impl Hook
impl Hook
pub fn new() -> Self
Sourcepub fn set_target_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_target_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_events<T, V>(self, v: T) -> Self
pub fn set_events<T, V>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Hook::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Hook::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Hook::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Hook::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Hook::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Hook::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_push_option<T>(self, v: T) -> Selfwhere
T: Into<PushOption>,
pub fn set_push_option<T>(self, v: T) -> Selfwhere
T: Into<PushOption>,
Sets the value of push_option.
§Example
use google_cloud_securesourcemanager_v1::model::hook::PushOption;
let x = Hook::new().set_push_option(PushOption::default()/* use setters */);Sourcepub fn set_or_clear_push_option<T>(self, v: Option<T>) -> Selfwhere
T: Into<PushOption>,
pub fn set_or_clear_push_option<T>(self, v: Option<T>) -> Selfwhere
T: Into<PushOption>,
Sets or clears the value of push_option.
§Example
use google_cloud_securesourcemanager_v1::model::hook::PushOption;
let x = Hook::new().set_or_clear_push_option(Some(PushOption::default()/* use setters */));
let x = Hook::new().set_or_clear_push_option(None::<PushOption>);Sourcepub fn set_sensitive_query_string<T: Into<String>>(self, v: T) -> Self
pub fn set_sensitive_query_string<T: Into<String>>(self, v: T) -> Self
Sets the value of sensitive_query_string.
§Example
let x = Hook::new().set_sensitive_query_string("example");