001 002package com.commercetools.api.models.extension; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * <p>The <code>Authorization</code> header will be set to the content of <code>headerValue</code>. The authentication scheme (such as <code>Basic</code> or <code>Bearer</code>) should be included in the <code>headerValue</code>.</p> 019 * <p>For example, the <code>headerValue</code> for Basic Authentication should be set to <code>Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==</code>.</p> 020 */ 021@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 022public class AuthorizationHeaderAuthenticationImpl implements AuthorizationHeaderAuthentication, ModelBase { 023 024 private String type; 025 026 private String headerValue; 027 028 /** 029 * create instance with all properties 030 */ 031 @JsonCreator 032 AuthorizationHeaderAuthenticationImpl(@JsonProperty("headerValue") final String headerValue) { 033 this.headerValue = headerValue; 034 this.type = AUTHORIZATION_HEADER; 035 } 036 037 /** 038 * create empty instance 039 */ 040 public AuthorizationHeaderAuthenticationImpl() { 041 this.type = AUTHORIZATION_HEADER; 042 } 043 044 /** 045 * 046 */ 047 048 public String getType() { 049 return this.type; 050 } 051 052 /** 053 * <p>Partially hidden on retrieval for security reasons.</p> 054 */ 055 056 public String getHeaderValue() { 057 return this.headerValue; 058 } 059 060 public void setHeaderValue(final String headerValue) { 061 this.headerValue = headerValue; 062 } 063 064 @Override 065 public boolean equals(Object o) { 066 if (this == o) 067 return true; 068 069 if (o == null || getClass() != o.getClass()) 070 return false; 071 072 AuthorizationHeaderAuthenticationImpl that = (AuthorizationHeaderAuthenticationImpl) o; 073 074 return new EqualsBuilder().append(type, that.type).append(headerValue, that.headerValue).isEquals(); 075 } 076 077 @Override 078 public int hashCode() { 079 return new HashCodeBuilder(17, 37).append(type).append(headerValue).toHashCode(); 080 } 081 082}