Class Hook.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Hook.Builder>
com.google.cloud.securesourcemanager.v1.Hook.Builder
All Implemented Interfaces:
HookOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Hook

public static final class Hook.Builder extends com.google.protobuf.GeneratedMessage.Builder<Hook.Builder> implements HookOrBuilder
 Metadata of a Secure Source Manager Hook.
 
Protobuf type google.cloud.securesourcemanager.v1.Hook
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Hook.Builder>
    • clear

      public Hook.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Hook.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Hook.Builder>
    • getDefaultInstanceForType

      public Hook getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Hook build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Hook buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Hook.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Hook.Builder>
    • mergeFrom

      public Hook.Builder mergeFrom(Hook other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Hook.Builder>
    • mergeFrom

      public Hook.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Hook.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. A unique identifier for a Hook. The name should be of the
       format:
       `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface HookOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. A unique identifier for a Hook. The name should be of the
       format:
       `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface HookOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Hook.Builder setName(String value)
       Identifier. A unique identifier for a Hook. The name should be of the
       format:
       `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Hook.Builder clearName()
       Identifier. A unique identifier for a Hook. The name should be of the
       format:
       `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Hook.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. A unique identifier for a Hook. The name should be of the
       format:
       `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getTargetUri

      public String getTargetUri()
       Required. The target URI to which the payloads will be delivered.
       
      string target_uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTargetUri in interface HookOrBuilder
      Returns:
      The targetUri.
    • getTargetUriBytes

      public com.google.protobuf.ByteString getTargetUriBytes()
       Required. The target URI to which the payloads will be delivered.
       
      string target_uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTargetUriBytes in interface HookOrBuilder
      Returns:
      The bytes for targetUri.
    • setTargetUri

      public Hook.Builder setTargetUri(String value)
       Required. The target URI to which the payloads will be delivered.
       
      string target_uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The targetUri to set.
      Returns:
      This builder for chaining.
    • clearTargetUri

      public Hook.Builder clearTargetUri()
       Required. The target URI to which the payloads will be delivered.
       
      string target_uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTargetUriBytes

      public Hook.Builder setTargetUriBytes(com.google.protobuf.ByteString value)
       Required. The target URI to which the payloads will be delivered.
       
      string target_uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for targetUri to set.
      Returns:
      This builder for chaining.
    • getDisabled

      public boolean getDisabled()
       Optional. Determines if the hook disabled or not.
       Set to true to stop sending traffic.
       
      bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisabled in interface HookOrBuilder
      Returns:
      The disabled.
    • setDisabled

      public Hook.Builder setDisabled(boolean value)
       Optional. Determines if the hook disabled or not.
       Set to true to stop sending traffic.
       
      bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The disabled to set.
      Returns:
      This builder for chaining.
    • clearDisabled

      public Hook.Builder clearDisabled()
       Optional. Determines if the hook disabled or not.
       Set to true to stop sending traffic.
       
      bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getEventsList

      public List<Hook.HookEventType> getEventsList()
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEventsList in interface HookOrBuilder
      Returns:
      A list containing the events.
    • getEventsCount

      public int getEventsCount()
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEventsCount in interface HookOrBuilder
      Returns:
      The count of events.
    • getEvents

      public Hook.HookEventType getEvents(int index)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEvents in interface HookOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The events at the given index.
    • setEvents

      public Hook.Builder setEvents(int index, Hook.HookEventType value)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The events to set.
      Returns:
      This builder for chaining.
    • addEvents

      public Hook.Builder addEvents(Hook.HookEventType value)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The events to add.
      Returns:
      This builder for chaining.
    • addAllEvents

      public Hook.Builder addAllEvents(Iterable<? extends Hook.HookEventType> values)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The events to add.
      Returns:
      This builder for chaining.
    • clearEvents

      public Hook.Builder clearEvents()
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getEventsValueList

      public List<Integer> getEventsValueList()
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEventsValueList in interface HookOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for events.
    • getEventsValue

      public int getEventsValue(int index)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEventsValue in interface HookOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of events at the given index.
    • setEventsValue

      public Hook.Builder setEventsValue(int index, int value)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for events to set.
      Returns:
      This builder for chaining.
    • addEventsValue

      public Hook.Builder addEventsValue(int value)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for events to add.
      Returns:
      This builder for chaining.
    • addAllEventsValue

      public Hook.Builder addAllEventsValue(Iterable<Integer> values)
       Optional. The events that trigger hook on.
       
      repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The enum numeric values on the wire for events to add.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface HookOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface HookOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Hook.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public Hook.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public Hook.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public Hook.Builder clearCreateTime()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface HookOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface HookOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface HookOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public Hook.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public Hook.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public Hook.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public Hook.Builder clearUpdateTime()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface HookOrBuilder
    • getUid

      public String getUid()
       Output only. Unique identifier of the hook.
       
      string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUid in interface HookOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. Unique identifier of the hook.
       
      string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUidBytes in interface HookOrBuilder
      Returns:
      The bytes for uid.
    • setUid

      public Hook.Builder setUid(String value)
       Output only. Unique identifier of the hook.
       
      string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The uid to set.
      Returns:
      This builder for chaining.
    • clearUid

      public Hook.Builder clearUid()
       Output only. Unique identifier of the hook.
       
      string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Returns:
      This builder for chaining.
    • setUidBytes

      public Hook.Builder setUidBytes(com.google.protobuf.ByteString value)
       Output only. Unique identifier of the hook.
       
      string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The bytes for uid to set.
      Returns:
      This builder for chaining.
    • hasPushOption

      public boolean hasPushOption()
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasPushOption in interface HookOrBuilder
      Returns:
      Whether the pushOption field is set.
    • getPushOption

      public Hook.PushOption getPushOption()
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPushOption in interface HookOrBuilder
      Returns:
      The pushOption.
    • setPushOption

      public Hook.Builder setPushOption(Hook.PushOption value)
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
    • setPushOption

      public Hook.Builder setPushOption(Hook.PushOption.Builder builderForValue)
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
    • mergePushOption

      public Hook.Builder mergePushOption(Hook.PushOption value)
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
    • clearPushOption

      public Hook.Builder clearPushOption()
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
    • getPushOptionBuilder

      public Hook.PushOption.Builder getPushOptionBuilder()
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
    • getPushOptionOrBuilder

      public Hook.PushOptionOrBuilder getPushOptionOrBuilder()
       Optional. The trigger option for push events.
       
      .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPushOptionOrBuilder in interface HookOrBuilder
    • getSensitiveQueryString

      public String getSensitiveQueryString()
       Optional. The sensitive query string to be appended to the target URI.
       
      string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSensitiveQueryString in interface HookOrBuilder
      Returns:
      The sensitiveQueryString.
    • getSensitiveQueryStringBytes

      public com.google.protobuf.ByteString getSensitiveQueryStringBytes()
       Optional. The sensitive query string to be appended to the target URI.
       
      string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSensitiveQueryStringBytes in interface HookOrBuilder
      Returns:
      The bytes for sensitiveQueryString.
    • setSensitiveQueryString

      public Hook.Builder setSensitiveQueryString(String value)
       Optional. The sensitive query string to be appended to the target URI.
       
      string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sensitiveQueryString to set.
      Returns:
      This builder for chaining.
    • clearSensitiveQueryString

      public Hook.Builder clearSensitiveQueryString()
       Optional. The sensitive query string to be appended to the target URI.
       
      string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setSensitiveQueryStringBytes

      public Hook.Builder setSensitiveQueryStringBytes(com.google.protobuf.ByteString value)
       Optional. The sensitive query string to be appended to the target URI.
       
      string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for sensitiveQueryString to set.
      Returns:
      This builder for chaining.