content: /*
   * Copyright (C) 2017 MINDORKS NEXTGEN PRIVATE LIMITED
   * 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
   *
   *     https://mindorks.com/license/apache-v2
   *
   * 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 <%= appPackage %>.data.network;
  
  import com.google.gson.annotations.Expose;
  import com.google.gson.annotations.SerializedName;
  import <%= appPackage %>.di.ApiInfo;
  
  import javax.inject.Inject;
  import javax.inject.Singleton;
  
  /**
   * Created by janisharali on 27/01/17.
   */
  
  @Singleton
  public class ApiHeader {
  
      private ProtectedApiHeader mProtectedApiHeader;
      private PublicApiHeader mPublicApiHeader;
  
      @Inject
      public ApiHeader(PublicApiHeader publicApiHeader, ProtectedApiHeader protectedApiHeader) {
          mPublicApiHeader = publicApiHeader;
          mProtectedApiHeader = protectedApiHeader;
      }
  
      public ProtectedApiHeader getProtectedApiHeader() {
          return mProtectedApiHeader;
      }
  
      public PublicApiHeader getPublicApiHeader() {
          return mPublicApiHeader;
      }
  
      public static final class PublicApiHeader {
  
          @Expose
          @SerializedName("api_key")
          private String mApiKey;
  
          @Inject
          public PublicApiHeader(@ApiInfo String apiKey) {
              mApiKey = apiKey;
          }
  
          public String getApiKey() {
              return mApiKey;
          }
  
          public void setApiKey(String apiKey) {
              mApiKey = apiKey;
          }
      }
  
      public static final class ProtectedApiHeader {
  
          @Expose
          @SerializedName("api_key")
          private String mApiKey;
  
          @Expose
          @SerializedName("user_id")
          private Long mUserId;
  
          @Expose
          @SerializedName("access_token")
          private String mAccessToken;
  
          public ProtectedApiHeader(String mApiKey, Long mUserId, String mAccessToken) {
              this.mApiKey = mApiKey;
              this.mUserId = mUserId;
              this.mAccessToken = mAccessToken;
          }
  
          public String getApiKey() {
              return mApiKey;
          }
  
          public void setApiKey(String apiKey) {
              mApiKey = apiKey;
          }
  
          public Long getUserId() {
              return mUserId;
          }
  
          public void setUserId(Long mUserId) {
              this.mUserId = mUserId;
          }
  
          public String getAccessToken() {
              return mAccessToken;
          }
  
          public void setAccessToken(String accessToken) {
              mAccessToken = accessToken;
          }
      }
  }
  