Skip to content

Commit

Permalink
style: use file-scope namespace and primary constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
xlegalles committed Oct 24, 2024
1 parent f4ef2ec commit 6fdc535
Show file tree
Hide file tree
Showing 27 changed files with 331 additions and 364 deletions.
16 changes: 8 additions & 8 deletions Client/Api/Responses/IActivateJobsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// 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 System.Collections.Generic;

namespace Zeebe.Client.Api.Responses
namespace Zeebe.Client.Api.Responses;

public interface IActivateJobsResponse
{
public interface IActivateJobsResponse
{
/// <returns>
/// the list of activated jobs
/// </returns>
IList<IJob> Jobs { get; }
}
/// <returns>
/// the list of activated jobs.
/// </returns>
IList<IJob> Jobs { get; }
}
30 changes: 15 additions & 15 deletions Client/Api/Responses/IBrokerInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
// 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 System.Collections.Generic;

namespace Zeebe.Client.Api.Responses
namespace Zeebe.Client.Api.Responses;

public interface IBrokerInfo
{
public interface IBrokerInfo
{
/// <returns>the node if of the broker </returns>
int NodeId { get; }
/// <returns>the node if of the broker.</returns>
int NodeId { get; }

/// <returns>the address host of the broker </returns>
string Host { get; }
/// <returns>the address host of the broker.</returns>
string Host { get; }

/// <returns>the address port of the broker </returns>
int Port { get; }
/// <returns>the address port of the broker.</returns>
int Port { get; }

/// <returns>the address (host+port) of the broker separated by a ':'</returns>
string Address { get; }
/// <returns>the address (host+port) of the broker separated by a ':'.</returns>
string Address { get; }

/// <returns>all partitions of the broker </returns>
IList<IPartitionInfo> Partitions { get; }
}
}
/// <returns>all partitions of the broker.</returns>
IList<IPartitionInfo> Partitions { get; }
}
15 changes: 7 additions & 8 deletions Client/Api/Responses/ICancelProcessInstanceResponse.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
namespace Zeebe.Client.Api.Responses
namespace Zeebe.Client.Api.Responses;

/// <summary>
/// Response on a cancel process instance command.
/// </summary>
public interface ICancelProcessInstanceResponse
{
/// <summary>
/// Response on a cancel process instance command.
/// </summary>
public interface ICancelProcessInstanceResponse
{
}
}
}
16 changes: 7 additions & 9 deletions Client/Api/Responses/ICompleteJobResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
// 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 Zeebe.Client.Api.Responses
{
/// <summary>
/// Represents an response for an job complete command request.
/// </summary>
public interface ICompleteJobResponse
{
}
}

namespace Zeebe.Client.Api.Responses;

/// <summary>
/// Represents an response for an job complete command request.
/// </summary>
public interface ICompleteJobResponse;
12 changes: 6 additions & 6 deletions Client/Api/Responses/IDecisionMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ public interface IDecisionMetadata
{
/// <returns>
/// the dmn decision ID, as parsed during deployment; together with the versions forms a
/// unique identifier for a specific decision
/// unique identifier for a specific decision.
/// </returns>
string DmnDecisionId { get; }

/// <returns>the dmn name of the decision, as parsed during deployment</returns>
/// <returns>the dmn name of the decision, as parsed during deployment.</returns>
string DmnDecisionName { get; }

/// <returns>the assigned decision version</returns>
/// <returns>the assigned decision version.</returns>
int Version { get; }

/// <returns>the assigned decision key, which acts as a unique identifier for this decision</returns>
/// <returns>the assigned decision key, which acts as a unique identifier for this decision.</returns>
long DecisionKey { get; }

/// <returns>
/// the dmn ID of the decision requirements graph that this decision is part of, as parsed
/// during deployment
/// during deployment.
/// </returns>
string DmnDecisionRequirementsId { get; }

/// <returns>the assigned key of the decision requirements graph that this decision is part of</returns>
/// <returns>the assigned key of the decision requirements graph that this decision is part of.</returns>
long DecisionRequirementsKey { get; }
}
18 changes: 9 additions & 9 deletions Client/Api/Responses/IDecisionRequirementsMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//
//
// Copyright (c) 2021 camunda services GmbH ([email protected])
//
//
// 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
//
//
// http://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.
Expand All @@ -19,24 +19,24 @@ public interface IDecisionRequirementsMetadata
{
/// <returns>
/// the dmn decision requirements ID, as parsed during deployment; together with the
/// versions forms a unique identifier for a specific decision
/// versions forms a unique identifier for a specific decision.
/// </returns>
string DmnDecisionRequirementsId { get; }

/// <returns>the dmn name of the decision requirements, as parsed during deployment</returns>
/// <returns>the dmn name of the decision requirements, as parsed during deployment.</returns>
string DmnDecisionRequirementsName { get; }

/// <returns>the assigned decision requirements version</returns>
/// <returns>the assigned decision requirements version.</returns>
int Version { get; }

/// <returns>
/// the assigned decision requirements key, which acts as a unique identifier for this
/// decision requirements
/// decision requirements.
/// </returns>
long DecisionRequirementsKey { get; }

/// <returns>
/// the resource name (i.e. filename) from which this decision requirements was parsed
/// the resource name (i.e. filename) from which this decision requirements was parsed.
/// </returns>
string ResourceName { get; }
}
29 changes: 14 additions & 15 deletions Client/Api/Responses/IDeployResourceResponse.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
using System.Collections.Generic;

namespace Zeebe.Client.Api.Responses
namespace Zeebe.Client.Api.Responses;

public interface IDeployResourceResponse
{
public interface IDeployResourceResponse
{
/// <returns>the unique key of the deployment </returns>
long Key { get; }
/// <returns>the unique key of the deployment.</returns>
long Key { get; }

/// <returns>the processes meta data, which are deployed </returns>
IList<IProcessMetadata> Processes { get; }
/// <returns>the processes meta data, which are deployed.</returns>
IList<IProcessMetadata> Processes { get; }

/// <returns>the decisions which are deployed</returns>
IList<IDecisionMetadata> Decisions { get; }
/// <returns>the decisions which are deployed.</returns>
IList<IDecisionMetadata> Decisions { get; }

/// <returns>the decision requirements which are deployed </returns>
IList<IDecisionRequirementsMetadata> DecisionRequirements { get; }
/// <returns>the decision requirements which are deployed.</returns>
IList<IDecisionRequirementsMetadata> DecisionRequirements { get; }

/// <returns>the forms which are deployed</returns>
IList<IFormMetadata> Forms { get; }
}
}
/// <returns>the forms which are deployed.</returns>
IList<IFormMetadata> Forms { get; }
}
115 changes: 57 additions & 58 deletions Client/Api/Responses/IEvaluateDecisionResponse.cs
Original file line number Diff line number Diff line change
@@ -1,62 +1,61 @@
using System.Collections.Generic;

namespace Zeebe.Client.Api.Responses
namespace Zeebe.Client.Api.Responses;

/// <summary>
/// Response for evaluating a decision on the broker.
/// </summary>
public interface IEvaluateDecisionResponse
{
/// <summary>
/// Response for evaluating a decision on the broker.
/// </summary>
public interface IEvaluateDecisionResponse
{
/// <returns>
/// the decision ID, as parsed during deployment; together with the versions forms a unique
/// identifier for a specific decision
/// </returns>
string DecisionId { get; }

/// <returns>
/// the assigned decision version
/// </returns>
int DecisionVersion { get; }

/// <returns>
/// the assigned decision key, which acts as a unique identifier for this decision
/// </returns>
long DecisionKey { get; }

/// <returns>
/// the name of the decision, as parsed during deployment
/// </returns>
string DecisionName { get; }

/// <returns>
/// the ID of the decision requirements graph that this decision is part of, as parsed
/// during deployment
/// </returns>
string DecisionRequirementsId { get; }

/// <returns>
/// the assigned key of the decision requirements graph that this decision is part of
/// </returns>
long DecisionRequirementsKey { get; }

/// <returns>
/// the output of the evaluated decision
/// </returns>
string DecisionOutput { get; }

/// <returns>
/// a list of decisions that were evaluated within the requested decision evaluation
/// </returns>
IList<IEvaluatedDecision> EvaluatedDecisions { get; }

/// <returns>
/// a string indicating the ID of the decision which failed during evaluation
/// </returns>
string FailedDecisionId { get; }

/// <returns>
/// a message describing why the decision which was evaluated failed
/// </returns>
string FailureMessage { get; }
}
/// <returns>
/// the decision ID, as parsed during deployment; together with the versions forms a unique
/// identifier for a specific decision.
/// </returns>
string DecisionId { get; }

/// <returns>
/// the assigned decision version.
/// </returns>
int DecisionVersion { get; }

/// <returns>
/// the assigned decision key, which acts as a unique identifier for this decision.
/// </returns>
long DecisionKey { get; }

/// <returns>
/// the name of the decision, as parsed during deployment.
/// </returns>
string DecisionName { get; }

/// <returns>
/// the ID of the decision requirements graph that this decision is part of, as parsed
/// during deployment.
/// </returns>
string DecisionRequirementsId { get; }

/// <returns>
/// the assigned key of the decision requirements graph that this decision is part of.
/// </returns>
long DecisionRequirementsKey { get; }

/// <returns>
/// the output of the evaluated decision.
/// </returns>
string DecisionOutput { get; }

/// <returns>
/// a list of decisions that were evaluated within the requested decision evaluation.
/// </returns>
IList<IEvaluatedDecision> EvaluatedDecisions { get; }

/// <returns>
/// a string indicating the ID of the decision which failed during evaluation.
/// </returns>
string FailedDecisionId { get; }

/// <returns>
/// a message describing why the decision which was evaluated failed.
/// </returns>
string FailureMessage { get; }
}
Loading

0 comments on commit 6fdc535

Please sign in to comment.