-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,052 additions
and
4 deletions.
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
738 changes: 738 additions & 0 deletions
738
apis/dapr/src/api/java/com/marcnuri/yakc/api/daprio/v2alpha1/DaprIoV2alpha1Api.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
65 changes: 65 additions & 0 deletions
65
apis/dapr/src/model/java/com/marcnuri/yakc/model/io/dapr/v2alpha1/Subscription.java
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,65 @@ | ||
/* | ||
* Copyright 2020 Marc Nuri | ||
* | ||
* 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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.marcnuri.yakc.model.io.dapr.v2alpha1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.marcnuri.yakc.model.Model; | ||
import com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Singular; | ||
import lombok.ToString; | ||
|
||
/** | ||
* Subscription describes an pub/sub event subscription. | ||
*/ | ||
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"}) | ||
@Builder(toBuilder = true, builderClassName = "Builder") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@ToString | ||
public class Subscription implements Model { | ||
|
||
|
||
/** | ||
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
*/ | ||
@JsonProperty("apiVersion") | ||
private String apiVersion; | ||
|
||
/** | ||
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
*/ | ||
@JsonProperty("kind") | ||
private String kind; | ||
|
||
@JsonProperty("metadata") | ||
private ObjectMeta metadata; | ||
|
||
@JsonProperty("scopes") | ||
@Singular(value = "addToScopes", ignoreNullCollections = true) | ||
private List<String> scopes; | ||
|
||
@JsonProperty("spec") | ||
private SubscriptionSpec spec; | ||
|
||
} | ||
|
68 changes: 68 additions & 0 deletions
68
apis/dapr/src/model/java/com/marcnuri/yakc/model/io/dapr/v2alpha1/SubscriptionList.java
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,68 @@ | ||
/* | ||
* Copyright 2020 Marc Nuri | ||
* | ||
* 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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.marcnuri.yakc.model.io.dapr.v2alpha1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.marcnuri.yakc.model.ListModel; | ||
import com.marcnuri.yakc.model.Model; | ||
import com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.NonNull; | ||
import lombok.Singular; | ||
import lombok.ToString; | ||
|
||
/** | ||
* SubscriptionList is a list of Subscription | ||
*/ | ||
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"}) | ||
@Builder(toBuilder = true, builderClassName = "Builder") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@ToString | ||
public class SubscriptionList implements Model, ListModel<Subscription> { | ||
|
||
|
||
/** | ||
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
*/ | ||
@JsonProperty("apiVersion") | ||
private String apiVersion; | ||
|
||
/** | ||
* List of subscriptions. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md | ||
*/ | ||
@NonNull | ||
@JsonProperty("items") | ||
@Singular(value = "addToItems", ignoreNullCollections = true) | ||
private List<Subscription> items; | ||
|
||
/** | ||
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
*/ | ||
@JsonProperty("kind") | ||
private String kind; | ||
|
||
@JsonProperty("metadata") | ||
private ListMeta metadata; | ||
|
||
} | ||
|
68 changes: 68 additions & 0 deletions
68
apis/dapr/src/model/java/com/marcnuri/yakc/model/io/dapr/v2alpha1/SubscriptionSpec.java
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,68 @@ | ||
/* | ||
* Copyright 2020 Marc Nuri | ||
* | ||
* 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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.marcnuri.yakc.model.io.dapr.v2alpha1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.marcnuri.yakc.model.Model; | ||
import java.util.Map; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.NonNull; | ||
import lombok.Singular; | ||
import lombok.ToString; | ||
|
||
/** | ||
* SubscriptionSpec is the spec for an event subscription. | ||
*/ | ||
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"}) | ||
@Builder(toBuilder = true, builderClassName = "Builder") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@ToString | ||
public class SubscriptionSpec implements Model { | ||
|
||
|
||
/** | ||
* The optional metadata to provide the the subscription. | ||
*/ | ||
@JsonProperty("metadata") | ||
@Singular(value = "putInMetadata", ignoreNullCollections = true) | ||
private Map<String, String> metadata; | ||
|
||
/** | ||
* The PubSub component name. | ||
*/ | ||
@NonNull | ||
@JsonProperty("pubsubname") | ||
private String pubsubname; | ||
|
||
@NonNull | ||
@JsonProperty("routes") | ||
private SubscriptionSpecRoutes routes; | ||
|
||
/** | ||
* The topic name to subscribe to. | ||
*/ | ||
@NonNull | ||
@JsonProperty("topic") | ||
private String topic; | ||
|
||
} | ||
|
52 changes: 52 additions & 0 deletions
52
.../dapr/src/model/java/com/marcnuri/yakc/model/io/dapr/v2alpha1/SubscriptionSpecRoutes.java
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,52 @@ | ||
/* | ||
* Copyright 2020 Marc Nuri | ||
* | ||
* 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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.marcnuri.yakc.model.io.dapr.v2alpha1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.marcnuri.yakc.model.Model; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Singular; | ||
import lombok.ToString; | ||
|
||
/** | ||
* The Routes configuration for this topic. | ||
*/ | ||
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"}) | ||
@Builder(toBuilder = true, builderClassName = "Builder") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@ToString | ||
public class SubscriptionSpecRoutes implements Model { | ||
|
||
|
||
@JsonProperty("default") | ||
private String defaults; | ||
|
||
/** | ||
* The list of rules for this topic. | ||
*/ | ||
@JsonProperty("rules") | ||
@Singular(value = "addToRules", ignoreNullCollections = true) | ||
private List<SubscriptionSpecRoutesRules> rules; | ||
|
||
} | ||
|
55 changes: 55 additions & 0 deletions
55
.../src/model/java/com/marcnuri/yakc/model/io/dapr/v2alpha1/SubscriptionSpecRoutesRules.java
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,55 @@ | ||
/* | ||
* Copyright 2020 Marc Nuri | ||
* | ||
* 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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.marcnuri.yakc.model.io.dapr.v2alpha1; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.marcnuri.yakc.model.Model; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.NonNull; | ||
import lombok.ToString; | ||
|
||
/** | ||
* Rule is used to specify the condition for sending a message to a specific path. | ||
*/ | ||
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"}) | ||
@Builder(toBuilder = true, builderClassName = "Builder") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@ToString | ||
public class SubscriptionSpecRoutesRules implements Model { | ||
|
||
|
||
/** | ||
* The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. The rules are tested in the order specified, so they should be define from most-to-least specific. The default route should appear last in the list. | ||
*/ | ||
@NonNull | ||
@JsonProperty("match") | ||
private String match; | ||
|
||
/** | ||
* The path for events that match this rule. | ||
*/ | ||
@NonNull | ||
@JsonProperty("path") | ||
private String path; | ||
|
||
} | ||
|