Aqara Home v2.4.1版本的 MD5 值为:529779ac2bc0131db52a1fc3098d2b35
以下内容为反编译后的 Principal.java 源代码,内容仅作参考
package com.amazonaws.auth.policy;
import com.amazonaws.auth.policy.internal.JsonPolicyReader;
public class Principal {
public static final Principal c = new Principal("AWS", "*");
public static final Principal d = new Principal("Service", "*");
public static final Principal f2154e = new Principal(JsonPolicyReader.d, "*");
public static final Principal f2155f = new Principal("*", "*");
public final String a;
public final String b;
public enum Services {
AWSDataPipeline("datapipeline.amazonaws.com"),
AmazonElasticTranscoder("elastictranscoder.amazonaws.com"),
AmazonEC2("ec2.amazonaws.com"),
AWSOpsWorks("opsworks.amazonaws.com"),
AWSCloudHSM("cloudhsm.amazonaws.com"),
AllServices("*");
public String serviceId;
Services(String str) {
this.serviceId = str;
}
public static Services fromString(String str) {
Services[] values;
if (str != null) {
for (Services services : values()) {
if (services.getServiceId().equalsIgnoreCase(str)) {
return services;
}
}
return null;
}
return null;
}
public String getServiceId() {
return this.serviceId;
}
}
public enum WebIdentityProviders {
Facebook("graph.facebook.com"),
Google("accounts.google.com"),
Amazon("www.amazon.com"),
AllProviders("*");
public String webIdentityProvider;
WebIdentityProviders(String str) {
this.webIdentityProvider = str;
}
public static WebIdentityProviders fromString(String str) {
WebIdentityProviders[] values;
if (str != null) {
for (WebIdentityProviders webIdentityProviders : values()) {
if (webIdentityProviders.getWebIdentityProvider().equalsIgnoreCase(str)) {
return webIdentityProviders;
}
}
return null;
}
return null;
}
public String getWebIdentityProvider() {
return this.webIdentityProvider;
}
}
public Principal(Services services) {
if (services != null) {
this.a = services.getServiceId();
this.b = "Service";
return;
}
throw new IllegalArgumentException("Null AWS service name specified");
}
public String a() {
return this.a;
}
public String b() {
return this.b;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj != null && (obj instanceof Principal)) {
Principal principal = (Principal) obj;
return b().equals(principal.b()) && a().equals(principal.a());
}
return false;
}
public int hashCode() {
return ((this.b.hashCode() + 31) * 31) + this.a.hashCode();
}
public Principal(String str, String str2) {
this.b = str;
this.a = "AWS".equals(str) ? str2.replaceAll("-", "") : str2;
}
public Principal(String str) {
if (str != null) {
this.a = str.replaceAll("-", "");
this.b = "AWS";
return;
}
throw new IllegalArgumentException("Null AWS account ID specified");
}
public Principal(WebIdentityProviders webIdentityProviders) {
if (webIdentityProviders != null) {
this.a = webIdentityProviders.getWebIdentityProvider();
this.b = JsonPolicyReader.d;
return;
}
throw new IllegalArgumentException("Null web identity provider specified");
}
}