<?php

namespace OXModule\StructClass;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for createModuleAccess StructClass
 * @subpackage Structs
 */
class CreateModuleAccess extends AbstractStructBase
{
    /**
     * The ctx
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\Context
     */
    public $ctx;
    /**
     * The admin_user
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\User
     */
    public $admin_user;
    /**
     * The access
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\UserModuleAccess
     */
    public $access;
    /**
     * The auth
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\Credentials
     */
    public $auth;
    /**
     * The schema_select_strategy
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \OXModule\StructClass\SchemaSelectStrategy
     */
    public $schema_select_strategy;
    /**
     * Constructor method for createModuleAccess
     * @uses CreateModuleAccess::setCtx()
     * @uses CreateModuleAccess::setAdmin_user()
     * @uses CreateModuleAccess::setAccess()
     * @uses CreateModuleAccess::setAuth()
     * @uses CreateModuleAccess::setSchema_select_strategy()
     * @param \OXModule\StructClass\Context $ctx
     * @param \OXModule\StructClass\User $admin_user
     * @param \OXModule\StructClass\UserModuleAccess $access
     * @param \OXModule\StructClass\Credentials $auth
     * @param \OXModule\StructClass\SchemaSelectStrategy $schema_select_strategy
     */
    public function __construct(\OXModule\StructClass\Context $ctx = null, \OXModule\StructClass\User $admin_user = null, \OXModule\StructClass\UserModuleAccess $access = null, \OXModule\StructClass\Credentials $auth = null, \OXModule\StructClass\SchemaSelectStrategy $schema_select_strategy = null)
    {
        $this
            ->setCtx($ctx)
            ->setAdmin_user($admin_user)
            ->setAccess($access)
            ->setAuth($auth)
            ->setSchema_select_strategy($schema_select_strategy);
    }
    /**
     * Get ctx value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \OXModule\StructClass\Context|null
     */
    public function getCtx()
    {
        return isset($this->ctx) ? $this->ctx : null;
    }
    /**
     * Set ctx value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \OXModule\StructClass\Context $ctx
     * @return \OXModule\StructClass\CreateModuleAccess
     */
    public function setCtx(\OXModule\StructClass\Context $ctx = null)
    {
        if (is_null($ctx) || (is_array($ctx) && empty($ctx))) {
            unset($this->ctx);
        } else {
            $this->ctx = $ctx;
        }
        return $this;
    }
    /**
     * Get admin_user value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \OXModule\StructClass\User|null
     */
    public function getAdmin_user()
    {
        return isset($this->admin_user) ? $this->admin_user : null;
    }
    /**
     * Set admin_user value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \OXModule\StructClass\User $admin_user
     * @return \OXModule\StructClass\CreateModuleAccess
     */
    public function setAdmin_user(\OXModule\StructClass\User $admin_user = null)
    {
        if (is_null($admin_user) || (is_array($admin_user) && empty($admin_user))) {
            unset($this->admin_user);
        } else {
            $this->admin_user = $admin_user;
        }
        return $this;
    }
    /**
     * Get access value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \OXModule\StructClass\UserModuleAccess|null
     */
    public function getAccess()
    {
        return isset($this->access) ? $this->access : null;
    }
    /**
     * Set access value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \OXModule\StructClass\UserModuleAccess $access
     * @return \OXModule\StructClass\CreateModuleAccess
     */
    public function setAccess(\OXModule\StructClass\UserModuleAccess $access = null)
    {
        if (is_null($access) || (is_array($access) && empty($access))) {
            unset($this->access);
        } else {
            $this->access = $access;
        }
        return $this;
    }
    /**
     * Get auth value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \OXModule\StructClass\Credentials|null
     */
    public function getAuth()
    {
        return isset($this->auth) ? $this->auth : null;
    }
    /**
     * Set auth value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \OXModule\StructClass\Credentials $auth
     * @return \OXModule\StructClass\CreateModuleAccess
     */
    public function setAuth(\OXModule\StructClass\Credentials $auth = null)
    {
        if (is_null($auth) || (is_array($auth) && empty($auth))) {
            unset($this->auth);
        } else {
            $this->auth = $auth;
        }
        return $this;
    }
    /**
     * Get schema_select_strategy value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \OXModule\StructClass\SchemaSelectStrategy|null
     */
    public function getSchema_select_strategy()
    {
        return isset($this->schema_select_strategy) ? $this->schema_select_strategy : null;
    }
    /**
     * Set schema_select_strategy value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \OXModule\StructClass\SchemaSelectStrategy $schema_select_strategy
     * @return \OXModule\StructClass\CreateModuleAccess
     */
    public function setSchema_select_strategy(\OXModule\StructClass\SchemaSelectStrategy $schema_select_strategy = null)
    {
        if (is_null($schema_select_strategy) || (is_array($schema_select_strategy) && empty($schema_select_strategy))) {
            unset($this->schema_select_strategy);
        } else {
            $this->schema_select_strategy = $schema_select_strategy;
        }
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \OXModule\StructClass\CreateModuleAccess
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
