Skip to content

Commit

Permalink
Add isGcpPubSub
Browse files Browse the repository at this point in the history
  • Loading branch information
shehzad-kore committed May 9, 2023
1 parent 72bd737 commit bb472c6
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 15 deletions.
10 changes: 5 additions & 5 deletions OmniCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OmniCore", "src\OmniCore\OmniCore.csproj", "{AA66B6BC-5279-4324-A184-D0297CE56FE2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OmniCore", "src\OmniCore\OmniCore.csproj", "{D6F633DB-9FF1-4234-B597-C2706EFBAD1E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OmniCore.Test", "src\OmniCore.Test\OmniCore.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AA66B6BC-5279-4324-A184-D0297CE56FE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA66B6BC-5279-4324-A184-D0297CE56FE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA66B6BC-5279-4324-A184-D0297CE56FE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA66B6BC-5279-4324-A184-D0297CE56FE2}.Release|Any CPU.Build.0 = Release|Any CPU
{D6F633DB-9FF1-4234-B597-C2706EFBAD1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6F633DB-9FF1-4234-B597-C2706EFBAD1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6F633DB-9FF1-4234-B597-C2706EFBAD1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6F633DB-9FF1-4234-B597-C2706EFBAD1E}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
3 changes: 2 additions & 1 deletion docs/EventNotificationConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PubsubTopicName** | **string** | PubsubTopicName: A Cloud Pub/Sub topic name. For example, `projects/myProject/topics/deviceEvents`. | [optional]
**PubsubTopicName** | **string** | PubsubTopicName: A Topic name. For example, `projects/myProject/topics/deviceEvents`. | [optional]
**IsGcpPubSub** | [**Bool**](Bool.md) | Describe whether the topic is Gcp pubsub topic or Omni topic | [optional]
**SubfolderMatches** | **string** | SubfolderMatches: If the subfolder name matches this string exactly, this configuration will be used. The string must not include the leading '/' character. If empty, all strings are matched. This field is used only for telemetry events; subfolders are not supported for state changes. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
3 changes: 2 additions & 1 deletion docs/NotificationConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PubsubTopicName** | **string** | PubsubTopicName: A Cloud Pub/Sub topic name. For example, `projects/myProject/topics/deviceEvents`. | [optional]
**PubsubTopicName** | **string** | PubsubTopicName: A Topic name. For example, `projects/myProject/topics/deviceEvents`. | [optional]
**IsGcpPubSub** | [**Bool**](Bool.md) | Describe whether the topic is Gcp pubsub topic or Omni topic | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

27 changes: 23 additions & 4 deletions src/OmniCore/Model/EventNotificationConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,30 @@ public partial class EventNotificationConfig : IEquatable<EventNotificationConfi
/// <summary>
/// Initializes a new instance of the <see cref="EventNotificationConfig" /> class.
/// </summary>
/// <param name="pubsubTopicName">PubsubTopicName: A Cloud Pub/Sub topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;..</param>
/// <param name="pubsubTopicName">PubsubTopicName: A Topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;..</param>
/// <param name="isGcpPubSub">Describe whether the topic is Gcp pubsub topic or Omni topic.</param>
/// <param name="subfolderMatches">SubfolderMatches: If the subfolder name matches this string exactly, this configuration will be used. The string must not include the leading &#39;/&#39; character. If empty, all strings are matched. This field is used only for telemetry events; subfolders are not supported for state changes..</param>
public EventNotificationConfig(string pubsubTopicName = default(string), string subfolderMatches = default(string))
public EventNotificationConfig(string pubsubTopicName = default(string), Bool isGcpPubSub = default(Bool), string subfolderMatches = default(string))
{
this.PubsubTopicName = pubsubTopicName;
this.IsGcpPubSub = isGcpPubSub;
this.SubfolderMatches = subfolderMatches;
}

/// <summary>
/// PubsubTopicName: A Cloud Pub/Sub topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.
/// PubsubTopicName: A Topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.
/// </summary>
/// <value>PubsubTopicName: A Cloud Pub/Sub topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.</value>
/// <value>PubsubTopicName: A Topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.</value>
[DataMember(Name = "pubsubTopicName", EmitDefaultValue = false)]
public string PubsubTopicName { get; set; }

/// <summary>
/// Describe whether the topic is Gcp pubsub topic or Omni topic
/// </summary>
/// <value>Describe whether the topic is Gcp pubsub topic or Omni topic</value>
[DataMember(Name = "isGcpPubSub", EmitDefaultValue = false)]
public Bool IsGcpPubSub { get; set; }

/// <summary>
/// SubfolderMatches: If the subfolder name matches this string exactly, this configuration will be used. The string must not include the leading &#39;/&#39; character. If empty, all strings are matched. This field is used only for telemetry events; subfolders are not supported for state changes.
/// </summary>
Expand All @@ -66,6 +75,7 @@ public override string ToString()
StringBuilder sb = new StringBuilder();
sb.Append("class EventNotificationConfig {\n");
sb.Append(" PubsubTopicName: ").Append(PubsubTopicName).Append("\n");
sb.Append(" IsGcpPubSub: ").Append(IsGcpPubSub).Append("\n");
sb.Append(" SubfolderMatches: ").Append(SubfolderMatches).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down Expand Up @@ -107,6 +117,11 @@ public bool Equals(EventNotificationConfig input)
(this.PubsubTopicName != null &&
this.PubsubTopicName.Equals(input.PubsubTopicName))
) &&
(
this.IsGcpPubSub == input.IsGcpPubSub ||
(this.IsGcpPubSub != null &&
this.IsGcpPubSub.Equals(input.IsGcpPubSub))
) &&
(
this.SubfolderMatches == input.SubfolderMatches ||
(this.SubfolderMatches != null &&
Expand All @@ -127,6 +142,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.PubsubTopicName.GetHashCode();
}
if (this.IsGcpPubSub != null)
{
hashCode = (hashCode * 59) + this.IsGcpPubSub.GetHashCode();
}
if (this.SubfolderMatches != null)
{
hashCode = (hashCode * 59) + this.SubfolderMatches.GetHashCode();
Expand Down
27 changes: 23 additions & 4 deletions src/OmniCore/Model/NotificationConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,28 @@ public partial class NotificationConfig : IEquatable<NotificationConfig>, IValid
/// <summary>
/// Initializes a new instance of the <see cref="NotificationConfig" /> class.
/// </summary>
/// <param name="pubsubTopicName">PubsubTopicName: A Cloud Pub/Sub topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;..</param>
public NotificationConfig(string pubsubTopicName = default(string))
/// <param name="pubsubTopicName">PubsubTopicName: A Topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;..</param>
/// <param name="isGcpPubSub">Describe whether the topic is Gcp pubsub topic or Omni topic.</param>
public NotificationConfig(string pubsubTopicName = default(string), Bool isGcpPubSub = default(Bool))
{
this.PubsubTopicName = pubsubTopicName;
this.IsGcpPubSub = isGcpPubSub;
}

/// <summary>
/// PubsubTopicName: A Cloud Pub/Sub topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.
/// PubsubTopicName: A Topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.
/// </summary>
/// <value>PubsubTopicName: A Cloud Pub/Sub topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.</value>
/// <value>PubsubTopicName: A Topic name. For example, &#x60;projects/myProject/topics/deviceEvents&#x60;.</value>
[DataMember(Name = "pubsubTopicName", EmitDefaultValue = false)]
public string PubsubTopicName { get; set; }

/// <summary>
/// Describe whether the topic is Gcp pubsub topic or Omni topic
/// </summary>
/// <value>Describe whether the topic is Gcp pubsub topic or Omni topic</value>
[DataMember(Name = "isGcpPubSub", EmitDefaultValue = false)]
public Bool IsGcpPubSub { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -57,6 +66,7 @@ public override string ToString()
StringBuilder sb = new StringBuilder();
sb.Append("class NotificationConfig {\n");
sb.Append(" PubsubTopicName: ").Append(PubsubTopicName).Append("\n");
sb.Append(" IsGcpPubSub: ").Append(IsGcpPubSub).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -96,6 +106,11 @@ public bool Equals(NotificationConfig input)
this.PubsubTopicName == input.PubsubTopicName ||
(this.PubsubTopicName != null &&
this.PubsubTopicName.Equals(input.PubsubTopicName))
) &&
(
this.IsGcpPubSub == input.IsGcpPubSub ||
(this.IsGcpPubSub != null &&
this.IsGcpPubSub.Equals(input.IsGcpPubSub))
);
}

Expand All @@ -112,6 +127,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.PubsubTopicName.GetHashCode();
}
if (this.IsGcpPubSub != null)
{
hashCode = (hashCode * 59) + this.IsGcpPubSub.GetHashCode();
}
return hashCode;
}
}
Expand Down

0 comments on commit bb472c6

Please sign in to comment.