private function setSharePropertiesAsyncImpl(
        $share,
        array $properties,
        FileServiceOptions $options = null,
        $operation = 'properties'
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::isTrue(
            $operation == 'properties' || $operation == 'metadata',
            Resources::FILE_SHARE_PROPERTIES_OPERATION_INVALID
        );
        Validate::canCastAsString($share, 'share');

        $headers = array();
        if ($operation == 'properties') {
            $headers[Resources::X_MS_SHARE_QUOTA] =
                $properties[Resources::X_MS_SHARE_QUOTA];
        } else {
            Utilities::validateMetadata($properties);
            $headers = $this->generateMetadataHeaders($properties);
        }

        $method      = Resources::HTTP_PUT;
        $postParams  = array();
        $queryParams = array();
        $path        = $this->createPath($share);

        if (is_null($options)) {
            $options = new FileServiceOptions();
        }

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_TIMEOUT,
            $options->getTimeout()
        );

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_REST_TYPE,
            'share'
        );
        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_COMP,
            $operation
        );

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_OK,
            Resources::EMPTY_STRING,
            $options
        );
    }
private function setSharePropertiesAsyncImpl(
        $share,
        array $properties,
        FileServiceOptions $options = null,
        $operation = 'properties'
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::isTrue(
            $operation == 'properties' || $operation == 'metadata',
            Resources::FILE_SHARE_PROPERTIES_OPERATION_INVALID
        );
        Validate::canCastAsString($share, 'share');

        $headers = array();
        if ($operation == 'properties') {
            $headers[Resources::X_MS_SHARE_QUOTA] =
                $properties[Resources::X_MS_SHARE_QUOTA];
        } else {
            Utilities::validateMetadata($properties);
            $headers = $this->generateMetadataHeaders($properties);
        }

        $method      = Resources::HTTP_PUT;
        $postParams  = array();
        $queryParams = array();
        $path        = $this->createPath($share);

        if (is_null($options)) {
            $options = new FileServiceOptions();
        }

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_TIMEOUT,
            $options->getTimeout()
        );

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_REST_TYPE,
            'share'
        );
        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_COMP,
            $operation
        );

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_OK,
            Resources::EMPTY_STRING,
            $options
        );
    }
private function setSharePropertiesAsyncImpl ( $ share , array $ properties , FileServiceOptions $ options = null , $ operation = 'properties' ) { Validate :: canCastAsString ( $ share , 'share' ) ; Validate :: isTrue ( $ operation == 'properties' || $ operation == 'metadata' , Resources :: FILE_SHARE_PROPERTIES_OPERATION_INVALID ) ; Validate :: canCastAsString ( $ share , 'share' ) ; $ headers = array ( ) ; if ( $ operation == 'properties' ) { $ headers [ Resources :: X_MS_SHARE_QUOTA ] = $ properties [ Resources :: X_MS_SHARE_QUOTA ] ; } else { Utilities :: validateMetadata ( $ properties ) ; $ headers = $ this -> generateMetadataHeaders ( $ properties ) ; } $ method = Resources :: HTTP_PUT ; $ postParams = array ( ) ; $ queryParams = array ( ) ; $ path = $ this -> createPath ( $ share ) ; if ( is_null ( $ options ) ) { $ options = new FileServiceOptions ( ) ; } $ this -> addOptionalQueryParam ( $ queryParams , Resources :: QP_TIMEOUT , $ options -> getTimeout ( ) ) ; $ this -> addOptionalQueryParam ( $ queryParams , Resources :: QP_REST_TYPE , 'share' ) ; $ this -> addOptionalQueryParam ( $ queryParams , Resources :: QP_COMP , $ operation ) ; return $ this -> sendAsync ( $ method , $ headers , $ queryParams , $ postParams , $ path , Resources :: STATUS_OK , Resources :: EMPTY_STRING , $ options ) ; }
Helper method to create promise for setShareProperties API call.

@param string             $share      The share name.
@param array              $properties The array that contains
either the properties or
the metadata to be set.
@param FileServiceOptions $options    The optional parameters.
@param string             $operation  The operation string. Should be
'metadata' to set metadata,
and 'properties' to set
properties.

@return \GuzzleHttp\Promise\PromiseInterface
Helper method to create promise for setShareProperties API call .