Skip to content

Commit

Permalink
feat(Case Management): add service to project (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: Chong Lee <[email protected]>
  • Loading branch information
padamstx and Chong Lee authored May 20, 2020
1 parent 4c90a2f commit e4b444a
Show file tree
Hide file tree
Showing 71 changed files with 7,606 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ before_install:
&& openssl aes-256-cbc -K $encrypted_66f264007c0d_key -iv $encrypted_66f264007c0d_iv -in iam_access_groups.env.enc -out iam_access_groups.env -d
&& openssl aes-256-cbc -K $encrypted_94fa7fdf4df9_key -iv $encrypted_94fa7fdf4df9_iv -in global_catalog.env.enc -out global_catalog.env -d
&& openssl aes-256-cbc -K $encrypted_acd9ca9788e3_key -iv $encrypted_acd9ca9788e3_iv -in resource_manager.env.enc -out resource_manager.env -d
&& openssl aes-256-cbc -K $encrypted_dac53b985913_key -iv $encrypted_dac53b985913_iv -in case_management.env.enc -out case_management.env -d
|| true
install:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Changes might occur which impact applications that use this SDK.

Service Name | Artifact Id
--- | ---
[Case Management](https://cloud.ibm.com/apidocs/case-management) | case-management
[Global Catalog](https://cloud.ibm.com/apidocs/resource-catalog/global-catalog) | global-catalog
[Global Search](https://cloud.ibm.com/apidocs/search) | global-search
[Global Tagging](https://cloud.ibm.com/apidocs/tagging) | global-tagging
Expand Down
Binary file added case_management.env.enc
Binary file not shown.
59 changes: 59 additions & 0 deletions modules/case-management/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<!-- >>> Replace this with the parent pom's artifactId -->
<artifactId>platform-services</artifactId>
<groupId>com.ibm.cloud</groupId>
<version>99-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

<!-- >>> Replace this with the service module's artifactId (e.g. "example-service") -->
<artifactId>case-management</artifactId>

<!-- >>> Replace this with a text description of this module (e.g. "Example Service") -->
<name>Case Management APIs</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>sdk-core</artifactId>
</dependency>
<dependency>
<!-- >>> Replace this with the "common" module's artifactId (e.g. my-services-common) -->
<artifactId>platform-services-common</artifactId>
<groupId>com.ibm.cloud</groupId>
</dependency>
<dependency>
<!-- >>> Replace this with the "common" module's artifactId (e.g. my-services-common) -->
<artifactId>platform-services-common</artifactId>
<groupId>${project.groupId}</groupId>
<type>test-jar</type>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* (C) Copyright IBM Corp. 2020.
*
* 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.ibm.cloud.platform_services.case_management.v1.model;

/**
* Payload to accept the proposed resolution of the case.
*/
public class AcceptPayload extends StatusPayload {

/**
* action to perform on the case.
*/
public interface Action {
/** resolve. */
String RESOLVE = "resolve";
/** unresolve. */
String UNRESOLVE = "unresolve";
/** accept. */
String ACCEPT = "accept";
}


/**
* Builder.
*/
public static class Builder {
private String action;
private String comment;

public Builder(StatusPayload acceptPayload) {
this.action = acceptPayload.action;
this.comment = acceptPayload.comment;
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Instantiates a new builder with required properties.
*
* @param action the action
*/
public Builder(String action) {
this.action = action;
}

/**
* Builds a AcceptPayload.
*
* @return the new AcceptPayload instance
*/
public AcceptPayload build() {
return new AcceptPayload(this);
}

/**
* Set the action.
*
* @param action the action
* @return the AcceptPayload builder
*/
public Builder action(String action) {
this.action = action;
return this;
}

/**
* Set the comment.
*
* @param comment the comment
* @return the AcceptPayload builder
*/
public Builder comment(String comment) {
this.comment = comment;
return this;
}
}

protected AcceptPayload(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.action,
"action cannot be null");
action = builder.action;
comment = builder.comment;
}

/**
* New builder.
*
* @return a AcceptPayload builder
*/
public Builder newBuilder() {
return new Builder(this);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* (C) Copyright IBM Corp. 2020.
*
* 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.ibm.cloud.platform_services.case_management.v1.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* The addComment options.
*/
public class AddCommentOptions extends GenericModel {

protected String caseNumber;
protected String comment;

/**
* Builder.
*/
public static class Builder {
private String caseNumber;
private String comment;

private Builder(AddCommentOptions addCommentOptions) {
this.caseNumber = addCommentOptions.caseNumber;
this.comment = addCommentOptions.comment;
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Instantiates a new builder with required properties.
*
* @param caseNumber the caseNumber
* @param comment the comment
*/
public Builder(String caseNumber, String comment) {
this.caseNumber = caseNumber;
this.comment = comment;
}

/**
* Builds a AddCommentOptions.
*
* @return the new AddCommentOptions instance
*/
public AddCommentOptions build() {
return new AddCommentOptions(this);
}

/**
* Set the caseNumber.
*
* @param caseNumber the caseNumber
* @return the AddCommentOptions builder
*/
public Builder caseNumber(String caseNumber) {
this.caseNumber = caseNumber;
return this;
}

/**
* Set the comment.
*
* @param comment the comment
* @return the AddCommentOptions builder
*/
public Builder comment(String comment) {
this.comment = comment;
return this;
}
}

protected AddCommentOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.caseNumber,
"caseNumber cannot be empty");
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.comment,
"comment cannot be null");
caseNumber = builder.caseNumber;
comment = builder.comment;
}

/**
* New builder.
*
* @return a AddCommentOptions builder
*/
public Builder newBuilder() {
return new Builder(this);
}

/**
* Gets the caseNumber.
*
* Unique identifier of a case.
*
* @return the caseNumber
*/
public String caseNumber() {
return caseNumber;
}

/**
* Gets the comment.
*
* Comment to add to the case.
*
* @return the comment
*/
public String comment() {
return comment;
}
}

Loading

0 comments on commit e4b444a

Please sign in to comment.