├── .gitattributes ├── .gitignore ├── .php_cs ├── .travis.yml ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── bin └── release-tool.php ├── build.xml ├── changelog.txt ├── composer.json ├── composer.lock ├── doc └── develop.md ├── examples ├── Client │ ├── Client.php │ ├── CloudStorageService.php │ ├── CloudSubscription.php │ ├── CloudTable.php │ ├── ErrorMessages.php │ └── WindowsAzureErrorCodes.php ├── MediaServices │ ├── README.md │ ├── analyticsworkflow_indexer.php │ ├── azuread_asymmetrickey.php │ ├── azuread_symmetrickey.php │ ├── azuread_userpass.php │ ├── liveworkflow_features.php │ ├── resources │ │ ├── Azure-Video.wmv │ │ ├── default_slate_image_media_services.jpg │ │ └── indexerTaskPresetTemplate.xml │ ├── scale_encoding_units.php │ ├── userconfig.php │ ├── vodworkflow_aes.php │ ├── vodworkflow_drm_fairplay.php │ └── vodworkflow_drm_playready_widevine.php ├── README.markdown └── tasklist │ ├── README.markdown │ ├── index.php │ └── userconfig.php ├── phpcs.xml ├── phpdoc.dist.xml ├── phpmd.xml ├── phpunit.functional.xml.dist ├── phpunit.local.xml.dist ├── phpunit.xml.dist ├── src ├── Common │ ├── CloudConfigurationManager.php │ ├── Internal │ │ ├── Atom │ │ │ ├── AtomBase.php │ │ │ ├── AtomLink.php │ │ │ ├── Category.php │ │ │ ├── Content.php │ │ │ ├── Entry.php │ │ │ ├── Feed.php │ │ │ ├── Generator.php │ │ │ ├── Person.php │ │ │ └── Source.php │ │ ├── Authentication │ │ │ ├── IAuthScheme.php │ │ │ ├── OAuthScheme.php │ │ │ ├── SharedKeyAuthScheme.php │ │ │ ├── StorageAuthScheme.php │ │ │ └── TableSharedKeyLiteAuthScheme.php │ │ ├── ConnectionStringParser.php │ │ ├── ConnectionStringSource.php │ │ ├── FilterableService.php │ │ ├── Filters │ │ │ ├── AuthenticationFilter.php │ │ │ ├── DateFilter.php │ │ │ ├── HeadersFilter.php │ │ │ ├── SASFilter.php │ │ │ └── WrapFilter.php │ │ ├── Http │ │ │ ├── BatchRequest.php │ │ │ ├── BatchResponse.php │ │ │ ├── HttpCallContext.php │ │ │ ├── HttpClient.php │ │ │ ├── IHttpClient.php │ │ │ ├── IUrl.php │ │ │ └── Url.php │ │ ├── IServiceFilter.php │ │ ├── InvalidArgumentTypeException.php │ │ ├── Logger.php │ │ ├── MediaServicesSettings.php │ │ ├── OAuthRestProxy.php │ │ ├── ParserState.php │ │ ├── Resources.php │ │ ├── RestProxy.php │ │ ├── Serialization │ │ │ ├── ISerializer.php │ │ │ ├── JsonSerializer.php │ │ │ └── XmlSerializer.php │ │ ├── ServiceBusSettings.php │ │ ├── ServiceManagementSettings.php │ │ ├── ServiceRestProxy.php │ │ ├── ServiceSettings.php │ │ ├── StorageServiceSettings.php │ │ ├── Utilities.php │ │ └── Validate.php │ ├── Models │ │ ├── GetServicePropertiesResult.php │ │ ├── Logging.php │ │ ├── Metrics.php │ │ ├── OAuthAccessToken.php │ │ ├── RetentionPolicy.php │ │ └── ServiceProperties.php │ ├── ServiceException.php │ └── ServicesBuilder.php ├── MediaServices │ ├── Authentication │ │ ├── AccessToken.php │ │ ├── AzureAdClient.php │ │ ├── AzureAdClientAsymmetricKey.php │ │ ├── AzureAdClientSymmetricKey.php │ │ ├── AzureAdClientUserCredentials.php │ │ ├── AzureAdTokenCredentialType.php │ │ ├── AzureAdTokenCredentials.php │ │ ├── AzureAdTokenProvider.php │ │ ├── AzureEnvironment.php │ │ ├── AzureEnvironmentConstants.php │ │ ├── AzureEnvironments.php │ │ └── ITokenProvider.php │ ├── Internal │ │ ├── ContentPropertiesSerializer.php │ │ └── IMediaServices.php │ ├── MediaServicesRestProxy.php │ ├── Models │ │ ├── AccessPolicy.php │ │ ├── AdMarkerSources.php │ │ ├── Asset.php │ │ ├── AssetDeliveryPolicy.php │ │ ├── AssetDeliveryPolicyConfigurationKey.php │ │ ├── AssetDeliveryPolicyType.php │ │ ├── AssetDeliveryProtocol.php │ │ ├── AssetFile.php │ │ ├── AudioStream.php │ │ ├── Channel.php │ │ ├── ChannelEncoding.php │ │ ├── ChannelEncodingPresets.php │ │ ├── ChannelEndpoint.php │ │ ├── ChannelInput.php │ │ ├── ChannelInputAccessControl.php │ │ ├── ChannelOutput.php │ │ ├── ChannelOutputHls.php │ │ ├── ChannelPreview.php │ │ ├── ChannelPreviewAccessControl.php │ │ ├── ChannelSlate.php │ │ ├── ChannelState.php │ │ ├── ContentKey.php │ │ ├── ContentKeyAuthorizationPolicy.php │ │ ├── ContentKeyAuthorizationPolicyOption.php │ │ ├── ContentKeyAuthorizationPolicyRestriction.php │ │ ├── ContentKeyDeliveryType.php │ │ ├── ContentKeyRestrictionType.php │ │ ├── ContentKeyTypes.php │ │ ├── CrossSiteAccessPolicies.php │ │ ├── EncodingReservedUnit.php │ │ ├── EncodingReservedUnitType.php │ │ ├── EncodingType.php │ │ ├── EncryptionSchemes.php │ │ ├── ErrorDetail.php │ │ ├── IPAccessControl.php │ │ ├── IPRange.php │ │ ├── IngestManifest.php │ │ ├── IngestManifestAsset.php │ │ ├── IngestManifestFile.php │ │ ├── IngestManifestStatistics.php │ │ ├── Job.php │ │ ├── JobTemplate.php │ │ ├── Locator.php │ │ ├── MediaProcessor.php │ │ ├── Operation.php │ │ ├── OperationState.php │ │ ├── Program.php │ │ ├── ProgramState.php │ │ ├── ProtectionKeyTypes.php │ │ ├── StorageAccount.php │ │ ├── StreamingProtocol.php │ │ ├── Task.php │ │ ├── TaskHistoricalEvent.php │ │ ├── TaskOptions.php │ │ ├── TaskTemplate.php │ │ └── VideoStream.php │ └── Templates │ │ ├── AgcAndColorStripeRestriction.php │ │ ├── AllowedTrackTypes.php │ │ ├── AsymmetricTokenVerificationKey.php │ │ ├── ContentEncryptionKeyFromHeader.php │ │ ├── ContentEncryptionKeyFromKeyIdentifier.php │ │ ├── ContentKeySpecs.php │ │ ├── ErrorMessages.php │ │ ├── ExplicitAnalogTelevisionRestriction.php │ │ ├── FairPlayConfiguration.php │ │ ├── Hdcp.php │ │ ├── MediaServicesLicenseTemplateSerializer.php │ │ ├── OpenIdConnectDiscoveryDocument.php │ │ ├── PlayReadyContentKey.php │ │ ├── PlayReadyLicenseResponseTemplate.php │ │ ├── PlayReadyLicenseTemplate.php │ │ ├── PlayReadyLicenseType.php │ │ ├── PlayReadyPlayRight.php │ │ ├── RequiredOutputProtection.php │ │ ├── ScmsRestriction.php │ │ ├── SymmetricVerificationKey.php │ │ ├── TokenClaim.php │ │ ├── TokenRestrictionTemplate.php │ │ ├── TokenRestrictionTemplateSerializer.php │ │ ├── TokenType.php │ │ ├── TokenVerificationKey.php │ │ ├── UnknownOutputPassingOption.php │ │ ├── WidevineMessage.php │ │ ├── WidevineMessageSerializer.php │ │ └── X509CertTokenVerificationKey.php ├── ServiceBus │ ├── Internal │ │ ├── Action.php │ │ ├── ActiveToken.php │ │ ├── Filter.php │ │ ├── IServiceBus.php │ │ ├── IWrap.php │ │ ├── WrapAccessTokenResult.php │ │ ├── WrapRestProxy.php │ │ └── WrapTokenManager.php │ ├── Models │ │ ├── BrokerProperties.php │ │ ├── BrokeredMessage.php │ │ ├── CorrelationFilter.php │ │ ├── EmptyRuleAction.php │ │ ├── FalseFilter.php │ │ ├── ListOptions.php │ │ ├── ListQueuesOptions.php │ │ ├── ListQueuesResult.php │ │ ├── ListRulesOptions.php │ │ ├── ListRulesResult.php │ │ ├── ListSubscriptionsOptions.php │ │ ├── ListSubscriptionsResult.php │ │ ├── ListTopicsOptions.php │ │ ├── ListTopicsResult.php │ │ ├── QueueDescription.php │ │ ├── QueueInfo.php │ │ ├── ReceiveMessageOptions.php │ │ ├── ReceiveMode.php │ │ ├── RuleDescription.php │ │ ├── RuleInfo.php │ │ ├── SqlFilter.php │ │ ├── SqlRuleAction.php │ │ ├── SubscriptionDescription.php │ │ ├── SubscriptionInfo.php │ │ ├── TopicDescription.php │ │ ├── TopicInfo.php │ │ └── TrueFilter.php │ └── ServiceBusRestProxy.php ├── ServiceManagement │ ├── Internal │ │ ├── IServiceManagement.php │ │ ├── Service.php │ │ └── WindowsAzureService.php │ ├── Models │ │ ├── AffinityGroup.php │ │ ├── AsynchronousOperationResult.php │ │ ├── ChangeDeploymentConfigurationOptions.php │ │ ├── CreateAffinityGroupOptions.php │ │ ├── CreateDeploymentOptions.php │ │ ├── CreateServiceOptions.php │ │ ├── Deployment.php │ │ ├── DeploymentSlot.php │ │ ├── DeploymentStatus.php │ │ ├── GetAffinityGroupPropertiesResult.php │ │ ├── GetDeploymentOptions.php │ │ ├── GetDeploymentResult.php │ │ ├── GetHostedServicePropertiesOptions.php │ │ ├── GetHostedServicePropertiesResult.php │ │ ├── GetOperationStatusResult.php │ │ ├── GetStorageServiceKeysResult.php │ │ ├── GetStorageServicePropertiesResult.php │ │ ├── HostedService.php │ │ ├── InputEndpoint.php │ │ ├── KeyType.php │ │ ├── ListAffinityGroupsResult.php │ │ ├── ListHostedServicesResult.php │ │ ├── ListLocationsResult.php │ │ ├── ListStorageServicesResult.php │ │ ├── Location.php │ │ ├── Mode.php │ │ ├── OperationStatus.php │ │ ├── Role.php │ │ ├── RoleInstance.php │ │ ├── StorageService.php │ │ ├── UpdateServiceOptions.php │ │ ├── UpgradeDeploymentOptions.php │ │ └── UpgradeStatus.php │ └── ServiceManagementRestProxy.php └── ServiceRuntime │ ├── Internal │ ├── AcquireCurrentState.php │ ├── ChannelNotAvailableException.php │ ├── ChunkedGoalStateDeserializer.php │ ├── CurrentState.php │ ├── CurrentStatus.php │ ├── FileInputChannel.php │ ├── FileOutputChannel.php │ ├── GoalState.php │ ├── ICurrentStateSerializer.php │ ├── IGoalStateDeserializer.php │ ├── IInputChannel.php │ ├── IOutputChannel.php │ ├── IRoleEnvironmentChange.php │ ├── IRoleEnvironmentDataDeserializer.php │ ├── IRuntimeClient.php │ ├── IRuntimeClientFactory.php │ ├── IRuntimeCurrentStateClient.php │ ├── IRuntimeGoalStateClient.php │ ├── LocalResource.php │ ├── Protocol1RuntimeClient.php │ ├── Protocol1RuntimeClientFactory.php │ ├── Protocol1RuntimeCurrentStateClient.php │ ├── Protocol1RuntimeGoalStateClient.php │ ├── ReleaseCurrentState.php │ ├── Role.php │ ├── RoleEnvironmentConfigurationSettingChange.php │ ├── RoleEnvironmentData.php │ ├── RoleEnvironmentNotAvailableException.php │ ├── RoleEnvironmentTopologyChange.php │ ├── RoleInstance.php │ ├── RoleInstanceEndpoint.php │ ├── RoleInstanceStatus.php │ ├── RuntimeKernel.php │ ├── RuntimeVersionManager.php │ ├── RuntimeVersionProtocolClient.php │ ├── XmlCurrentStateSerializer.php │ ├── XmlGoalStateDeserializer.php │ └── XmlRoleEnvironmentDataDeserializer.php │ └── RoleEnvironment.php └── tests ├── WindowsAzureTests.php ├── framework ├── BlobServiceRestProxyTestBase.php ├── FiddlerFilter.php ├── MediaServicesRestProxyTestBase.php ├── QueueServiceRestProxyTestBase.php ├── RestProxyTestBase.php ├── ServiceBusRestProxyTestBase.php ├── ServiceManagementRestProxyTestBase.php ├── ServiceRestProxyTestBase.php ├── TableServiceRestProxyTestBase.php ├── TestResources.php └── VirtualFileSystem.php ├── functional └── WindowsAzure │ ├── BlobServiceFunctionalTestData.php │ ├── MediaServices │ └── MediaServicesFunctionalTest.php │ └── ServiceBus │ ├── BrokerPropertiesMapperTest.php │ ├── CustomPropertiesMapperTest.php │ ├── IntegrationTestBase.php │ ├── ScenarioTestBase.php │ ├── ServiceBusIntegrationTest.php │ ├── ServiceBusQueueTest.php │ ├── ServiceBusTopicTest.php │ └── WrapTokenManagerTest.php ├── mock └── WindowsAzure │ └── Common │ └── Internal │ ├── Authentication │ ├── OAuthSchemeMock.php │ ├── SharedKeyAuthSchemeMock.php │ ├── StorageAuthSchemeMock.php │ └── TableSharedKeyLiteAuthSchemeMock.php │ └── Filters │ └── SimpleFilterMock.php └── unit └── WindowsAzure ├── Common ├── CloudConfigurationManagerTest.php ├── Internal │ ├── Atom │ │ ├── AtomLinkTest.php │ │ ├── CategoryTest.php │ │ ├── ContentTest.php │ │ ├── EntryTest.php │ │ ├── FeedTest.php │ │ ├── GeneratorTest.php │ │ ├── PersonTest.php │ │ └── SourceTest.php │ ├── Authentication │ │ ├── OAuthSchemeTest.php │ │ ├── SharedKeyAuthSchemeTest.php │ │ ├── StorageAuthSchemeTest.php │ │ └── TableSharedKeyLiteAuthSchemeTest.php │ ├── ConnectionStringParserTest.php │ ├── ConnectionStringSourceTest.php │ ├── Filters │ │ ├── AuthenticationFilterTest.php │ │ ├── DateFilterTest.php │ │ ├── HeadersFilterTest.php │ │ └── WrapFilterTest.php │ ├── Http │ │ ├── BatchRequestTest.php │ │ ├── BatchResponseTest.php │ │ ├── HttpCallContextTest.php │ │ ├── HttpClientTest.php │ │ └── UrlTest.php │ ├── InvalidArgumentTypeExceptionTest.php │ ├── LoggerTest.php │ ├── MediaServicesSettingsTest.php │ ├── Serialization │ │ ├── DummyClass.php │ │ ├── JsonSerializerTest.php │ │ └── XmlSerializerTest.php │ ├── ServiceBusSettingsTest.php │ ├── ServiceManagementSettingsTest.php │ ├── ServiceRestProxyTest.php │ ├── StorageServiceSettingsTest.php │ ├── UtilitiesTest.php │ └── ValidateTest.php ├── Models │ ├── GetServicePropertiesResultTest.php │ ├── LoggingTest.php │ ├── MetricsTest.php │ ├── OAuthAccessTokenTest.php │ ├── RetentionPolicyTest.php │ └── ServicePropertiesTest.php ├── ServiceExceptionTest.php └── ServicesBuilderTest.php ├── MediaServices ├── Internal │ └── ContentPropertiesSerializerTest.php ├── MediaServicesRestProxyTest.php ├── Models │ ├── AccessPolicyTest.php │ ├── AssetDeliveryPolicyTest.php │ ├── AssetFileTest.php │ ├── AssetTest.php │ ├── ContentKeyAuthorizationOptionsTest.php │ ├── ContentKeyAuthorizationPolicyTest.php │ ├── ContentKeyAuthorizationRestrictionsTest.php │ ├── ContentKeyTest.php │ ├── EncodingReservedUnitTypeTest.php │ ├── ErrorDetailTest.php │ ├── IngestManifestAssetTest.php │ ├── IngestManifestFileTest.php │ ├── IngestManifestStatisticsTest.php │ ├── IngestManifestTest.php │ ├── JobTemplateTest.php │ ├── JobTest.php │ ├── LocatorTest.php │ ├── MediaProcessorTest.php │ ├── StorageAccountTest.php │ ├── TaskHistoricalEventTest.php │ ├── TaskTemplateTest.php │ └── TaskTest.php ├── Templates │ ├── AgcAndColorStripeRestrictionTest.php │ ├── ContentEncryptionKeyFromKeyIdentifierTest.php │ ├── ExplicitAnalogTelevisionRestrictionTest.php │ ├── MediaServicesLicenseTemplateSerializerTest.php │ ├── OpenIdConnectDiscoveryDocumentTest.php │ ├── PlayReadyLicenseResponseTemplateTest.php │ ├── PlayReadyLicenseTemplateTest.php │ ├── PlayReadyPlayRightTest.php │ ├── ScmsRestrictionTest.php │ ├── SymmetricVerificationKeyTest.php │ ├── TokenClaimsTest.php │ ├── TokenRestrictionTemplateSerializerTest.php │ ├── TokenRestrictionTemplateTest.php │ ├── WidevineMessageTest.php │ └── X509CertTokenVerificationKeyTest.php └── resources │ └── default_slate_image_media_services.jpg ├── ServiceBus ├── Internal │ ├── ActionTest.php │ ├── ActiveTokenTest.php │ ├── FilterTest.php │ └── WrapTokenManagerTest.php ├── ServiceBusRestProxyTest.php ├── WrapRestProxyTest.php └── models │ ├── BrokerPropertiesTest.php │ ├── BrokeredMessageTest.php │ ├── CorrelationFilterTest.php │ ├── EmptyRuleActionTest.php │ ├── FalseFilterTest.php │ ├── ListOptionsTest.php │ ├── ListQueuesOptionsTest.php │ ├── ListQueuesResultTest.php │ ├── ListRulesOptionsTest.php │ ├── ListRulesResultTest.php │ ├── ListSubscriptionsOptionsTest.php │ ├── ListSubscriptionsResultTest.php │ ├── ListTopicsOptionsTest.php │ ├── ListTopicsResultTest.php │ ├── QueueDescriptionTest.php │ ├── QueueInfoTest.php │ ├── ReceiveMessageOptionsTest.php │ ├── RuleDescriptionTest.php │ ├── RuleInfoTest.php │ ├── SqlFilterTest.php │ ├── SqlRuleActionTest.php │ ├── SubscriptionDescriptionTest.php │ ├── SubscriptionInfoTest.php │ ├── TopicDescriptionTest.php │ ├── TopicInfoTest.php │ ├── TrueFilterTest.php │ └── WrapAccessTokenResultTest.php ├── ServiceManagement ├── Internal │ ├── ServiceTest.php │ └── WindowsAzureServiceTest.php ├── Models │ ├── AffinityGroupTest.php │ ├── AsynchronousOperationResultTest.php │ ├── ChangeDeploymentConfigurationOptionsTest.php │ ├── CreateAffinityGroupOptionsTest.php │ ├── CreateDeploymentOptionsTest.php │ ├── CreateStorageServiceOptionsTest.php │ ├── DeploymentSlotTest.php │ ├── DeploymentStatusTest.php │ ├── DeploymentTest.php │ ├── GetAffinityGroupPropertiesResultTest.php │ ├── GetDeploymentOptionsTest.php │ ├── GetDeploymentResultTest.php │ ├── GetHostedServicePropertiesOptionsTest.php │ ├── GetHostedServicePropertiesResultTest.php │ ├── GetOperationStatusResultTest.php │ ├── GetStorageServiceKeysResultTest.php │ ├── GetStorageServicePropertiesResultTest.php │ ├── HostedServiceTest.php │ ├── InputEndpointTest.php │ ├── ListAffinityGroupsResultTest.php │ ├── ListHostedServicesResultTest.php │ ├── ListLocationsResultTest.php │ ├── ListStorageServicesResultTest.php │ ├── LocationTest.php │ ├── ModeTest.php │ ├── RoleInstanceTest.php │ ├── RoleTest.php │ ├── StorageServiceTest.php │ ├── UpdateServiceOptionsTest.php │ ├── UpgradeDeploymentOptionsTest.php │ └── UpgradeStatusTest.php └── ServiceManagementRestProxyTest.php └── ServiceRuntime ├── Internal ├── AcquireCurrentStateTest.php ├── ChunkedGoalStateDeserializerTest.php ├── CurrentStateTest.php ├── FileInputChannelTest.php ├── FileOutputChannelTest.php ├── GoalStateTest.php ├── LocalResourceTest.php ├── Protocol1RuntimeClientFactoryTest.php ├── Protocol1RuntimeClientTest.php ├── Protocol1RuntimeCurrentStateClientTest.php ├── Protocol1RuntimeGoalStateClientTest.php ├── ReleaseCurrentStateTest.php ├── RoleEnvironmentConfigurationSettingChangeTest.php ├── RoleEnvironmentDataTest.php ├── RoleEnvironmentTopologyChangeTest.php ├── RoleInstanceEndpointTest.php ├── RoleInstanceTest.php ├── RoleTest.php ├── RuntimeKernelTest.php ├── RuntimeVersionManagerTest.php ├── RuntimeVersionProtocolClientTest.php ├── XmlCurrentStateSerializerTest.php ├── XmlGoalStateDeserializerTest.php └── XmlRoleEnvironmentDataDeserializerTest.php └── RoleEnvironmentTest.php /.gitattributes: -------------------------------------------------------------------------------- 1 | *.php diff=php 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/api 2 | bin/logs 3 | bin/coverage 4 | channel/ 5 | *.tgz 6 | phpunit.xml 7 | cache.properties 8 | vendor 9 | nbproject 10 | phpcs-checkstyle.tmp 11 | composer.phar 12 | .vscode/ 13 | .idea/ 14 | examples/MediaServices/IndexerOutput/ 15 | -------------------------------------------------------------------------------- /.php_cs: -------------------------------------------------------------------------------- 1 | fixers([ 5 | 'psr2', 6 | ]) 7 | ->finder( 8 | Symfony\CS\Finder\DefaultFinder::create() 9 | ->in(__DIR__.'/WindowsAzure') 10 | ) 11 | ; 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - '5.6' 5 | - '7.0' 6 | 7 | sudo: false 8 | 9 | env: 10 | - AZURE_STORAGE_CONNECTION_STRING="UseDevelopmentStorage=true;" 11 | 12 | before_script: 13 | - composer install --prefer-dist -o 14 | 15 | script: 16 | - ./vendor/bin/phpunit -c phpunit.local.xml.dist 17 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## Important Annoucement 4 | 5 | As of February 2021, the Azure SDK for PHP has entered a retirement phase and is no longer officially supported by Microsoft. This repository will no longer be maintained. 6 | 7 | >NOTE: Please note that the Azure Storage SDK for PHP will be separately maintained in [its own repo](https://github.com/Azure/azure-storage-php) 8 | If you prefer to work in PHP, you can also directly [call the Azure REST API in PHP](https://docs.microsoft.com/en-us/rest/api/azure/) 9 | 10 | Thank you for your support so far. Should you have any question, please feel free to open an Issue on GitHub. 11 | 12 | ## How to file issues and get help 13 | 14 | Since the repository has entered a retirement phase, please note that we can no longer support bug fixes / feature requests. However, if you do have a general inquiry, please file 15 | your question as a new Issue. Before you file a new issue, please search in existing issues to avoid duplicate. 16 | 17 | ## Microsoft Support Policy 18 | 19 | Support for this repository is limited to the resources listed above. 20 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "microsoft/windowsazure", 3 | "description": "This project provides a set of PHP client libraries that make it easy to access Windows Azure tables, blobs, queues, service runtime and service management APIs.", 4 | "keywords": [ "php", "azure", "sdk" ], 5 | "license": "Apache-2.0", 6 | "authors": [ 7 | { 8 | "name": "Azure PHP SDK", 9 | "email": "azurephpsdk@microsoft.com" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=5.6", 14 | "pear/net_url2": "^2.2", 15 | "pear/mail_mime": "^1.10", 16 | "firebase/php-jwt": "^4.0 || ^5.0", 17 | "microsoft/azure-storage": "^0.19.1", 18 | "guzzlehttp/guzzle": "^6.2", 19 | "zendframework/zend-mime": "^2.6", 20 | "zendframework/zend-mail": "^2.7" 21 | }, 22 | "require-dev": { 23 | "mikey179/vfsStream": "^1.6", 24 | "phpunit/phpunit": "^4.8.35", 25 | "phpdocumentor/phpdocumentor": "^2.8", 26 | "sebastian/phpcpd": "^2.0", 27 | "phploc/phploc": "^2.1", 28 | "pdepend/pdepend": "^2.2", 29 | "phpmd/phpmd": "^2.4", 30 | "squizlabs/php_codesniffer": "^2.6", 31 | "mayflower/php-codebrowser": "^1.1", 32 | "friendsofphp/php-cs-fixer": "^1.12.2" 33 | }, 34 | "autoload": { 35 | "psr-4": { "WindowsAzure\\": "src/" } 36 | }, 37 | "autoload-dev": { 38 | "psr-4": { "Tests\\": "tests/" } 39 | }, 40 | "extra": { 41 | "branch-alias": { 42 | "dev-master": "0.4-dev" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /examples/Client/Client.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | require_once __DIR__.'/../../vendor/autoload.php'; 26 | 27 | spl_autoload_register( 28 | function ($class) { 29 | static $classes = null; 30 | if ($classes === null) { 31 | $classes = array( 32 | 'client\\cloudstorageservice' => '/CloudStorageService.php', 33 | 'client\\cloudsubscription' => '/CloudSubscription.php', 34 | 'client\\cloudtable' => '/CloudTable.php', 35 | 'client\\errormessages' => '/ErrorMessages.php', 36 | 'client\\windowsazureerrorcodes' => '/WindowsAzureErrorCodes.php', 37 | ); 38 | } 39 | $cn = strtolower($class); 40 | if (isset($classes[$cn])) { 41 | require __DIR__.$classes[$cn]; 42 | } 43 | } 44 | ); 45 | -------------------------------------------------------------------------------- /examples/Client/ErrorMessages.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Client; 27 | 28 | /** 29 | * The error messages used in the code. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ErrorMessages 42 | { 43 | const INVALID_ENDPOINT = 'The provided endpoint is invalid.'; 44 | } 45 | -------------------------------------------------------------------------------- /examples/Client/WindowsAzureErrorCodes.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Client; 27 | 28 | /** 29 | * Windows Azure error codes. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class WindowsAzureErrorCodes 42 | { 43 | const TABLE_ALREADY_EXISTS = '409'; 44 | } 45 | -------------------------------------------------------------------------------- /examples/MediaServices/README.md: -------------------------------------------------------------------------------- 1 | This folder contains the following Azure Media Services PHP SDK samples: 2 | 3 | * vodworkflow_aes.php: End-to-end VOD workflow that applies AES content protection. 4 | * vodworkflow_drm_playready_widevine.php: End-to-end VOD workflow that applies DRM (PlayReady + Widevine) content protection. 5 | * vodworkflow_drm_fairplay.php: End-to-end VOD workflow that applies DRM (FairPlay) content protection. 6 | * scale_encoding_units.php: Scales the encoding reserved units. 7 | * analyticsworkflow_indexer.php: End-to-end analitycs workflow to index a media file. 8 | * liveworkflow_features.php: End-to-end live event workflow with configuration options to cover multiple scenarios. 9 | * azuread_userpass.php: Azure AD authentication with user credentials (username/password). 10 | * azuread_symmetrickey.php: Azure AD authentication with service principal (client symmetric key). 11 | * azuread_asymmetrickey: Azure AD authentication with service principal (client certificate). 12 | * userconfig.php: Common file used to store the Azure Media Services account credentials to execute all the samples. 13 | -------------------------------------------------------------------------------- /examples/MediaServices/resources/Azure-Video.wmv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-sdk-for-php/3528039537b6ba9dd1f033a3c47c299964ee0f63/examples/MediaServices/resources/Azure-Video.wmv -------------------------------------------------------------------------------- /examples/MediaServices/resources/default_slate_image_media_services.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-sdk-for-php/3528039537b6ba9dd1f033a3c47c299964ee0f63/examples/MediaServices/resources/default_slate_image_media_services.jpg -------------------------------------------------------------------------------- /examples/MediaServices/resources/indexerTaskPresetTemplate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/MediaServices/userconfig.php: -------------------------------------------------------------------------------- 1 | .onmicrosoft.com"; 7 | $username = 'user@domain.com'; 8 | $password = 'userkey'; 9 | $clientId = ""; 10 | $clientKey = " 2 | 3 | Azure SDK for PHP rules 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /phpdoc.dist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Windows Azure SDK for PHP 4 | 5 | bin/api 6 | 7 | 8 | bin/api 9 | 10 | 11 | src/ 12 | 13 | 14 | -------------------------------------------------------------------------------- /phpmd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | Sebastian Bergmann's ruleset 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /phpunit.functional.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | tests/functional 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | src 25 | 26 | src/WindowsAzure.php 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /phpunit.local.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | tests/unit/ 10 | tests/unit/WindowsAzure/MediaServices/MediaServicesRestProxyTest.php 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | src 25 | 26 | src/WindowsAzure.php 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | tests/unit 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | src 25 | 26 | src/WindowsAzure.php 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Common/Internal/Authentication/IAuthScheme.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\Common\Internal\Authentication; 27 | 28 | /** 29 | * Interface for azure authentication schemes. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IAuthScheme 42 | { 43 | /** 44 | * Returns authorization header to be included in the request. 45 | * 46 | * @param array $headers request headers 47 | * @param string $url request URL 48 | * @param array $queryParams query variables 49 | * @param string $httpMethod request http method 50 | * 51 | * @see Specifying the Authorization Header section at 52 | * http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx 53 | * 54 | * @abstract 55 | * 56 | * @return string 57 | */ 58 | public function getAuthorizationHeader($headers, $url, $queryParams, 59 | $httpMethod 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/Common/Internal/FilterableService.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\Common\Internal; 27 | 28 | /** 29 | * Interface for service with filers. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface FilterableService 42 | { 43 | /** 44 | * Adds new filter to proxy object and returns new BlobRestProxy with 45 | * that filter. 46 | * 47 | * @param IServiceFilter $filter Filter to add for the pipeline 48 | * 49 | * @return mixed 50 | */ 51 | public function withFilter(IServiceFilter $filter); 52 | } 53 | -------------------------------------------------------------------------------- /src/Common/Internal/IServiceFilter.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\Common\Internal; 27 | 28 | use WindowsAzure\Common\Internal\Http\IHttpClient; 29 | use Psr\Http\Message\ResponseInterface; 30 | 31 | /** 32 | * ServiceFilter is called when the sending the request and after receiving the 33 | * response. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/windowsazure/azure-sdk-for-php 44 | */ 45 | interface IServiceFilter 46 | { 47 | /** 48 | * Processes HTTP request before send. 49 | * 50 | * @param IHttpClient $request HTTP request object 51 | * 52 | * @return IHttpClient processed HTTP request object 53 | */ 54 | public function handleRequest(IHttpClient $request); 55 | 56 | /** 57 | * Processes HTTP response after send. 58 | * 59 | * @param IHttpClient $request HTTP request object 60 | * @param ResponseInterface $response HTTP response object 61 | * 62 | * @return ResponseInterface processed HTTP response object 63 | */ 64 | public function handleResponse(IHttpClient $request, ResponseInterface $response); 65 | } 66 | -------------------------------------------------------------------------------- /src/Common/Internal/InvalidArgumentTypeException.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\Common\Internal; 27 | 28 | /** 29 | * Exception thrown if an argument type does not match with the expected type. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class InvalidArgumentTypeException extends \InvalidArgumentException 42 | { 43 | /** 44 | * Constructor. 45 | * 46 | * @param string $validType The valid type that should be provided by the user 47 | * @param string $name The parameter name 48 | */ 49 | public function __construct($validType, $name = null) 50 | { 51 | parent::__construct( 52 | sprintf(Resources::INVALID_PARAM_MSG, $name, $validType) 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Common/Internal/ParserState.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\Common\Internal; 27 | 28 | /** 29 | * State of the connection string parser. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ParserState 42 | { 43 | const EXPECT_KEY = 'ExpectKey'; 44 | const EXPECT_ASSIGNMENT = 'ExpectAssignment'; 45 | const EXPECT_VALUE = 'ExpectValue'; 46 | const EXPECT_SEPARATOR = 'ExpectSeparator'; 47 | } 48 | -------------------------------------------------------------------------------- /src/MediaServices/Authentication/AzureAdTokenCredentialType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Authentication; 27 | 28 | /** 29 | * Enumerate types of Azure AD Credentials 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 40 | */ 41 | class AzureAdTokenCredentialType { 42 | 43 | /** 44 | * User Credential by prompting user for user name and password. 45 | */ 46 | const USER_CREDENTIAL = 0; 47 | 48 | /** 49 | * User Secret Credential by providing user name and password via configuration. 50 | */ 51 | const USER_SECRET_CREDENTIAL = 1; 52 | 53 | /** 54 | * Service Principal with the symmetric key credential. 55 | */ 56 | const SERVICE_PRINCIPAL_WITH_CLIENT_SYMMETRIC_KEY = 2; 57 | 58 | /** 59 | * Service Principal with the certificate credential. 60 | */ 61 | const SERVICE_PRINCIPAL_WITH_CERTIFICATE = 3; 62 | } 63 | -------------------------------------------------------------------------------- /src/MediaServices/Authentication/ITokenProvider.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Authentication; 27 | 28 | use WindowsAzure\MediaServices\Authentication\AccessToken; 29 | 30 | /** 31 | * A generic interface to a RFC6750 bearer token provider. 32 | * 33 | * @category Microsoft 34 | * 35 | * @author Azure PHP SDK 36 | * @copyright Microsoft Corporation 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * 39 | * @version Release: 0.5.0_2016-11 40 | * 41 | * @link https://github.com/windowsazure/azure-sdk-for-php 42 | */ 43 | interface ITokenProvider 44 | { 45 | /** 46 | * Gets the access token to use. 47 | * 48 | * @return WindowsAzure\MediaServices\Authentication\AccessToken 49 | */ 50 | public function getAccessToken(); 51 | } 52 | -------------------------------------------------------------------------------- /src/MediaServices/Models/AdMarkerSources.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents AdMarkerSources type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class AdMarkerSources 42 | { 43 | /** 44 | * Api. 45 | * 46 | * @var string 47 | */ 48 | const Api = 'Api'; 49 | 50 | /** 51 | * Scte35. 52 | * 53 | * @var string 54 | */ 55 | const Scte35 = 'Scte35'; 56 | } 57 | -------------------------------------------------------------------------------- /src/MediaServices/Models/AssetDeliveryProtocol.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents AssetDeliveryProtocol type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class AssetDeliveryProtocol 42 | { 43 | /** 44 | * No protocols. 45 | * 46 | * @var int 47 | */ 48 | const NONE = 0; 49 | 50 | /** 51 | * Smooth streaming protocol. 52 | * 53 | * @var int 54 | */ 55 | const SMOOTH_STREAMING = 1; 56 | 57 | /** 58 | * MPEG Dynamic Adaptive Streaming over HTTP (DASH). 59 | * 60 | * @var int 61 | */ 62 | const DASH = 2; 63 | 64 | /** 65 | * Apple HTTP Live Streaming protocol. 66 | * 67 | * @var int 68 | */ 69 | const HLS = 4; 70 | 71 | /** 72 | * Adobe HTTP Dynamic Streaming (HDS). 73 | * 74 | * @var int 75 | */ 76 | const HDS = 4; 77 | 78 | /** 79 | * Include all protocols. 80 | * 81 | * @var int 82 | */ 83 | const ALL = 0xFFFF; 84 | } 85 | -------------------------------------------------------------------------------- /src/MediaServices/Models/ChannelEncodingPresets.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents ChannelEncodingPresets type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ChannelEncodingPresets 42 | { 43 | /** 44 | * Default720p. 45 | * 46 | * @var string 47 | */ 48 | const Default720p = 'Default720p'; 49 | } 50 | -------------------------------------------------------------------------------- /src/MediaServices/Models/ContentKeyDeliveryType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents ContentKeyDeliveryType type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ContentKeyDeliveryType 42 | { 43 | /** 44 | * None. 45 | * 46 | * @var int 47 | */ 48 | const NONE = 0; 49 | 50 | /** 51 | * Use PlayReady License acquisition protocol. 52 | * 53 | * @var int 54 | */ 55 | const PLAYREADY_LICENSE = 1; 56 | 57 | /** 58 | * Use MPEG Baseline HTTP key protocol. 59 | * 60 | * @var int 61 | */ 62 | const BASELINE_HTTP = 2; 63 | 64 | /** 65 | * Use Widevine license server. 66 | * 67 | * @var int 68 | */ 69 | const WIDEVINE = 3; 70 | 71 | /** 72 | * Send FairPlay SPC to Key Delivery server and get CKC back. 73 | * 74 | * @var int 75 | */ 76 | const FAIRPLAY = 4; 77 | } 78 | -------------------------------------------------------------------------------- /src/MediaServices/Models/ContentKeyRestrictionType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents ContentKeyRestrictionType type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ContentKeyRestrictionType 42 | { 43 | /** 44 | * No restrictions. 45 | * 46 | * @var int 47 | */ 48 | const OPEN = 0; 49 | 50 | /** 51 | * Restrict by a token. 52 | * 53 | * @var int 54 | */ 55 | const TOKEN_RESTRICTED = 1; 56 | 57 | /** 58 | * Restrict by IP. 59 | * 60 | * @var int 61 | */ 62 | const IP_RESTRICTED = 2; 63 | } 64 | -------------------------------------------------------------------------------- /src/MediaServices/Models/EncodingReservedUnitType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents Reserved unit type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class EncodingReservedUnitType 42 | { 43 | /** 44 | * S1 (aka Basic) encoding units size. 45 | */ 46 | const S1 = 0; 47 | 48 | /** 49 | * S2 (aka Standard) encoding units size. 50 | */ 51 | const S2 = 1; 52 | 53 | /** 54 | * S3 (aka Premium) encoding units size. 55 | */ 56 | const S3 = 2; 57 | } 58 | -------------------------------------------------------------------------------- /src/MediaServices/Models/EncodingType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents EncodingType type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class EncodingType 42 | { 43 | /** 44 | * None. 45 | * 46 | * @var string 47 | */ 48 | const None = 'None'; 49 | 50 | /** 51 | * Standard. 52 | * 53 | * @var string 54 | */ 55 | const Standard = 'Standard'; 56 | } 57 | -------------------------------------------------------------------------------- /src/MediaServices/Models/EncryptionSchemes.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents ContentKey type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class EncryptionSchemes 42 | { 43 | /** 44 | * The content key type "CommonEncryption". 45 | * 46 | * @var int 47 | */ 48 | const COMMON_ENCRYPTION = 'CommonEncryption'; 49 | 50 | /** 51 | * The content key type "StorageEncryption". 52 | * 53 | * @var int 54 | */ 55 | const STORAGE_ENCRYPTION = 'StorageEncryption'; 56 | } 57 | -------------------------------------------------------------------------------- /src/MediaServices/Models/OperationState.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents OperationState type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class OperationState 42 | { 43 | /** 44 | * Succeeded. 45 | * 46 | * @var string 47 | */ 48 | const Succeeded = 'Succeeded'; 49 | 50 | /** 51 | * Failed. 52 | * 53 | * @var string 54 | */ 55 | const Failed = 'Failed'; 56 | 57 | /** 58 | * InProgress. 59 | * 60 | * @var string 61 | */ 62 | const InProgress = 'InProgress'; 63 | } 64 | -------------------------------------------------------------------------------- /src/MediaServices/Models/ProgramState.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents ProgramState type enum used in media services, used to describe 30 | * the state of a program. 31 | * 32 | * @category Microsoft 33 | * 34 | * @author Azure PHP SDK 35 | * @copyright Microsoft Corporation 36 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 37 | * 38 | * @version Release: 0.5.0_2016-11 39 | * 40 | * @link https://github.com/windowsazure/azure-sdk-for-php 41 | */ 42 | class ProgramState 43 | { 44 | /** 45 | * Program state "Stopped". Program is stopped. 46 | * 47 | * @var int 48 | */ 49 | const Stopped = 'Stopped'; 50 | 51 | /** 52 | * Program state "Starting". Program is starting. 53 | * 54 | * @var int 55 | */ 56 | const Starting = 'Starting'; 57 | 58 | /** 59 | * Program state "Running". Program is running. 60 | * 61 | * @var int 62 | */ 63 | const Running = 'Running'; 64 | 65 | /** 66 | * Program state "Stopping". Program is stopping. 67 | * 68 | * @var int 69 | */ 70 | const Stopping = 'Stopping'; 71 | } 72 | -------------------------------------------------------------------------------- /src/MediaServices/Models/ProtectionKeyTypes.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents ContentKey type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ProtectionKeyTypes 42 | { 43 | /** 44 | * The protection key type "X509CertificateThumbprint". 45 | * 46 | * @var int 47 | */ 48 | const X509_CERTIFICATE_THUMBPRINT = 0; 49 | } 50 | -------------------------------------------------------------------------------- /src/MediaServices/Models/StreamingProtocol.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents StreamingProtocol type enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class StreamingProtocol 42 | { 43 | /** 44 | * Fragmented MP4. 45 | * 46 | * @var string 47 | */ 48 | const FragmentedMP4 = 'FragmentedMP4'; 49 | 50 | /** 51 | * RTMP. 52 | * 53 | * @var string 54 | */ 55 | const RTMP = 'RTMP'; 56 | 57 | /** 58 | * RTPMPEG2TS. 59 | * 60 | * @var string 61 | */ 62 | const RTPMPEG2TS = 'RTPMPEG2TS'; 63 | } 64 | -------------------------------------------------------------------------------- /src/MediaServices/Models/TaskOptions.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Models; 27 | 28 | /** 29 | * Represents task options enum used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class TaskOptions 42 | { 43 | /** 44 | * The options of the task "none". 45 | * 46 | * @var int 47 | */ 48 | const NONE = 0; 49 | 50 | /** 51 | * The options of the task "protected configuration". 52 | * 53 | * @var int 54 | */ 55 | const PROTECTED_CONFIGURATION = 1; 56 | } 57 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/AllowedTrackTypes.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents AllowedTrackTypes type used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class AllowedTrackTypes 42 | { 43 | /** 44 | * @var string 45 | */ 46 | const SD_ONLY = 'SD_ONLY'; 47 | 48 | /** 49 | * @var string 50 | */ 51 | const SD_HD = 'SD_HD'; 52 | } 53 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/AsymmetricTokenVerificationKey.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents AsymmetricTokenVerificationKey object used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class AsymmetricTokenVerificationKey extends TokenVerificationKey 42 | { 43 | /** 44 | * AsymmetricTokenVerificationKey RawBody. 45 | * 46 | * @var string 47 | */ 48 | protected $_rawBody; 49 | 50 | /** 51 | * Get "AsymmetricTokenVerificationKey RawBody". 52 | * 53 | * @return string RawBody 54 | */ 55 | public function getRawBody() 56 | { 57 | return $this->_rawBody; 58 | } 59 | 60 | /** 61 | * Set "AsymmetricTokenVerificationKey RawBody". 62 | * 63 | * @param string $value RawBody 64 | */ 65 | public function setRawBody($value) 66 | { 67 | $this->_rawBody = $value; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/ContentEncryptionKeyFromHeader.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents AsymmetricTokenVerificationKey object used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ContentEncryptionKeyFromHeader extends PlayReadyContentKey 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/Hdcp.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents Hdcp type used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class Hdcp 42 | { 43 | /** 44 | * @var string 45 | */ 46 | const HDCP_NONE = 'HDCP_NONE'; 47 | 48 | /** 49 | * @var string 50 | */ 51 | const HDCP_V1 = 'HDCP_V1'; 52 | 53 | /** 54 | * @var string 55 | */ 56 | const HDCP_V2 = 'HDCP_V2'; 57 | } 58 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/OpenIdConnectDiscoveryDocument.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents OpenIdConnectDiscoveryDocument object used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class OpenIdConnectDiscoveryDocument 42 | { 43 | /** 44 | * SymmetricTokenVerificationKey keyValue. 45 | * 46 | * @var string 47 | */ 48 | private $_openIdDiscoveryUri; 49 | 50 | /** 51 | * Create SymmetricTokenVerificationKey. 52 | */ 53 | public function __construct() 54 | { 55 | } 56 | 57 | /** 58 | * Get "SymmetricTokenVerificationKey OpenIdDiscoveryUri". 59 | * 60 | * @return string OpenIdDiscoveryUri 61 | */ 62 | public function getOpenIdDiscoveryUri() 63 | { 64 | return $this->_openIdDiscoveryUri; 65 | } 66 | 67 | /** 68 | * Set "SymmetricTokenVerificationKey OpenIdDiscoveryUri". 69 | * 70 | * @param string $value OpenIdDiscoveryUri 71 | */ 72 | public function setOpenIdDiscoveryUri($value) 73 | { 74 | $this->_openIdDiscoveryUri = $value; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/PlayReadyContentKey.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents PlayReadyContentKey abstract class used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | abstract class PlayReadyContentKey 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/PlayReadyLicenseType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents PlayReadyLicenseType type enumeration used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class PlayReadyLicenseType 42 | { 43 | /** 44 | * @var string 45 | */ 46 | const NON_PERSISTENT = 'Nonpersistent'; 47 | 48 | /** 49 | * @var string 50 | */ 51 | const PERSISTENT = 'Persistent'; 52 | } 53 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/RequiredOutputProtection.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents RequiredOutputProtection type used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class RequiredOutputProtection 42 | { 43 | /** 44 | * Indicates whether HDCP is required. 45 | * 46 | * @var string 47 | */ 48 | public $hdcp; 49 | } 50 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/TokenType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents TokenType type enumeration used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class TokenType 42 | { 43 | /** 44 | * The undefined value is used to avoid defaulting to one of supported types. 45 | * 46 | * @var string 47 | */ 48 | const UNDEFINED = 'Undefined'; 49 | 50 | /** 51 | * Simple Web Token. 52 | * 53 | * @var string 54 | */ 55 | const SWT = 'SWT'; 56 | 57 | /** 58 | * Json Web Token. 59 | * 60 | * @var string 61 | */ 62 | const JWT = 'JWT'; 63 | } 64 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/TokenVerificationKey.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents TokenVerificationKey abstract class used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | abstract class TokenVerificationKey 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/UnknownOutputPassingOption.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents UnknownOutputPassingOption type enumeration used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class UnknownOutputPassingOption 42 | { 43 | /** 44 | * Passing the video portion of protected content to an Unknown Output is not allowed. 45 | * 46 | * @var string 47 | */ 48 | const NOT_ALLOWED = 'NotAllowed'; 49 | 50 | /** 51 | * Passing the video portion of protected content to an Unknown Output is allowed. 52 | * 53 | * @var string 54 | */ 55 | const ALLOWED = 'Allowed'; 56 | 57 | /** 58 | * Passing the video portion of protected content to an Unknown Output is allowed but the client must 59 | * constrain the resolution of the video content. 60 | * 61 | * @var string 62 | */ 63 | const ALLOWED_WITH_VIDEO_CONSTRICTION = 'AllowedWithVideoConstriction'; 64 | } 65 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/WidevineMessage.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents WidevineMessage type used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class WidevineMessage 42 | { 43 | /** 44 | * Controls which content keys should be included in a license. 45 | * Only one of allowed_track_types and content_key_specs can be specified. 46 | * 47 | * @var string 48 | */ 49 | public $allowed_track_types; 50 | 51 | /** 52 | * A finer grained control on what content keys to return. 53 | * Only one of allowed_track_types and content_key_specs can be specified. 54 | * 55 | * @var ContentKeySpecs[] 56 | */ 57 | public $content_key_specs; 58 | 59 | /** 60 | * Policy settings for this license. In the event this asset has 61 | * a pre-defined policy, these specified values will be used. 62 | * 63 | * @var mixed 64 | */ 65 | public $policy_overrides; 66 | } 67 | -------------------------------------------------------------------------------- /src/MediaServices/Templates/X509CertTokenVerificationKey.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\MediaServices\Templates; 27 | 28 | /** 29 | * Represents X509CertTokenVerificationKey object used in media services. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class X509CertTokenVerificationKey extends AsymmetricTokenVerificationKey 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/ServiceBus/Internal/IWrap.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceBus\Internal; 27 | 28 | use WindowsAzure\Common\Internal\FilterableService; 29 | 30 | /** 31 | * This class constructs HTTP requests and receive HTTP responses for queue 32 | * service layer. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | interface IWrap extends FilterableService 45 | { 46 | /** 47 | * Gets a WRAP access token with specified parameters. 48 | * 49 | * @param string $uri The URI of the WRAP service 50 | * @param string $name The user name of the WRAP service 51 | * @param string $password The password of the WRAP service 52 | * @param string $scope The scope of the WRAP service 53 | * 54 | * @return WrapAccessTokenResult 55 | */ 56 | public function wrapAccessToken($uri, $name, $password, $scope); 57 | } 58 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/EmptyRuleAction.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | use WindowsAzure\ServiceBus\Internal\Action; 28 | 29 | /** 30 | * The empty rule action class. 31 | * 32 | * @category Microsoft 33 | * 34 | * @author Azure PHP SDK 35 | * @copyright 2012 Microsoft Corporation 36 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 37 | * 38 | * @version Release: 0.5.0_2016-11 39 | * 40 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 41 | */ 42 | class EmptyRuleAction extends Action 43 | { 44 | /** 45 | * Creates an empty rule action with default parameter. 46 | */ 47 | public function __construct() 48 | { 49 | parent::__construct(); 50 | $this->attributes['xsi:type'] = 'EmptyRuleAction'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/FalseFilter.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | use WindowsAzure\ServiceBus\Internal\Filter; 28 | 29 | /** 30 | * The false filter. 31 | * 32 | * @category Microsoft 33 | * 34 | * @author Azure PHP SDK 35 | * @copyright 2012 Microsoft Corporation 36 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 37 | * 38 | * @version Release: 0.5.0_2016-11 39 | * 40 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 41 | */ 42 | class FalseFilter extends Filter 43 | { 44 | /** 45 | * Creates a filter with default parameter. 46 | */ 47 | public function __construct() 48 | { 49 | parent::__construct(); 50 | $this->attributes['xsi:type'] = 'FalseFilter'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/ListQueuesOptions.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | /** 28 | * This options to list queues. 29 | * 30 | * @category Microsoft 31 | * 32 | * @author Azure PHP SDK 33 | * @copyright 2012 Microsoft Corporation 34 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 35 | * 36 | * @version Release: 0.5.0_2016-11 37 | * 38 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 39 | */ 40 | class ListQueuesOptions extends ListOptions 41 | { 42 | } 43 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/ListRulesOptions.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | /** 28 | * The options to specify a list rules request. 29 | * 30 | * @category Microsoft 31 | * 32 | * @author Azure PHP SDK 33 | * @copyright 2012 Microsoft Corporation 34 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 35 | * 36 | * @version Release: 0.5.0_2016-11 37 | * 38 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 39 | */ 40 | class ListRulesOptions extends ListOptions 41 | { 42 | } 43 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/ListSubscriptionsOptions.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | /** 28 | * The options to list the subscriptions. 29 | * 30 | * @category Microsoft 31 | * 32 | * @author Azure PHP SDK 33 | * @copyright 2012 Microsoft Corporation 34 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 35 | * 36 | * @version Release: 0.5.0_2016-11 37 | * 38 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 39 | */ 40 | class ListSubscriptionsOptions extends ListOptions 41 | { 42 | } 43 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/ListTopicsOptions.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | /** 28 | * This class contains the options for list topics request. 29 | * 30 | * @category Microsoft 31 | * 32 | * @author Azure PHP SDK 33 | * @copyright 2012 Microsoft Corporation 34 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 35 | * 36 | * @version Release: 0.5.0_2016-11 37 | * 38 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 39 | */ 40 | class ListTopicsOptions extends ListOptions 41 | { 42 | } 43 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/ReceiveMode.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | /** 28 | * The mode of receiving message from Service Bus. 29 | * 30 | * @category Microsoft 31 | * 32 | * @author Azure PHP SDK 33 | * @copyright 2012 Microsoft Corporation 34 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 35 | * 36 | * @version Release: 0.5.0_2016-11 37 | * 38 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 39 | */ 40 | class ReceiveMode 41 | { 42 | const RECEIVE_AND_DELETE = 0; 43 | const PEEK_LOCK = 1; 44 | } 45 | -------------------------------------------------------------------------------- /src/ServiceBus/Models/TrueFilter.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright 2012 Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 23 | */ 24 | 25 | namespace WindowsAzure\ServiceBus\Models; 26 | 27 | use WindowsAzure\ServiceBus\Internal\Filter; 28 | 29 | /** 30 | * The true filter. 31 | * 32 | * @category Microsoft 33 | * 34 | * @author Azure PHP SDK 35 | * @copyright 2012 Microsoft Corporation 36 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 37 | * 38 | * @version Release: 0.5.0_2016-11 39 | * 40 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 41 | */ 42 | class TrueFilter extends Filter 43 | { 44 | /** 45 | * Creates a true filter with default parameter. 46 | */ 47 | public function __construct() 48 | { 49 | parent::__construct(); 50 | $this->attributes['xsi:type'] = 'TrueFilter'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/ServiceManagement/Models/CreateAffinityGroupOptions.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\Common\Internal\Validate; 29 | 30 | /** 31 | * The optional parameters for createAffinityGroup API. 32 | * 33 | * @category Microsoft 34 | * 35 | * @author Azure PHP SDK 36 | * @copyright 2012 Microsoft Corporation 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * 39 | * @version Release: 0.5.0_2016-11 40 | * 41 | * @link https://github.com/windowsazure/azure-sdk-for-php 42 | */ 43 | class CreateAffinityGroupOptions 44 | { 45 | /** 46 | * @var string 47 | */ 48 | private $_description; 49 | 50 | /** 51 | * Gets the description. 52 | * 53 | * @return string 54 | */ 55 | public function getDescription() 56 | { 57 | return $this->_description; 58 | } 59 | 60 | /** 61 | * Sets the description. 62 | * 63 | * @param string $description The description 64 | */ 65 | public function setDescription($description) 66 | { 67 | Validate::isString($description, 'description'); 68 | 69 | $this->_description = $description; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/ServiceManagement/Models/DeploymentSlot.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceManagement\Models; 27 | 28 | /** 29 | * Valid deployment slots that can be used on Windows Azure. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class DeploymentSlot 42 | { 43 | const STAGING = 'staging'; 44 | const PRODUCTION = 'production'; 45 | 46 | /** 47 | * Validates the provided slot name. 48 | * 49 | * @param string $slot The deployment slot name 50 | * 51 | * @return bool 52 | */ 53 | public static function isValid($slot) 54 | { 55 | switch (strtolower($slot)) { 56 | case self::STAGING: 57 | case self::PRODUCTION: 58 | return true; 59 | 60 | default: 61 | return false; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/ServiceManagement/Models/DeploymentStatus.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceManagement\Models; 27 | 28 | /** 29 | * The possible values for deployment status. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class DeploymentStatus 42 | { 43 | const SUSPENDED = 'Suspended'; 44 | const RUNNING = 'Running'; 45 | 46 | /** 47 | * Validates the provided status. 48 | * 49 | * @param string $status The deployment status 50 | * 51 | * @return bool 52 | */ 53 | public static function isValid($status) 54 | { 55 | switch (strtolower($status)) { 56 | case strtolower(self::SUSPENDED): 57 | case strtolower(self::RUNNING): 58 | return true; 59 | 60 | default: 61 | return false; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/ServiceManagement/Models/KeyType.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceManagement\Models; 27 | 28 | /** 29 | * The storage account key type. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class KeyType 42 | { 43 | const PRIMARY_KEY = 'Primary'; 44 | const SECONDARY_KEY = 'Secondary'; 45 | } 46 | -------------------------------------------------------------------------------- /src/ServiceManagement/Models/Mode.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceManagement\Models; 27 | 28 | /** 29 | * The possible values for deployment change mode. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class Mode 42 | { 43 | const AUTO = 'auto'; 44 | const MANUAL = 'manual'; 45 | 46 | /** 47 | * Validates the provided mode. 48 | * 49 | * @param string $mode The deployment change mode 50 | * 51 | * @return bool 52 | */ 53 | public static function isValid($mode) 54 | { 55 | switch (strtolower($mode)) { 56 | case self::AUTO: 57 | case self::MANUAL: 58 | return true; 59 | 60 | default: 61 | return false; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/ServiceManagement/Models/OperationStatus.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceManagement\Models; 27 | 28 | /** 29 | * The possible status values of asynchronous request. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class OperationStatus 42 | { 43 | const IN_PROGRESS = 'InProgress'; 44 | const SUCCEEDED = 'Succeeded'; 45 | const FAILED = 'Failed'; 46 | } 47 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/ChannelNotAvailableException.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * Custom exception when a role environment channel is not available. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ChannelNotAvailableException extends \Exception 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/CurrentState.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The current state representation. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class CurrentState 42 | { 43 | /** 44 | * @var string 45 | */ 46 | private $_clientId; 47 | 48 | /** 49 | * Constructor. 50 | * 51 | * @param string $clientId The client identifier 52 | */ 53 | public function __construct($clientId) 54 | { 55 | $this->_clientId = $clientId; 56 | } 57 | 58 | /** 59 | * Gets the client identifier. 60 | * 61 | * @return string 62 | */ 63 | public function getClientId() 64 | { 65 | return $this->_clientId; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/CurrentStatus.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The current status. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class CurrentStatus 42 | { 43 | /** 44 | * @var string 45 | */ 46 | const STARTED = 'Started'; 47 | 48 | /** 49 | * @var string 50 | */ 51 | const BUSY = 'Busy'; 52 | 53 | /** 54 | * @var string 55 | */ 56 | const RECYCLE = 'Recycle'; 57 | 58 | /** 59 | * @var string 60 | */ 61 | const STOPPED = 'Stopped'; 62 | } 63 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/FileOutputChannel.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The file output channel. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class FileOutputChannel implements IOutputChannel 42 | { 43 | // @codingStandardsIgnoreStart 44 | 45 | /** 46 | * Gets the output stream. 47 | * 48 | * @param string $name The output channel path 49 | * 50 | * @return resource 51 | * 52 | * @throws ChannelNotAvailableException 53 | */ 54 | public function getOutputStream($name) 55 | { 56 | $fp = @fopen($name, 'w'); 57 | if ($fp) { 58 | return $fp; 59 | } else { 60 | throw new ChannelNotAvailableException(); 61 | } 62 | } 63 | 64 | // @codingStandardsIgnoreEnd 65 | } 66 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/ICurrentStateSerializer.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The current state serializer. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface ICurrentStateSerializer 42 | { 43 | /** 44 | * Serializes the current state. 45 | * 46 | * @param CurrentState $state The current state 47 | * @param resource $stream The output stream 48 | */ 49 | public function serialize(CurrentState $state, $stream); 50 | } 51 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IGoalStateDeserializer.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The goal state deserializer. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IGoalStateDeserializer 42 | { 43 | /** 44 | * Initializes the goal state deserializer with the input stream. 45 | * 46 | * @param resource $inputStream The input stream 47 | */ 48 | public function initialize($inputStream); 49 | 50 | /** 51 | * Deserializes a goal state. 52 | * 53 | * @return GoalState 54 | */ 55 | public function deserialize(); 56 | } 57 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IInputChannel.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The input channel. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IInputChannel 42 | { 43 | /** 44 | * Gets the input stream. 45 | * 46 | * @param string $name The input stream path 47 | * 48 | * @return resource 49 | */ 50 | public function getInputStream($name); 51 | 52 | /** 53 | * Closes the input stream. 54 | */ 55 | public function closeInputStream(); 56 | } 57 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IOutputChannel.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The output channel. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IOutputChannel 42 | { 43 | /** 44 | * Gets the output stream. 45 | * 46 | * @param string $name The output channel path 47 | */ 48 | public function getOutputStream($name); 49 | } 50 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IRoleEnvironmentChange.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The role environment change. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IRoleEnvironmentChange 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IRoleEnvironmentDataDeserializer.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The role environment data deserializer. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IRoleEnvironmentDataDeserializer 42 | { 43 | /** 44 | * Deserializes the role environment data. 45 | * 46 | * @param resource $document The document to deserialize 47 | * 48 | * @return RoleEnvironmentData 49 | */ 50 | public function deserialize($document); 51 | } 52 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IRuntimeClient.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The runtime client. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IRuntimeClient extends IRuntimeCurrentStateClient, IRuntimeGoalStateClient 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IRuntimeClientFactory.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The runtime client factory. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IRuntimeClientFactory 42 | { 43 | /** 44 | * Gets the runtime version. 45 | * 46 | * @return string 47 | */ 48 | public function getVersion(); 49 | 50 | /** 51 | * Creates a new runtime client instance. 52 | * 53 | * @param string $path The goal state path 54 | * 55 | * @return IRuntimeClient 56 | */ 57 | public function createRuntimeClient($path); 58 | } 59 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IRuntimeCurrentStateClient.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The runtime current state client. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IRuntimeCurrentStateClient 42 | { 43 | /** 44 | * Sets the current state. 45 | * 46 | * @param CurrentState $state The current state 47 | */ 48 | public function setCurrentState(CurrentState $state); 49 | } 50 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/IRuntimeGoalStateClient.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The runtime goal state client. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | interface IRuntimeGoalStateClient 42 | { 43 | /** 44 | * Gets the current goal state. 45 | * 46 | * @return GoalState 47 | */ 48 | public function getCurrentGoalState(); 49 | 50 | /** 51 | * Gets the role environment data. 52 | * 53 | * @return RoleEnvironmentData 54 | */ 55 | public function getRoleEnvironmentData(); 56 | } 57 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/Protocol1RuntimeClientFactory.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The runtime client factory. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class Protocol1RuntimeClientFactory 42 | { 43 | /** 44 | * Gets the runtime version. 45 | * 46 | * @return string 47 | */ 48 | public function getVersion() 49 | { 50 | return '2011-03-08'; 51 | } 52 | 53 | /** 54 | * Creates a new runtime client instance. 55 | * 56 | * @param string $path The goal state path 57 | * 58 | * @return Protocol1RuntimeClient 59 | */ 60 | public function createRuntimeClient($path) 61 | { 62 | $kernel = RuntimeKernel::getKernel(); 63 | 64 | return new Protocol1RuntimeClient( 65 | $kernel->getProtocol1RuntimeGoalStateClient(), 66 | $kernel->getProtocol1RuntimeCurrentStateClient(), 67 | $path 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/ReleaseCurrentState.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The release current state request. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class ReleaseCurrentState extends CurrentState 42 | { 43 | /** 44 | * Constructor. 45 | * 46 | * @param string $clientId The client identifier 47 | */ 48 | public function __construct($clientId) 49 | { 50 | parent::__construct($clientId); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/RoleEnvironmentConfigurationSettingChange.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The role environment configuration setting change. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class RoleEnvironmentConfigurationSettingChange implements IRoleEnvironmentChange 42 | { 43 | /** 44 | * @var string 45 | */ 46 | private $_settingName; 47 | 48 | /** 49 | * Constructor. 50 | * 51 | * @param string $settingName The setting name 52 | */ 53 | public function __construct($settingName) 54 | { 55 | $this->_settingName = $settingName; 56 | } 57 | 58 | /** 59 | * Returns the name of the configuration setting that has been changed. 60 | * 61 | * @return string 62 | */ 63 | public function getConfigurationSettingName() 64 | { 65 | return $this->_settingName; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/RoleEnvironmentNotAvailableException.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * Custom exception when the role environment is not available. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class RoleEnvironmentNotAvailableException extends \Exception 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/RoleEnvironmentTopologyChange.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The role environment topology change. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class RoleEnvironmentTopologyChange implements IRoleEnvironmentChange 42 | { 43 | /** 44 | * @var string 45 | */ 46 | private $_roleName; 47 | 48 | /** 49 | * Constructor. 50 | * 51 | * @param string $roleName The role name 52 | */ 53 | public function __construct($roleName) 54 | { 55 | $this->_roleName = $roleName; 56 | } 57 | 58 | /** 59 | * Returns the name of the role. 60 | * 61 | * @return string 62 | */ 63 | public function getRoleName() 64 | { 65 | return $this->_roleName; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/RoleInstanceStatus.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | /** 29 | * The role instance status. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class RoleInstanceStatus 42 | { 43 | /** 44 | * The role instance is unavailable for requests. 45 | * 46 | * @var int 47 | */ 48 | const BUSY = 0; 49 | 50 | /** 51 | * The role instance is ready to accept requests. 52 | * 53 | * @var int 54 | */ 55 | const READY = 1; 56 | } 57 | -------------------------------------------------------------------------------- /src/ServiceRuntime/Internal/XmlGoalStateDeserializer.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace WindowsAzure\ServiceRuntime\Internal; 27 | 28 | use WindowsAzure\Common\Internal\Utilities; 29 | 30 | /** 31 | * The XML goal state deserializer. 32 | * 33 | * @category Microsoft 34 | * 35 | * @author Azure PHP SDK 36 | * @copyright 2012 Microsoft Corporation 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * 39 | * @version Release: 0.5.0_2016-11 40 | * 41 | * @link https://github.com/windowsazure/azure-sdk-for-php 42 | */ 43 | class XmlGoalStateDeserializer 44 | { 45 | /** 46 | * Deserializes a goal state. 47 | * 48 | * @param string $document The goal state document 49 | * 50 | * @return GoalState 51 | */ 52 | public function deserialize($document) 53 | { 54 | $goalStateInfo = Utilities::unserialize($document); 55 | 56 | return new GoalState( 57 | $goalStateInfo['Incarnation'], 58 | $goalStateInfo['ExpectedState'], 59 | $goalStateInfo['RoleEnvironmentPath'], 60 | new \DateTime($goalStateInfo['Deadline']), 61 | $goalStateInfo['CurrentStateEndpoint'] 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /tests/framework/VirtualFileSystem.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\framework; 27 | 28 | use org\bovigo\vfs\vfsStream; 29 | use org\bovigo\vfs\vfsStreamDirectory; 30 | use org\bovigo\vfs\vfsStreamWrapper; 31 | 32 | /** 33 | * Represents virtual file system for testing purpose. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/windowsazure/azure-sdk-for-php 44 | */ 45 | class VirtualFileSystem 46 | { 47 | public static function newFile($contents, $fileName = null, $root = null) 48 | { 49 | $root = is_null($root) ? 'root' : $root; 50 | $fileName = is_null($fileName) ? 'test.txt' : $fileName; 51 | 52 | vfsStreamWrapper::register(); 53 | vfsStreamWrapper::setRoot(new vfsStreamDirectory($root)); 54 | 55 | $file = vfsStream::newFile($fileName); 56 | $file->setContent($contents); 57 | 58 | vfsStreamWrapper::getRoot()->addChild($file); 59 | $virtualPath = vfsStream::url($root.'/'.$fileName); 60 | 61 | return $virtualPath; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/mock/WindowsAzure/Common/Internal/Authentication/SharedKeyAuthSchemeMock.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\mock\WindowsAzure\Common\Internal\Authentication; 27 | 28 | use WindowsAzure\Common\Internal\Authentication\SharedKeyAuthScheme; 29 | 30 | /** 31 | * Mock class to wrap SharedKeyAuthScheme class. 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class SharedKeyAuthSchemeMock extends SharedKeyAuthScheme 42 | { 43 | public function getIncludedHeaders() 44 | { 45 | return $this->includedHeaders; 46 | } 47 | 48 | public function computeSignatureMock($headers, $url, $queryParams, $httpMethod) 49 | { 50 | return parent::computeSignature($headers, $url, $queryParams, $httpMethod); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/mock/WindowsAzure/Common/Internal/Authentication/TableSharedKeyLiteAuthSchemeMock.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\mock\WindowsAzure\Common\Internal\Authentication; 27 | 28 | use WindowsAzure\Common\Internal\Authentication\TableSharedKeyLiteAuthScheme; 29 | 30 | /** 31 | * Mock class to wrap SharedKeyAuthScheme class. 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/windowsazure/azure-sdk-for-php 40 | */ 41 | class TableSharedKeyLiteAuthSchemeMock extends TableSharedKeyLiteAuthScheme 42 | { 43 | public function getIncludedHeaders() 44 | { 45 | return $this->includedHeaders; 46 | } 47 | 48 | public function computeSignatureMock($headers, $url, $queryParams, $httpMethod) 49 | { 50 | return parent::computeSignature($headers, $url, $queryParams, $httpMethod); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/Common/Internal/InvalidArgumentTypeExceptionTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\Common\Internal; 27 | 28 | use WindowsAzure\Common\Internal\InvalidArgumentTypeException; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class InvalidArgumentTypeException. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class InvalidArgumentTypeExceptionTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\Common\Internal\InvalidArgumentTypeException::__construct 48 | */ 49 | public function test__construct() 50 | { 51 | $e = new InvalidArgumentTypeException('string'); 52 | 53 | $this->assertTrue(isset($e)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/Common/Internal/Serialization/DummyClass.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\Common\Internal\Serialization; 27 | 28 | /** 29 | * Dummy class for Xml Serializer. 30 | * 31 | * @category Microsoft 32 | * 33 | * @author Azure PHP SDK 34 | * @copyright 2012 Microsoft Corporation 35 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 36 | * 37 | * @version Release: 0.5.0_2016-11 38 | * 39 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 40 | */ 41 | class DummyClass 42 | { 43 | private $_attributes; 44 | 45 | public function __construct() 46 | { 47 | $this->_attributes = []; 48 | } 49 | 50 | public function addAttribute($attributeKey, $attributeValue) 51 | { 52 | $this->_attributes[$attributeKey] = $attributeValue; 53 | } 54 | 55 | public function getAttributes() 56 | { 57 | return $this->_attributes; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/MediaServices/Templates/OpenIdConnectDiscoveryDocumentTest.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/windowsazure/azure-sdk-for-php 23 | */ 24 | 25 | namespace Tests\unit\WindowsAzure\MediaServices\Templates; 26 | 27 | use WindowsAzure\MediaServices\Templates\OpenIdConnectDiscoveryDocument; 28 | use PHPUnit\Framework\TestCase; 29 | 30 | /** 31 | * Unit Tests for OpenIdConnectDiscoveryDocument. 32 | * 33 | * @category Microsoft 34 | * 35 | * @author Azure PHP SDK 36 | * @copyright Microsoft Corporation 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * 39 | * @version Release: 0.5.0_2016-11 40 | * 41 | * @link https://github.com/windowsazure/azure-sdk-for-php 42 | */ 43 | class OpenIdConnectDiscoveryDocumentTest extends TestCase 44 | { 45 | /** 46 | * @covers \WindowsAzure\MediaServices\Templates\OpenIdConnectDiscoveryDocument::getOpenIdDiscoveryUri 47 | * @covers \WindowsAzure\MediaServices\Templates\OpenIdConnectDiscoveryDocument::setOpenIdDiscoveryUri 48 | */ 49 | public function testGetSetOpenIdDiscoveryUri() 50 | { 51 | // Setup 52 | $entity = new OpenIdConnectDiscoveryDocument(); 53 | $payload = 'payload string'; 54 | 55 | // Test 56 | $entity->setOpenIdDiscoveryUri($payload); 57 | $result = $entity->getOpenIdDiscoveryUri(); 58 | 59 | // Assert 60 | $this->assertEquals($payload, $result); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/MediaServices/Templates/SymmetricVerificationKeyTest.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/windowsazure/azure-sdk-for-php 23 | */ 24 | 25 | namespace Tests\unit\WindowsAzure\MediaServices\Templates; 26 | 27 | use WindowsAzure\MediaServices\Templates\SymmetricVerificationKey; 28 | use PHPUnit\Framework\TestCase; 29 | 30 | /** 31 | * Unit Tests for SymmetricVerificationKey. 32 | * 33 | * @category Microsoft 34 | * 35 | * @author Azure PHP SDK 36 | * @copyright Microsoft Corporation 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * 39 | * @version Release: 0.5.0_2016-11 40 | * 41 | * @link https://github.com/windowsazure/azure-sdk-for-php 42 | */ 43 | class SymmetricVerificationKeyTest extends TestCase 44 | { 45 | /** 46 | * @covers \WindowsAzure\MediaServices\Templates\SymmetricVerificationKey::getKeyValue 47 | * @covers \WindowsAzure\MediaServices\Templates\SymmetricVerificationKey::setKeyValue 48 | */ 49 | public function testGetSetKeyValue() 50 | { 51 | // Setup 52 | $entity = new SymmetricVerificationKey(); 53 | $payload = 'payload string'; 54 | 55 | // Test 56 | $entity->setKeyValue($payload); 57 | $result = $entity->getKeyValue(); 58 | 59 | // Assert 60 | $this->assertEquals($payload, $result); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/MediaServices/Templates/X509CertTokenVerificationKeyTest.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright Microsoft Corporation 20 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 21 | * 22 | * @link https://github.com/windowsazure/azure-sdk-for-php 23 | */ 24 | 25 | namespace Tests\unit\WindowsAzure\MediaServices\Templates; 26 | 27 | use WindowsAzure\MediaServices\Templates\X509CertTokenVerificationKey; 28 | use PHPUnit\Framework\TestCase; 29 | 30 | /** 31 | * Unit Tests for X509CertTokenVerificationKey. 32 | * 33 | * @category Microsoft 34 | * 35 | * @author Azure PHP SDK 36 | * @copyright Microsoft Corporation 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * 39 | * @version Release: 0.5.0_2016-11 40 | * 41 | * @link https://github.com/windowsazure/azure-sdk-for-php 42 | */ 43 | class X509CertTokenVerificationKeyTest extends TestCase 44 | { 45 | /** 46 | * @covers \WindowsAzure\MediaServices\Templates\X509CertTokenVerificationKey::getRawBody 47 | * @covers \WindowsAzure\MediaServices\Templates\X509CertTokenVerificationKey::setRawBody 48 | */ 49 | public function testGetSetRawBody() 50 | { 51 | // Setup 52 | $entity = new X509CertTokenVerificationKey(); 53 | $payload = 'payload string'; 54 | 55 | // Test 56 | $entity->setRawBody($payload); 57 | $result = $entity->getRawBody(); 58 | 59 | // Assert 60 | $this->assertEquals($payload, $result); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/MediaServices/resources/default_slate_image_media_services.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-sdk-for-php/3528039537b6ba9dd1f033a3c47c299964ee0f63/tests/unit/WindowsAzure/MediaServices/resources/default_slate_image_media_services.jpg -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/Internal/ActionTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\Internal; 27 | 28 | use WindowsAzure\ServiceBus\Internal\Action; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class Action. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class ActionTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Internal\Action::__construct 48 | */ 49 | public function testActionConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $action = new Action(); 55 | 56 | // Assert 57 | $this->assertNotNull($action); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/Internal/FilterTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\Unit\WindowsAzure\ServiceBus\Models; 27 | 28 | use WindowsAzure\ServiceBus\Internal\Filter; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class Filter. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class FilterTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Internal\Filter::__construct 48 | */ 49 | public function testFilterConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $filter = new Filter(); 55 | 56 | // Assert 57 | $this->assertNotNull($filter); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/EmptyRuleActionTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\EmptyRuleAction; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class EmptyRuleAction. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class EmptyRuleActionTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Models\EmptyRuleAction::__construct 48 | */ 49 | public function testEmptyRuleActionConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $getRuleResult = new EmptyRuleAction(); 55 | 56 | // Assert 57 | $this->assertNotNull($getRuleResult); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/FalseFilterTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\FalseFilter; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class FalseFilter. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class FalseFilterTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Models\FalseFilter::__construct 48 | */ 49 | public function testFalseFilterConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $getRuleResult = new FalseFilter(); 55 | 56 | // Assert 57 | $this->assertNotNull($getRuleResult); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListQueuesOptionsTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListQueuesOptions; 29 | 30 | use PHPUnit\Framework\TestCase; 31 | 32 | /** 33 | * Unit tests for class WrapAccessTokenResult. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 44 | */ 45 | class ListQueuesOptionsTest extends TestCase 46 | { 47 | /** 48 | * @covers \WindowsAzure\ServiceBus\Models\ListQueuesOptions::__construct 49 | */ 50 | public function testListQueuesOptionsConstructor() 51 | { 52 | // Setup 53 | 54 | // Test 55 | $listQueuesOptions = new ListQueuesOptions(); 56 | 57 | // Assert 58 | $this->assertNotNull($listQueuesOptions); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListQueuesResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListQueuesResult; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class WrapAccessTokenResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class ListQueuesResultTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Models\ListQueuesResult::__construct 48 | */ 49 | public function testListQueuesResultConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $listQueuesResult = new ListQueuesResult(); 55 | 56 | // Assert 57 | $this->assertNotNull($listQueuesResult); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListRulesOptionsTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListRulesOptions; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class WrapAccessTokenResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class ListRulesOptionsTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Models\ListRulesOptions::__construct 48 | */ 49 | public function testListRulesOptionsConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $listRulesOptions = new ListRulesOptions(); 55 | 56 | // Assert 57 | $this->assertNotNull($listRulesOptions); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListRulesResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListRulesResult; 29 | 30 | use PHPUnit\Framework\TestCase; 31 | 32 | /** 33 | * Unit tests for class WrapAccessTokenResult. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 44 | */ 45 | class ListRulesResultTest extends TestCase 46 | { 47 | /** 48 | * @covers \WindowsAzure\ServiceBus\Models\ListRulesResult::__construct 49 | */ 50 | public function testListRulesResultConstructor() 51 | { 52 | // Setup 53 | 54 | // Test 55 | $listRulesResult = new ListRulesResult(); 56 | 57 | // Assert 58 | $this->assertNotNull($listRulesResult); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListSubscriptionsOptionsTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListSubscriptionsOptions; 29 | 30 | use PHPUnit\Framework\TestCase; 31 | 32 | /** 33 | * Unit tests for class WrapAccessTokenResult. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 44 | */ 45 | class ListSubscriptionsOptionsTest extends TestCase 46 | { 47 | /** 48 | * @covers \WindowsAzure\ServiceBus\Models\ListSubscriptionsOptions::__construct 49 | */ 50 | public function testListSubscriptionsOptionsConstructor() 51 | { 52 | // Setup 53 | 54 | // Test 55 | $listSubscriptionsOptions = new ListSubscriptionsOptions(); 56 | 57 | // Assert 58 | $this->assertNotNull($listSubscriptionsOptions); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListSubscriptionsResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListSubscriptionsResult; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class WrapAccessTokenResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class ListSubscriptionsResultTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Models\ListSubscriptionsResult::__construct 48 | */ 49 | public function testListSubscriptionsResultConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $listSubscriptionsResult = new ListSubscriptionsResult(); 55 | 56 | // Assert 57 | $this->assertNotNull($listSubscriptionsResult); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListTopicsOptionsTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListTopicsOptions; 29 | 30 | use PHPUnit\Framework\TestCase; 31 | 32 | /** 33 | * Unit tests for class WrapAccessTokenResult. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 44 | */ 45 | class ListTopicsOptionsTest extends TestCase 46 | { 47 | /** 48 | * @covers \WindowsAzure\ServiceBus\Models\ListTopicsOptions::__construct 49 | */ 50 | public function testListTopicsOptionsConstructor() 51 | { 52 | // Setup 53 | 54 | // Test 55 | $listTopicsOptions = new ListTopicsOptions(); 56 | 57 | // Assert 58 | $this->assertNotNull($listTopicsOptions); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/ListTopicsResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\ListTopicsResult; 29 | 30 | use PHPUnit\Framework\TestCase; 31 | 32 | /** 33 | * Unit tests for class WrapAccessTokenResult. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 44 | */ 45 | class ListTopicsResultTest extends TestCase 46 | { 47 | /** 48 | * @covers \WindowsAzure\ServiceBus\Models\ListTopicsResult::__construct 49 | */ 50 | public function testListTopicsResultConstructor() 51 | { 52 | // Setup 53 | 54 | // Test 55 | $listTopicsResult = new ListTopicsResult(); 56 | 57 | // Assert 58 | $this->assertNotNull($listTopicsResult); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceBus/models/TrueFilterTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceBus\models; 27 | 28 | use WindowsAzure\ServiceBus\Models\TrueFilter; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class TrueFilter. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/WindowsAzure/azure-sdk-for-php 43 | */ 44 | class TrueFilterTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceBus\Models\TrueFilter::__construct 48 | */ 49 | public function testTrueFilterConstructor() 50 | { 51 | // Setup 52 | 53 | // Test 54 | $getRuleResult = new TrueFilter(); 55 | 56 | // Assert 57 | $this->assertNotNull($getRuleResult); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/CreateAffinityGroupOptionsTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\CreateAffinityGroupOptions; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class CreateAffinityGroupOptions. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class CreateAffinityGroupOptionsTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\CreateAffinityGroupOptions::setDescription 48 | * @covers \WindowsAzure\ServiceManagement\Models\CreateAffinityGroupOptions::getDescription 49 | */ 50 | public function testSetDescription() 51 | { 52 | // Setup 53 | $options = new CreateAffinityGroupOptions(); 54 | $expected = 'Description'; 55 | 56 | // Test 57 | $options->setDescription($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $options->getDescription()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/DeploymentSlotTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\DeploymentSlot; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class DeploymentSlot. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class DeploymentSlotTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\DeploymentSlot::isValid 48 | */ 49 | public function testIsValidWithValid() 50 | { 51 | // Test 52 | $actual = DeploymentSlot::isValid(DeploymentSlot::STAGING); 53 | 54 | // Assert 55 | $this->assertTrue($actual); 56 | } 57 | 58 | /** 59 | * @covers \WindowsAzure\ServiceManagement\Models\DeploymentSlot::isValid 60 | */ 61 | public function testIsValidWithInvalid() 62 | { 63 | // Test 64 | $actual = DeploymentSlot::isValid('invalid'); 65 | 66 | // Assert 67 | $this->assertFalse($actual); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/GetDeploymentResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\GetDeploymentResult; 29 | use WindowsAzure\ServiceManagement\Models\Deployment; 30 | use PHPUnit\Framework\TestCase; 31 | 32 | /** 33 | * Unit tests for class GetDeploymentResult. 34 | * 35 | * @category Microsoft 36 | * 37 | * @author Azure PHP SDK 38 | * @copyright 2012 Microsoft Corporation 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * 41 | * @version Release: 0.5.0_2016-11 42 | * 43 | * @link https://github.com/windowsazure/azure-sdk-for-php 44 | */ 45 | class GetDeploymentResultTest extends TestCase 46 | { 47 | /** 48 | * @covers \WindowsAzure\ServiceManagement\Models\GetDeploymentResult::setDeployment 49 | * @covers \WindowsAzure\ServiceManagement\Models\GetDeploymentResult::getDeployment 50 | */ 51 | public function testSetDeployment() 52 | { 53 | // Setup 54 | $expected = new Deployment(); 55 | $result = new GetDeploymentResult(); 56 | 57 | // Test 58 | $result->setDeployment($expected); 59 | 60 | // Assert 61 | $this->assertEquals($expected, $result->getDeployment()); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/HostedServiceTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\HostedService; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class HostedService. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class HostedServiceTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\HostedService::setDeployments 48 | * @covers \WindowsAzure\ServiceManagement\Models\HostedService::getDeployments 49 | */ 50 | public function testSetDeployments() 51 | { 52 | // Setup 53 | $expected = []; 54 | $hostedService = new HostedService(); 55 | 56 | // Test 57 | $hostedService->setDeployments($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $hostedService->getDeployments()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/ListAffinityGroupsResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\ListAffinityGroupsResult; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class ListAffinityGroupsResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class ListAffinityGroupsResultTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\ListAffinityGroupsResult::setAffinityGroups 48 | * @covers \WindowsAzure\ServiceManagement\Models\ListAffinityGroupsResult::getAffinityGroups 49 | */ 50 | public function testSetAffinityGroups() 51 | { 52 | // Setup 53 | $result = new ListAffinityGroupsResult(); 54 | $expected = []; 55 | 56 | // Test 57 | $result->setAffinityGroups($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $result->getAffinityGroups()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/ListHostedServicesResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\ListHostedServicesResult; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class ListHostedServicesResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class ListHostedServicesResultTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\ListHostedServicesResult::setHostedServices 48 | * @covers \WindowsAzure\ServiceManagement\Models\ListHostedServicesResult::getHostedServices 49 | */ 50 | public function testSetHostedServices() 51 | { 52 | // Setup 53 | $expected = []; 54 | $result = new ListHostedServicesResult([], 'tag'); 55 | 56 | // Test 57 | $result->setHostedServices($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $result->getHostedServices()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/ListLocationsResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\ListLocationsResult; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class ListLocationsResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class ListLocationsResultTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\ListLocationsResult::setLocations 48 | * @covers \WindowsAzure\ServiceManagement\Models\ListLocationsResult::getLocations 49 | */ 50 | public function testSetLocations() 51 | { 52 | // Setup 53 | $result = new ListLocationsResult(); 54 | $expected = ['Anywhere US', 'West US']; 55 | 56 | // Test 57 | $result->setLocations($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $result->getLocations()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/ListStorageServicesResultTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\ListStorageServicesResult; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class ListStorageServicesResult. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class ListStorageServicesResultTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\ListStorageServicesResult::setStorageServices 48 | * @covers \WindowsAzure\ServiceManagement\Models\ListStorageServicesResult::getStorageServices 49 | */ 50 | public function testSetStorageServices() 51 | { 52 | // Setup 53 | $expected = []; 54 | $result = new ListStorageServicesResult([], 'tag'); 55 | 56 | // Test 57 | $result->setStorageServices($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $result->getStorageServices()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/ModeTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\Mode; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class Mode. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class ModeTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\Mode::isValid 48 | */ 49 | public function testIsValidWithValid() 50 | { 51 | // Setup 52 | $expected = true; 53 | 54 | // Test 55 | $actual = Mode::isValid('Manual'); 56 | 57 | // Assert 58 | $this->assertEquals($expected, $actual); 59 | } 60 | 61 | /** 62 | * @covers \WindowsAzure\ServiceManagement\Models\Mode::isValid 63 | */ 64 | public function testIsValidWithInvalid() 65 | { 66 | // Setup 67 | $expected = false; 68 | 69 | // Test 70 | $actual = Mode::isValid('Wrong value'); 71 | 72 | // Assert 73 | $this->assertEquals($expected, $actual); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceManagement/Models/UpgradeDeploymentOptionsTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceManagement\Models; 27 | 28 | use WindowsAzure\ServiceManagement\Models\UpgradeDeploymentOptions; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class UpgradeDeploymentOptions. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class UpgradeDeploymentOptionsTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceManagement\Models\UpgradeDeploymentOptions::setRoleToUpgrade 48 | * @covers \WindowsAzure\ServiceManagement\Models\UpgradeDeploymentOptions::getRoleToUpgrade 49 | */ 50 | public function testSetRoleToUpgrade() 51 | { 52 | // Setup 53 | $expected = 'myrole'; 54 | $options = new UpgradeDeploymentOptions(); 55 | 56 | // Test 57 | $options->setRoleToUpgrade($expected); 58 | 59 | // Assert 60 | $this->assertEquals($expected, $options->getRoleToUpgrade()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceRuntime/Internal/ReleaseCurrentStateTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceRuntime\Internal; 27 | 28 | use WindowsAzure\ServiceRuntime\Internal\ReleaseCurrentState; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class ReleaseCurrentState. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class ReleaseCurrentStateTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceRuntime\Internal\ReleaseCurrentState::__construct 48 | */ 49 | public function testConstruct() 50 | { 51 | $clientId = 'ClientId'; 52 | 53 | // Setup 54 | $releaseCurrentState = new ReleaseCurrentState( 55 | $clientId 56 | ); 57 | 58 | // Test 59 | $this->assertEquals($clientId, $releaseCurrentState->getClientId()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /tests/unit/WindowsAzure/ServiceRuntime/Internal/RoleEnvironmentTopologyChangeTest.php: -------------------------------------------------------------------------------- 1 | 20 | * @copyright 2012 Microsoft Corporation 21 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 22 | * 23 | * @link https://github.com/windowsazure/azure-sdk-for-php 24 | */ 25 | 26 | namespace Tests\unit\WindowsAzure\ServiceRuntime\Internal; 27 | 28 | use WindowsAzure\ServiceRuntime\Internal\RoleEnvironmentTopologyChange; 29 | use PHPUnit\Framework\TestCase; 30 | 31 | /** 32 | * Unit tests for class RoleEnvironmentTopologyChange. 33 | * 34 | * @category Microsoft 35 | * 36 | * @author Azure PHP SDK 37 | * @copyright 2012 Microsoft Corporation 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * 40 | * @version Release: 0.5.0_2016-11 41 | * 42 | * @link https://github.com/windowsazure/azure-sdk-for-php 43 | */ 44 | class RoleEnvironmentTopologyChangeTest extends TestCase 45 | { 46 | /** 47 | * @covers \WindowsAzure\ServiceRuntime\Internal\RoleEnvironmentTopologyChange::__construct 48 | * @covers \WindowsAzure\ServiceRuntime\Internal\RoleEnvironmentTopologyChange::getRoleName 49 | */ 50 | public function testGetRoleName() 51 | { 52 | $roleName = 'role'; 53 | 54 | // Setup 55 | $roleEnvironmentTopologyChange = new RoleEnvironmentTopologyChange($roleName); 56 | 57 | // Test 58 | $this->assertEquals($roleName, $roleEnvironmentTopologyChange->getRoleName()); 59 | } 60 | } 61 | --------------------------------------------------------------------------------