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

// APITenant api tenant
//
// swagger:model apiTenant
type APITenant struct {

	// Can the tenant create and "own" Gateways?
	CanHaveGateways bool `json:"canHaveGateways,omitempty"`

	// Tenant description.
	Description string `json:"description,omitempty"`

	// Tenant ID (UUID).
	// Note: this value will be automatically generated on create.
	ID string `json:"id,omitempty"`

	// Max. device count for tenant.
	// When set to 0, the tenant can have unlimited devices.
	MaxDeviceCount int64 `json:"maxDeviceCount,omitempty"`

	// Max. gateway count for tenant.
	// When set to 0, the tenant can have unlimited gateways.
	MaxGatewayCount int64 `json:"maxGatewayCount,omitempty"`

	// Tenant name,
	Name string `json:"name,omitempty"`

	// Private gateways (downlink).
	// If enabled, then other tenants will not be able to schedule downlink
	// messages through the gateways of this tenant. For example, in case you
	// do want to share uplinks with other tenants (private_gateways_up=false),
	// but you want to prevent other tenants from using gateway airtime.
	PrivateGatewaysDown bool `json:"privateGatewaysDown,omitempty"`

	// Private gateways (uplink).
	// If enabled, then uplink messages will not be shared with other tenants.
	PrivateGatewaysUp bool `json:"privateGatewaysUp,omitempty"`

	// Tags (user defined).
	// These tags can be used to add additional information to the tenant. These
	// tags are NOT exposed in the integration events.
	Tags map[string]string `json:"tags,omitempty"`
}

// Validate validates this api tenant
func (m *APITenant) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this api tenant based on context it is used
func (m *APITenant) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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