use of com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest in project java-bigquerydatatransfer by googleapis.
the class CreatePlayTransfer method createPlayTransfer.
public static void createPlayTransfer(String projectId, TransferConfig transferConfig) throws IOException {
try (DataTransferServiceClient client = DataTransferServiceClient.create()) {
ProjectName parent = ProjectName.of(projectId);
CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder().setParent(parent.toString()).setTransferConfig(transferConfig).build();
TransferConfig config = client.createTransferConfig(request);
System.out.println("play transfer created successfully :" + config.getName());
} catch (ApiException ex) {
System.out.print("play transfer was not created." + ex.toString());
}
}
use of com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest in project java-bigquerydatatransfer by googleapis.
the class CreateTeradataTransfer method createTeradataTransfer.
public static void createTeradataTransfer(String projectId, TransferConfig transferConfig) throws IOException {
try (DataTransferServiceClient client = DataTransferServiceClient.create()) {
ProjectName parent = ProjectName.of(projectId);
CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder().setParent(parent.toString()).setTransferConfig(transferConfig).build();
TransferConfig config = client.createTransferConfig(request);
System.out.println("Cloud teradata transfer created successfully :" + config.getName());
} catch (ApiException ex) {
System.out.print("Cloud teradata transfer was not created." + ex.toString());
}
}
use of com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest in project java-bigquerydatatransfer by googleapis.
the class CreateYoutubeChannelTransfer method createYoutubeChannelTransfer.
public static void createYoutubeChannelTransfer(String projectId, TransferConfig transferConfig) throws IOException {
try (DataTransferServiceClient client = DataTransferServiceClient.create()) {
ProjectName parent = ProjectName.of(projectId);
CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder().setParent(parent.toString()).setTransferConfig(transferConfig).build();
TransferConfig config = client.createTransferConfig(request);
System.out.println("Youtube channel transfer created successfully :" + config.getName());
} catch (ApiException ex) {
System.out.print("Youtube channel transfer was not created." + ex.toString());
}
}
use of com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest in project java-bigquerydatatransfer by googleapis.
the class CreateYoutubeContentOwnerTransfer method createYoutubeContentOwnerTransfer.
public static void createYoutubeContentOwnerTransfer(String projectId, TransferConfig transferConfig) throws IOException {
try (DataTransferServiceClient client = DataTransferServiceClient.create()) {
ProjectName parent = ProjectName.of(projectId);
CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder().setParent(parent.toString()).setTransferConfig(transferConfig).build();
TransferConfig config = client.createTransferConfig(request);
System.out.println("Youtube content owner channel transfer created successfully :" + config.getName());
} catch (ApiException ex) {
System.out.print("Youtube content owner channel transfer was not created." + ex.toString());
}
}
use of com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest in project java-bigquerydatatransfer by googleapis.
the class CreateAdManagerTransfer method createAdManagerTransfer.
public static void createAdManagerTransfer(String projectId, TransferConfig transferConfig) throws IOException {
try (DataTransferServiceClient client = DataTransferServiceClient.create()) {
ProjectName parent = ProjectName.of(projectId);
CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder().setParent(parent.toString()).setTransferConfig(transferConfig).build();
TransferConfig config = client.createTransferConfig(request);
System.out.println("Ad manager transfer created successfully :" + config.getName());
} catch (ApiException ex) {
System.out.print("Ad manager transfer was not created." + ex.toString());
}
}
Aggregations