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

package model

// 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/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// OpenapiUploadLocalFileResp UploadLocalFileResp
//
// UploadLocalFileResp is the response to upload an import task.
//
// swagger:model openapiUploadLocalFileResp
type OpenapiUploadLocalFileResp struct {

	// The stub ID for the uploaded file. You can use this stub ID to [create an import task](#tag/Import/operation/CreateImportTask).
	// Example: 123
	// Required: true
	UploadStubID *string `json:"upload_stub_id"`
}

// Validate validates this openapi upload local file resp
func (m *OpenapiUploadLocalFileResp) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateUploadStubID(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *OpenapiUploadLocalFileResp) validateUploadStubID(formats strfmt.Registry) error {

	if err := validate.Required("upload_stub_id", "body", m.UploadStubID); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this openapi upload local file resp based on context it is used
func (m *OpenapiUploadLocalFileResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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