1616
1717package functions ;
1818
19- // [START cloudfunctions_imagemagick_setup ]
19+ // [START functions_imagemagick_setup ]
2020
2121import com .google .cloud .functions .CloudEventsFunction ;
2222import com .google .cloud .storage .Blob ;
@@ -50,9 +50,9 @@ public class ImageMagick implements CloudEventsFunction {
5050 private static Storage storage = StorageOptions .getDefaultInstance ().getService ();
5151 private static final String BLURRED_BUCKET_NAME = System .getenv ("BLURRED_BUCKET_NAME" );
5252 private static final Logger logger = Logger .getLogger (ImageMagick .class .getName ());
53- // [END cloudfunctions_imagemagick_setup ]
53+ // [END functions_imagemagick_setup ]
5454
55- // [START cloudfunctions_imagemagick_analyze ]
55+ // [START functions_imagemagick_analyze ]
5656 @ Override
5757 // Blurs uploaded images that are flagged as Adult or Violence.
5858 public void accept (CloudEvent event ) {
@@ -100,9 +100,9 @@ public void accept(CloudEvent event) {
100100 logger .log (Level .SEVERE , "Error with Vision API: " + e .getMessage (), e );
101101 }
102102 }
103- // [END cloudfunctions_imagemagick_analyze ]
103+ // [END functions_imagemagick_analyze ]
104104
105- // [START cloudfunctions_imagemagick_blur ]
105+ // [START functions_imagemagick_blur ]
106106 // Blurs the file described by blobInfo using ImageMagick,
107107 // and uploads it to the blurred bucket.
108108 private static void blur (BlobInfo blobInfo ) throws IOException {
@@ -139,7 +139,7 @@ private static void blur(BlobInfo blobInfo) throws IOException {
139139 Files .delete (download );
140140 Files .delete (upload );
141141 }
142- // [END cloudfunctions_imagemagick_blur ]
142+ // [END functions_imagemagick_blur ]
143143
144144 // Converts CloudEvent data payload to a GcsEvent
145145 private static GcsEvent getEventData (CloudEvent event ) {
@@ -151,6 +151,6 @@ private static GcsEvent getEventData(CloudEvent event) {
151151 }
152152 return new GcsEvent ();
153153 }
154- // [START cloudfunctions_imagemagick_setup ]
154+ // [START functions_imagemagick_setup ]
155155}
156- // [END cloudfunctions_imagemagick_setup ]
156+ // [END functions_imagemagick_setup ]
0 commit comments