-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add schema evolution methods and fields
PiperOrigin-RevId: 500819578 Source-Link: googleapis/googleapis@05a375f Source-Link: googleapis/googleapis-gen@303c959 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUHViU3ViLlYxLy5Pd2xCb3QueWFtbCIsImgiOiIzMDNjOTU5MmM0OThkYzAyNDMyZGFhMjlhY2I0NmQ2N2RlY2ZiMGMyIn0=
- Loading branch information
1 parent
f868bc8
commit 4003c4d
Showing
32 changed files
with
5,746 additions
and
397 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...oogle.Cloud.PubSub.V1.GeneratedSnippets/SchemaServiceClient.CommitSchemaAsyncSnippet.g.cs
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,45 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_CommitSchema_async_flattened] | ||
using Google.Cloud.PubSub.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CommitSchemaAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task CommitSchemaAsync() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/schemas/[SCHEMA]"; | ||
Schema schema = new Schema(); | ||
// Make the request | ||
Schema response = await schemaServiceClient.CommitSchemaAsync(name, schema); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_CommitSchema_async_flattened] | ||
} |
48 changes: 48 additions & 0 deletions
48
...ubSub.V1.GeneratedSnippets/SchemaServiceClient.CommitSchemaRequestObjectAsyncSnippet.g.cs
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,48 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_CommitSchema_async] | ||
using Google.Cloud.PubSub.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CommitSchemaAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task CommitSchemaRequestObjectAsync() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CommitSchemaRequest request = new CommitSchemaRequest | ||
{ | ||
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"), | ||
Schema = new Schema(), | ||
}; | ||
// Make the request | ||
Schema response = await schemaServiceClient.CommitSchemaAsync(request); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_CommitSchema_async] | ||
} |
47 changes: 47 additions & 0 deletions
47
...oud.PubSub.V1.GeneratedSnippets/SchemaServiceClient.CommitSchemaRequestObjectSnippet.g.cs
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,47 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_CommitSchema_sync] | ||
using Google.Cloud.PubSub.V1; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CommitSchema</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void CommitSchemaRequestObject() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create(); | ||
// Initialize request argument(s) | ||
CommitSchemaRequest request = new CommitSchemaRequest | ||
{ | ||
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"), | ||
Schema = new Schema(), | ||
}; | ||
// Make the request | ||
Schema response = schemaServiceClient.CommitSchema(request); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_CommitSchema_sync] | ||
} |
45 changes: 45 additions & 0 deletions
45
...ubSub.V1.GeneratedSnippets/SchemaServiceClient.CommitSchemaResourceNamesAsyncSnippet.g.cs
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,45 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_CommitSchema_async_flattened_resourceNames] | ||
using Google.Cloud.PubSub.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CommitSchemaAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task CommitSchemaResourceNamesAsync() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"); | ||
Schema schema = new Schema(); | ||
// Make the request | ||
Schema response = await schemaServiceClient.CommitSchemaAsync(name, schema); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_CommitSchema_async_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
...oud.PubSub.V1.GeneratedSnippets/SchemaServiceClient.CommitSchemaResourceNamesSnippet.g.cs
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,44 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_CommitSchema_sync_flattened_resourceNames] | ||
using Google.Cloud.PubSub.V1; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CommitSchema</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void CommitSchemaResourceNames() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create(); | ||
// Initialize request argument(s) | ||
SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"); | ||
Schema schema = new Schema(); | ||
// Make the request | ||
Schema response = schemaServiceClient.CommitSchema(name, schema); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_CommitSchema_sync_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
....V1/Google.Cloud.PubSub.V1.GeneratedSnippets/SchemaServiceClient.CommitSchemaSnippet.g.cs
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,44 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_CommitSchema_sync_flattened] | ||
using Google.Cloud.PubSub.V1; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CommitSchema</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void CommitSchema() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/schemas/[SCHEMA]"; | ||
Schema schema = new Schema(); | ||
// Make the request | ||
Schema response = schemaServiceClient.CommitSchema(name, schema); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_CommitSchema_sync_flattened] | ||
} |
45 changes: 45 additions & 0 deletions
45
...oud.PubSub.V1.GeneratedSnippets/SchemaServiceClient.DeleteSchemaRevisionAsyncSnippet.g.cs
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,45 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async_flattened] | ||
using Google.Cloud.PubSub.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DeleteSchemaRevisionAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task DeleteSchemaRevisionAsync() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/schemas/[SCHEMA]"; | ||
string revisionId = ""; | ||
// Make the request | ||
Schema response = await schemaServiceClient.DeleteSchemaRevisionAsync(name, revisionId); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async_flattened] | ||
} |
48 changes: 48 additions & 0 deletions
48
....GeneratedSnippets/SchemaServiceClient.DeleteSchemaRevisionRequestObjectAsyncSnippet.g.cs
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,48 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.PubSub.V1.Snippets | ||
{ | ||
// [START pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async] | ||
using Google.Cloud.PubSub.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSchemaServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DeleteSchemaRevisionAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task DeleteSchemaRevisionRequestObjectAsync() | ||
{ | ||
// Create client | ||
SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
DeleteSchemaRevisionRequest request = new DeleteSchemaRevisionRequest | ||
{ | ||
SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"), | ||
RevisionId = "", | ||
}; | ||
// Make the request | ||
Schema response = await schemaServiceClient.DeleteSchemaRevisionAsync(request); | ||
} | ||
} | ||
// [END pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async] | ||
} |
Oops, something went wrong.