autogits/bots-common/gitea-generated/models/organization_permissions.go
Adam Majer 598ecbbd5a .
2024-07-07 21:12:40 +02:00

63 lines
1.5 KiB
Go

// 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"
)
// OrganizationPermissions OrganizationPermissions list different users permissions on an organization
//
// swagger:model OrganizationPermissions
type OrganizationPermissions struct {
// can create repository
CanCreateRepository bool `json:"can_create_repository,omitempty"`
// can read
CanRead bool `json:"can_read,omitempty"`
// can write
CanWrite bool `json:"can_write,omitempty"`
// is admin
IsAdmin bool `json:"is_admin,omitempty"`
// is owner
IsOwner bool `json:"is_owner,omitempty"`
}
// Validate validates this organization permissions
func (m *OrganizationPermissions) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this organization permissions based on context it is used
func (m *OrganizationPermissions) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *OrganizationPermissions) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OrganizationPermissions) UnmarshalBinary(b []byte) error {
var res OrganizationPermissions
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}