Skip to content

Commit 50658e2

Browse files
committed
Regenerate all APIs with resource name format methods
(There are some resource name classes in other packages which will need some manual tidy-up before we can close #2443.)
1 parent 215ea7f commit 50658e2

File tree

28 files changed

+915
-0
lines changed

28 files changed

+915
-0
lines changed

‎apis/Google.Cloud.BigQuery.DataTransfer.V1/Google.Cloud.BigQuery.DataTransfer.V1/ResourceNames.cs

+54
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,13 @@ public static bool TryParse(string locationName, out LocationName result)
272272
}
273273
}
274274

275+
/// <summary>Formats the IDs into the string representation of the <see cref="LocationName"/>.</summary>
276+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
277+
/// <param name="locationId">The <c>location</c> ID. Must not be <c>null</c>.</param>
278+
/// <returns>The string representation of the <see cref="LocationName"/>.</returns>
279+
public static string Format(string projectId, string locationId) =>
280+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(locationId, nameof(locationId)));
281+
275282
/// <summary>
276283
/// Constructs a new instance of the <see cref="LocationName"/> resource name class
277284
/// from its component parts.
@@ -364,6 +371,14 @@ public static bool TryParse(string locationDataSourceName, out LocationDataSourc
364371
}
365372
}
366373

374+
/// <summary>Formats the IDs into the string representation of the <see cref="LocationDataSourceName"/>.</summary>
375+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
376+
/// <param name="locationId">The <c>location</c> ID. Must not be <c>null</c>.</param>
377+
/// <param name="dataSourceId">The <c>dataSource</c> ID. Must not be <c>null</c>.</param>
378+
/// <returns>The string representation of the <see cref="LocationDataSourceName"/>.</returns>
379+
public static string Format(string projectId, string locationId, string dataSourceId) =>
380+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNull(dataSourceId, nameof(dataSourceId)));
381+
367382
/// <summary>
368383
/// Constructs a new instance of the <see cref="LocationDataSourceName"/> resource name class
369384
/// from its component parts.
@@ -463,6 +478,15 @@ public static bool TryParse(string locationRunName, out LocationRunName result)
463478
}
464479
}
465480

481+
/// <summary>Formats the IDs into the string representation of the <see cref="LocationRunName"/>.</summary>
482+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
483+
/// <param name="locationId">The <c>location</c> ID. Must not be <c>null</c>.</param>
484+
/// <param name="transferConfigId">The <c>transferConfig</c> ID. Must not be <c>null</c>.</param>
485+
/// <param name="runId">The <c>run</c> ID. Must not be <c>null</c>.</param>
486+
/// <returns>The string representation of the <see cref="LocationRunName"/>.</returns>
487+
public static string Format(string projectId, string locationId, string transferConfigId, string runId) =>
488+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNull(transferConfigId, nameof(transferConfigId)), gax::GaxPreconditions.CheckNotNull(runId, nameof(runId)));
489+
466490
/// <summary>
467491
/// Constructs a new instance of the <see cref="LocationRunName"/> resource name class
468492
/// from its component parts.
@@ -569,6 +593,14 @@ public static bool TryParse(string locationTransferConfigName, out LocationTrans
569593
}
570594
}
571595

596+
/// <summary>Formats the IDs into the string representation of the <see cref="LocationTransferConfigName"/>.</summary>
597+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
598+
/// <param name="locationId">The <c>location</c> ID. Must not be <c>null</c>.</param>
599+
/// <param name="transferConfigId">The <c>transferConfig</c> ID. Must not be <c>null</c>.</param>
600+
/// <returns>The string representation of the <see cref="LocationTransferConfigName"/>.</returns>
601+
public static string Format(string projectId, string locationId, string transferConfigId) =>
602+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNull(transferConfigId, nameof(transferConfigId)));
603+
572604
/// <summary>
573605
/// Constructs a new instance of the <see cref="LocationTransferConfigName"/> resource name class
574606
/// from its component parts.
@@ -872,6 +904,13 @@ public static bool TryParse(string projectDataSourceName, out ProjectDataSourceN
872904
}
873905
}
874906

907+
/// <summary>Formats the IDs into the string representation of the <see cref="ProjectDataSourceName"/>.</summary>
908+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
909+
/// <param name="dataSourceId">The <c>dataSource</c> ID. Must not be <c>null</c>.</param>
910+
/// <returns>The string representation of the <see cref="ProjectDataSourceName"/>.</returns>
911+
public static string Format(string projectId, string dataSourceId) =>
912+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(dataSourceId, nameof(dataSourceId)));
913+
875914
/// <summary>
876915
/// Constructs a new instance of the <see cref="ProjectDataSourceName"/> resource name class
877916
/// from its component parts.
@@ -964,6 +1003,14 @@ public static bool TryParse(string projectRunName, out ProjectRunName result)
9641003
}
9651004
}
9661005

1006+
/// <summary>Formats the IDs into the string representation of the <see cref="ProjectRunName"/>.</summary>
1007+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
1008+
/// <param name="transferConfigId">The <c>transferConfig</c> ID. Must not be <c>null</c>.</param>
1009+
/// <param name="runId">The <c>run</c> ID. Must not be <c>null</c>.</param>
1010+
/// <returns>The string representation of the <see cref="ProjectRunName"/>.</returns>
1011+
public static string Format(string projectId, string transferConfigId, string runId) =>
1012+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(transferConfigId, nameof(transferConfigId)), gax::GaxPreconditions.CheckNotNull(runId, nameof(runId)));
1013+
9671014
/// <summary>
9681015
/// Constructs a new instance of the <see cref="ProjectRunName"/> resource name class
9691016
/// from its component parts.
@@ -1063,6 +1110,13 @@ public static bool TryParse(string projectTransferConfigName, out ProjectTransfe
10631110
}
10641111
}
10651112

1113+
/// <summary>Formats the IDs into the string representation of the <see cref="ProjectTransferConfigName"/>.</summary>
1114+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
1115+
/// <param name="transferConfigId">The <c>transferConfig</c> ID. Must not be <c>null</c>.</param>
1116+
/// <returns>The string representation of the <see cref="ProjectTransferConfigName"/>.</returns>
1117+
public static string Format(string projectId, string transferConfigId) =>
1118+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(transferConfigId, nameof(transferConfigId)));
1119+
10661120
/// <summary>
10671121
/// Constructs a new instance of the <see cref="ProjectTransferConfigName"/> resource name class
10681122
/// from its component parts.

‎apis/Google.Cloud.Bigtable.Admin.V2/Google.Cloud.Bigtable.Admin.V2/ResourceNames.cs

+39
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ public static bool TryParse(string appProfileName, out AppProfileName result)
7070
}
7171
}
7272

73+
/// <summary>Formats the IDs into the string representation of the <see cref="AppProfileName"/>.</summary>
74+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
75+
/// <param name="instanceId">The <c>instance</c> ID. Must not be <c>null</c>.</param>
76+
/// <param name="appProfileId">The <c>appProfile</c> ID. Must not be <c>null</c>.</param>
77+
/// <returns>The string representation of the <see cref="AppProfileName"/>.</returns>
78+
public static string Format(string projectId, string instanceId, string appProfileId) =>
79+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(instanceId, nameof(instanceId)), gax::GaxPreconditions.CheckNotNull(appProfileId, nameof(appProfileId)));
80+
7381
/// <summary>
7482
/// Constructs a new instance of the <see cref="AppProfileName"/> resource name class
7583
/// from its component parts.
@@ -169,6 +177,14 @@ public static bool TryParse(string clusterName, out ClusterName result)
169177
}
170178
}
171179

180+
/// <summary>Formats the IDs into the string representation of the <see cref="ClusterName"/>.</summary>
181+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
182+
/// <param name="instanceId">The <c>instance</c> ID. Must not be <c>null</c>.</param>
183+
/// <param name="clusterId">The <c>cluster</c> ID. Must not be <c>null</c>.</param>
184+
/// <returns>The string representation of the <see cref="ClusterName"/>.</returns>
185+
public static string Format(string projectId, string instanceId, string clusterId) =>
186+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(instanceId, nameof(instanceId)), gax::GaxPreconditions.CheckNotNull(clusterId, nameof(clusterId)));
187+
172188
/// <summary>
173189
/// Constructs a new instance of the <see cref="ClusterName"/> resource name class
174190
/// from its component parts.
@@ -268,6 +284,13 @@ public static bool TryParse(string instanceName, out InstanceName result)
268284
}
269285
}
270286

287+
/// <summary>Formats the IDs into the string representation of the <see cref="InstanceName"/>.</summary>
288+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
289+
/// <param name="instanceId">The <c>instance</c> ID. Must not be <c>null</c>.</param>
290+
/// <returns>The string representation of the <see cref="InstanceName"/>.</returns>
291+
public static string Format(string projectId, string instanceId) =>
292+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(instanceId, nameof(instanceId)));
293+
271294
/// <summary>
272295
/// Constructs a new instance of the <see cref="InstanceName"/> resource name class
273296
/// from its component parts.
@@ -360,6 +383,13 @@ public static bool TryParse(string locationName, out LocationName result)
360383
}
361384
}
362385

386+
/// <summary>Formats the IDs into the string representation of the <see cref="LocationName"/>.</summary>
387+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
388+
/// <param name="locationId">The <c>location</c> ID. Must not be <c>null</c>.</param>
389+
/// <returns>The string representation of the <see cref="LocationName"/>.</returns>
390+
public static string Format(string projectId, string locationId) =>
391+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(locationId, nameof(locationId)));
392+
363393
/// <summary>
364394
/// Constructs a new instance of the <see cref="LocationName"/> resource name class
365395
/// from its component parts.
@@ -452,6 +482,15 @@ public static bool TryParse(string snapshotName, out SnapshotName result)
452482
}
453483
}
454484

485+
/// <summary>Formats the IDs into the string representation of the <see cref="SnapshotName"/>.</summary>
486+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
487+
/// <param name="instanceId">The <c>instance</c> ID. Must not be <c>null</c>.</param>
488+
/// <param name="clusterId">The <c>cluster</c> ID. Must not be <c>null</c>.</param>
489+
/// <param name="snapshotId">The <c>snapshot</c> ID. Must not be <c>null</c>.</param>
490+
/// <returns>The string representation of the <see cref="SnapshotName"/>.</returns>
491+
public static string Format(string projectId, string instanceId, string clusterId, string snapshotId) =>
492+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(instanceId, nameof(instanceId)), gax::GaxPreconditions.CheckNotNull(clusterId, nameof(clusterId)), gax::GaxPreconditions.CheckNotNull(snapshotId, nameof(snapshotId)));
493+
455494
/// <summary>
456495
/// Constructs a new instance of the <see cref="SnapshotName"/> resource name class
457496
/// from its component parts.

‎apis/Google.Cloud.Dataproc.V1/Google.Cloud.Dataproc.V1/ResourceNames.cs

+15
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ public static bool TryParse(string regionName, out RegionName result)
6868
}
6969
}
7070

71+
/// <summary>Formats the IDs into the string representation of the <see cref="RegionName"/>.</summary>
72+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
73+
/// <param name="regionId">The <c>region</c> ID. Must not be <c>null</c>.</param>
74+
/// <returns>The string representation of the <see cref="RegionName"/>.</returns>
75+
public static string Format(string projectId, string regionId) =>
76+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(regionId, nameof(regionId)));
77+
7178
/// <summary>
7279
/// Constructs a new instance of the <see cref="RegionName"/> resource name class
7380
/// from its component parts.
@@ -160,6 +167,14 @@ public static bool TryParse(string workflowTemplateName, out WorkflowTemplateNam
160167
}
161168
}
162169

170+
/// <summary>Formats the IDs into the string representation of the <see cref="WorkflowTemplateName"/>.</summary>
171+
/// <param name="projectId">The <c>project</c> ID. Must not be <c>null</c>.</param>
172+
/// <param name="regionId">The <c>region</c> ID. Must not be <c>null</c>.</param>
173+
/// <param name="workflowTemplateId">The <c>workflowTemplate</c> ID. Must not be <c>null</c>.</param>
174+
/// <returns>The string representation of the <see cref="WorkflowTemplateName"/>.</returns>
175+
public static string Format(string projectId, string regionId, string workflowTemplateId) =>
176+
s_template.Expand(gax::GaxPreconditions.CheckNotNull(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNull(regionId, nameof(regionId)), gax::GaxPreconditions.CheckNotNull(workflowTemplateId, nameof(workflowTemplateId)));
177+
163178
/// <summary>
164179
/// Constructs a new instance of the <see cref="WorkflowTemplateName"/> resource name class
165180
/// from its component parts.

0 commit comments

Comments
 (0)