
org.cloudfoundry.spring.util.network.ConnectionContext Maven / Gradle / Ivy
The newest version!
// Generated by delombok at Sat Jun 18 07:22:04 PDT 2016
/*
* Copyright 2013-2016 the original author or authors.
*
* 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 org.cloudfoundry.spring.util.network;
import org.cloudfoundry.client.CloudFoundryClient;
import org.springframework.security.oauth2.client.OAuth2ClientContext;
import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
/**
* A type encapsulating networking types that are shared between clients
*/
public final class ConnectionContext {
private final OAuth2ClientContext clientContext;
private final CloudFoundryClient cloudFoundryClient;
private final HostnameVerifier hostnameVerifier;
private final OAuth2ProtectedResourceDetails protectedResourceDetails;
private final SslCertificateTruster sslCertificateTruster;
private final SSLContext sslContext;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
ConnectionContext(final OAuth2ClientContext clientContext, final CloudFoundryClient cloudFoundryClient, final HostnameVerifier hostnameVerifier, final OAuth2ProtectedResourceDetails protectedResourceDetails, final SslCertificateTruster sslCertificateTruster, final SSLContext sslContext) {
this.clientContext = clientContext;
this.cloudFoundryClient = cloudFoundryClient;
this.hostnameVerifier = hostnameVerifier;
this.protectedResourceDetails = protectedResourceDetails;
this.sslCertificateTruster = sslCertificateTruster;
this.sslContext = sslContext;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public static class ConnectionContextBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private OAuth2ClientContext clientContext;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private CloudFoundryClient cloudFoundryClient;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private HostnameVerifier hostnameVerifier;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private OAuth2ProtectedResourceDetails protectedResourceDetails;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private SslCertificateTruster sslCertificateTruster;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private SSLContext sslContext;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
ConnectionContextBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder clientContext(final OAuth2ClientContext clientContext) {
this.clientContext = clientContext;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder cloudFoundryClient(final CloudFoundryClient cloudFoundryClient) {
this.cloudFoundryClient = cloudFoundryClient;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder hostnameVerifier(final HostnameVerifier hostnameVerifier) {
this.hostnameVerifier = hostnameVerifier;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder protectedResourceDetails(final OAuth2ProtectedResourceDetails protectedResourceDetails) {
this.protectedResourceDetails = protectedResourceDetails;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder sslCertificateTruster(final SslCertificateTruster sslCertificateTruster) {
this.sslCertificateTruster = sslCertificateTruster;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder sslContext(final SSLContext sslContext) {
this.sslContext = sslContext;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContext build() {
return new ConnectionContext(clientContext, cloudFoundryClient, hostnameVerifier, protectedResourceDetails, sslCertificateTruster, sslContext);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "ConnectionContext.ConnectionContextBuilder(clientContext=" + this.clientContext + ", cloudFoundryClient=" + this.cloudFoundryClient + ", hostnameVerifier=" + this.hostnameVerifier + ", protectedResourceDetails=" + this.protectedResourceDetails + ", sslCertificateTruster=" + this.sslCertificateTruster + ", sslContext=" + this.sslContext + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public static ConnectionContextBuilder builder() {
return new ConnectionContextBuilder();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ConnectionContextBuilder toBuilder() {
return new ConnectionContextBuilder().clientContext(this.clientContext).cloudFoundryClient(this.cloudFoundryClient).hostnameVerifier(this.hostnameVerifier).protectedResourceDetails(this.protectedResourceDetails).sslCertificateTruster(this.sslCertificateTruster).sslContext(this.sslContext);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public OAuth2ClientContext getClientContext() {
return this.clientContext;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CloudFoundryClient getCloudFoundryClient() {
return this.cloudFoundryClient;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public HostnameVerifier getHostnameVerifier() {
return this.hostnameVerifier;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public OAuth2ProtectedResourceDetails getProtectedResourceDetails() {
return this.protectedResourceDetails;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SslCertificateTruster getSslCertificateTruster() {
return this.sslCertificateTruster;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SSLContext getSslContext() {
return this.sslContext;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof ConnectionContext)) return false;
final ConnectionContext other = (ConnectionContext) o;
final java.lang.Object this$clientContext = this.getClientContext();
final java.lang.Object other$clientContext = other.getClientContext();
if (this$clientContext == null ? other$clientContext != null : !this$clientContext.equals(other$clientContext)) return false;
final java.lang.Object this$cloudFoundryClient = this.getCloudFoundryClient();
final java.lang.Object other$cloudFoundryClient = other.getCloudFoundryClient();
if (this$cloudFoundryClient == null ? other$cloudFoundryClient != null : !this$cloudFoundryClient.equals(other$cloudFoundryClient)) return false;
final java.lang.Object this$hostnameVerifier = this.getHostnameVerifier();
final java.lang.Object other$hostnameVerifier = other.getHostnameVerifier();
if (this$hostnameVerifier == null ? other$hostnameVerifier != null : !this$hostnameVerifier.equals(other$hostnameVerifier)) return false;
final java.lang.Object this$protectedResourceDetails = this.getProtectedResourceDetails();
final java.lang.Object other$protectedResourceDetails = other.getProtectedResourceDetails();
if (this$protectedResourceDetails == null ? other$protectedResourceDetails != null : !this$protectedResourceDetails.equals(other$protectedResourceDetails)) return false;
final java.lang.Object this$sslCertificateTruster = this.getSslCertificateTruster();
final java.lang.Object other$sslCertificateTruster = other.getSslCertificateTruster();
if (this$sslCertificateTruster == null ? other$sslCertificateTruster != null : !this$sslCertificateTruster.equals(other$sslCertificateTruster)) return false;
final java.lang.Object this$sslContext = this.getSslContext();
final java.lang.Object other$sslContext = other.getSslContext();
if (this$sslContext == null ? other$sslContext != null : !this$sslContext.equals(other$sslContext)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $clientContext = this.getClientContext();
result = result * PRIME + ($clientContext == null ? 43 : $clientContext.hashCode());
final java.lang.Object $cloudFoundryClient = this.getCloudFoundryClient();
result = result * PRIME + ($cloudFoundryClient == null ? 43 : $cloudFoundryClient.hashCode());
final java.lang.Object $hostnameVerifier = this.getHostnameVerifier();
result = result * PRIME + ($hostnameVerifier == null ? 43 : $hostnameVerifier.hashCode());
final java.lang.Object $protectedResourceDetails = this.getProtectedResourceDetails();
result = result * PRIME + ($protectedResourceDetails == null ? 43 : $protectedResourceDetails.hashCode());
final java.lang.Object $sslCertificateTruster = this.getSslCertificateTruster();
result = result * PRIME + ($sslCertificateTruster == null ? 43 : $sslCertificateTruster.hashCode());
final java.lang.Object $sslContext = this.getSslContext();
result = result * PRIME + ($sslContext == null ? 43 : $sslContext.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "ConnectionContext(clientContext=" + this.getClientContext() + ", cloudFoundryClient=" + this.getCloudFoundryClient() + ", hostnameVerifier=" + this.getHostnameVerifier() + ", protectedResourceDetails=" + this.getProtectedResourceDetails() + ", sslCertificateTruster=" + this.getSslCertificateTruster() + ", sslContext=" + this.getSslContext() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy