Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pageable operation issue in purview administration library #39009

Merged
merged 4 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/purview/Azure.Analytics.Purview.Administration",
"Tag": "net/purview/Azure.Analytics.Purview.Administration_6bb65ebe43"
"Tag": "net/purview/Azure.Analytics.Purview.Administration_01092e8843"
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ RequestContent content = RequestContent.Create(new
parentCollection = new
{
referenceName = "<referenceName>",
type = "<type>",
},
});
Response response = await client.CreateOrUpdateCollectionAsync(content);
Expand Down Expand Up @@ -146,6 +147,7 @@ RequestContent content = RequestContent.Create(new
parentCollection = new
{
referenceName = "<referenceName>",
type = "<type>",
},
});
Response response = client.CreateOrUpdateCollection(content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ RequestContent content = RequestContent.Create(new
},
collection = new
{
type = "<type>",
referenceName = "<referenceName>",
},
parentCollectionName = "<parentCollectionName>",
Expand Down Expand Up @@ -177,6 +178,7 @@ RequestContent content = RequestContent.Create(new
},
collection = new
{
type = "<type>",
referenceName = "<referenceName>",
},
parentCollectionName = "<parentCollectionName>",
Expand Down Expand Up @@ -311,6 +313,8 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "

await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
]]></code>
This sample shows how to call GetMetadataPoliciesAsync with all parameters and parse the result.
Expand All @@ -321,6 +325,29 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "

await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("effect").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString());
}
]]></code></example>
</member>
Expand All @@ -334,6 +361,8 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "

foreach (BinaryData item in client.GetMetadataPolicies(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
]]></code>
This sample shows how to call GetMetadataPolicies with all parameters and parse the result.
Expand All @@ -344,6 +373,29 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "

foreach (BinaryData item in client.GetMetadataPolicies(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("effect").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString());
}
]]></code></example>
</member>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre

await foreach (BinaryData item in client.GetMetadataRolesAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
]]></code>
This sample shows how to call GetMetadataRolesAsync with all parameters and parse the result.
Expand All @@ -21,6 +23,25 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre

await foreach (BinaryData item in client.GetMetadataRolesAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("provisioningState").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("roleType").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("friendlyName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("version").ToString());
}
]]></code></example>
</member>
Expand All @@ -34,6 +55,8 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre

foreach (BinaryData item in client.GetMetadataRoles(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
]]></code>
This sample shows how to call GetMetadataRoles with all parameters and parse the result.
Expand All @@ -44,6 +67,25 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre

foreach (BinaryData item in client.GetMetadataRoles(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("provisioningState").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("roleType").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("friendlyName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("version").ToString());
}
]]></code></example>
</member>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading