#[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
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");Trait Implementations§
impl StructuralPartialEq for Hook
Auto Trait Implementations§
impl Freeze for Hook
impl RefUnwindSafe for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnsafeUnpin for Hook
impl UnwindSafe for Hook
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request