content: /*
   * Selling Partner API for Catalog Items
   * The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.  For more information, refer to the [Catalog Items API Use Case Guide](doc:catalog-items-api-v2022-04-01-use-case-guide).
   *
   * OpenAPI spec version: 2022-04-01
   *
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   * Do not edit the class manually.
   */
  
  
  package io.swagger.client.auth;
  
  import io.swagger.client.Pair;
  
  import com.squareup.okhttp.Credentials;
  
  import java.util.Map;
  import java.util.List;
  
  import java.io.UnsupportedEncodingException;
  
  public class HttpBasicAuth implements Authentication {
      private String username;
      private String password;
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      @Override
      public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
          if (username == null && password == null) {
              return;
          }
          headerParams.put("Authorization", Credentials.basic(
                  username == null ? "" : username,
                  password == null ? "" : password));
      }
  }
  