// Path: provider/src/main/java/com/cloudera/director/aws/STSAssumeNRolesSessionCredentialsProvider.java
// static public class RoleConfiguration {
//   private final String roleArn;
//   private final String roleSessionName;
//   private final String roleExternalId;
// 
//   /**
//    * Creates an instance of role configuration.
//    *
//    * @param roleArn         role Arn
//    * @param roleSessionName role session name
//    */
//   public RoleConfiguration(String roleArn, String roleSessionName) {
//     this(roleArn, roleSessionName, null);
//   }
// 
//   /**
//    * Creates an instance of role configuration.
//    *
//    * @param roleArn         role Arn
//    * @param roleSessionName role session name
//    * @param roleExternalId  role external Id
//    */
//   public RoleConfiguration(String roleArn, String roleSessionName, String roleExternalId) {
//     checkArgument(!isEmpty(roleArn), "roleArn is empty");
//     checkArgument(!isEmpty(roleSessionName), "roleSessionName is empty");
// 
//     this.roleArn = roleArn;
//     this.roleSessionName = roleSessionName;
//     this.roleExternalId = roleExternalId;
//   }
// 
//   /**
//    * Gets role session name.
//    *
//    * @return role session name
//    */
//   public String getRoleSessionName() {
//     return roleSessionName;
//   }
// 
//   /**
//    * Gets role external Id.
//    *
//    * @return role external Id
//    */
//   public String getRoleExternalId() {
//     return roleExternalId;
//   }
// 
//   /**
//    * Gets role Arn.
//    *
//    * @return role Arn
//    */
//   public String getRoleArn() {
//     return roleArn;
//   }
// 
//   @Override
//   public String toString() {
//     return "RoleConfiguration{" +
//         "roleArn='" + roleArn + '\'' +
//         ", roleSessionName='" + roleSessionName + '\'' +
//         ", roleExternalId='" + roleExternalId + '\'' +
//         '}';
//   }
// }


import static java.util.Objects.requireNonNull;
import com.cloudera.director.aws.STSAssumeNRolesSessionCredentialsProvider.RoleConfiguration;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.typesafe.config.Config;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.annotation.Nonnull;
// (c) Copyright 2017 Cloudera, Inc.
//
// 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.cloudera.director.aws;





/**
 * STS role configuration holder.
 */
public class STSRoles {
  public static final STSRoles DEFAULT = new STSRoles(Collections.emptyList());

  @VisibleForTesting
  static final String ROLE_ARN = "roleArn";
  @VisibleForTesting
  static final String ROLE_SESSION_NAME = "roleSessionName";
  @VisibleForTesting
  static final String ROLE_EXTERNAL_ID = "roleExternalId";

// Path: provider/src/main/java/com/cloudera/director/aws/STSAssumeNRolesSessionCredentialsProvider.java
// static public class RoleConfiguration {
//   private final String roleArn;
//   private final String roleSessionName;
//   private final String roleExternalId;
// 
//   /**
//    * Creates an instance of role configuration.
//    *
//    * @param roleArn         role Arn
//    * @param roleSessionName role session name
//    */
//   public RoleConfiguration(String roleArn, String roleSessionName) {
//     this(roleArn, roleSessionName, null);
//   }
// 
//   /**
//    * Creates an instance of role configuration.
//    *
//    * @param roleArn         role Arn
//    * @param roleSessionName role session name
//    * @param roleExternalId  role external Id
//    */
//   public RoleConfiguration(String roleArn, String roleSessionName, String roleExternalId) {
//     checkArgument(!isEmpty(roleArn), "roleArn is empty");
//     checkArgument(!isEmpty(roleSessionName), "roleSessionName is empty");
// 
//     this.roleArn = roleArn;
//     this.roleSessionName = roleSessionName;
//     this.roleExternalId = roleExternalId;
//   }
// 
//   /**
//    * Gets role session name.
//    *
//    * @return role session name
//    */
//   public String getRoleSessionName() {
//     return roleSessionName;
//   }
// 
//   /**
//    * Gets role external Id.
//    *
//    * @return role external Id
//    */
//   public String getRoleExternalId() {
//     return roleExternalId;
//   }
// 
//   /**
//    * Gets role Arn.
//    *
//    * @return role Arn
//    */
//   public String getRoleArn() {
//     return roleArn;
//   }
// 
//   @Override
//   public String toString() {
//     return "RoleConfiguration{" +
//         "roleArn='" + roleArn + '\'' +
//         ", roleSessionName='" + roleSessionName + '\'' +
//         ", roleExternalId='" + roleExternalId + '\'' +
//         '}';
//   }
// }


// Path: provider/src/main/java/com/cloudera/director/aws/STSRoles.java
import static java.util.Objects.requireNonNull;
import com.cloudera.director.aws.STSAssumeNRolesSessionCredentialsProvider.RoleConfiguration;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.typesafe.config.Config;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.annotation.Nonnull;

// (c) Copyright 2017 Cloudera, Inc.
//
// 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.cloudera.director.aws;





/**
 * STS role configuration holder.
 */
public class STSRoles {
  public static final STSRoles DEFAULT = new STSRoles(Collections.emptyList());

  @VisibleForTesting
  static final String ROLE_ARN = "roleArn";
  @VisibleForTesting
  static final String ROLE_SESSION_NAME = "roleSessionName";
  @VisibleForTesting
  static final String ROLE_EXTERNAL_ID = "roleExternalId";

  private final List<RoleConfiguration> roleConfigurations;