Skip to content

Commit

Permalink
Merge branch 'AutoRest' of https://github.com/Azure/azure-sdk-for-net
Browse files Browse the repository at this point in the history
…into Rename
  • Loading branch information
gucalder committed Feb 16, 2017
2 parents bcbbc33 + b5d905f commit 61bbae1
Show file tree
Hide file tree
Showing 457 changed files with 89,142 additions and 4,130 deletions.
1 change: 1 addition & 0 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"src/ResourceManagement/Cdn/Microsoft.Azure.Management.Cdn",
"src/ResourceManagement/CognitiveServices/Microsoft.Azure.Management.CognitiveServices",
"src/ResourceManagement/Compute/Microsoft.Azure.Management.Compute",
"src/ResourceManagement/CustomerInsights/Microsoft.Azure.Management.CustomerInsights",
"src/ResourceManagement/DataLake.Analytics/Microsoft.Azure.Management.DataLake.Analytics",
"src/ResourceManagement/DataLake.Store/Microsoft.Azure.Management.DataLake.Store",
"src/ResourceManagement/DevTestLabs/Microsoft.Azure.Management.DevTestLabs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>1928bb6e-0a9c-4b90-9a3c-92cc12625e4c</ProjectGuid>
<RootNamespace>CustomerInsights.Tests</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

namespace CustomerInsights.Tests
{
using System;
using System.Collections.Generic;
using Microsoft.Azure.Management.CustomerInsights.Models;

public class Helpers
{
public static ProfileResourceFormat GetTestProfile(string profileName)
{
return new ProfileResourceFormat
{
ApiEntitySetName = profileName,
Fields =
new[]
{
new PropertyDefinition
{
FieldName = "Id",
FieldType = "Edm.String",
IsArray = false,
IsRequired = true
},
new PropertyDefinition
{
FieldName = "ProfileId",
FieldType = "Edm.String",
IsArray = false,
IsRequired = true
},
new PropertyDefinition
{
FieldName = "LastName",
FieldType = "Edm.String",
IsArray = false,
IsRequired = true
},
new PropertyDefinition
{
FieldName = profileName,
FieldType = "Edm.String",
IsArray = false,
IsRequired = true
},
new PropertyDefinition
{
FieldName = "SavingAccountBalance",
FieldType = "Edm.Int32",
IsArray = false,
IsRequired = true
}
},
StrongIds =
new List<StrongId>
{
new StrongId
{
StrongIdName = "Id",
Description = null,
DisplayName = null,
KeyPropertyNames = new List<string> { "Id", "SavingAccountBalance" }
},
new StrongId
{
StrongIdName = "ProfileId",
Description = null,
DisplayName = null,
KeyPropertyNames = new List<string> { "ProfileId", "LastName" }
}
},
DisplayName = null,
Description = null,
Attributes = null,
SchemaItemTypeLink = "SchemaItemTypeLink",
LocalizedAttributes = null,
SmallImage = "\\Images\\smallImage",
MediumImage = "\\Images\\MediumImage",
LargeImage = "\\Images\\LargeImage"
};
}

public static InteractionResourceFormat GetTestInteraction(string interactionName, string profileName)
{
return new InteractionResourceFormat
{
ApiEntitySetName = interactionName,
PrimaryParticipantProfilePropertyName = profileName,
IdPropertyNames = new[] { interactionName },
Fields =
new[]
{
new PropertyDefinition
{
FieldName = interactionName,
FieldType = "Edm.String",
IsArray = false,
IsRequired = true
},
new PropertyDefinition { FieldName = profileName, FieldType = "Edm.String" }
},
SmallImage = "\\Images\\smallImage",
MediumImage = "\\Images\\MediumImage",
LargeImage = "\\Images\\LargeImage"
};
}

public static ConnectorResourceFormat GetTestConnector(string connectorName, string description)
{
return new ConnectorResourceFormat
{
DisplayName = connectorName,
Description = description,
ConnectorType = ConnectorTypes.AzureBlob,
ConnectorProperties =
new Dictionary<string, object>
{
{
"connectionKeyVaultUrl",
$"vault=off;DefaultEndpointsProtocol=https;AccountName=XXX;AccountKey=XXX"
}
}
};
}

public static RoleAssignmentResourceFormat GetTestRoleAssignment(RoleTypes roleType, int principalCount)
{
var roleAssignment = new RoleAssignmentResourceFormat
{
Role = roleType,
Principals = new List<AssignmentPrincipal>()
};

for (var i = 0; i < principalCount; ++i)
{
roleAssignment.Principals.Add(
new AssignmentPrincipal { PrincipalType = "User", PrincipalId = Guid.NewGuid().ToString("N") });
}

return roleAssignment;
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CustomerInsights.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("CustomerInsights.Tests")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9f5b66c3-1bda-4c49-80b6-592247201188")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/authorizationPolicies/testPolicy5967?api-version=2017-01-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzkwOWU5NzktZWY3MS00ZGVmLWE5NzAtYmM3YzE1NGRiOGM1L3Jlc291cmNlR3JvdXBzL1Rlc3RIdWJSRy9wcm92aWRlcnMvTWljcm9zb2Z0LkN1c3RvbWVySW5zaWdodHMvaHVicy9zZGt0ZXN0Ym4zL2F1dGhvcml6YXRpb25Qb2xpY2llcy90ZXN0UG9saWN5NTk2Nz9hcGktdmVyc2lvbj0yMDE3LTAxLTAx",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"properties\": {\r\n \"permissions\": [\r\n \"Read\",\r\n \"Write\",\r\n \"Manage\"\r\n ],\r\n \"primaryKey\": \"cHJpbWFyeVRlc3RSZWFk\",\r\n \"secondaryKey\": \"c2Vjb25kYXJ5VGVzdFJlYWQ=\"\r\n }\r\n}",
"RequestHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"196"
],
"x-ms-client-request-id": [
"e5064317-a5fe-48f8-a5de-4fb63dd2b224"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.24410.01",
"Microsoft.Azure.Management.CustomerInsights.CustomerInsightsManagementClient/0.0.1-preview"
]
},
"ResponseBody": "{\r\n \"id\": \"/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/AuthorizationPolicies/testPolicy5967\",\r\n \"name\": \"sdktestbn3/testPolicy5967\",\r\n \"properties\": {\r\n \"permissions\": [\r\n \"Read\",\r\n \"Write\",\r\n \"Manage\"\r\n ],\r\n \"policyName\": \"testPolicy5967\",\r\n \"primaryKey\": \"cHJpbWFyeVRlc3RSZWFk\",\r\n \"secondaryKey\": \"c2Vjb25kYXJ5VGVzdFJlYWQ=\"\r\n },\r\n \"type\": \"Microsoft.CustomerInsights/hubs/AuthorizationPolicies\"\r\n}",
"ResponseHeaders": {
"Content-Length": [
"436"
],
"Content-Type": [
"application/json"
],
"Expires": [
"-1"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Tue, 31 Jan 2017 19:57:10 GMT"
],
"Pragma": [
"no-cache"
],
"Server": [
"Microsoft-HTTPAPI/2.0",
"Microsoft-HTTPAPI/2.0"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"6a73bbf4-83d4-4a50-a344-697032e7e20f",
"b7ee5b41-a074-40cc-9b49-8b60c5f95a8f"
],
"OData-Version": [
"4.0"
],
"x-ms-correlation-request-id": [
"fe9a31d5-4294-421e-89e3-e598bdc0bf06"
],
"x-ms-routing-request-id": [
"CENTRALUS:20170131T195711Z:fe9a31d5-4294-421e-89e3-e598bdc0bf06"
]
},
"StatusCode": 201
},
{
"RequestUri": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/authorizationPolicies/testPolicy5967?api-version=2017-01-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzkwOWU5NzktZWY3MS00ZGVmLWE5NzAtYmM3YzE1NGRiOGM1L3Jlc291cmNlR3JvdXBzL1Rlc3RIdWJSRy9wcm92aWRlcnMvTWljcm9zb2Z0LkN1c3RvbWVySW5zaWdodHMvaHVicy9zZGt0ZXN0Ym4zL2F1dGhvcml6YXRpb25Qb2xpY2llcy90ZXN0UG9saWN5NTk2Nz9hcGktdmVyc2lvbj0yMDE3LTAxLTAx",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"6e092682-eb29-43f2-aec3-c7593701b4ad"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.24410.01",
"Microsoft.Azure.Management.CustomerInsights.CustomerInsightsManagementClient/0.0.1-preview"
]
},
"ResponseBody": "{\r\n \"id\": \"/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/AuthorizationPolicies/testPolicy5967\",\r\n \"name\": \"sdktestbn3/testPolicy5967\",\r\n \"properties\": {\r\n \"permissions\": [\r\n \"Read\",\r\n \"Write\",\r\n \"Manage\"\r\n ],\r\n \"policyName\": \"testPolicy5967\",\r\n \"primaryKey\": \"cHJpbWFyeVRlc3RSZWFk\",\r\n \"secondaryKey\": \"c2Vjb25kYXJ5VGVzdFJlYWQ=\"\r\n },\r\n \"type\": \"Microsoft.CustomerInsights/hubs/AuthorizationPolicies\"\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json"
],
"Expires": [
"-1"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Tue, 31 Jan 2017 19:57:47 GMT"
],
"Pragma": [
"no-cache"
],
"Transfer-Encoding": [
"chunked"
],
"Server": [
"Microsoft-HTTPAPI/2.0",
"Microsoft-HTTPAPI/2.0"
],
"Vary": [
"Accept-Encoding"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14950"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-request-id": [
"2ccc360e-4771-4d08-a87e-623c50e4856f",
"ec786b6f-563c-461c-b2b6-d382df447ba0"
],
"OData-Version": [
"4.0"
],
"x-ms-correlation-request-id": [
"5194f52b-fb7a-4c2f-820d-51f8f0422bd4"
],
"x-ms-routing-request-id": [
"CENTRALUS:20170131T195748Z:5194f52b-fb7a-4c2f-820d-51f8f0422bd4"
]
},
"StatusCode": 200
}
],
"Names": {
"CreateAndReadAuthorizationPolicy": [
"testPolicy5967"
]
},
"Variables": {
"SubscriptionId": "c909e979-ef71-4def-a970-bc7c154db8c5"
}
}
Loading

0 comments on commit 61bbae1

Please sign in to comment.