Skip to content

Commit

Permalink
feat: Generate updated event definitions
Browse files Browse the repository at this point in the history
- New events for APIs: Batch, Deploy, NetworkServices, Speech
- Additional event types for Firestore and Datastore
  • Loading branch information
jskeet committed Apr 4, 2024
1 parent 98db8ba commit 9d3b0c7
Show file tree
Hide file tree
Showing 29 changed files with 57,422 additions and 0 deletions.
11,673 changes: 11,673 additions & 0 deletions src/Google.Events.Protobuf/Cloud/Batch/V1/Data.g.cs

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions src/Google.Events.Protobuf/Cloud/Batch/V1/ExtensionAttributes.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright 2024, 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.

using CloudNative.CloudEvents;

namespace Google.Events.Protobuf.Cloud.Batch.V1
{
/// <summary>Extension attributes for Google.Events.Protobuf.Cloud.Batch.V1 events.</summary>
public static class ExtensionAttributes
{
/// <summary>
/// <para>The resource ID of the Job triggering the event.</para>
///
/// <para>This is used by the following events:</para>
///
/// <list type="bullet">
/// <item><description>google.cloud.batch.job.v1.created</description></item>
/// <item><description>google.cloud.batch.job.v1.deleted</description></item>
/// </list>
/// </summary>
public static CloudEventAttribute Job { get; } = CloudEventAttribute.CreateExtension("job", CloudEventAttributeType.String);

}
}
27 changes: 27 additions & 0 deletions src/Google.Events.Protobuf/Cloud/Batch/V1/JobEventData.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2024, 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.

namespace Google.Events.Protobuf.Cloud.Batch.V1
{
[global::CloudNative.CloudEvents.CloudEventFormatterAttribute(typeof(ProtobufJsonCloudEventFormatter<JobEventData>))]
public partial class JobEventData
{
/// <summary>CloudEvent type for the 'created' event.</summary>
public const string CreatedCloudEventType = "google.cloud.batch.job.v1.created";

/// <summary>CloudEvent type for the 'deleted' event.</summary>
public const string DeletedCloudEventType = "google.cloud.batch.job.v1.deleted";

}
}
12 changes: 12 additions & 0 deletions src/Google.Events.Protobuf/Cloud/Datastore/V1/EntityEventData.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,17 @@ public partial class EntityEventData
/// <summary>CloudEvent type for the 'written' event.</summary>
public const string WrittenCloudEventType = "google.cloud.datastore.entity.v1.written";

/// <summary>CloudEvent type for the 'created.withAuthContext' event.</summary>
public const string CreatedWithAuthContextCloudEventType = "google.cloud.datastore.entity.v1.created.withAuthContext";

/// <summary>CloudEvent type for the 'updated.withAuthContext' event.</summary>
public const string UpdatedWithAuthContextCloudEventType = "google.cloud.datastore.entity.v1.updated.withAuthContext";

/// <summary>CloudEvent type for the 'deleted.withAuthContext' event.</summary>
public const string DeletedWithAuthContextCloudEventType = "google.cloud.datastore.entity.v1.deleted.withAuthContext";

/// <summary>CloudEvent type for the 'written.withAuthContext' event.</summary>
public const string WrittenWithAuthContextCloudEventType = "google.cloud.datastore.entity.v1.written.withAuthContext";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public static class ExtensionAttributes
/// <item><description>google.cloud.datastore.entity.v1.updated</description></item>
/// <item><description>google.cloud.datastore.entity.v1.deleted</description></item>
/// <item><description>google.cloud.datastore.entity.v1.written</description></item>
/// <item><description>google.cloud.datastore.entity.v1.created.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.updated.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.deleted.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.written.withAuthContext</description></item>
/// </list>
/// </summary>
public static CloudEventAttribute Database { get; } = CloudEventAttribute.CreateExtension("database", CloudEventAttributeType.String);
Expand All @@ -43,6 +47,10 @@ public static class ExtensionAttributes
/// <item><description>google.cloud.datastore.entity.v1.updated</description></item>
/// <item><description>google.cloud.datastore.entity.v1.deleted</description></item>
/// <item><description>google.cloud.datastore.entity.v1.written</description></item>
/// <item><description>google.cloud.datastore.entity.v1.created.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.updated.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.deleted.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.written.withAuthContext</description></item>
/// </list>
/// </summary>
public static CloudEventAttribute Entity { get; } = CloudEventAttribute.CreateExtension("entity", CloudEventAttributeType.String);
Expand All @@ -57,6 +65,10 @@ public static class ExtensionAttributes
/// <item><description>google.cloud.datastore.entity.v1.updated</description></item>
/// <item><description>google.cloud.datastore.entity.v1.deleted</description></item>
/// <item><description>google.cloud.datastore.entity.v1.written</description></item>
/// <item><description>google.cloud.datastore.entity.v1.created.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.updated.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.deleted.withAuthContext</description></item>
/// <item><description>google.cloud.datastore.entity.v1.written.withAuthContext</description></item>
/// </list>
/// </summary>
public static CloudEventAttribute Namespace { get; } = CloudEventAttribute.CreateExtension("namespace", CloudEventAttributeType.String);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2024, 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.

namespace Google.Events.Protobuf.Cloud.Deploy.V1
{
[global::CloudNative.CloudEvents.CloudEventFormatterAttribute(typeof(ProtobufJsonCloudEventFormatter<AutomationEventData>))]
public partial class AutomationEventData
{
/// <summary>CloudEvent type for the 'created' event.</summary>
public const string CreatedCloudEventType = "google.cloud.deploy.automation.v1.created";

/// <summary>CloudEvent type for the 'updated' event.</summary>
public const string UpdatedCloudEventType = "google.cloud.deploy.automation.v1.updated";

/// <summary>CloudEvent type for the 'deleted' event.</summary>
public const string DeletedCloudEventType = "google.cloud.deploy.automation.v1.deleted";

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2024, 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.

namespace Google.Events.Protobuf.Cloud.Deploy.V1
{
[global::CloudNative.CloudEvents.CloudEventFormatterAttribute(typeof(ProtobufJsonCloudEventFormatter<CustomTargetTypeEventData>))]
public partial class CustomTargetTypeEventData
{
/// <summary>CloudEvent type for the 'created' event.</summary>
public const string CreatedCloudEventType = "google.cloud.deploy.customTargetType.v1.created";

/// <summary>CloudEvent type for the 'updated' event.</summary>
public const string UpdatedCloudEventType = "google.cloud.deploy.customTargetType.v1.updated";

/// <summary>CloudEvent type for the 'deleted' event.</summary>
public const string DeletedCloudEventType = "google.cloud.deploy.customTargetType.v1.deleted";

}
}
Loading

0 comments on commit 9d3b0c7

Please sign in to comment.