-
Notifications
You must be signed in to change notification settings - Fork 318
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
1 parent
173a169
commit e9bac3a
Showing
8 changed files
with
235 additions
and
3 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
34 changes: 34 additions & 0 deletions
34
...in/java/org/cloudfoundry/client/v3/securitygroups/AbstractUnbindSecurityGroupRequest.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,34 @@ | ||
/* | ||
* Copyright 2013-2021 the original author or authors. | ||
* | ||
* 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 org.cloudfoundry.client.v3.securitygroups; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
||
public abstract class AbstractUnbindSecurityGroupRequest { | ||
|
||
/** | ||
* The Security Group id | ||
*/ | ||
@JsonIgnore | ||
abstract String getSecurityGroupId(); | ||
|
||
/** | ||
* The Space id | ||
*/ | ||
@JsonIgnore | ||
abstract String getSpaceId(); | ||
} |
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
27 changes: 27 additions & 0 deletions
27
...in/java/org/cloudfoundry/client/v3/securitygroups/_UnbindRunningSecurityGroupRequest.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,27 @@ | ||
/* | ||
* Copyright 2013-2021 the original author or authors. | ||
* | ||
* 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 org.cloudfoundry.client.v3.securitygroups; | ||
|
||
import org.immutables.value.Value; | ||
|
||
/** | ||
* The request payload for the Unbind Running Security Group operation | ||
*/ | ||
@Value.Immutable | ||
abstract class _UnbindRunningSecurityGroupRequest extends AbstractUnbindSecurityGroupRequest { | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...in/java/org/cloudfoundry/client/v3/securitygroups/_UnbindStagingSecurityGroupRequest.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,27 @@ | ||
/* | ||
* Copyright 2013-2021 the original author or authors. | ||
* | ||
* 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 org.cloudfoundry.client.v3.securitygroups; | ||
|
||
import org.immutables.value.Value; | ||
|
||
/** | ||
* The request payload for the Unbind Staging Security Group operation | ||
*/ | ||
@Value.Immutable | ||
abstract class _UnbindStagingSecurityGroupRequest extends AbstractUnbindSecurityGroupRequest { | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...java/org/cloudfoundry/client/v3/securitygroups/UnbindRunningSecurityGroupRequestTest.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,28 @@ | ||
package org.cloudfoundry.client.v3.securitygroups; | ||
|
||
import org.junit.Test; | ||
|
||
public class UnbindRunningSecurityGroupRequestTest { | ||
|
||
@Test(expected = IllegalStateException.class) | ||
public void noSecurityGroupId() { | ||
UnbindRunningSecurityGroupRequest.builder() | ||
.build(); | ||
} | ||
|
||
@Test(expected = IllegalStateException.class) | ||
public void noSpaceId() { | ||
UnbindRunningSecurityGroupRequest.builder() | ||
.securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") | ||
.build(); | ||
} | ||
|
||
@Test | ||
public void valid() { | ||
UnbindRunningSecurityGroupRequest.builder() | ||
.securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") | ||
.spaceId("space-guid2") | ||
.build(); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...java/org/cloudfoundry/client/v3/securitygroups/UnbindStagingSecurityGroupRequestTest.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,27 @@ | ||
package org.cloudfoundry.client.v3.securitygroups; | ||
|
||
import org.junit.Test; | ||
|
||
public class UnbindStagingSecurityGroupRequestTest { | ||
|
||
@Test(expected = IllegalStateException.class) | ||
public void noSecurityGroupId() { | ||
UnbindStagingSecurityGroupRequest.builder() | ||
.build(); | ||
} | ||
|
||
@Test(expected = IllegalStateException.class) | ||
public void noSpaceId() { | ||
UnbindStagingSecurityGroupRequest.builder() | ||
.securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") | ||
.build(); | ||
} | ||
|
||
@Test | ||
public void valid() { | ||
UnbindStagingSecurityGroupRequest.builder() | ||
.securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") | ||
.spaceId("space-guid2") | ||
.build(); | ||
} | ||
} |