@@ -0,0 +1,2282 @@
+/*%0A *%0A *  * Copyright 2020 Google Inc. All Rights Reserved.%0A *  *%0A *  * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  * you may not use this file except in compliance with the License.%0A *  * You may obtain a copy of the License at%0A *  *%0A *  *    http://www.apache.org/licenses/LICENSE-2.0%0A *  *%0A *  * Unless required by applicable law or agreed to in writing, software%0A *  * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  * See the License for the specific language governing permissions and%0A *  * limitations under the License.%0A *%0A */%0A%0Apackage com.google.cloud.hadoop.ranger.gcs.utilities;%0A%0Apublic class RangerGcsPermissionCheckResult %7B%0A    private static final String ALLOW_MSG = %22Access allowed.%22;%0A    private static final String DENY_MSG = %22Access denied.%22;%0A%0A    private String message;%0A    private RangerGcsPermissionCheckResultEnum type;%0A%0A    private RangerGcsPermissionCheckResult(String msg, RangerGcsPermissionCheckResultEnum type) %7B%0A        this.message = msg;%0A        this.type = type;%0A    %7D%0A%0A    public static RangerGcsPermissionCheckResult Allow() %7B%0A        return new RangerGcsPermissionCheckResult(ALLOW_MSG, RangerGcsPermissionCheckResultEnum.ALLOW);%0A    %7D%0A%0A    public static RangerGcsPermissionCheckResult Deny() %7B%0A        return new RangerGcsPermissionCheckResult(DENY_MSG, RangerGcsPermissionCheckResultEnum.DENY);%0A    %7D%0A%0A    public String getMessage() %7B%0A        return this.message;%0A    %7D%0A%0A    public void setMessage(String message) %7B%0A        this.message = message;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return String.format(%22%25s(%25s)%22, this.type, this.message);%0A    %7D%0A%0A    /**%0A     * Compare equality. Only the result matters. Don't care about message.%0A     */%0A    public boolean equals(RangerGcsPermissionCheckResult other) %7B%0A        return this.type.equals(other.type);%0A    %7D%0A%0A    private enum RangerGcsPermissionCheckResultEnum %7B%0A        ALLOW(%22Allow%22), DENY(%22Deny%22);%0A%0A        private final String type;%0A%0A        private RangerGcsPermissionCheckResultEnum(String type) %7B%0A            this.type = type;%0A        %7D%0A%0A        @Override%0A        public String toString() %7B%0A            return this.type;%0A        %7D%0A    %7D%0A%7D%0A

Implement utility sub-module