// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// HashicorpCloudWebhookWebhookSubscriptionEvent The information about an event type of a webhook subscription.
//
// swagger:model hashicorp.cloud.webhook.WebhookSubscriptionEvent
type HashicorpCloudWebhookWebhookSubscriptionEvent struct {

	// The type of action of this event, such as `create`, `update`, or `delete`.
	// When the action is '*', it means that the webhook is subscribed to all event actions for the event source.
	Action string `json:"action,omitempty"`

	// The source of the event, such as `hashicorp.packer.version`.
	Source string `json:"source,omitempty"`
}

// Validate validates this hashicorp cloud webhook webhook subscription event
func (m *HashicorpCloudWebhookWebhookSubscriptionEvent) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this hashicorp cloud webhook webhook subscription event based on context it is used
func (m *HashicorpCloudWebhookWebhookSubscriptionEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *HashicorpCloudWebhookWebhookSubscriptionEvent) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *HashicorpCloudWebhookWebhookSubscriptionEvent) UnmarshalBinary(b []byte) error {
	var res HashicorpCloudWebhookWebhookSubscriptionEvent
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
