<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RetrieveClientPurchasesResponse StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:RetrieveClientPurchasesResponse
 * @subpackage Structs
 */
class RetrieveClientPurchasesResponse extends AbstractStructBase
{
    /**
     * The Memberships
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfMembership_MembershipExtended
     */
    public $Memberships;
    /**
     * The Subscriptions
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfTicketing_SubscriptionInstanceExtended
     */
    public $Subscriptions;
    /**
     * The Tickets
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfTicketing_ClientTicketsRow
     */
    public $Tickets;
    /**
     * Constructor method for RetrieveClientPurchasesResponse
     * @uses RetrieveClientPurchasesResponse::setMemberships()
     * @uses RetrieveClientPurchasesResponse::setSubscriptions()
     * @uses RetrieveClientPurchasesResponse::setTickets()
     * @param \patest\ArrayType\ArrayOfMembership_MembershipExtended $memberships
     * @param \patest\ArrayType\ArrayOfTicketing_SubscriptionInstanceExtended $subscriptions
     * @param \patest\ArrayType\ArrayOfTicketing_ClientTicketsRow $tickets
     */
    public function __construct(\patest\ArrayType\ArrayOfMembership_MembershipExtended $memberships = null, \patest\ArrayType\ArrayOfTicketing_SubscriptionInstanceExtended $subscriptions = null, \patest\ArrayType\ArrayOfTicketing_ClientTicketsRow $tickets = null)
    {
        $this
            ->setMemberships($memberships)
            ->setSubscriptions($subscriptions)
            ->setTickets($tickets);
    }
    /**
     * Get Memberships 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 \patest\ArrayType\ArrayOfMembership_MembershipExtended|null
     */
    public function getMemberships()
    {
        return isset($this->Memberships) ? $this->Memberships : null;
    }
    /**
     * Set Memberships 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 \patest\ArrayType\ArrayOfMembership_MembershipExtended $memberships
     * @return \patest\StructType\RetrieveClientPurchasesResponse
     */
    public function setMemberships(\patest\ArrayType\ArrayOfMembership_MembershipExtended $memberships = null)
    {
        if (is_null($memberships) || (is_array($memberships) && empty($memberships))) {
            unset($this->Memberships);
        } else {
            $this->Memberships = $memberships;
        }
        return $this;
    }
    /**
     * Get Subscriptions 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 \patest\ArrayType\ArrayOfTicketing_SubscriptionInstanceExtended|null
     */
    public function getSubscriptions()
    {
        return isset($this->Subscriptions) ? $this->Subscriptions : null;
    }
    /**
     * Set Subscriptions 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 \patest\ArrayType\ArrayOfTicketing_SubscriptionInstanceExtended $subscriptions
     * @return \patest\StructType\RetrieveClientPurchasesResponse
     */
    public function setSubscriptions(\patest\ArrayType\ArrayOfTicketing_SubscriptionInstanceExtended $subscriptions = null)
    {
        if (is_null($subscriptions) || (is_array($subscriptions) && empty($subscriptions))) {
            unset($this->Subscriptions);
        } else {
            $this->Subscriptions = $subscriptions;
        }
        return $this;
    }
    /**
     * Get Tickets 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 \patest\ArrayType\ArrayOfTicketing_ClientTicketsRow|null
     */
    public function getTickets()
    {
        return isset($this->Tickets) ? $this->Tickets : null;
    }
    /**
     * Set Tickets 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 \patest\ArrayType\ArrayOfTicketing_ClientTicketsRow $tickets
     * @return \patest\StructType\RetrieveClientPurchasesResponse
     */
    public function setTickets(\patest\ArrayType\ArrayOfTicketing_ClientTicketsRow $tickets = null)
    {
        if (is_null($tickets) || (is_array($tickets) && empty($tickets))) {
            unset($this->Tickets);
        } else {
            $this->Tickets = $tickets;
        }
        return $this;
    }
}
