/**
   * Update the translations of a DynamicInputModel
   * @param fieldModel
   */
private updateFieldTranslation(fieldModel: DynamicFormControlModel) {
    fieldModel.label = this.translate.instant(this.LABEL_KEY_PREFIX + fieldModel.id);
    if (isNotEmpty(fieldModel.validators)) {
      fieldModel.errorMessages = {};
      Object.keys(fieldModel.validators).forEach((key) => {
        fieldModel.errorMessages[key] = this.translate.instant(this.ERROR_KEY_PREFIX + fieldModel.id + '.' + key);
      });
    }
    if (fieldModel instanceof DynamicOptionControlModel) {
      if (isNotEmpty(fieldModel.options)) {
        fieldModel.options.forEach((option) => {
          if (hasNoValue(option.label)) {
            option.label = this.translate.instant(this.OPTIONS_KEY_PREFIX + fieldModel.id + '.' + option.value);
          }
        });
      }
    }
  }


/**
   * Fired whenever the form receives an update and makes sure the Content Source and field update is up-to-date with the changes
   * @param event
   */
onChange(event) {
    this.updateContentSourceField(event.model, true);
    this.saveFieldUpdate();
  }


/**
   * Submit the edited Content Source to the REST API, re-initialize the field update and display a notification
   */
onSubmit() {
    // Remove cached harvester request to allow for latest harvester to be displayed when switching tabs
    this.collectionRD$.pipe(
      getFirstSucceededRemoteData(),
      map((col) => col.payload.uuid),
      switchMap((uuid) => this.collectionService.getHarvesterEndpoint(uuid)),
      take(1)
    ).subscribe((endpoint) => this.requestService.removeByHrefSubstring(endpoint));
    this.requestService.setStaleByHrefSubstring(this.contentSource._links.self.href);
    // Update harvester
    this.collectionRD$.pipe(
      getFirstSucceededRemoteData(),
      switchMap((coll) => this.updateCollection(coll.payload) as Observable<string>),
      take(1),
      switchMap((uuid) => this.collectionService.updateContentSource(uuid, this.contentSource)),
      take(1)
    ).subscribe((result: ContentSource | INotification) => {
      if (hasValue((result as any).harvestType)) {
        this.clearNotifications();
        this.initializeOriginalContentSource(result as ContentSource);
        this.displayedNotifications.push(this.notificationsService.success(this.getNotificationTitle('saved'), this.getNotificationContent('saved')));
      } else {
        this.displayedNotifications.push(result as INotification);
      }
    });
  }


updateCollection(collection: Collection): Observable<string|Observable<never>> {

    const operations: Operation[] = [];
    this.addOperation(operations, this.adminEmailModel, 'cris.harvesting.email', collection);
    this.addOperation(operations, this.preTransformModel, 'cris.harvesting.preTransform', collection);
    this.addOperation(operations, this.postTransformModel, 'cris.harvesting.postTransform', collection);
    this.addOperation(operations, this.itemValidationEnabledModel, 'cris.harvesting.itemValidationEnabled', collection);
    this.addOperation(operations, this.recordValidationEnabledModel, 'cris.harvesting.recordValidationEnabled', collection);
    this.addOperation(operations, this.forceSynchronizationModel, 'cris.harvesting.forceSynchronization', collection);

    operations.push({
      op: 'remove',
      path: '/metadata/cris.harvesting.ccAddress'
    });

    if (this.ccAddressesModel.value) {
      this.ccAddressesModel.value.toString().split(',')
        .map((address) => address.trim())
        .forEach((address) =>  operations.push({
          op: 'add',
          value: address,
          path: '/metadata/cris.harvesting.ccAddress'
        }));
    }

    return this.collectionService.patch(collection, operations).pipe(
      getFirstCompletedRemoteData(),
      map((response) => {
        if (!response.isSuccess) {
          return throwError('The collection update fails');
        }
        return collection.uuid;
      }));
  }


addOperation(operations: Operation[], inputModel: any, metadata: string, collection: Collection) {
    const value = inputModel.value;
    if (value) {
      operations.push({
        op: 'replace',
        value: value + '',
        path: '/metadata/' + metadata
      });
    } else if (collection.hasMetadata(metadata)) {
      operations.push({
        op: 'remove',
        path: '/metadata/' + metadata
      });
    }
  }


/**
   * Cancel the edit and return to the previous page
   */
onCancel() {
    this.location.back();
  }


/**
   * Is the current form valid to be submitted ?
   */
isValid(): boolean {
    return (this.contentSource.harvestType === ContentSourceHarvestType.None) || this.formGroup.valid;
  }


/**
   * Switch the external source on or off and fire a field update
   */
changeExternalSource() {
    if (this.contentSource.harvestType === ContentSourceHarvestType.None) {
      this.contentSource.harvestType = this.previouslySelectedHarvestType;
    } else {
      this.previouslySelectedHarvestType = this.contentSource.harvestType;
      this.contentSource.harvestType = ContentSourceHarvestType.None;
    }
    this.updateContentSource(false);
  }


/**
   * Loop over all inputs and update the Content Source with their value
   * @param updateHarvestType   When set to false, the harvestType of the contentSource will be ignored in the update
   */
updateContentSource(updateHarvestType: boolean) {
    this.inputModels.forEach(
      (fieldModel: DynamicInputModel) => {
        this.updateContentSourceField(fieldModel, updateHarvestType);
      }
    );
    this.saveFieldUpdate();
  }


/**
   * Update the Content Source with the value from a DynamicInputModel
   * @param fieldModel          The fieldModel to fetch the value from and update the contentSource with
   * @param updateHarvestType   When set to false, the harvestType of the contentSource will be ignored in the update
   */
updateContentSourceField(fieldModel: DynamicInputModel, updateHarvestType: boolean) {
    if (hasValue(fieldModel.value) && !(fieldModel.id === this.harvestTypeModel.id && !updateHarvestType)) {
      this.contentSource[fieldModel.id] = fieldModel.value;
    }
  }


/**
   * Save the current Content Source to the Object Updates cache
   */
saveFieldUpdate() {
    this.objectUpdatesService.saveAddFieldUpdate(this.url, cloneDeep(this.contentSource));
  }


/**
   * Clear possible active notifications
   */
clearNotifications() {
    this.displayedNotifications.forEach((notification: INotification) => {
      this.notificationsService.remove(notification);
    });
    this.displayedNotifications = [];
  }


/**
   * Make sure open subscriptions are closed
   */
ngOnDestroy(): void {
    if (this.updateSub) {
      this.updateSub.unsubscribe();
    }
  }


(config) => {
      let decalParam = this.route.snapshot.queryParams.testDecal // "Forgotten" test parameter to play with different stickers on the delivery box image
      if (config && config.application) {
        if (config.application.name) {
          this.applicationName = config.application.name
        }
        if (config.application.logo) {
          let logo: string = config.application.logo

          if (logo.substring(0, 4) === 'http') {
            logo = decodeURIComponent(logo.substring(logo.lastIndexOf('/') + 1))
          }
          this.logoSrc = 'assets/public/images/' + (decalParam ? decalParam : logo)
        }
      }
      if (decalParam) {
        this.ngZone.runOutsideAngular(() => {
          this.io.socket().emit('verifySvgInjectionChallenge', decalParam)
        })
      }
    }


() => {
          this.io.socket().emit('verifySvgInjectionChallenge', decalParam)
        }


(err) => console.log(err)


(res) => {
      this.membershipCost = res.membershipCost
    }


(err) => {
      this.error = err.error.error
    }


() => this.router.navigate(['/payment', 'deluxe'])


@Component({
  selector: 'app-deluxe-user',
  templateUrl: './deluxe-user.component.html',
  styleUrls: ['./deluxe-user.component.scss']
})

export class DeluxeUserComponent implements OnInit {

  public membershipCost: Number = 0
  public error: string = undefined
  public applicationName = 'OWASP Juice Shop'
  public logoSrc: string = 'assets/public/images/JuiceShop_Logo.png'

  constructor (private router: Router, private userService: UserService, private cookieService: CookieService, private configurationService: ConfigurationService, private route: ActivatedRoute, private ngZone: NgZone, private io: SocketIoService) {
  }

  ngOnInit () {
    this.configurationService.getApplicationConfiguration().subscribe((config) => {
      let decalParam = this.route.snapshot.queryParams.testDecal // "Forgotten" test parameter to play with different stickers on the delivery box image
      if (config && config.application) {
        if (config.application.name) {
          this.applicationName = config.application.name
        }
        if (config.application.logo) {
          let logo: string = config.application.logo

          if (logo.substring(0, 4) === 'http') {
            logo = decodeURIComponent(logo.substring(logo.lastIndexOf('/') + 1))
          }
          this.logoSrc = 'assets/public/images/' + (decalParam ? decalParam : logo)
        }
      }
      if (decalParam) {
        this.ngZone.runOutsideAngular(() => {
          this.io.socket().emit('verifySvgInjectionChallenge', decalParam)
        })
      }
    }, (err) => console.log(err))
    this.userService.deluxeStatus().subscribe((res) => {
      this.membershipCost = res.membershipCost
    }, (err) => {
      this.error = err.error.error
    })
  }

  upgradeToDeluxe () {
    this.ngZone.run(() => this.router.navigate(['/payment', 'deluxe']))
  }
}


ngOnInit () {
    this.configurationService.getApplicationConfiguration().subscribe((config) => {
      let decalParam = this.route.snapshot.queryParams.testDecal // "Forgotten" test parameter to play with different stickers on the delivery box image
      if (config && config.application) {
        if (config.application.name) {
          this.applicationName = config.application.name
        }
        if (config.application.logo) {
          let logo: string = config.application.logo

          if (logo.substring(0, 4) === 'http') {
            logo = decodeURIComponent(logo.substring(logo.lastIndexOf('/') + 1))
          }
          this.logoSrc = 'assets/public/images/' + (decalParam ? decalParam : logo)
        }
      }
      if (decalParam) {
        this.ngZone.runOutsideAngular(() => {
          this.io.socket().emit('verifySvgInjectionChallenge', decalParam)
        })
      }
    }, (err) => console.log(err))
    this.userService.deluxeStatus().subscribe((res) => {
      this.membershipCost = res.membershipCost
    }, (err) => {
      this.error = err.error.error
    })
  }


upgradeToDeluxe () {
    this.ngZone.run(() => this.router.navigate(['/payment', 'deluxe']))
  }


/**
 *
The attributes allowed or specified with a parameter object.

 */
export interface _ParameterAttribute {
  /**
   *
The field identifier.

   */
  key: string;

  /**
   *
The field value, expressed as a String.

   */
  stringValue: string;
}


export type _UnmarshalledParameterAttribute = _ParameterAttribute;


export interface IDummyController {
    getPageByFilter(correlationId: string, filter: FilterParams, paging: PagingParams, callback: (err: any, result: DataPage<Dummy>) => void): void;
    getOneById(correlationId: string, id: string, callback: (err: any, result: Dummy) => void): void;
    create(correlationId: string, entity: Dummy, callback: (err: any, result: Dummy) => void): void;
    update(correlationId: string, entity: Dummy, callback: (err: any, result: Dummy) => void): void;
    deleteById(correlationId: string, id: string, callback: (err: any, result: Dummy) => void): void;
}


(props: IconType) => {
  const { color, size, type, spin, isTpl } = props;

  const MyIcon: React.ForwardRefExoticComponent<Pick<AntdIconProps, AntdIconType> &
    React.RefAttributes<HTMLSpanElement>> = Icon[type];

  return isTpl ? (
    <div style={{ textAlign: 'center' }}


interface IconType extends Omit<IconConfigType, 'spin' | 'color'> {
  isTpl?: boolean;
  spin?: IconConfigType['spin'];
  color?: IconConfigType['color'];
}


@Component({
  selector: 'sf-checkbox-widget',
  template: `<div class="widget form-group">
    <label [attr.for]="id" class="horizontal control-label">
        {{ schema.title }}
    </label>
  <div *ngIf="schema.type!='array'" class="checkbox">
    <label class="horizontal control-label">
      <input
        [formControl]="formProperty"
        [indeterminate]="formProperty.value !== false && formProperty.value !== true ? true :null"
        type="checkbox" [attr.disabled]="schema.readOnly">
      <input *ngIf="schema.readOnly" type="hidden" [formControl]="formProperty">
      {{schema.description}}
    </label>
  </div>
  <ng-container *ngIf="schema.type==='array'">
    <div *ngFor="let option of schema.items.oneOf" class="checkbox">
      <label class="horizontal control-label">
        <input
          value="{{option.enum[0]}}" type="checkbox"
          [attr.disabled]="schema.readOnly"
          (change)="check($event.target.checked, $event.target.value)"
          [attr.checked]="checked[option.enum[0]] ? true : null">
        {{option.description}}
      </label>
    </div>
  </ng-container>
</div>`
})
export class CheckboxComponent extends CheckboxWidget {

}


(entry) => {
				// Set the old value before re-signing
				if (entry instanceof SignedCodeManualSectionPlaceholder) {
					const manualSection = this.manualSections[entry.getName()];
					if (manualSection != null) {
						entry.setPreviousCode(manualSection.code);
					}
				}

				if (entry instanceof SignedCodePlaceholder) {
					return entry.toString();
				}

				return entry;
			}


class SignedCodeBuilder {
	private code: Array<string | SignedCodePlaceholder>;
	private manualSections: Record<string, ManualSectionInfo>;

	constructor() {
		this.code = [];
		this.manualSections = {};
	}

	/**
	 * Add previous code from a previously generated code file.
	 */
	addPreviousCode(code: SignedCode): this {
		this.manualSections = {
			...this.manualSections,
			...code.getManualSections(),
		};
		return this;
	}

	/**
	 * Add a snipet of code.
	 */
	addCode(code: string): this {
		this.code.push(code);
		return this;
	}

	/**
	 * Add a command annotation with the command which defined how the file was
	 * generated.
	 */
	addCommandAnnotation(command: string): this {
		this.code.push(new SignedCodeCommandPlaceholder(command));
		return this;
	}

	/**
	 * Add a hash annotation.
	 */
	addHashAnnotation(): this {
		this.code.push(new SignedCodeHashPlaceholder());
		return this;
	}

	/**
	 * Add a version annotation.
	 */
	addVersionAnnotation(version: number): this {
		this.code.push(new SignedCodeVersionPlaceholder(version));
		return this;
	}

	/**
	 * Generic function to add placeholders.
	 *
	 * Note: This is used by the template engine to add placeholders altogether.
	 */
	addPlaceholder(placeholder: SignedCodePlaceholder): this {
		this.code.push(placeholder);
		return this;
	}

	/**
	 * Sets the code for a manual section by name.
	 *
	 * Note:
	 *   This doesn't add code until a manual section was added to the file
	 *   with the same name.
	 */
	setManualSectionCode(name: string, code: string): this {
		this.manualSections[name] = { code };
		return this;
	}

	/**
	 * Adds a new manual section with name.
	 */
	addManualSection(
		name: string,
		options?: { defaultCode: string; code: string },
	): this {
		this.code.push(
			new SignedCodeManualSectionPlaceholder(
				name,
				options?.code,
				options?.defaultCode,
			),
		);

		return this;
	}

	/**
	 * Get the fully generated code as a signed-code object.
	 */
	getCode(): SignedCode {
		const content = this.code
			.map((entry) => {
				// Set the old value before re-signing
				if (entry instanceof SignedCodeManualSectionPlaceholder) {
					const manualSection = this.manualSections[entry.getName()];
					if (manualSection != null) {
						entry.setPreviousCode(manualSection.code);
					}
				}

				if (entry instanceof SignedCodePlaceholder) {
					return entry.toString();
				}

				return entry;
			})
			.join("");

		const signedContent = new SignedCode(content);
		signedContent.resign();

		return signedContent;
	}

	toString(): string {
		return this.getCode().getContent();
	}
}


/**
	 * Add previous code from a previously generated code file.
	 */
addPreviousCode(code: SignedCode): this {
		this.manualSections = {
			...this.manualSections,
			...code.getManualSections(),
		};
		return this;
	}


/**
	 * Add a snipet of code.
	 */
addCode(code: string): this {
		this.code.push(code);
		return this;
	}


/**
	 * Add a command annotation with the command which defined how the file was
	 * generated.
	 */
addCommandAnnotation(command: string): this {
		this.code.push(new SignedCodeCommandPlaceholder(command));
		return this;
	}


/**
	 * Add a hash annotation.
	 */
addHashAnnotation(): this {
		this.code.push(new SignedCodeHashPlaceholder());
		return this;
	}


/**
	 * Add a version annotation.
	 */
addVersionAnnotation(version: number): this {
		this.code.push(new SignedCodeVersionPlaceholder(version));
		return this;
	}


/**
	 * Generic function to add placeholders.
	 *
	 * Note: This is used by the template engine to add placeholders altogether.
	 */
addPlaceholder(placeholder: SignedCodePlaceholder): this {
		this.code.push(placeholder);
		return this;
	}


/**
	 * Sets the code for a manual section by name.
	 *
	 * Note:
	 *   This doesn't add code until a manual section was added to the file
	 *   with the same name.
	 */
setManualSectionCode(name: string, code: string): this {
		this.manualSections[name] = { code };
		return this;
	}


/**
	 * Adds a new manual section with name.
	 */
addManualSection(
		name: string,
		options?: { defaultCode: string; code: string },
	): this {
		this.code.push(
			new SignedCodeManualSectionPlaceholder(
				name,
				options?.code,
				options?.defaultCode,
			),
		);

		return this;
	}


/**
	 * Get the fully generated code as a signed-code object.
	 */
getCode(): SignedCode {
		const content = this.code
			.map((entry) => {
				// Set the old value before re-signing
				if (entry instanceof SignedCodeManualSectionPlaceholder) {
					const manualSection = this.manualSections[entry.getName()];
					if (manualSection != null) {
						entry.setPreviousCode(manualSection.code);
					}
				}

				if (entry instanceof SignedCodePlaceholder) {
					return entry.toString();
				}

				return entry;
			})
			.join("");

		const signedContent = new SignedCode(content);
		signedContent.resign();

		return signedContent;
	}


toString(): string {
		return this.getCode().getContent();
	}


/**
 * A hook instance for a LDF server-based SPARQL endpoint.
 */
export class HookSparqlEndpointLdf implements Hook {
  public readonly dockerfile: string;
  public readonly dockerfileCache: string;
  public readonly resourceConstraints: DockerResourceConstraints;
  public readonly config: string;
  public readonly portServer: number;
  public readonly portCache: number;
  public readonly workers: number;
  public readonly maxMemory: number;
  public readonly dataset: string;
  public readonly hookSparqlEndpointLdfEngine: Hook;

  public constructor(
    dockerfile: string,
    dockerfileCache: string,
    resourceConstraints: DockerResourceConstraints,
    config: string,
    portServer: number,
    portCache: number,
    workers: number,
    maxMemory: number,
    dataset: string,
    hookSparqlEndpointLdfEngine: Hook,
  ) {
    this.dockerfile = dockerfile;
    this.dockerfileCache = dockerfileCache;
    this.resourceConstraints = resourceConstraints;
    this.config = config;
    this.portServer = portServer;
    this.portCache = portCache;
    this.workers = workers;
    this.maxMemory = maxMemory;
    this.dataset = dataset;
    this.hookSparqlEndpointLdfEngine = hookSparqlEndpointLdfEngine;
  }

  public getDockerImageName(context: ITaskContext, type: string): string {
    return context.docker.imageBuilder.getImageName(context, `sparql-endpoint-ldf-${type}`);
  }

  public async prepare(context: ITaskContext, forceOverwriteGenerated: boolean): Promise<void> {
    // Build server Dockerfile
    context.logger.info(`Building LDF server Docker image`);
    await context.docker.imageBuilder.build({
      cwd: context.experimentPaths.root,
      dockerFile: this.dockerfile,
      auxiliaryFiles: [ this.config ],
      imageName: this.getDockerImageName(context, 'server'),
      buildArgs: {
        SERVER_CONFIG: this.config,
        SERVER_WORKERS: `${this.workers}`,
        MAX_MEMORY: `${this.maxMemory}`,
      },
      logger: context.logger,
    });

    // Build cache Dockerfile
    context.logger.info(`Building LDF server cache Docker image`);
    await context.docker.imageBuilder.build({
      cwd: context.experimentPaths.root,
      dockerFile: this.dockerfileCache,
      imageName: this.getDockerImageName(context, 'cache'),
      logger: context.logger,
    });

    // Prepare LDF engine
    context.logger.info(`Preparing LDF engine hook`);
    await this.hookSparqlEndpointLdfEngine.prepare(context, forceOverwriteGenerated);
  }

  public async start(context: ITaskContext, options?: IHookStartOptions): Promise<ProcessHandler> {
    // Create shared network
    const networkHandler = options?.docker?.network ?
      undefined :
      await context.docker.networkCreator.create({ Name: this.getDockerImageName(context, 'network') });
    const network = options?.docker?.network || networkHandler!.network.id;

    // Determine dataset path
    let datasetPath = this.dataset;
    if (datasetPath.startsWith('generated/')) {
      datasetPath = Path.join(context.experimentPaths.generated, datasetPath.slice(10));
    } else {
      datasetPath = Path.join(context.experimentPaths.root, this.dataset);
    }

    // Start LDF server
    const serverHandler = await context.docker.containerCreator.start({
      containerName: 'ldfserver',
      imageName: this.getDockerImageName(context, 'server'),
      resourceConstraints: this.resourceConstraints,
      hostConfig: {
        Binds: [
          `${datasetPath}:/data/dataset.hdt`,
          `${datasetPath}.index.v1-1:/data/dataset.hdt.index.v1-1`,
        ],
        PortBindings: {
          '3000/tcp': [
            { HostPort: `${this.portServer}` },
          ],
        },
        NetworkMode: network,
      },
      logFilePath: Path.join(context.experimentPaths.output, 'logs', 'sparql-endpoint-ldf-server.txt'),
      statsFilePath: Path.join(context.experimentPaths.output, 'stats-sparql-endpoint-ldf-server.csv'),
    });

    // Start cache proxy
    const cacheHandler = await context.docker.containerCreator.start({
      containerName: 'cache',
      imageName: this.getDockerImageName(context, 'cache'),
      resourceConstraints: this.resourceConstraints,
      hostConfig: {
        Binds: [
          // Ideally, we do this at build time, but impossible due to https://github.com/apocas/dockerode/issues/553
          `${Path.join(context.experimentPaths.input, 'nginx-default')}:/etc/nginx/sites-enabled/default`,
          `${Path.join(context.experimentPaths.input, 'nginx.conf')}:/etc/nginx/nginx.conf`,
        ],
        PortBindings: {
          '80/tcp': [
            { HostPort: `${this.portCache}` },
          ],
        },
        NetworkMode: network,
      },
      logFilePath: Path.join(context.experimentPaths.output, 'logs', 'sparql-endpoint-ldf-cache.txt'),
      statsFilePath: Path.join(context.experimentPaths.output, 'stats-sparql-endpoint-ldf-cache.csv'),
    });

    // Start LDF engine
    const ldfEngineHandler = await this.hookSparqlEndpointLdfEngine.start(context, { docker: { network }});

    return new ProcessHandlerComposite([
      ldfEngineHandler,
      cacheHandler,
      serverHandler,
      ...networkHandler ? [ networkHandler ] : [],
    ]);
  }

  public async clean(context: ITaskContext, cleanTargets: ICleanTargets): Promise<void> {
    await this.hookSparqlEndpointLdfEngine.clean(context, cleanTargets);

    if (cleanTargets.docker) {
      await context.docker.networkCreator.remove(this.getDockerImageName(context, 'network'));
      await context.docker.containerCreator.remove('ldfserver');
      await context.docker.containerCreator.remove('cache');
    }
  }
}


public getDockerImageName(context: ITaskContext, type: string): string {
    return context.docker.imageBuilder.getImageName(context, `sparql-endpoint-ldf-${type}`);
  }


public async prepare(context: ITaskContext, forceOverwriteGenerated: boolean): Promise<void> {
    // Build server Dockerfile
    context.logger.info(`Building LDF server Docker image`);
    await context.docker.imageBuilder.build({
      cwd: context.experimentPaths.root,
      dockerFile: this.dockerfile,
      auxiliaryFiles: [ this.config ],
      imageName: this.getDockerImageName(context, 'server'),
      buildArgs: {
        SERVER_CONFIG: this.config,
        SERVER_WORKERS: `${this.workers}`,
        MAX_MEMORY: `${this.maxMemory}`,
      },
      logger: context.logger,
    });

    // Build cache Dockerfile
    context.logger.info(`Building LDF server cache Docker image`);
    await context.docker.imageBuilder.build({
      cwd: context.experimentPaths.root,
      dockerFile: this.dockerfileCache,
      imageName: this.getDockerImageName(context, 'cache'),
      logger: context.logger,
    });

    // Prepare LDF engine
    context.logger.info(`Preparing LDF engine hook`);
    await this.hookSparqlEndpointLdfEngine.prepare(context, forceOverwriteGenerated);
  }


public async start(context: ITaskContext, options?: IHookStartOptions): Promise<ProcessHandler> {
    // Create shared network
    const networkHandler = options?.docker?.network ?
      undefined :
      await context.docker.networkCreator.create({ Name: this.getDockerImageName(context, 'network') });
    const network = options?.docker?.network || networkHandler!.network.id;

    // Determine dataset path
    let datasetPath = this.dataset;
    if (datasetPath.startsWith('generated/')) {
      datasetPath = Path.join(context.experimentPaths.generated, datasetPath.slice(10));
    } else {
      datasetPath = Path.join(context.experimentPaths.root, this.dataset);
    }

    // Start LDF server
    const serverHandler = await context.docker.containerCreator.start({
      containerName: 'ldfserver',
      imageName: this.getDockerImageName(context, 'server'),
      resourceConstraints: this.resourceConstraints,
      hostConfig: {
        Binds: [
          `${datasetPath}:/data/dataset.hdt`,
          `${datasetPath}.index.v1-1:/data/dataset.hdt.index.v1-1`,
        ],
        PortBindings: {
          '3000/tcp': [
            { HostPort: `${this.portServer}` },
          ],
        },
        NetworkMode: network,
      },
      logFilePath: Path.join(context.experimentPaths.output, 'logs', 'sparql-endpoint-ldf-server.txt'),
      statsFilePath: Path.join(context.experimentPaths.output, 'stats-sparql-endpoint-ldf-server.csv'),
    });

    // Start cache proxy
    const cacheHandler = await context.docker.containerCreator.start({
      containerName: 'cache',
      imageName: this.getDockerImageName(context, 'cache'),
      resourceConstraints: this.resourceConstraints,
      hostConfig: {
        Binds: [
          // Ideally, we do this at build time, but impossible due to https://github.com/apocas/dockerode/issues/553
          `${Path.join(context.experimentPaths.input, 'nginx-default')}:/etc/nginx/sites-enabled/default`,
          `${Path.join(context.experimentPaths.input, 'nginx.conf')}:/etc/nginx/nginx.conf`,
        ],
        PortBindings: {
          '80/tcp': [
            { HostPort: `${this.portCache}` },
          ],
        },
        NetworkMode: network,
      },
      logFilePath: Path.join(context.experimentPaths.output, 'logs', 'sparql-endpoint-ldf-cache.txt'),
      statsFilePath: Path.join(context.experimentPaths.output, 'stats-sparql-endpoint-ldf-cache.csv'),
    });

    // Start LDF engine
    const ldfEngineHandler = await this.hookSparqlEndpointLdfEngine.start(context, { docker: { network }});

    return new ProcessHandlerComposite([
      ldfEngineHandler,
      cacheHandler,
      serverHandler,
      ...networkHandler ? [ networkHandler ] : [],
    ]);
  }


public async clean(context: ITaskContext, cleanTargets: ICleanTargets): Promise<void> {
    await this.hookSparqlEndpointLdfEngine.clean(context, cleanTargets);

    if (cleanTargets.docker) {
      await context.docker.networkCreator.remove(this.getDockerImageName(context, 'network'));
      await context.docker.containerCreator.remove('ldfserver');
      await context.docker.containerCreator.remove('cache');
    }
  }


/**
     * Admin Directory API
     *
     * Manages enterprise resources such as users and groups, administrative
     * notifications, security features, and more.
     *
     * @example
     * const {google} = require('googleapis');
     * const admin = google.admin('directory_v1');
     *
     * @namespace admin
     * @type {Function}
     * @version directory_v1
     * @variation directory_v1
     * @param {object=} options Options for Admin
     */
class Admin {
        context: APIRequestContext;
        asps: Resource$Asps;
        channels: Resource$Channels;
        chromeosdevices: Resource$Chromeosdevices;
        customers: Resource$Customers;
        domainAliases: Resource$Domainaliases;
        domains: Resource$Domains;
        groups: Resource$Groups;
        members: Resource$Members;
        mobiledevices: Resource$Mobiledevices;
        notifications: Resource$Notifications;
        orgunits: Resource$Orgunits;
        privileges: Resource$Privileges;
        resolvedAppAccessSettings: Resource$Resolvedappaccesssettings;
        resources: Resource$Resources;
        roleAssignments: Resource$Roleassignments;
        roles: Resource$Roles;
        schemas: Resource$Schemas;
        tokens: Resource$Tokens;
        users: Resource$Users;
        verificationCodes: Resource$Verificationcodes;
        constructor(options: GlobalOptions, google?: GoogleConfigurable);
    }


class Resource$Asps {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.asps.delete
         * @desc Delete an ASP issued by a user.
         * @alias directory.asps.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {integer} params.codeId The unique ID of the ASP to be deleted.
         * @param {string} params.userKey Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Asps$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Asps$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Asps$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.asps.get
         * @desc Get information about an ASP issued by a user.
         * @alias directory.asps.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {integer} params.codeId The unique ID of the ASP.
         * @param {string} params.userKey Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Asps$Get, options?: MethodOptions): GaxiosPromise<Schema$Asp>;
        get(params: Params$Resource$Asps$Get, options: MethodOptions | BodyResponseCallback<Schema$Asp>, callback: BodyResponseCallback<Schema$Asp>): void;
        get(params: Params$Resource$Asps$Get, callback: BodyResponseCallback<Schema$Asp>): void;
        get(callback: BodyResponseCallback<Schema$Asp>): void;
        /**
         * directory.asps.list
         * @desc List the ASPs issued by a user.
         * @alias directory.asps.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.userKey Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Asps$List, options?: MethodOptions): GaxiosPromise<Schema$Asps>;
        list(params: Params$Resource$Asps$List, options: MethodOptions | BodyResponseCallback<Schema$Asps>, callback: BodyResponseCallback<Schema$Asps>): void;
        list(params: Params$Resource$Asps$List, callback: BodyResponseCallback<Schema$Asps>): void;
        list(callback: BodyResponseCallback<Schema$Asps>): void;
    }


class Resource$Channels {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * admin.channels.stop
         * @desc Stop watching resources through this channel
         * @alias admin.channels.stop
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {().Channel} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        stop(params?: Params$Resource$Channels$Stop, options?: MethodOptions): GaxiosPromise<void>;
        stop(params: Params$Resource$Channels$Stop, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        stop(params: Params$Resource$Channels$Stop, callback: BodyResponseCallback<void>): void;
        stop(callback: BodyResponseCallback<void>): void;
    }


class Resource$Customers {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.customers.get
         * @desc Retrieves a customer.
         * @alias directory.customers.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerKey Id of the customer to be retrieved
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Customers$Get, options?: MethodOptions): GaxiosPromise<Schema$Customer>;
        get(params: Params$Resource$Customers$Get, options: MethodOptions | BodyResponseCallback<Schema$Customer>, callback: BodyResponseCallback<Schema$Customer>): void;
        get(params: Params$Resource$Customers$Get, callback: BodyResponseCallback<Schema$Customer>): void;
        get(callback: BodyResponseCallback<Schema$Customer>): void;
        /**
         * directory.customers.patch
         * @desc Updates a customer. This method supports patch semantics.
         * @alias directory.customers.patch
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerKey Id of the customer to be updated
         * @param {().Customer} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        patch(params?: Params$Resource$Customers$Patch, options?: MethodOptions): GaxiosPromise<Schema$Customer>;
        patch(params: Params$Resource$Customers$Patch, options: MethodOptions | BodyResponseCallback<Schema$Customer>, callback: BodyResponseCallback<Schema$Customer>): void;
        patch(params: Params$Resource$Customers$Patch, callback: BodyResponseCallback<Schema$Customer>): void;
        patch(callback: BodyResponseCallback<Schema$Customer>): void;
        /**
         * directory.customers.update
         * @desc Updates a customer.
         * @alias directory.customers.update
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerKey Id of the customer to be updated
         * @param {().Customer} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        update(params?: Params$Resource$Customers$Update, options?: MethodOptions): GaxiosPromise<Schema$Customer>;
        update(params: Params$Resource$Customers$Update, options: MethodOptions | BodyResponseCallback<Schema$Customer>, callback: BodyResponseCallback<Schema$Customer>): void;
        update(params: Params$Resource$Customers$Update, callback: BodyResponseCallback<Schema$Customer>): void;
        update(callback: BodyResponseCallback<Schema$Customer>): void;
    }


class Resource$Domainaliases {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.domainAliases.delete
         * @desc Deletes a Domain Alias of the customer.
         * @alias directory.domainAliases.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string} params.domainAliasName Name of domain alias to be retrieved.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Domainaliases$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Domainaliases$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Domainaliases$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.domainAliases.get
         * @desc Retrieves a domain alias of the customer.
         * @alias directory.domainAliases.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string} params.domainAliasName Name of domain alias to be retrieved.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Domainaliases$Get, options?: MethodOptions): GaxiosPromise<Schema$DomainAlias>;
        get(params: Params$Resource$Domainaliases$Get, options: MethodOptions | BodyResponseCallback<Schema$DomainAlias>, callback: BodyResponseCallback<Schema$DomainAlias>): void;
        get(params: Params$Resource$Domainaliases$Get, callback: BodyResponseCallback<Schema$DomainAlias>): void;
        get(callback: BodyResponseCallback<Schema$DomainAlias>): void;
        /**
         * directory.domainAliases.insert
         * @desc Inserts a Domain alias of the customer.
         * @alias directory.domainAliases.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {().DomainAlias} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Domainaliases$Insert, options?: MethodOptions): GaxiosPromise<Schema$DomainAlias>;
        insert(params: Params$Resource$Domainaliases$Insert, options: MethodOptions | BodyResponseCallback<Schema$DomainAlias>, callback: BodyResponseCallback<Schema$DomainAlias>): void;
        insert(params: Params$Resource$Domainaliases$Insert, callback: BodyResponseCallback<Schema$DomainAlias>): void;
        insert(callback: BodyResponseCallback<Schema$DomainAlias>): void;
        /**
         * directory.domainAliases.list
         * @desc Lists the domain aliases of the customer.
         * @alias directory.domainAliases.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string=} params.parentDomainName Name of the parent domain for which domain aliases are to be fetched.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Domainaliases$List, options?: MethodOptions): GaxiosPromise<Schema$DomainAliases>;
        list(params: Params$Resource$Domainaliases$List, options: MethodOptions | BodyResponseCallback<Schema$DomainAliases>, callback: BodyResponseCallback<Schema$DomainAliases>): void;
        list(params: Params$Resource$Domainaliases$List, callback: BodyResponseCallback<Schema$DomainAliases>): void;
        list(callback: BodyResponseCallback<Schema$DomainAliases>): void;
    }


class Resource$Domains {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.domains.delete
         * @desc Deletes a domain of the customer.
         * @alias directory.domains.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string} params.domainName Name of domain to be deleted
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Domains$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Domains$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Domains$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.domains.get
         * @desc Retrieves a domain of the customer.
         * @alias directory.domains.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string} params.domainName Name of domain to be retrieved
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Domains$Get, options?: MethodOptions): GaxiosPromise<Schema$Domains>;
        get(params: Params$Resource$Domains$Get, options: MethodOptions | BodyResponseCallback<Schema$Domains>, callback: BodyResponseCallback<Schema$Domains>): void;
        get(params: Params$Resource$Domains$Get, callback: BodyResponseCallback<Schema$Domains>): void;
        get(callback: BodyResponseCallback<Schema$Domains>): void;
        /**
         * directory.domains.insert
         * @desc Inserts a domain of the customer.
         * @alias directory.domains.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {().Domains} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Domains$Insert, options?: MethodOptions): GaxiosPromise<Schema$Domains>;
        insert(params: Params$Resource$Domains$Insert, options: MethodOptions | BodyResponseCallback<Schema$Domains>, callback: BodyResponseCallback<Schema$Domains>): void;
        insert(params: Params$Resource$Domains$Insert, callback: BodyResponseCallback<Schema$Domains>): void;
        insert(callback: BodyResponseCallback<Schema$Domains>): void;
        /**
         * directory.domains.list
         * @desc Lists the domains of the customer.
         * @alias directory.domains.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Domains$List, options?: MethodOptions): GaxiosPromise<Schema$Domains2>;
        list(params: Params$Resource$Domains$List, options: MethodOptions | BodyResponseCallback<Schema$Domains2>, callback: BodyResponseCallback<Schema$Domains2>): void;
        list(params: Params$Resource$Domains$List, callback: BodyResponseCallback<Schema$Domains2>): void;
        list(callback: BodyResponseCallback<Schema$Domains2>): void;
    }


class Resource$Groups {
        context: APIRequestContext;
        aliases: Resource$Groups$Aliases;
        constructor(context: APIRequestContext);
        /**
         * directory.groups.delete
         * @desc Delete Group
         * @alias directory.groups.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.groupKey Email or immutable ID of the group
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Groups$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Groups$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Groups$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.groups.get
         * @desc Retrieve Group
         * @alias directory.groups.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.groupKey Email or immutable ID of the group
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Groups$Get, options?: MethodOptions): GaxiosPromise<Schema$Group>;
        get(params: Params$Resource$Groups$Get, options: MethodOptions | BodyResponseCallback<Schema$Group>, callback: BodyResponseCallback<Schema$Group>): void;
        get(params: Params$Resource$Groups$Get, callback: BodyResponseCallback<Schema$Group>): void;
        get(callback: BodyResponseCallback<Schema$Group>): void;
        /**
         * directory.groups.insert
         * @desc Create Group
         * @alias directory.groups.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {().Group} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Groups$Insert, options?: MethodOptions): GaxiosPromise<Schema$Group>;
        insert(params: Params$Resource$Groups$Insert, options: MethodOptions | BodyResponseCallback<Schema$Group>, callback: BodyResponseCallback<Schema$Group>): void;
        insert(params: Params$Resource$Groups$Insert, callback: BodyResponseCallback<Schema$Group>): void;
        insert(callback: BodyResponseCallback<Schema$Group>): void;
        /**
         * directory.groups.list
         * @desc Retrieve all groups of a domain or of a user given a userKey
         * (paginated)
         * @alias directory.groups.list
         * @memberOf! ()
         *
         * @param {object=} params Parameters for request
         * @param {string=} params.customer Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.
         * @param {string=} params.domain Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead.
         * @param {integer=} params.maxResults Maximum number of results to return. Default is 200
         * @param {string=} params.orderBy Column to use for sorting results
         * @param {string=} params.pageToken Token to specify next page in the list
         * @param {string=} params.query Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups
         * @param {string=} params.sortOrder Whether to return results in ascending or descending order. Only of use when orderBy is also used
         * @param {string=} params.userKey Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Groups$List, options?: MethodOptions): GaxiosPromise<Schema$Groups>;
        list(params: Params$Resource$Groups$List, options: MethodOptions | BodyResponseCallback<Schema$Groups>, callback: BodyResponseCallback<Schema$Groups>): void;
        list(params: Params$Resource$Groups$List, callback: BodyResponseCallback<Schema$Groups>): void;
        list(callback: BodyResponseCallback<Schema$Groups>): void;
        /**
         * directory.groups.patch
         * @desc Update Group. This method supports patch semantics.
         * @alias directory.groups.patch
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.groupKey Email or immutable ID of the group. If ID, it should match with id of group object
         * @param {().Group} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        patch(params?: Params$Resource$Groups$Patch, options?: MethodOptions): GaxiosPromise<Schema$Group>;
        patch(params: Params$Resource$Groups$Patch, options: MethodOptions | BodyResponseCallback<Schema$Group>, callback: BodyResponseCallback<Schema$Group>): void;
        patch(params: Params$Resource$Groups$Patch, callback: BodyResponseCallback<Schema$Group>): void;
        patch(callback: BodyResponseCallback<Schema$Group>): void;
        /**
         * directory.groups.update
         * @desc Update Group
         * @alias directory.groups.update
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.groupKey Email or immutable ID of the group. If ID, it should match with id of group object
         * @param {().Group} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        update(params?: Params$Resource$Groups$Update, options?: MethodOptions): GaxiosPromise<Schema$Group>;
        update(params: Params$Resource$Groups$Update, options: MethodOptions | BodyResponseCallback<Schema$Group>, callback: BodyResponseCallback<Schema$Group>): void;
        update(params: Params$Resource$Groups$Update, callback: BodyResponseCallback<Schema$Group>): void;
        update(callback: BodyResponseCallback<Schema$Group>): void;
    }


class Resource$Groups$Aliases {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.groups.aliases.delete
         * @desc Remove a alias for the group
         * @alias directory.groups.aliases.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.alias The alias to be removed
         * @param {string} params.groupKey Email or immutable ID of the group
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Groups$Aliases$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Groups$Aliases$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Groups$Aliases$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.groups.aliases.insert
         * @desc Add a alias for the group
         * @alias directory.groups.aliases.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.groupKey Email or immutable ID of the group
         * @param {().Alias} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Groups$Aliases$Insert, options?: MethodOptions): GaxiosPromise<Schema$Alias>;
        insert(params: Params$Resource$Groups$Aliases$Insert, options: MethodOptions | BodyResponseCallback<Schema$Alias>, callback: BodyResponseCallback<Schema$Alias>): void;
        insert(params: Params$Resource$Groups$Aliases$Insert, callback: BodyResponseCallback<Schema$Alias>): void;
        insert(callback: BodyResponseCallback<Schema$Alias>): void;
        /**
         * directory.groups.aliases.list
         * @desc List all aliases for a group
         * @alias directory.groups.aliases.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.groupKey Email or immutable ID of the group
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Groups$Aliases$List, options?: MethodOptions): GaxiosPromise<Schema$Aliases>;
        list(params: Params$Resource$Groups$Aliases$List, options: MethodOptions | BodyResponseCallback<Schema$Aliases>, callback: BodyResponseCallback<Schema$Aliases>): void;
        list(params: Params$Resource$Groups$Aliases$List, callback: BodyResponseCallback<Schema$Aliases>): void;
        list(callback: BodyResponseCallback<Schema$Aliases>): void;
    }


class Resource$Mobiledevices {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.mobiledevices.action
         * @desc Take action on Mobile Device
         * @alias directory.mobiledevices.action
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string} params.resourceId Immutable ID of Mobile Device
         * @param {().MobileDeviceAction} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        action(params?: Params$Resource$Mobiledevices$Action, options?: MethodOptions): GaxiosPromise<void>;
        action(params: Params$Resource$Mobiledevices$Action, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        action(params: Params$Resource$Mobiledevices$Action, callback: BodyResponseCallback<void>): void;
        action(callback: BodyResponseCallback<void>): void;
        /**
         * directory.mobiledevices.delete
         * @desc Delete Mobile Device
         * @alias directory.mobiledevices.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string} params.resourceId Immutable ID of Mobile Device
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Mobiledevices$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Mobiledevices$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Mobiledevices$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.mobiledevices.get
         * @desc Retrieve Mobile Device
         * @alias directory.mobiledevices.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string=} params.projection Restrict information returned to a set of selected fields.
         * @param {string} params.resourceId Immutable ID of Mobile Device
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Mobiledevices$Get, options?: MethodOptions): GaxiosPromise<Schema$MobileDevice>;
        get(params: Params$Resource$Mobiledevices$Get, options: MethodOptions | BodyResponseCallback<Schema$MobileDevice>, callback: BodyResponseCallback<Schema$MobileDevice>): void;
        get(params: Params$Resource$Mobiledevices$Get, callback: BodyResponseCallback<Schema$MobileDevice>): void;
        get(callback: BodyResponseCallback<Schema$MobileDevice>): void;
        /**
         * directory.mobiledevices.list
         * @desc Retrieve all Mobile Devices of a customer (paginated)
         * @alias directory.mobiledevices.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {integer=} params.maxResults Maximum number of results to return. Default is 100
         * @param {string=} params.orderBy Column to use for sorting results
         * @param {string=} params.pageToken Token to specify next page in the list
         * @param {string=} params.projection Restrict information returned to a set of selected fields.
         * @param {string=} params.query Search string in the format given at http://support.google.com/a/bin/answer.py?answer=1408863#search
         * @param {string=} params.sortOrder Whether to return results in ascending or descending order. Only of use when orderBy is also used
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Mobiledevices$List, options?: MethodOptions): GaxiosPromise<Schema$MobileDevices>;
        list(params: Params$Resource$Mobiledevices$List, options: MethodOptions | BodyResponseCallback<Schema$MobileDevices>, callback: BodyResponseCallback<Schema$MobileDevices>): void;
        list(params: Params$Resource$Mobiledevices$List, callback: BodyResponseCallback<Schema$MobileDevices>): void;
        list(callback: BodyResponseCallback<Schema$MobileDevices>): void;
    }


class Resource$Notifications {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.notifications.delete
         * @desc Deletes a notification
         * @alias directory.notifications.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.
         * @param {string} params.notificationId The unique ID of the notification.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Notifications$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Notifications$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Notifications$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.notifications.get
         * @desc Retrieves a notification.
         * @alias directory.notifications.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.
         * @param {string} params.notificationId The unique ID of the notification.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Notifications$Get, options?: MethodOptions): GaxiosPromise<Schema$Notification>;
        get(params: Params$Resource$Notifications$Get, options: MethodOptions | BodyResponseCallback<Schema$Notification>, callback: BodyResponseCallback<Schema$Notification>): void;
        get(params: Params$Resource$Notifications$Get, callback: BodyResponseCallback<Schema$Notification>): void;
        get(callback: BodyResponseCallback<Schema$Notification>): void;
        /**
         * directory.notifications.list
         * @desc Retrieves a list of notifications.
         * @alias directory.notifications.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer The unique ID for the customer's G Suite account.
         * @param {string=} params.language The ISO 639-1 code of the language notifications are returned in. The default is English (en).
         * @param {integer=} params.maxResults Maximum number of notifications to return per page. The default is 100.
         * @param {string=} params.pageToken The token to specify the page of results to retrieve.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Notifications$List, options?: MethodOptions): GaxiosPromise<Schema$Notifications>;
        list(params: Params$Resource$Notifications$List, options: MethodOptions | BodyResponseCallback<Schema$Notifications>, callback: BodyResponseCallback<Schema$Notifications>): void;
        list(params: Params$Resource$Notifications$List, callback: BodyResponseCallback<Schema$Notifications>): void;
        list(callback: BodyResponseCallback<Schema$Notifications>): void;
        /**
         * directory.notifications.patch
         * @desc Updates a notification. This method supports patch semantics.
         * @alias directory.notifications.patch
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer The unique ID for the customer's G Suite account.
         * @param {string} params.notificationId The unique ID of the notification.
         * @param {().Notification} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        patch(params?: Params$Resource$Notifications$Patch, options?: MethodOptions): GaxiosPromise<Schema$Notification>;
        patch(params: Params$Resource$Notifications$Patch, options: MethodOptions | BodyResponseCallback<Schema$Notification>, callback: BodyResponseCallback<Schema$Notification>): void;
        patch(params: Params$Resource$Notifications$Patch, callback: BodyResponseCallback<Schema$Notification>): void;
        patch(callback: BodyResponseCallback<Schema$Notification>): void;
        /**
         * directory.notifications.update
         * @desc Updates a notification.
         * @alias directory.notifications.update
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer The unique ID for the customer's G Suite account.
         * @param {string} params.notificationId The unique ID of the notification.
         * @param {().Notification} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        update(params?: Params$Resource$Notifications$Update, options?: MethodOptions): GaxiosPromise<Schema$Notification>;
        update(params: Params$Resource$Notifications$Update, options: MethodOptions | BodyResponseCallback<Schema$Notification>, callback: BodyResponseCallback<Schema$Notification>): void;
        update(params: Params$Resource$Notifications$Update, callback: BodyResponseCallback<Schema$Notification>): void;
        update(callback: BodyResponseCallback<Schema$Notification>): void;
    }


class Resource$Orgunits {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.orgunits.delete
         * @desc Remove organizational unit
         * @alias directory.orgunits.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string} params.orgUnitPath Full path of the organizational unit or its ID
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Orgunits$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Orgunits$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Orgunits$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.orgunits.get
         * @desc Retrieve organizational unit
         * @alias directory.orgunits.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string} params.orgUnitPath Full path of the organizational unit or its ID
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Orgunits$Get, options?: MethodOptions): GaxiosPromise<Schema$OrgUnit>;
        get(params: Params$Resource$Orgunits$Get, options: MethodOptions | BodyResponseCallback<Schema$OrgUnit>, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        get(params: Params$Resource$Orgunits$Get, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        get(callback: BodyResponseCallback<Schema$OrgUnit>): void;
        /**
         * directory.orgunits.insert
         * @desc Add organizational unit
         * @alias directory.orgunits.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {().OrgUnit} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Orgunits$Insert, options?: MethodOptions): GaxiosPromise<Schema$OrgUnit>;
        insert(params: Params$Resource$Orgunits$Insert, options: MethodOptions | BodyResponseCallback<Schema$OrgUnit>, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        insert(params: Params$Resource$Orgunits$Insert, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        insert(callback: BodyResponseCallback<Schema$OrgUnit>): void;
        /**
         * directory.orgunits.list
         * @desc Retrieve all organizational units
         * @alias directory.orgunits.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string=} params.orgUnitPath the URL-encoded organizational unit's path or its ID
         * @param {string=} params.type Whether to return all sub-organizations or just immediate children
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Orgunits$List, options?: MethodOptions): GaxiosPromise<Schema$OrgUnits>;
        list(params: Params$Resource$Orgunits$List, options: MethodOptions | BodyResponseCallback<Schema$OrgUnits>, callback: BodyResponseCallback<Schema$OrgUnits>): void;
        list(params: Params$Resource$Orgunits$List, callback: BodyResponseCallback<Schema$OrgUnits>): void;
        list(callback: BodyResponseCallback<Schema$OrgUnits>): void;
        /**
         * directory.orgunits.patch
         * @desc Update organizational unit. This method supports patch semantics.
         * @alias directory.orgunits.patch
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string} params.orgUnitPath Full path of the organizational unit or its ID
         * @param {().OrgUnit} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        patch(params?: Params$Resource$Orgunits$Patch, options?: MethodOptions): GaxiosPromise<Schema$OrgUnit>;
        patch(params: Params$Resource$Orgunits$Patch, options: MethodOptions | BodyResponseCallback<Schema$OrgUnit>, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        patch(params: Params$Resource$Orgunits$Patch, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        patch(callback: BodyResponseCallback<Schema$OrgUnit>): void;
        /**
         * directory.orgunits.update
         * @desc Update organizational unit
         * @alias directory.orgunits.update
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customerId Immutable ID of the G Suite account
         * @param {string} params.orgUnitPath Full path of the organizational unit or its ID
         * @param {().OrgUnit} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        update(params?: Params$Resource$Orgunits$Update, options?: MethodOptions): GaxiosPromise<Schema$OrgUnit>;
        update(params: Params$Resource$Orgunits$Update, options: MethodOptions | BodyResponseCallback<Schema$OrgUnit>, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        update(params: Params$Resource$Orgunits$Update, callback: BodyResponseCallback<Schema$OrgUnit>): void;
        update(callback: BodyResponseCallback<Schema$OrgUnit>): void;
    }


class Resource$Privileges {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.privileges.list
         * @desc Retrieves a paginated list of all privileges for a customer.
         * @alias directory.privileges.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Privileges$List, options?: MethodOptions): GaxiosPromise<Schema$Privileges>;
        list(params: Params$Resource$Privileges$List, options: MethodOptions | BodyResponseCallback<Schema$Privileges>, callback: BodyResponseCallback<Schema$Privileges>): void;
        list(params: Params$Resource$Privileges$List, callback: BodyResponseCallback<Schema$Privileges>): void;
        list(callback: BodyResponseCallback<Schema$Privileges>): void;
    }


class Resource$Resolvedappaccesssettings {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.resolvedAppAccessSettings.GetSettings
         * @desc Retrieves resolved app access settings of the logged in user.
         * @alias directory.resolvedAppAccessSettings.GetSettings
         * @memberOf! ()
         *
         * @param {object=} params Parameters for request
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        GetSettings(params?: Params$Resource$Resolvedappaccesssettings$Getsettings, options?: MethodOptions): GaxiosPromise<Schema$AppAccessCollections>;
        GetSettings(params: Params$Resource$Resolvedappaccesssettings$Getsettings, options: MethodOptions | BodyResponseCallback<Schema$AppAccessCollections>, callback: BodyResponseCallback<Schema$AppAccessCollections>): void;
        GetSettings(params: Params$Resource$Resolvedappaccesssettings$Getsettings, callback: BodyResponseCallback<Schema$AppAccessCollections>): void;
        GetSettings(callback: BodyResponseCallback<Schema$AppAccessCollections>): void;
        /**
         * directory.resolvedAppAccessSettings.ListTrustedApps
         * @desc Retrieves the list of apps trusted by the admin of the logged in
         * user.
         * @alias directory.resolvedAppAccessSettings.ListTrustedApps
         * @memberOf! ()
         *
         * @param {object=} params Parameters for request
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        ListTrustedApps(params?: Params$Resource$Resolvedappaccesssettings$Listtrustedapps, options?: MethodOptions): GaxiosPromise<Schema$TrustedApps>;
        ListTrustedApps(params: Params$Resource$Resolvedappaccesssettings$Listtrustedapps, options: MethodOptions | BodyResponseCallback<Schema$TrustedApps>, callback: BodyResponseCallback<Schema$TrustedApps>): void;
        ListTrustedApps(params: Params$Resource$Resolvedappaccesssettings$Listtrustedapps, callback: BodyResponseCallback<Schema$TrustedApps>): void;
        ListTrustedApps(callback: BodyResponseCallback<Schema$TrustedApps>): void;
    }


class Resource$Resources {
        context: APIRequestContext;
        buildings: Resource$Resources$Buildings;
        calendars: Resource$Resources$Calendars;
        features: Resource$Resources$Features;
        constructor(context: APIRequestContext);
    }


class Resource$Resources$Buildings {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.resources.buildings.delete
         * @desc Deletes a building.
         * @alias directory.resources.buildings.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.buildingId The ID of the building to delete.
         * @param {string} params.customer The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Resources$Buildings$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Resources$Buildings$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Resources$Buildings$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.resources.buildings.get
         * @desc Retrieves a building.
         * @alias directory.resources.buildings.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.buildingId The unique ID of the building to retrieve.
         * @param {string} params.customer The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Resources$Buildings$Get, options?: MethodOptions): GaxiosPromise<Schema$Building>;
        get(params: Params$Resource$Resources$Buildings$Get, options: MethodOptions | BodyResponseCallback<Schema$Building>, callback: BodyResponseCallback<Schema$Building>): void;
        get(params: Params$Resource$Resources$Buildings$Get, callback: BodyResponseCallback<Schema$Building>): void;
        get(callback: BodyResponseCallback<Schema$Building>): void;
        /**
         * directory.resources.buildings.insert
         * @desc Inserts a building.
         * @alias directory.resources.buildings.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string=} params.coordinatesSource Source from which Building.coordinates are derived.
         * @param {string} params.customer The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
         * @param {().Building} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Resources$Buildings$Insert, options?: MethodOptions): GaxiosPromise<Schema$Building>;
        insert(params: Params$Resource$Resources$Buildings$Insert, options: MethodOptions | BodyResponseCallback<Schema$Building>, callback: BodyResponseCallback<Schema$Building>): void;
        insert(params: Params$Resource$Resources$Buildings$Insert, callback: BodyResponseCallback<Schema$Building>): void;
        insert(callback: BodyResponseCallback<Schema$Building>): void;
        /**
         * directory.resources.buildings.list
         * @desc Retrieves a list of buildings for an account.
         * @alias directory.resources.buildings.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
         * @param {integer=} params.maxResults Maximum number of results to return.
         * @param {string=} params.pageToken Token to specify the next page in the list.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Resources$Buildings$List, options?: MethodOptions): GaxiosPromise<Schema$Buildings>;
        list(params: Params$Resource$Resources$Buildings$List, options: MethodOptions | BodyResponseCallback<Schema$Buildings>, callback: BodyResponseCallback<Schema$Buildings>): void;
        list(params: Params$Resource$Resources$Buildings$List, callback: BodyResponseCallback<Schema$Buildings>): void;
        list(callback: BodyResponseCallback<Schema$Buildings>): void;
        /**
         * directory.resources.buildings.patch
         * @desc Updates a building. This method supports patch semantics.
         * @alias directory.resources.buildings.patch
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.buildingId The ID of the building to update.
         * @param {string=} params.coordinatesSource Source from which Building.coordinates are derived.
         * @param {string} params.customer The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
         * @param {().Building} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        patch(params?: Params$Resource$Resources$Buildings$Patch, options?: MethodOptions): GaxiosPromise<Schema$Building>;
        patch(params: Params$Resource$Resources$Buildings$Patch, options: MethodOptions | BodyResponseCallback<Schema$Building>, callback: BodyResponseCallback<Schema$Building>): void;
        patch(params: Params$Resource$Resources$Buildings$Patch, callback: BodyResponseCallback<Schema$Building>): void;
        patch(callback: BodyResponseCallback<Schema$Building>): void;
        /**
         * directory.resources.buildings.update
         * @desc Updates a building.
         * @alias directory.resources.buildings.update
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.buildingId The ID of the building to update.
         * @param {string=} params.coordinatesSource Source from which Building.coordinates are derived.
         * @param {string} params.customer The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.
         * @param {().Building} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        update(params?: Params$Resource$Resources$Buildings$Update, options?: MethodOptions): GaxiosPromise<Schema$Building>;
        update(params: Params$Resource$Resources$Buildings$Update, options: MethodOptions | BodyResponseCallback<Schema$Building>, callback: BodyResponseCallback<Schema$Building>): void;
        update(params: Params$Resource$Resources$Buildings$Update, callback: BodyResponseCallback<Schema$Building>): void;
        update(callback: BodyResponseCallback<Schema$Building>): void;
    }


class Resource$Roleassignments {
        context: APIRequestContext;
        constructor(context: APIRequestContext);
        /**
         * directory.roleAssignments.delete
         * @desc Deletes a role assignment.
         * @alias directory.roleAssignments.delete
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string} params.roleAssignmentId Immutable ID of the role assignment.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        delete(params?: Params$Resource$Roleassignments$Delete, options?: MethodOptions): GaxiosPromise<void>;
        delete(params: Params$Resource$Roleassignments$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
        delete(params: Params$Resource$Roleassignments$Delete, callback: BodyResponseCallback<void>): void;
        delete(callback: BodyResponseCallback<void>): void;
        /**
         * directory.roleAssignments.get
         * @desc Retrieve a role assignment.
         * @alias directory.roleAssignments.get
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {string} params.roleAssignmentId Immutable ID of the role assignment.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        get(params?: Params$Resource$Roleassignments$Get, options?: MethodOptions): GaxiosPromise<Schema$RoleAssignment>;
        get(params: Params$Resource$Roleassignments$Get, options: MethodOptions | BodyResponseCallback<Schema$RoleAssignment>, callback: BodyResponseCallback<Schema$RoleAssignment>): void;
        get(params: Params$Resource$Roleassignments$Get, callback: BodyResponseCallback<Schema$RoleAssignment>): void;
        get(callback: BodyResponseCallback<Schema$RoleAssignment>): void;
        /**
         * directory.roleAssignments.insert
         * @desc Creates a role assignment.
         * @alias directory.roleAssignments.insert
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {().RoleAssignment} params.resource Request body data
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        insert(params?: Params$Resource$Roleassignments$Insert, options?: MethodOptions): GaxiosPromise<Schema$RoleAssignment>;
        insert(params: Params$Resource$Roleassignments$Insert, options: MethodOptions | BodyResponseCallback<Schema$RoleAssignment>, callback: BodyResponseCallback<Schema$RoleAssignment>): void;
        insert(params: Params$Resource$Roleassignments$Insert, callback: BodyResponseCallback<Schema$RoleAssignment>): void;
        insert(callback: BodyResponseCallback<Schema$RoleAssignment>): void;
        /**
         * directory.roleAssignments.list
         * @desc Retrieves a paginated list of all roleAssignments.
         * @alias directory.roleAssignments.list
         * @memberOf! ()
         *
         * @param {object} params Parameters for request
         * @param {string} params.customer Immutable ID of the G Suite account.
         * @param {integer=} params.maxResults Maximum number of results to return.
         * @param {string=} params.pageToken Token to specify the next page in the list.
         * @param {string=} params.roleId Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.
         * @param {string=} params.userKey The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.
         * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
         * @param {callback} callback The callback that handles the response.
         * @return {object} Request object
         */
        list(params?: Params$Resource$Roleassignments$List, options?: MethodOptions): GaxiosPromise<Schema$RoleAssignments>;
        list(params: Params$Resource$Roleassignments$List, options: MethodOptions | BodyResponseCallback<Schema$RoleAssignments>, callback: BodyResponseCallback<Schema$RoleAssignments>): void;
        list(params: Params$Resource$Roleassignments$List, callback: BodyResponseCallback<Schema$RoleAssignments>): void;
        list(callback: BodyResponseCallback<Schema$RoleAssignments>): void;
    }