Class Hook

java.lang.Object
build.cursed.genapi.forgejo.model.Hook

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-09-28T16:24:31.414706+02:00[Europe/Stockholm]", comments="Generator version: 7.21.0") public class Hook extends Object
Hook a hook is a web hook when one repository changed
  • Field Details

  • Constructor Details

    • Hook

      public Hook()
  • Method Details

    • active

      public Hook active(@Nullable Boolean active)
    • getActive

      @Nullable public Boolean getActive()
      Get active
      Returns:
      active
    • setActive

      public void setActive(@Nullable Boolean active)
    • authorizationHeader

      public Hook authorizationHeader(@Nullable String authorizationHeader)
    • getAuthorizationHeader

      @Nullable public String getAuthorizationHeader()
      Get authorizationHeader
      Returns:
      authorizationHeader
    • setAuthorizationHeader

      public void setAuthorizationHeader(@Nullable String authorizationHeader)
    • branchFilter

      public Hook branchFilter(@Nullable String branchFilter)
    • getBranchFilter

      @Nullable public String getBranchFilter()
      Get branchFilter
      Returns:
      branchFilter
    • setBranchFilter

      public void setBranchFilter(@Nullable String branchFilter)
    • config

      public Hook config(@Nullable Map<String,String> config)
    • putConfigItem

      public Hook putConfigItem(String key, String configItem)
    • getConfig

      @Nullable public Map<String,String> getConfig()
      Deprecated: use Metadata instead
      Returns:
      config
    • setConfig

      public void setConfig(@Nullable Map<String,String> config)
    • contentType

      public Hook contentType(@Nullable String contentType)
    • getContentType

      @Nullable public String getContentType()
      Get contentType
      Returns:
      contentType
    • setContentType

      public void setContentType(@Nullable String contentType)
    • createdAt

      public Hook createdAt(@Nullable OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Get createdAt
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
    • events

      public Hook events(@Nullable List<String> events)
    • addEventsItem

      public Hook addEventsItem(String eventsItem)
    • getEvents

      @Nullable public List<String> getEvents()
      Get events
      Returns:
      events
    • setEvents

      public void setEvents(@Nullable List<String> events)
    • id

      public Hook id(@Nullable Long id)
    • getId

      @Nullable public Long getId()
      Get id
      Returns:
      id
    • setId

      public void setId(@Nullable Long id)
    • metadata

      public Hook metadata(@Nullable Object metadata)
    • getMetadata

      @Nullable public Object getMetadata()
      Get metadata
      Returns:
      metadata
    • setMetadata

      public void setMetadata(@Nullable Object metadata)
    • type

      public Hook type(@Nullable String type)
    • getType

      @Nullable public String getType()
      Get type
      Returns:
      type
    • setType

      public void setType(@Nullable String type)
    • updatedAt

      public Hook updatedAt(@Nullable OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      Get updatedAt
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable OffsetDateTime updatedAt)
    • url

      public Hook url(@Nullable String url)
    • getUrl

      @Nullable public String getUrl()
      Get url
      Returns:
      url
    • setUrl

      public void setUrl(@Nullable String url)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Hook
    • fromJson

      public static Hook fromJson(String jsonString) throws IOException
      Create an instance of Hook given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Hook
      Throws:
      IOException - if the JSON string is invalid with respect to Hook
    • toJson

      public String toJson()
      Convert an instance of Hook to an JSON string
      Returns:
      JSON string