All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.clientlib.TwitterCredentialsOAuth2 Maven / Gradle / Ivy

/*
Copyright 2020 Twitter, Inc.
SPDX-License-Identifier: Apache-2.0

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.

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
https://openapi-generator.tech
Do not edit the class manually.
*/


package com.twitter.clientlib;

public class TwitterCredentialsOAuth2 {

  private String twitterOAuth2ClientId;
  private String twitterOAuth2ClientSecret;
  private String twitterOAuth2AccessToken;
  private String twitterOAuth2RefreshToken;
  private boolean isOAUth2AutoRefreshToken;

  public TwitterCredentialsOAuth2(
      String twitterOAuth2ClientId,
      String twitterOAuth2ClientSecret,
      String twitterOAuth2AccessToken,
      String twitterOAuth2RefreshToken,
      boolean isOAUth2AutoRefreshToken
  ) {
    this.twitterOAuth2ClientId = twitterOAuth2ClientId;
    this.twitterOAuth2ClientSecret = twitterOAuth2ClientSecret;
    this.twitterOAuth2AccessToken = twitterOAuth2AccessToken;
    this.twitterOAuth2RefreshToken = twitterOAuth2RefreshToken;
    this.isOAUth2AutoRefreshToken = isOAUth2AutoRefreshToken;
  }

  public TwitterCredentialsOAuth2(
      String twitterOAuth2ClientId,
      String twitterOAuth2ClientSecret,
      String twitterOAuth2AccessToken,
      String twitterOAuth2RefreshToken
  ) {
    this(twitterOAuth2ClientId, twitterOAuth2ClientSecret, twitterOAuth2AccessToken,
        twitterOAuth2RefreshToken, false);
  }

  public String getTwitterOauth2ClientId() {
    return twitterOAuth2ClientId;
  }

  public void setTwitterOauth2ClientId(String clientId) {
    this.twitterOAuth2ClientId = clientId;
  }

  public String getTwitterOAuth2ClientSecret() {
    return twitterOAuth2ClientSecret;
  }

  public void setTwitterOAuth2ClientSecret(String twitterOAuth2ClientSecret) {
    this.twitterOAuth2ClientSecret = twitterOAuth2ClientSecret;
  }

  public String getTwitterOauth2AccessToken() {
    return twitterOAuth2AccessToken;
  }

  public void setTwitterOauth2AccessToken(String accessToken) {
    this.twitterOAuth2AccessToken = accessToken;
  }

  public boolean isOAuth2AccessToken() {
    return twitterOAuth2ClientId != null && twitterOAuth2AccessToken != null;
  }

  public String getTwitterOauth2RefreshToken() {
    return twitterOAuth2RefreshToken;
  }

  public void setTwitterOauth2RefreshToken(String refreshToken) {
    this.twitterOAuth2RefreshToken = refreshToken;
  }

  public boolean isOAUth2AutoRefreshToken() {
    return this.isOAUth2AutoRefreshToken;
  }

  public void setOAUth2AutoRefreshToken(boolean OAUth2AutoRefreshToken) {
    isOAUth2AutoRefreshToken = OAUth2AutoRefreshToken;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy