Skip to content

Commit

Permalink
feat(User Management): add service to project (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: Mahak <[email protected]>
  • Loading branch information
padamstx and mahakAg authored Aug 26, 2020
1 parent 823846a commit 95bea0c
Show file tree
Hide file tree
Showing 39 changed files with 4,531 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Service Name | Artifact Coordinates
[Open Service Broker](https://cloud.ibm.com/apidocs/resource-controller/ibm-cloud-osb-api) | com.ibm.cloud:open-service-broker:0.10.0
[Resource Controller](https://cloud.ibm.com/apidocs/resource-controller/resource-controller) | com.ibm.cloud:resource-controller:0.10.0
[Resource Manager](https://cloud.ibm.com/apidocs/resource-controller/resource-manager) | com.ibm.cloud:resource-manager:0.10.0
[User Management](https://cloud.ibm.com/apidocs/user-management) | com.ibm.cloud:user-management:0.10.0

## Prerequisites

Expand Down
5 changes: 5 additions & 0 deletions modules/coverage-reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
<artifactId>resource-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>user-management</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
78 changes: 78 additions & 0 deletions modules/user-management/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<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>user-management</artifactId>

<!-- >>> Replace this with a text description of this module (e.g. "Example Service") -->
<name>IBM Cloud User Management API</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.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
<dependency>
<groupId>com.cloudant</groupId>
<artifactId>cloudant-client</artifactId>
<version>2.19.0</version>
</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>

<developers>
<developer>
<name>IBM Cloud DevX SDK Development</name>
<email>[email protected]</email>
<url>https://www.ibm.com/</url>
</developer>
</developers>

</project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
* (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.user_management.v1.model;

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

/**
* Attribute.
*/
public class Attribute extends GenericModel {

protected String name;
protected String value;

/**
* Builder.
*/
public static class Builder {
private String name;
private String value;

private Builder(Attribute attribute) {
this.name = attribute.name;
this.value = attribute.value;
}

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

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

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

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

protected Attribute(Builder builder) {
name = builder.name;
value = builder.value;
}

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

/**
* Gets the name.
*
* The name of the attribute.
*
* @return the name
*/
public String name() {
return name;
}

/**
* Gets the value.
*
* The value of the attribute.
*
* @return the value
*/
public String value() {
return value;
}
}

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.user_management.v1.model;

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

/**
* The getUserProfile options.
*/
public class GetUserProfileOptions extends GenericModel {

protected String accountId;
protected String iamId;

/**
* Builder.
*/
public static class Builder {
private String accountId;
private String iamId;

private Builder(GetUserProfileOptions getUserProfileOptions) {
this.accountId = getUserProfileOptions.accountId;
this.iamId = getUserProfileOptions.iamId;
}

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

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

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

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

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

protected GetUserProfileOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.accountId,
"accountId cannot be empty");
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.iamId,
"iamId cannot be empty");
accountId = builder.accountId;
iamId = builder.iamId;
}

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

/**
* Gets the accountId.
*
* The account ID.
*
* @return the accountId
*/
public String accountId() {
return accountId;
}

/**
* Gets the iamId.
*
* The user's IAM ID.
*
* @return the iamId
*/
public String iamId() {
return iamId;
}
}

Loading

0 comments on commit 95bea0c

Please sign in to comment.