-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Everything in the body of BigQueryClient.DatasetLabels.cs after the first line (comment) is autogenerated. The remaining work for these features will be: - Implementation in BigQueryDatasetImpl - Options test - Snippets - Methods in BigQueryDataset.cs (we may improve the generator to do these later...) - Integration tests
- Loading branch information
Showing
7 changed files
with
567 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...oud.BigQuery.V2/Google.Cloud.BigQuery.V2.GenerateOverloads/Methods/ClearDatasetLabels.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Method Name="ClearDatasetLabels" | ||
TargetType="Dataset" | ||
ReturnType="IDictionary<string, string>"> | ||
<Options Type="ModifyLabelsOptions" /> | ||
|
||
<Comments> | ||
<summary> | ||
Clears all labels on {target}. | ||
</summary> | ||
<returns>A dictionary with the labels on the dataset before they were cleared.</returns> | ||
</Comments> | ||
|
||
</Method> |
26 changes: 26 additions & 0 deletions
26
...ud.BigQuery.V2/Google.Cloud.BigQuery.V2.GenerateOverloads/Methods/ModifyDatasetLabels.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Method Name="ModifyDatasetLabels" | ||
TargetType="Dataset" | ||
ReturnType="IDictionary<string, string>"> | ||
<Options Type="ModifyLabelsOptions" /> | ||
|
||
<AdditionalParameters> | ||
<Parameter Name="labels" Type="IDictionary<string, string>" Comment="The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal)." /> | ||
</AdditionalParameters> | ||
|
||
<Comments> | ||
<summary> | ||
Sets or removes one or more labels on {target}. | ||
</summary> | ||
<remarks> | ||
Each entry in <paramref name="labels"/> is treated as a label to set or remove. If the value is null, | ||
it will be removed from the bucket; otherwise, it will be set/added. Labels which do not have an entry | ||
in the dictionary will be ignored. | ||
</remarks> | ||
<returns> | ||
A dictionary with the same keys as <paramref name="labels"/>, and values indicating the corresponding label value | ||
before this operation completed. Labels which weren't present on the bucket before the modification have corresponding | ||
null values in the returned dictionary. | ||
</returns> | ||
</Comments> | ||
|
||
</Method> |
18 changes: 18 additions & 0 deletions
18
...oud.BigQuery.V2/Google.Cloud.BigQuery.V2.GenerateOverloads/Methods/RemoveDatasetLabel.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Method Name="RemoveDatasetLabel" | ||
TargetType="Dataset" | ||
ReturnType="string"> | ||
<Options Type="ModifyLabelsOptions" /> | ||
|
||
<AdditionalParameters> | ||
<Parameter Name="labelName" Type="string" Comment="The name of the label. Must not be null." /> | ||
</AdditionalParameters> | ||
|
||
<Comments> | ||
<summary> | ||
Removes a label from a bucket, if it previously existed. It is not an error to | ||
attempt to remove a label that doesn't already exist. | ||
</summary> | ||
<returns>The previous value of the label, or <c>null</c> if the label was not previously set.</returns> | ||
</Comments> | ||
|
||
</Method> |
24 changes: 24 additions & 0 deletions
24
....Cloud.BigQuery.V2/Google.Cloud.BigQuery.V2.GenerateOverloads/Methods/SetDatasetLabel.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Method Name="SetDatasetLabel" | ||
TargetType="Dataset" | ||
ReturnType="string"> | ||
<Options Type="ModifyLabelsOptions" /> | ||
|
||
<AdditionalParameters> | ||
<Parameter Name="labelName" Type="string" Comment="The name of the label. Must not be null." /> | ||
<Parameter Name="labelValue" Type="string" Comment="The new value of the label. Must not be null." /> | ||
</AdditionalParameters> | ||
|
||
<Comments> | ||
<summary> | ||
Sets the value for a single label on a dataset. The label will be added if it does | ||
not exist, or updated if it already exists. | ||
</summary> | ||
<remarks> | ||
<para> | ||
The dataset is first fetched to retrieve the current values, then a patch call is made. | ||
</para> | ||
</remarks> | ||
<returns>The previous value of the label, or <c>null</c> if the label was not previously set.</returns> | ||
</Comments> | ||
|
||
</Method> |
7 changes: 7 additions & 0 deletions
7
.../Google.Cloud.BigQuery.V2/Google.Cloud.BigQuery.V2.GenerateOverloads/generateoverloads.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
declare -r CLIENT=../Google.Cloud.BigQuery.V2/BigQueryClient | ||
dotnet run -- Methods/SetDatasetLabel.xml $CLIENT.DatasetLabels.cs | ||
dotnet run -- Methods/RemoveDatasetLabel.xml $CLIENT.DatasetLabels.cs | ||
dotnet run -- Methods/ClearDatasetLabels.xml $CLIENT.DatasetLabels.cs | ||
dotnet run -- Methods/ModifyDatasetLabels.xml $CLIENT.DatasetLabels.cs |
Oops, something went wrong.