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

io.camunda.connector.model.MSTeamsRequest Maven / Gradle / Ivy

There is a newer version: 8.6.2
Show newest version
/*
 * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
 * under one or more contributor license agreements. Licensed under a proprietary license.
 * See the License.txt file for more information. You may not use this file
 * except in compliance with the proprietary license.
 */
package io.camunda.connector.model;

import io.camunda.connector.model.authentication.MSTeamsAuthentication;
import io.camunda.connector.model.request.MSTeamsRequestData;
import io.camunda.connector.suppliers.GraphServiceClientSupplier;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.Objects;

public class MSTeamsRequest {

  @Valid @NotNull private MSTeamsAuthentication authentication;
  @Valid @NotNull private MSTeamsRequestData data;

  public Object invoke(final GraphServiceClientSupplier graphSupplier) {
    return data.invoke(authentication.buildAndGetGraphServiceClient(graphSupplier));
  }

  public MSTeamsAuthentication getAuthentication() {
    return authentication;
  }

  public void setAuthentication(final MSTeamsAuthentication authentication) {
    this.authentication = authentication;
  }

  public MSTeamsRequestData getData() {
    return data;
  }

  public void setData(final MSTeamsRequestData data) {
    this.data = data;
  }

  @Override
  public boolean equals(final Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    final MSTeamsRequest that = (MSTeamsRequest) o;
    return Objects.equals(authentication, that.authentication) && Objects.equals(data, that.data);
  }

  @Override
  public int hashCode() {
    return Objects.hash(authentication, data);
  }

  @Override
  public String toString() {
    return "MSTeamsRequest{" + "authentication=" + authentication + ", data=" + data + "}";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy