// 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"
)

// ResourcePermissionDTO resource permission DTO
//
// swagger:model resourcePermissionDTO
type ResourcePermissionDTO struct {

	// actions
	Actions []string `json:"actions"`

	// built in role
	BuiltInRole string `json:"builtInRole,omitempty"`

	// id
	ID int64 `json:"id,omitempty"`

	// is inherited
	IsInherited bool `json:"isInherited,omitempty"`

	// is managed
	IsManaged bool `json:"isManaged,omitempty"`

	// is service account
	IsServiceAccount bool `json:"isServiceAccount,omitempty"`

	// permission
	Permission string `json:"permission,omitempty"`

	// role name
	RoleName string `json:"roleName,omitempty"`

	// team
	Team string `json:"team,omitempty"`

	// team avatar Url
	TeamAvatarURL string `json:"teamAvatarUrl,omitempty"`

	// team Id
	TeamID int64 `json:"teamId,omitempty"`

	// team Uid
	TeamUID string `json:"teamUid,omitempty"`

	// user avatar Url
	UserAvatarURL string `json:"userAvatarUrl,omitempty"`

	// user Id
	UserID int64 `json:"userId,omitempty"`

	// user login
	UserLogin string `json:"userLogin,omitempty"`

	// user Uid
	UserUID string `json:"userUid,omitempty"`
}

// Validate validates this resource permission DTO
func (m *ResourcePermissionDTO) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this resource permission DTO based on context it is used
func (m *ResourcePermissionDTO) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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